/* ============================================================
   Shop + category pages, and the shared product card (.pc)
   Also loaded by the homepage for its product grid.
   ============================================================ */

/* ---------- Page head ---------- */
.shop-head {
  margin: 0 0 24px;
}

.shop-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.shop-crumbs a {
  color: var(--brand);
}

.shop-crumbs a:hover {
  color: var(--brand-2);
  text-decoration: underline;
}

.shop-title {
  margin: 12px 0 8px;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  line-height: 1;
  color: var(--brand-2);
}

.shop-sub {
  margin: 0;
  max-width: 60ch;
  font-size: 1.05rem;
  color: var(--muted);
}

/* ---------- Toolbar ---------- */
.shop-bar {
  position: sticky;
  top: 72px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 12px 0;
  margin-bottom: 8px;
  background: var(--bg);
  border-bottom: 1px solid #E5DEC8;
}

.shop-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  color: var(--brand-2);
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px #E5DEC8;
  white-space: nowrap;
}

.shop-chip:hover {
  box-shadow: inset 0 0 0 1.5px var(--brand-2);
}

.shop-chip.is-active {
  background: var(--brand-2);
  color: var(--cream);
  box-shadow: none;
}

.shop-chip--ghost {
  background: transparent;
  box-shadow: none;
  color: var(--brand);
}

.shop-chip--ghost:hover {
  box-shadow: none;
  text-decoration: underline;
}

.shop-sort {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shop-sort label {
  margin: 0;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.shop-sort select {
  width: auto;
  min-width: 200px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 600;
}

/* Secondary filter row (product types inside a category) */
.shop-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 12px 0 0;
}

.shop-type {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-weight: 700;
  font-size: .92rem;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}

.shop-type:hover {
  color: var(--brand-2);
}

.shop-type.is-active {
  color: var(--brand-2);
  border-bottom-color: var(--gold);
}

.shop-count {
  margin: 16px 0 18px;
  font-size: .9rem;
  color: var(--muted);
}

/* ---------- Product grid + card ---------- */
.pc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px 22px;
}

.pc {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pc__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  overflow: hidden;
  background: #FFFFFF;
  border: 1px solid #EFE9D6;
  margin-bottom: 14px;
}

/* contain + padding so cutouts and lifestyle photos sit the same way */
.pc__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
  transition: transform .35s ease;
}

.pc:hover .pc__media img {
  transform: scale(1.04);
}

.pc__fallback {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.pc__flag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.pc__flag--out {
  background: #70281A;
  color: var(--cream);
}

.pc__body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pc__type {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 4px;
}

.pc__title {
  margin: 0 0 6px;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.3;
}

.pc__title a {
  color: var(--text);
}

.pc__title a:hover {
  color: var(--brand);
}

.pc__price {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--brand-2);
  margin-bottom: 14px;
}

.pc__btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .92rem;
  color: var(--brand-2);
  box-shadow: inset 0 0 0 2px var(--brand-2);
  align-self: flex-start;
}

.pc__btn:hover {
  background: var(--brand-2);
  color: var(--cream);
}

/* ---------- Pager / empty ---------- */
.shop-pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
}

.shop-pager > :last-child {
  justify-self: end;
}

.shop-pager__btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--brand-2);
  box-shadow: inset 0 0 0 2px var(--brand-2);
}

.shop-pager__btn:hover {
  background: var(--brand-2);
  color: var(--cream);
}

.shop-pager__meta {
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
}

.shop-empty {
  padding: 56px 20px;
  border-radius: 22px;
  background: var(--surface-2);
  text-align: center;
}

.shop-empty h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 2rem;
  color: var(--brand-2);
}

.shop-empty p {
  margin: 0 0 20px;
  color: var(--muted);
}

/* ---------- Refill teaser below the grid ---------- */
.shop-refill {
  margin: 64px 0 24px;
}

.shop-refill .home-h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  line-height: 1;
  color: var(--brand-2);
}

.shop-refill .home-h2sub {
  margin: 8px 0 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .shop-bar {
    top: 64px;
  }
}

@media (max-width: 600px) {
  .shop-bar {
    position: static;
  }

  .shop-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .shop-sort {
    width: 100%;
  }

  .shop-sort select {
    flex: 1;
    min-width: 0;
  }

  .pc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 12px;
  }

  .pc__media img {
    padding: 8px;
  }

  .pc__title {
    font-size: .98rem;
  }

  .pc__btn {
    align-self: stretch;
    padding: 0 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pc__media img {
    transition: none;
  }

  .pc:hover .pc__media img {
    transform: none;
  }
}
