/* =========================
   PRODUCT INDEX PAGE
========================= */

.product-index-page {
  width: 100%;
  min-height: 100vh;
  padding: 120px 7% 80px;
  background:
    radial-gradient(
      circle at top left,
      rgba(154, 111, 62, 0.12),
      transparent 34%
    ),
    linear-gradient(180deg, #f7f1e8 0%, #efe3d2 100%);
  color: #2f241b;
}

.product-index-hero {
  max-width: 780px;
  margin: 0 auto 38px;
  text-align: center;
}

.product-index-hero span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(111, 63, 32, 0.09);
  color: #8a5a32;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.product-index-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.02;
  color: #2f241b;
  font-family: Georgia, serif;
}

.product-index-hero p {
  max-width: 680px;
  margin: 0 auto;
  color: #6f5b49;
  font-size: 16px;
  line-height: 1.8;
}

/* ALERT */
.product-alert {
  max-width: 1180px;
  margin: 0 auto 26px;
  padding: 15px 18px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 14px;
  font-weight: 700;
}

.product-alert.success {
  background: #e6f4df;
  color: #315b25;
  border: 1px solid #bddcac;
}

.product-alert.error {
  background: #fde8e3;
  color: #8a2f1f;
  border: 1px solid #efb5a9;
}

.product-alert a {
  color: inherit;
  font-weight: 900;
  text-decoration: underline;
  white-space: nowrap;
}

/* CATEGORY FILTER */
.product-category-filter {
  max-width: 1180px;
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.product-category-filter a {
  flex: 0 0 auto;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.78);
  border: 1px solid rgba(111, 63, 32, 0.15);
  color: #3b2a1d;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  transition: 0.22s ease;
}

.product-category-filter a:hover,
.product-category-filter a.active {
  background: #56692f;
  color: #fff;
  border-color: #56692f;
}

/* GRID */
.product-index-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

/* CARD */
.product-index-card {
  background: rgba(255, 250, 243, 0.96);
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(111, 63, 32, 0.13);
  box-shadow: 0 22px 60px rgba(69, 43, 24, 0.1);
  transition: 0.25s ease;
}

.product-index-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 75px rgba(69, 43, 24, 0.16);
}

.product-index-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #eadfce;
  overflow: hidden;
}

.product-index-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.35s ease;
}

.product-index-card:hover .product-index-image img {
  transform: scale(1.06);
}

.product-index-body {
  padding: 20px;
}

.product-tag {
  display: inline-block;
  margin-bottom: 10px;
  color: #8a5a32;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.product-index-body h2 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.28;
}

.product-index-body h2 a {
  color: #2f241b;
  text-decoration: none;
}

.product-index-body h2 a:hover {
  color: #56692f;
}

.product-index-body p {
  min-height: 44px;
  margin: 0 0 18px;
  color: #6f5b49;
  font-size: 14px;
  line-height: 1.6;
}

.product-index-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.product-index-bottom strong {
  color: #2f241b;
  font-size: 16px;
  font-weight: 900;
}

.product-detail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: #56692f;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  transition: 0.22s ease;
}

.product-detail-btn:hover {
  background: #3f4d25;
  transform: translateY(-2px);
}

/* EMPTY */
.product-empty-card {
  max-width: 520px;
  margin: 0 auto;
  padding: 45px 35px;
  text-align: center;
  background: #fffaf3;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(69, 43, 24, 0.12);
  border: 1px solid rgba(138, 90, 50, 0.14);
}

.product-empty-card h2 {
  margin: 0 0 12px;
  color: #2f241b;
  font-size: 30px;
  font-family: Georgia, serif;
}

.product-empty-card p {
  margin: 0 0 24px;
  color: #6f5b49;
  line-height: 1.7;
}

.product-empty-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  background: #56692f;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .product-index-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .product-index-page {
    padding: 105px 5% 60px;
  }

  .product-index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (max-width: 520px) {
  .product-index-page {
    padding: 95px 16px 50px;
  }

  .product-index-hero {
    margin-bottom: 30px;
  }

  .product-index-hero p {
    font-size: 14px;
  }

  .product-alert {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-index-grid {
    grid-template-columns: 1fr;
  }

  .product-index-card {
    border-radius: 24px;
  }
}

/* =========================
   DARK MODE - PRODUCT INDEX
========================= */

body.dark-mode .product-index-page {
  background:
    radial-gradient(
      circle at top left,
      rgba(177, 143, 90, 0.14),
      transparent 34%
    ),
    linear-gradient(180deg, #171b13 0%, #232617 100%);
  color: #f5ead9;
}

body.dark-mode .product-index-hero span {
  background: rgba(214, 181, 122, 0.12);
  color: #d9b979;
}

body.dark-mode .product-index-hero h1 {
  color: #f7ead3;
}

body.dark-mode .product-index-hero p {
  color: #c5b69f;
}

/* ALERT DARK */
body.dark-mode .product-alert.success {
  background: rgba(82, 112, 51, 0.22);
  color: #dff0ce;
  border-color: rgba(164, 199, 122, 0.25);
}

body.dark-mode .product-alert.error {
  background: rgba(120, 46, 34, 0.25);
  color: #ffd6cc;
  border-color: rgba(239, 181, 169, 0.25);
}

/* FILTER DARK */
body.dark-mode .product-category-filter a {
  background: rgba(255, 250, 243, 0.07);
  border-color: rgba(245, 234, 217, 0.12);
  color: #dfcfb8;
}

body.dark-mode .product-category-filter a:hover,
body.dark-mode .product-category-filter a.active {
  background: #d9b979;
  color: #1d2116;
  border-color: #d9b979;
}

/* CARD DARK */
body.dark-mode .product-index-card {
  background: rgba(36, 41, 27, 0.96);
  border-color: rgba(245, 234, 217, 0.11);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

body.dark-mode .product-index-card:hover {
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

body.dark-mode .product-index-image {
  background: #2f3324;
}

body.dark-mode .product-tag {
  color: #d9b979;
}

body.dark-mode .product-index-body h2 a {
  color: #f7ead3;
}

body.dark-mode .product-index-body h2 a:hover {
  color: #d9b979;
}

body.dark-mode .product-index-body p {
  color: #c5b69f;
}

body.dark-mode .product-index-bottom strong {
  color: #f7ead3;
}

body.dark-mode .product-detail-btn {
  background: #d9b979;
  color: #1d2116;
}

body.dark-mode .product-detail-btn:hover {
  background: #f0d28e;
}

/* EMPTY DARK */
body.dark-mode .product-empty-card {
  background: rgba(36, 41, 27, 0.96);
  border-color: rgba(245, 234, 217, 0.11);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

body.dark-mode .product-empty-card h2 {
  color: #f7ead3;
}

body.dark-mode .product-empty-card p {
  color: #c5b69f;
}

body.dark-mode .product-empty-card a {
  background: #d9b979;
  color: #1d2116;
}
