:root {
  --primary-font: "Montserrat", sans-serif;
  --box: #ffffff;
  --background: #f7efef;
  --site-primary: #d12c62;
  --site-accent: #519e87;
  --product-card-min: 178px;
  --section-content-max: 1320px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--primary-font);
}

body {
  background: var(--background);
}

.top_sale {
  width: min(var(--section-content-max), 94vw);
  margin: 0 auto;
  background: var(--box);
  position: relative;
  margin-top: 80px;
}

.product-list__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 10px 6px;
}

.top_sale span {
  font-size: 18px;
  font-weight: 500;
  margin: 0;
  display: inline-block;
}

hr {
  height: 1px;
  background-color: #7e7a7a;
  border: none;
  width: 90%;
  margin: 0 auto;
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  margin: 10px 10px 18px;
  padding: 18px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(209, 44, 98, 0.08), rgba(81, 158, 135, 0.08));
  border: 1px solid rgba(0,0,0,0.06);
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: start;
}

.empty-state__icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.07);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 22px rgba(0,0,0,0.06);
}

.empty-state__icon svg {
  width: 22px;
  height: 22px;
  color: var(--site-primary);
}

.empty-state__title {
  font-weight: 700;
  font-size: 15px;
  color: #222;
  margin: 2px 0 4px;
}

.empty-state__text {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

.empty-state__actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.empty-state__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, color 0.15s;
}

.empty-state__btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--site-primary), #b02052);
  box-shadow: 0 10px 20px rgba(209, 44, 98, 0.25);
}

.empty-state__btn--primary:hover {
  transform: translateY(-1px);
}

.empty-state__btn--ghost {
  background: #fff;
  color: var(--site-primary);
  border-color: rgba(209, 44, 98, 0.35);
}

.empty-state__btn--ghost:hover {
  background: rgba(209, 44, 98, 0.06);
}

/* Filters */
.product-filters {
  padding: 12px 12px 0;
}

.product-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}

.product-search input {
  width: 100%;
  border: 1px solid #ddd;
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
  background: #fff;
}

.product-search button {
  border: none;
  background: var(--site-primary);
  color: #fff;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.product-filters__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.product-filters__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.product-filters__field span {
  font-size: 12px;
  color: #666;
  font-weight: 600;
}

.product-filters select {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px 10px;
  background: #fff;
  font-size: 13px;
  outline: none;
}

.product-filters__actions {
  padding: 10px 2px 6px;
  text-align: right;
}

.product-filters__clear {
  font-size: 12px;
  text-decoration: none;
  color: var(--site-primary);
  font-weight: 600;
}

/* Cards */
.cards {
  flex-wrap: wrap;
  gap: clamp(6px, 1.8vw, 20px);
  padding: clamp(8px, 1.5vw, 16px) clamp(5px, 1.2vw, 12px) 20px;
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(min(var(--product-card-min), 100%), 1fr)
  );
}

.card {
  background: var(--box);
  width: 100%;
  min-width: 0;
  text-align: center;
  transition: transform 0.3s;
  padding-bottom: 12px;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: rgb(0, 0, 0);
  min-width: 0;
}

.card img {
  width: 100%;
  aspect-ratio: 360 / 400;
  height: auto;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
}

.card-title,
.card p {
  font-size: 13px;
  line-height: 1.3em;
  margin: 5px 10px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.card span {
  font-size: 12px;
  color: gray;
  padding: 0;
  margin-top: 0;
}

.price span:nth-of-type(2) {
  color: #519E87;
  font-weight: 600;
  padding: 0;
}

.price span:nth-of-type(1) {
  color: #D12C62;
  font-weight: 600;
  font-size: 18px;
  padding: 0;
}

.price_2 span {
  color: #519E87;
  font-weight: 600;
  font-size: 18px;
  padding: 0;
}

.card-meta {
  margin-top: auto;
  padding: 4px 10px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  align-content: center;
  flex-wrap: wrap;
  column-gap: 6px;
  row-gap: 4px;
  min-width: 0;
  font-size: clamp(10px, 2.5vw, 12px);
}

.card-meta .meta-item,
.card-meta .meta-separator {
  margin: 0;
  flex: 0 1 auto;
}

.card-meta .meta-item {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta .meta-separator {
  flex: 0 0 auto;
}

.load {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

/* Load more button */
.load button,
.load #loadMoreBtn {
  appearance: none;
  border: none;
  border-radius: 14px;
  padding: 12px 20px;
  min-width: 180px;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 12px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--site-primary), #b02052);
  color: #fff;
  box-shadow: 0 14px 26px rgba(209, 44, 98, 0.25);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s, opacity 0.15s;
}

.load button:hover,
.load #loadMoreBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(209, 44, 98, 0.30);
  filter: brightness(1.02);
}

.load button:active,
.load #loadMoreBtn:active {
  transform: translateY(0px) scale(0.99);
  box-shadow: 0 10px 20px rgba(209, 44, 98, 0.22);
}

.load button[disabled],
.load #loadMoreBtn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

/* Responsive */
@media (max-width: 768px) {
  .top_sale {
    width: 100%;
    margin-top: 40px;
  }

  .product-filters__row {
    grid-template-columns: 1fr;
  }

  .product-search {
    grid-template-columns: 1fr;
  }

  .cards {
    gap: 10px;
    padding: 12px 8px 18px;
  }

  .card img {
    aspect-ratio: 360 / 400;
    height: auto;
    margin-bottom: 6px;
  }

  .card-title,
  .card p {
    font-size: 10px;
    margin: 2px 4px;
    line-height: 1.15;
  }

  .card span {
    font-size: 9px;
  }

  .price span:nth-of-type(1),
  .price_2 span {
    font-size: 12px;
  }

  .card-meta {
    gap: 4px;
    padding: 4px 6px 0;
  }

  .empty-state {
    margin: 8px 8px 14px;
    padding: 14px 12px;
    grid-template-columns: 42px 1fr;
  }

  .empty-state__icon {
    width: 42px;
    height: 42px;
  }

  .empty-state__title {
    font-size: 14px;
  }

  .empty-state__text {
    font-size: 12px;
  }

  .load button,
  .load #loadMoreBtn {
    min-width: 160px;
    padding: 11px 16px;
  }
}

