/* ──────────────────────────────────────────────────────────────
   SHOP PAGE (page-shop.php)
   Only enqueued when is_page('shop').
   All selectors namespaced under .shp-*.
   ────────────────────────────────────────────────────────────── */

:root,
:root[data-theme="dark"],
:root[data-theme="light"] {
  --red: #FF2C55;
  --black: #0A0A0A;
  --white: #FFFFFF;
  --bg: #FAFAFA;
  --muted: #666666;
  --rule: #111111;
  --ld-text: #0A0A0A;
  --ld-text-muted: #666666;
  --ld-bg: #FAFAFA;
}

/* All rules below scoped under body.page-shop so shop.css can't bleed
   into other pages (e.g. the header mega-menu when hovering it from /shop/). */

body.page-shop {
  font-family: 'Inter', sans-serif;
  color: var(--black);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  display: block;
}

body.page-shop h1,
body.page-shop h2,
body.page-shop h3,
body.page-shop h4,
body.page-shop h5,
body.page-shop h6 { color: inherit; }
body.page-shop p { color: inherit; }

body.page-shop .section-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── HERO ───────────────────────────────────────────── */
.shp-hero {
  padding: 80px 48px 56px;
  background: #FFFFFF !important;
  border-bottom: 1px solid #EAEAEA;
}

.shp-hero--tight {
  padding: 40px 48px 28px;
}

.shp-hero-inner {
  margin: 0 0 40px;
}

.shp-hero--tight .shp-hero-inner {
  margin: 0;
}

.shp-hero-h1 {
  font-size: clamp(2.6rem, 4.4vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin: 18px 0 24px;
}

.shp-hero--tight .shp-hero-h1 {
  margin: 0;
}

.shp-hero-h1 em {
  font-style: italic;
  color: var(--red);
}

.shp-hero-sub {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 720px;
}

.shp-hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid #E5E5E5;
  border-bottom: 1px solid #E5E5E5;
  padding: 22px 0;
  margin-top: 32px;
}

.shp-meta-item {
  padding: 8px 32px 8px 0;
  border-right: 1px solid #E5E5E5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shp-meta-item:last-child { border-right: none; }

.shp-meta-num {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--red);
  line-height: 1;
}

.shp-meta-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── GRID SECTION ───────────────────────────────────── */
.shp-grid-section {
  padding: 72px 48px 88px;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.shp-grid-header {
  margin-bottom: 48px;
  max-width: 820px;
}

.shp-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}

.shp-grid-h2 {
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.04;
  color: var(--black);
}

.shp-grid-intro {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.65;
  margin-top: 18px;
  max-width: 640px;
}

/* ── PRODUCT CARDS — side-by-side ───────────────────── */
.shp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: start;
}

.shp-card {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  gap: 32px;
  background: var(--white);
  text-decoration: none;
  color: var(--black);
  padding: 36px 36px 32px;
  border: 1px solid #EAEAEA;
  position: relative;
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
  overflow: hidden;
}

.shp-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--red);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.shp-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.07), 0 4px 12px rgba(0,0,0,0.04);
  border-color: rgba(255,44,85,0.25);
}

.shp-card:hover::before { transform: scaleY(1); }

.shp-card-media {
  width: 144px;
  height: 144px;
  border-radius: 50%;
  background: linear-gradient(155deg, #F4F4F4 0%, #FAFAFA 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
}

.shp-card-media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.shp-card:hover .shp-card-media img { transform: scale(1.05); }

.shp-card-media-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

.shp-card-media-fallback span {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: rgba(255,255,255,0.18);
}

.shp-card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.shp-card-eyebrow {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.shp-card-num {
  color: rgba(0,0,0,0.4);
  font-variant-numeric: tabular-nums;
}

.shp-card-divider {
  width: 1px;
  height: 14px;
  background: #DCDCDC;
  align-self: center;
}

.shp-card-price {
  color: var(--red);
  font-size: 26px;
  letter-spacing: -0.02em;
  font-weight: 900;
  text-transform: none;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.shp-card-price-suffix {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.45);
  margin-left: 6px;
  position: relative;
  top: -4px;
}

.shp-card-name {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.18;
  color: var(--black);
  margin-bottom: 22px;
  text-transform: uppercase;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.shp-card-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 32px;
}

.shp-card-desc p { margin: 0 0 12px; }
.shp-card-desc p:last-child { margin-bottom: 0; }

.shp-card-desc ul,
.shp-card-desc ol,
.shp-card-desc ul[class],
.shp-card-desc ol[class] {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: grid !important;
  gap: 6px !important;
}

.shp-card-desc li,
.shp-card-desc ul[class] li,
.shp-card-desc ol[class] li {
  position: relative;
  padding-left: 20px !important;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  list-style: none !important;
}

.shp-card-desc li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
}

.shp-card-desc li::marker { content: none; }
.shp-card-desc li span { font-weight: inherit !important; }

.shp-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
}

