/* ============================================================
   Bianca Kau · shop.css
   Styles specific to /shop.html — filter sidebar + product grid.
   All colour/type tokens come from main.css; never redefined here.
   ============================================================ */

/* ---------------------------------------------------------- page header */
.shop-header {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(3rem, 7vw, 5.5rem) var(--pad) clamp(2rem, 4vw, 3rem);
}
.shop-header .kicker {
  margin-bottom: .6rem;
}
.shop-header h1 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.018em;
  color: var(--ink);
  text-wrap: balance;
  margin-top: .3rem;
}
.shop-header h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--clay);
}
.shop-header__lede {
  font-size: clamp(1.05rem, 1vw + .9rem, 1.28rem);
  color: var(--ink-soft);
  max-width: 52ch;
  margin-top: 1rem;
  line-height: 1.55;
  text-wrap: pretty;
}
.shop-header__note {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  margin-top: 1.4rem;
  font-size: .9rem;
  color: var(--ink-faint);
  font-style: italic;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: .38em 1em .38em .75em;
  background: var(--paper);
}
.shop-header__note::before {
  content: "";
  display: inline-block;
  width: .45em;
  height: .45em;
  border-radius: 50%;
  background: var(--ochre);
  flex: none;
}

/* ---------------------------------------------------------- rule below header */
.shop-rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* ---------------------------------------------------------- two-column shop layout */
.shop {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3.5rem) var(--pad) clamp(4rem, 8vw, 6rem);
  display: grid;
  grid-template-columns: clamp(180px, 20vw, 240px) 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

@media (max-width: 820px) {
  .shop {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ---------------------------------------------------------- filter sidebar */
.shop__filters {
  position: sticky;
  top: calc(64px + 1.5rem); /* below the nav */
  padding: 1.5rem 1.4rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
}

@media (max-width: 820px) {
  .shop__filters {
    position: static;
    margin-bottom: 2rem;
    border-radius: 6px;
  }
}

.filters__heading {
  font-family: var(--text);
  font-size: .72rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-faint);
  margin-bottom: 1.1rem;
  font-variant: small-caps;
}

.filters__group {
  margin-bottom: 1.6rem;
}
.filters__group + .filters__group {
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
}

.filters__group-label {
  font-family: var(--text);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: .8rem;
  display: block;
}

/* checkbox list */
.filters__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.filters__item label {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .92rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color .2s;
  line-height: 1.3;
}
.filters__item label:hover {
  color: var(--clay);
}

/* custom checkbox */
.filters__item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.05rem;
  height: 1.05rem;
  border: 1.5px solid color-mix(in oklab, var(--ink) 30%, var(--oat));
  border-radius: 3px;
  background: var(--cream);
  cursor: pointer;
  flex: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
  position: relative;
}
.filters__item input[type="checkbox"]:checked {
  background: var(--clay);
  border-color: var(--clay);
}
.filters__item input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10' fill='none' stroke='%23FBF7EF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1.5 5 4.5 8 10.5 2'/%3E%3C/svg%3E");
  background-size: 62% 62%;
  background-repeat: no-repeat;
  background-position: center;
}
.filters__item input[type="checkbox"]:focus-visible {
  outline: 2.5px solid var(--clay);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--clay) 18%, transparent);
}

/* price placeholder */
.filters__price-hint {
  font-size: .86rem;
  color: var(--ink-faint);
  font-style: italic;
  line-height: 1.45;
  margin-top: .2rem;
}

/* filter count badge */
.filters__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35em;
  height: 1.35em;
  padding: 0 .3em;
  border-radius: 999px;
  background: color-mix(in oklab, var(--clay) 12%, var(--cream));
  color: var(--clay);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-left: auto;
  font-style: normal;
  transition: background .2s, color .2s;
}
.filters__item input[type="checkbox"]:checked ~ .filters__count,
.filters__item:has(input:checked) .filters__count {
  background: var(--clay);
  color: var(--cream);
}

/* clear link */
.filters__clear {
  display: none; /* shown via JS when any box is checked */
  font-size: .8rem;
  color: var(--clay);
  text-decoration: none;
  letter-spacing: .04em;
  margin-top: 1.2rem;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--text);
  padding: 0;
  transition: color .2s;
}
.filters__clear:hover { color: var(--clay-deep); text-decoration: underline; }
.filters__clear.visible { display: inline-block; }

/* ---------------------------------------------------------- product grid */
.shop__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(180px, 22vw, 260px), 1fr));
  gap: clamp(1.2rem, 2.5vw, 1.8rem);
}

