/* discounts: LIST page — СТРОГО ВНУТРИ #discounts-page */

#discounts-page .wrap {
  max-width:1180px;
  margin:24px auto;
  padding:0 16px;
}

#discounts-page .layout {
  display:grid;
  grid-template-columns:1fr 320px;
  gap:20px;
}

#discounts-page .card {
  background:#fff;
  border:1px solid #eee;
  border-radius:14px;
  box-shadow:0 4px 14px rgba(0,0,0,.05);
  overflow:hidden;
}

#discounts-page .card h2 {
  margin:0;
  padding:16px 18px;
  border-bottom:1px solid #f0f0f0;
}

#discounts-page .content {
  padding:16px 18px;
}

/* grid */
#discounts-page .grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  gap:16px;
}

#discounts-page .product {
  border:1px solid #eee;
  border-radius:14px;
  overflow:hidden;
  background:#fff;
}

#discounts-page .img-wrap {
  position:relative;
  height:180px;
  overflow:hidden;
}

#discounts-page .img-wrap img {
  width:100%;
  height:100%;
  object-fit:cover;
}

#discounts-page .badge {
  position:absolute;
  top:10px;
  left:10px;
  padding:6px 10px;
  border-radius:999px;
  background:#ff3b30;
  color:#fff;
  font-weight:700;
}

#discounts-page .p-body {
  padding:12px;
}

#discounts-page .title {
  font-weight:700;
  margin-bottom:6px;
}

#discounts-page .muted {
  color:#666;
  font-size:12px;
}

#discounts-page .contacts a {
  display:inline-block;
  margin-right:10px;
  text-decoration:none;
}

/* sidebar form (компактный вид внутри списка) */
#discounts-page .field {
  display:flex;
  flex-direction:column;
  margin-bottom:12px;
}

#discounts-page label {
  font-weight:600;
  margin-bottom:6px;
}

#discounts-page input[type="text"],
#discounts-page input[type="number"],
#discounts-page input[type="url"],
#discounts-page input[type="date"],
#discounts-page input[type="file"] {
  padding:10px 12px;
  border:1px solid #ddd;
  border-radius:10px;
  font-size:14px;
  background:#fff;
}

#discounts-page .help {
  font-size:12px;
  color:#666;
  margin-top:4px;
}

#discounts-page .err {
  color:#b00020;
  font-size:12px;
  margin-top:4px;
}

/* ВАЖНО: .btn только внутри блока скидок,
   чтобы не трогать кнопку в шапке */
#discounts-page .btn {
  display:inline-block;
  padding:10px 14px;
  border:0;
  border-radius:10px;
  cursor:pointer;
  font-weight:700;
  background:#2a7fff;
  color:#fff;
}

#discounts-page .note {
  background:#f5fbff;
  border:1px dashed #b5d9ff;
  border-radius:10px;
  padding:10px 12px;
  margin:10px 0;
  color:#245;
}

#discounts-page .messages {
  margin-bottom:12px;
}

#discounts-page .messages .ok {
  background:#e7f7e9;
  border:1px solid #bfe8c6;
  color:#1d6a2e;
  padding:8px 10px;
  border-radius:10px;
}

/* filters */
#discounts-page .card h3 {
  margin: 0 0 12px;
}

#discounts-page .filter-select,
#discounts-page .card select,
#discounts-page .card input[type="range"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
  margin-bottom: 12px;
}

#discounts-page .card label.muted {
  display:block;
  margin:8px 0 6px;
  font-size:13px;
  color:#555;
}

#discounts-page .card .btn {
  width: 100%;
}

/* адаптив */
@media (max-width:960px){
  #discounts-page .layout{
    grid-template-columns:1fr;
  }
}
