/* ===== Gaia Boutique: shop listing page ===== */

.shop-main {
  padding-top: 70px;
}

/* ===== intro ===== */
.shop-intro {
  display: flex;
  align-items: flex-end;
  gap: 40px;
  padding: 56px 40px 40px;
}
.shop-intro-left {
  flex: 0 0 40%;
  max-width: 40%;
}
.shop-intro-left h1 {
  font-family: var(--font-serif);
  font-size: 64px;
  font-weight: 400;
  text-transform: uppercase;
  margin: 12px 0 16px;
  line-height: 1.05;
}
.shop-intro-left p {
  max-width: 420px;
}
.shop-intro-right {
  flex: 1 1 60%;
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.shop-cat-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  user-select: none;
  scroll-behavior: smooth;
  flex: 1 1 auto;
  min-width: 0;
}
.shop-cat-row::-webkit-scrollbar {
  display: none;
}
.shop-cat-row.dragging {
  cursor: grabbing;
}
.shop-cat {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shop-cat-img {
  width: 200px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}
.shop-cat-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
}
.shop-cat-name {
  font-family: var(--font-sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  width: fit-content;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.shop-cat.is-active .shop-cat-name {
  border-bottom-color: var(--black);
}
.shop-cat-next {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.2);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--dur) var(--ease);
}
.shop-cat-next:hover {
  border-color: var(--black);
}

/* ===== filter bar ===== */
.shop-bar {
  position: sticky;
  top: 70px;
  z-index: 5;
  background: var(--white);
  border-top: 1px solid rgba(0,0,0,.1);
  border-bottom: 1px solid rgba(0,0,0,.1);
}
.shop-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 40px;
}
.shop-filters-btn,
.shop-sort-btn {
  font-family: var(--font-sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.shop-chips {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1 1 auto;
  justify-content: center;
}
.shop-chips::-webkit-scrollbar {
  display: none;
}
.shop-chip {
  font-family: var(--font-sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.shop-chip.is-active {
  border-bottom-color: var(--black);
}
.shop-filters-panel {
  display: flex;
  gap: 64px;
  padding: 0 40px 24px;
  flex-wrap: wrap;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.filter-group-label {
  font-family: var(--font-sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(0,0,0,.5);
  margin-bottom: 4px;
}
.filter-group label {
  font-family: var(--font-sans);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.shop-sort-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  padding: 0 40px 24px;
}
.shop-filters-panel[hidden],
.shop-sort-panel[hidden] {
  display: none;
}
.sort-opt {
  font-family: var(--font-sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(0,0,0,.5);
}
.sort-opt[aria-pressed="true"] {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.shop-count {
  padding: 24px 40px 0;
  color: rgba(0,0,0,.5);
}

/* ===== grid ===== */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 8px;
  row-gap: 40px;
  padding: 40px;
}
.shop-grid .card {
  width: auto;
  flex: none;
}
/* The shared 2:3 card frame in styles.css is right for the grid too, so the
   old square override is gone. */
.card--sold .card-media img {
  filter: grayscale(1);
}
.card-sold {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-family: var(--font-sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--black);
}

.shop-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(0,0,0,.6);
}
.shop-empty .btn {
  display: block;
  margin: 24px auto 0;
  width: fit-content;
}

@media (prefers-reduced-motion: reduce) {
  .shop-cat-row {
    scroll-behavior: auto;
  }
}

/* ===== responsive ===== */
@media (max-width: 1023px) {
  .shop-intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 40px 16px 24px;
  }
  .shop-intro-left {
    flex: none;
    max-width: 100%;
  }
  .shop-intro-left h1 {
    font-size: 48px;
  }
  .shop-intro-right {
    width: 100%;
  }
  .shop-bar-row {
    padding: 16px;
  }
  .shop-filters-panel,
  .shop-sort-panel {
    padding: 0 16px 20px;
  }
  .shop-count {
    padding: 20px 16px 0;
  }
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 24px 16px;
  }
}

@media (max-width: 767px) {
  .shop-intro-left h1 {
    font-size: 40px;
  }
  .shop-bar-row {
    gap: 8px;
  }
  .shop-filters-btn,
  .shop-sort-btn {
    font-size: 13px;
  }
  .shop-chips {
    justify-content: flex-start;
    gap: 16px;
  }
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 16px;
    column-gap: 6px;
    row-gap: 28px;
  }
}

/* A piece her designer made once. Quiet mark, bottom left of the photograph,
   so it reads as a fact about the garment rather than a sales badge. */
.card-only {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 4px 8px;
  background: rgba(255,255,255,.88);
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--black);
  pointer-events: none;
}

/* The category rail was pinned to 200px cards at every width. */
@media (max-width: 767px) {
  .shop-cat {
    flex: 0 0 132px;
  }
  .shop-cat-img {
    width: 132px;
  }
}

/* Shop cards fade in as each batch is added (see drawBatch in shop.js). */
.card-in { animation: cardIn .45s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .card-in { animation: none; } }