.shp-card-cta {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  transition: background 0.22s, gap 0.22s, transform 0.22s;
  flex-shrink: 0;
}

.shp-card-cta svg {
  width: 15px;
  height: 15px;
  transition: transform 0.22s;
}

.shp-card:hover .shp-card-cta {
  background: var(--black);
  gap: 14px;
}
.shp-card:hover .shp-card-cta svg { transform: translateX(4px); }

/* ── BOTTOM CTA ─────────────────────────────────────── */
.shp-cta {
  padding: 88px 48px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,44,85,0.22) 0%, transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(255,44,85,0.10) 0%, transparent 50%),
    var(--black);
  color: var(--white);
  text-align: center;
}

.shp-cta-inner {
  max-width: 720px;
  margin: 0 auto;
}

.shp-cta-eyebrow {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  padding: 6px 12px;
  border: 1px solid rgba(255,44,85,0.35);
  background: rgba(255,44,85,0.08);
  margin-bottom: 22px;
}

.shp-cta-h2 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 16px;
}

.shp-cta-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  margin-bottom: 32px;
}

.shp-cta-btn {
  display: inline-block;
  padding: 18px 36px;
  background: var(--red);
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.18s, transform 0.18s;
}

.shp-cta-btn:hover {
  background: var(--white);
  color: var(--black);
  transform: translateY(-1px);
}

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 1100px) {
  .shp-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .shp-hero { padding: 60px 24px 40px; }
  .shp-hero--tight { padding: 32px 24px 20px; }
  .shp-hero-meta { grid-template-columns: repeat(3, 1fr); gap: 0; }
  .shp-meta-item { padding: 12px 16px 12px 0; }
  .shp-grid-section { padding: 56px 24px; }
  .shp-cta { padding: 64px 24px; }
}

@media (max-width: 640px) {
  .shp-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px;
  }
  .shp-card-media { width: 100%; height: 140px; }
  .shp-hero-meta { grid-template-columns: 1fr; }
  .shp-meta-item { border-right: none; border-bottom: 1px solid #E5E5E5; padding: 12px 0; }
  .shp-meta-item:last-child { border-bottom: none; }
}

/* ──────────────────────────────────────────────────────────────────
   SHOP — GROUPED LAYOUT (new)
   Adds:
     · .shp-toolbar    : sticky-ish search bar + empty-state message
     · .shp-buckets    : container for the 3 grouped sections
     · .shp-bucket     : single labelled group with heading + grid
   The original .shp-grid layout above stays for backwards-compat in
   case any other template uses it.
   ────────────────────────────────────────────────────────────────── */