/* empty-state when all filtered out */
.shop__empty {
  display: none;
  grid-column: 1 / -1;
  padding: clamp(3rem, 8vw, 5rem) 1rem;
  text-align: center;
  color: var(--ink-faint);
  font-style: italic;
  font-size: 1.1rem;
}
.shop__empty.visible { display: block; }

/* ---------------------------------------------------------- product card */
.shop-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow .4s var(--ease), transform .4s var(--ease);
}
.shop-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px -14px color-mix(in oklab, var(--ink) 28%, transparent);
}

/* media block */
.shop-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--linen);
  overflow: hidden;
}
.shop-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
  display: block;
}
.shop-card:hover .shop-card__media img {
  transform: scale(1.04);
}

/* badge */
.shop-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: .55rem .75rem .5rem;
  font-family: var(--text);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cream);
  background: color-mix(in oklab, var(--ink) 55%, transparent);
  backdrop-filter: blur(6px) saturate(1.1);
  -webkit-backdrop-filter: blur(6px) saturate(1.1);
  display: flex;
  align-items: center;
  gap: .5em;
}
.shop-badge::before {
  content: "";
  display: inline-block;
  width: .42em;
  height: .42em;
  border-radius: 50%;
  flex: none;
}

.shop-badge--available {
  background: color-mix(in oklab, var(--sage) 82%, transparent);
}
.shop-badge--available::before { background: color-mix(in oklab, var(--cream) 85%, var(--sage)); }

.shop-badge--sold {
  background: color-mix(in oklab, var(--madder) 75%, transparent);
}
.shop-badge--sold::before { background: color-mix(in oklab, var(--cream) 80%, var(--madder)); }

.shop-badge--made-to-order {
  background: color-mix(in oklab, var(--ochre) 80%, transparent);
  color: var(--ink);
}
.shop-badge--made-to-order::before { background: var(--ink); opacity: .5; }

/* card body */
.shop-card__body {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .28rem;
  flex: 1;
}

.shop-card__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.05rem, 1.4vw, 1.22rem);
  line-height: 1.18;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0;
}

.shop-card__meta {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  flex-wrap: wrap;
}

.shop-card__price {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.08rem;
  color: var(--clay);
}

.shop-card__shipping {
  font-size: .75rem;
  color: var(--sage);
  letter-spacing: .06em;
  font-weight: 600;
  text-transform: uppercase;
}

.shop-card__type {
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
  margin-top: .1rem;
}

.shop-card__enquire {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  margin-top: .7rem;
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--clay);
  text-decoration: none;
  transition: color .2s var(--ease), gap .25s var(--ease);
}
.shop-card__enquire:hover {
  color: var(--clay-deep);
  gap: .6em;
}
.shop-card__enquire .arrow {
  font-style: normal;
  transition: transform .25s var(--ease);
}
.shop-card__enquire:hover .arrow {
  transform: translateX(3px);
}

/* sold-out cards: mute slightly */
.shop-card[data-sold="true"] .shop-card__enquire {
  color: var(--ink-faint);
  pointer-events: none;
}
.shop-card[data-sold="true"] .shop-card__price {
  color: var(--ink-faint);
}

/* ---------------------------------------------------------- enquiry note banner */
.shop-enquiry-note {
  max-width: var(--maxw);
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  padding: 0 var(--pad);
}
.shop-enquiry-note__inner {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--clay);
  border-radius: 0 6px 6px 0;
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  max-width: 68ch;
}
.shop-enquiry-note__body {
  font-size: .95rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.shop-enquiry-note__body strong {
  font-weight: 600;
  color: var(--ink);
}
.shop-enquiry-note__body a {
  color: var(--clay);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--ochre) 55%, transparent);
  padding-bottom: .05em;
  transition: color .2s, border-color .2s;
}
.shop-enquiry-note__body a:hover {
  color: var(--clay-deep);
  border-color: var(--ochre);
}

/* mobile grid: guarantee fit, no horizontal clip */
.shop-card{min-width:0}
@media (max-width:600px){.shop__grid{grid-template-columns:1fr 1fr;gap:.6rem}}
@media (max-width:380px){.shop__grid{grid-template-columns:1fr}}

/* blowout guard: let single-column tracks shrink below content min-width */
@media (max-width:820px){.shop{grid-template-columns:minmax(0,1fr)}}
.shop__grid,.shop__filters,.shop-card__media{min-width:0}

/* minmax(0,1fr) track fix — 1fr keeps an auto min that blows the grid wider than the viewport */
@media (max-width:600px){.shop__grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:380px){.shop__grid{grid-template-columns:minmax(0,1fr)}}
.shop-card{overflow:hidden}
