/**
 * Leather 1X — Product Grid styles
 * Dark theme, gold accents, glassmorphism cards
 */

/* ── Wrapper ──────────────────────────────────────────────── */
.l1x-pgrid {
  width: min(100% - 32px, var(--container, 1360px));
  margin: 0 auto;
  padding: 48px 0 80px;
}

/* ── Section Title ────────────────────────────────────────── */
.l1x-pgrid__title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text, #f5f0e8);
  margin-bottom: 32px;
}

/* ── Filter Tabs ──────────────────────────────────────────── */
.l1x-pgrid__tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}

.l1x-pgrid__tabs::-webkit-scrollbar {
  display: none;
}

.l1x-pgrid__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted, #8a8478);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: all 0.25s ease;
}

.l1x-pgrid__tab:hover {
  border-color: rgba(201, 169, 106, 0.25);
  color: var(--text, #f5f0e8);
}

.l1x-pgrid__tab.is-active {
  border-color: var(--gold, #c9a96a);
  background: rgba(201, 169, 106, 0.10);
  color: var(--gold, #c9a96a);
}

/* ── Grid ─────────────────────────────────────────────────── */
.l1x-pgrid__grid {
  display: grid;
  grid-template-columns: repeat(var(--pgrid-cols, 4), 1fr);
  gap: 24px;
}

.l1x-pgrid__empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted, #8a8478);
  padding: 60px 20px;
}

/* ── Card ─────────────────────────────────────────────────── */
.l1x-pgrid__card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.l1x-pgrid__card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 169, 106, 0.20);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(201, 169, 106, 0.08);
}

.l1x-pgrid__card.is-hidden {
  display: none;
}

.l1x-pgrid__card.is-entering {
  opacity: 0;
  transform: translateY(16px);
  animation: l1x-pgrid-enter 0.4s ease forwards;
}

@keyframes l1x-pgrid-enter {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Card Link ────────────────────────────────────────────── */
.l1x-pgrid__card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: inherit;
}

/* ── Image ────────────────────────────────────────────────── */
.l1x-pgrid__img-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.l1x-pgrid__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.l1x-pgrid__card:hover .l1x-pgrid__img {
  transform: scale(1.06);
}

/* ── Badges ───────────────────────────────────────────────── */
.l1x-pgrid__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  z-index: 2;
}

.l1x-pgrid__badge--sale {
  background: var(--gold, #c9a96a);
  color: #1a1a1a;
}

.l1x-pgrid__badge--new {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text, #f5f0e8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* ── Info ─────────────────────────────────────────────────── */
.l1x-pgrid__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
}

.l1x-pgrid__cat {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold, #c9a96a);
  opacity: 0.75;
}

.l1x-pgrid__name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text, #f5f0e8);
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.l1x-pgrid__price {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text, #f5f0e8);
  margin-top: 2px;
}

.l1x-pgrid__price del {
  color: var(--muted, #8a8478);
  font-weight: 400;
  font-size: 0.78rem;
}

.l1x-pgrid__price ins {
  text-decoration: none;
  color: var(--gold, #c9a96a);
}

/* ── Rating Stars ─────────────────────────────────────────── */
.l1x-pgrid__rating {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
}

.l1x-pgrid__star {
  fill: rgba(255, 255, 255, 0.12);
}

.l1x-pgrid__star.is-filled {
  fill: var(--gold, #c9a96a);
}

.l1x-pgrid__review-count {
  font-size: 0.72rem;
  color: var(--muted, #8a8478);
  margin-left: 4px;
}

/* ── Add to Cart Button ───────────────────────────────────── */
.l1x-pgrid__atc {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  border: 1px solid rgba(201, 169, 106, 0.25);
  background: linear-gradient(180deg, rgba(138, 63, 24, 0.90), rgba(90, 38, 12, 0.90));
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  text-decoration: none;
  -webkit-appearance: none;
  appearance: none;
  transition: all 0.25s ease;
}

.l1x-pgrid__atc:hover {
  border-color: rgba(201, 169, 106, 0.45);
  box-shadow: 0 6px 20px rgba(138, 63, 24, 0.30);
  transform: translateY(-1px);
}

.l1x-pgrid__atc.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.l1x-pgrid__atc--options {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.10);
  color: var(--text, #f5f0e8);
}

.l1x-pgrid__atc--options:hover {
  border-color: rgba(201, 169, 106, 0.30);
  background: rgba(201, 169, 106, 0.06);
  color: var(--gold, #c9a96a);
  box-shadow: none;
}

.l1x-pgrid__atc--oos {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

/* ── Load More ────────────────────────────────────────────── */
.l1x-pgrid__load-wrap {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.l1x-pgrid__load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 36px;
  border-radius: 999px;
  border: 1px solid rgba(201, 169, 106, 0.20);
  background: rgba(201, 169, 106, 0.04);
  color: var(--gold, #c9a96a);
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: all 0.25s ease;
}

.l1x-pgrid__load-more:hover {
  background: rgba(201, 169, 106, 0.10);
  border-color: rgba(201, 169, 106, 0.40);
  transform: translateY(-1px);
}

.l1x-pgrid__load-more.is-loading {
  opacity: 0.5;
  pointer-events: none;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .l1x-pgrid__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 767px) {
  .l1x-pgrid {
    padding: 32px 0 60px;
  }

  .l1x-pgrid__title {
    font-size: 1.4rem;
    margin-bottom: 20px;
  }

  .l1x-pgrid__tabs {
    margin-bottom: 20px;
  }

  .l1x-pgrid__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Mobile carousel mode */
  .l1x-pgrid[data-mobile-carousel="1"] .l1x-pgrid__grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 12px;
    padding-bottom: 4px;
  }

  .l1x-pgrid[data-mobile-carousel="1"] .l1x-pgrid__grid::-webkit-scrollbar {
    display: none;
  }

  .l1x-pgrid[data-mobile-carousel="1"] .l1x-pgrid__card {
    flex: 0 0 72vw;
    scroll-snap-align: center;
  }

  .l1x-pgrid__info {
    padding: 12px;
  }

  .l1x-pgrid__name {
    font-size: 0.84rem;
  }

  .l1x-pgrid__price {
    font-size: 0.82rem;
  }

  .l1x-pgrid__atc {
    width: calc(100% - 24px);
    margin: 0 12px 12px;
    padding: 8px 12px;
    font-size: 0.78rem;
    border-radius: 10px;
  }
}

@media (max-width: 400px) {
  .l1x-pgrid__grid {
    gap: 8px;
  }

  .l1x-pgrid__img-wrap {
    aspect-ratio: 4/5;
  }
}