.shp-toolbar {
  padding: 32px 48px 8px;
  background: var(--white);
}
.shp-toolbar-inner {
  /* full-width within section padding, matching site convention */
}
.shp-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: #FAFAFA;
  border: 1px solid #EAEAEA;
  border-radius: 999px;
  transition: border-color 0.18s, background 0.18s;
}
.shp-search:focus-within {
  border-color: var(--red);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(255,44,85,0.10);
}
.shp-search-icon {
  width: 18px;
  height: 18px;
  color: var(--muted, #5a5a5a);
  flex-shrink: 0;
}
.shp-search-input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--black);
}
.shp-search-input::placeholder { color: var(--muted, #5a5a5a); }
.shp-search-clear {
  background: transparent;
  border: 0;
  color: var(--muted, #5a5a5a);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.shp-search-clear:hover { color: var(--red); }
.shp-toolbar-empty {
  margin: 24px 0 0;
  padding: 16px 20px;
  background: rgba(255,44,85,0.05);
  border: 1px dashed rgba(255,44,85,0.35);
  border-radius: 10px;
  color: var(--muted, #5a5a5a);
  font-size: 14px;
  text-align: center;
}

.shp-buckets {
  padding: 72px 48px 80px;
  background: #FFFFFF !important;
  position: relative;
  z-index: 1; /* below the sticky header (z-index: 100) so it never floats above it */
}
.shp-toolbar {
  background: #FFFFFF !important;
}
.shp-bucket {
  background: #FFFFFF !important;
}
.shp-bucket-head {
  background: transparent !important;
}
.shp-bucket {
  background: #FFFFFF;
  scroll-margin-top: 88px; /* keep sticky 72px header from covering anchor scrolls */
}
.shp-bucket + .shp-bucket {
  margin-top: 56px;
  padding-top: 56px;
  border-top: 1px solid #EAEAEA;
}
.shp-bucket[hidden] { display: none; }

.shp-bucket-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  margin: 0 0 28px;
  background: transparent;
  padding: 0;
  border: 0;
}
.shp-bucket-num {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
}
.shp-bucket-text { min-width: 0; }
.shp-bucket-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--black);
  margin: 0 0 6px;
}
.shp-bucket-desc {
  font-size: 14px;
  color: var(--muted, #5a5a5a);
  line-height: 1.55;
  margin: 0;
  max-width: 640px;
}
.shp-bucket-count {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted, #5a5a5a);
  white-space: nowrap;
}

.shp-bucket-grid {
  margin: 0;
  display: grid;
  /* Auto-FILL (not -fit) keeps every card the same width across
     every bucket. Empty tracks at the end of a partial row stay
     reserved instead of collapsing and stretching the last items. */
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}
/* Compact card variant for the grouped layout — overrides the
   side-by-side .shp-card from above where context is the grouped
   buckets. */
.shp-bucket-grid .shp-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 0;
  border: 1px solid #E5E5E5;
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.shp-bucket-grid .shp-card[hidden] { display: none; }
.shp-bucket-grid .shp-card:hover {
  border-color: rgba(255,44,85,0.45);
  box-shadow: 0 14px 30px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.shp-bucket-grid .shp-card-media {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FAFAFA;
  margin: 0;
  border-radius: 0; /* reset older .shp-card-media circle */
  aspect-ratio: auto; /* reset older 1:1 aspect that forces square */
  flex-shrink: 1;    /* override older flex-shrink: 0 */
}
.shp-bucket-grid .shp-card-media img {
  max-width: 60%;
  max-height: 75%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.shp-bucket-grid .shp-card-media-fallback {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.shp-bucket-grid .shp-card-body {
  padding: 22px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.shp-bucket-grid .shp-card-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--black);
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.005em;
  text-transform: none;
}
.shp-bucket-grid .shp-card-desc {
  font-size: 13.5px;
  color: var(--muted, #5a5a5a);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}
.shp-bucket-grid .shp-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
  margin-top: auto;
}
/* Override the older button-style .shp-card-cta — in the grouped
   layout the CTA is an inline red text link, not a filled button. */
.shp-bucket-grid .shp-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}
.shp-bucket-grid .shp-card-cta svg { width: 14px; height: 14px; transition: transform 0.2s; }
.shp-bucket-grid .shp-card:hover .shp-card-cta {
  background: transparent;
  gap: 6px;
  color: var(--red);
}
.shp-bucket-grid .shp-card:hover .shp-card-cta svg { transform: translateX(3px); }
.shp-bucket-grid .shp-card-price {
  font-size: 14.5px;
  font-weight: 900;
  color: var(--black);
  white-space: nowrap;
}
.shp-bucket-grid .shp-card-price-suffix {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted, #5a5a5a);
  margin-left: 4px;
}

/* Responsive — column count handled by auto-fit on .shp-bucket-grid */
@media (max-width: 900px) {
  .shp-toolbar { padding: 24px 24px 4px; }
  .shp-buckets { padding: 24px 24px 64px; }
  .shp-bucket + .shp-bucket { margin-top: 40px; padding-top: 40px; }
  .shp-bucket-head { grid-template-columns: auto 1fr; gap: 14px; }
  .shp-bucket-count { grid-column: 1 / -1; grid-row: 2; margin-left: 36px; }
}
@media (max-width: 768px) {
  .shp-bucket-grid { grid-template-columns: 1fr; gap: 16px; }
  .shp-bucket-head { position: static; margin-bottom: 12px; padding-bottom: 0; }
  .shp-bucket-desc { display: none; }
  .shp-bucket-count { display: none; }
  .shp-bucket + .shp-bucket { margin-top: 28px; padding-top: 28px; }
}
@media (max-width: 640px) {
  .shp-bucket-grid .shp-card-media { height: 140px; }
}
