/* ==========================================================================
   SOLARIA ATELIER — Editorial Turkish Atelier × Trusted Etsy Bridge Storefront
   Zero-runtime, mobile-first (<1s LCP) custom design system
   ========================================================================== */

:root {
  /* Brand Palette (Derived from Solaria Atelier Logo + Etsy Trust Orange) */
  --bg-ivory: #faf6f0;
  --bg-surface: #ffffff;
  --bg-sand: #f2e9dc;
  --bg-sand-deep: #e6d6c1;

  --ink-primary: #261812;
  --ink-secondary: #5c4940;
  --ink-muted: #847065;

  --brand-terracotta: #7a3b1e;
  --brand-gold: #b5823f;
  --brand-gold-soft: rgba(181, 130, 63, 0.14);

  /* High-Contrast Etsy Conversion Accent */
  --etsy-orange: #f1641e;
  --etsy-orange-hover: #d85110;
  --etsy-orange-active: #bf4409;
  --etsy-orange-soft: #fff1e9;

  /* Calm Boutique Trust Accent */
  --sage-bg: #ebf3ef;
  --sage-ink: #245344;
  --sage-border: #cde0d7;

  --border-subtle: #eae0d2;
  --border-strong: #d8c7b2;

  --shadow-xs: 0 1px 2px rgba(38, 24, 18, 0.04);
  --shadow-sm: 0 4px 14px rgba(38, 24, 18, 0.06);
  --shadow-md: 0 12px 32px rgba(38, 24, 18, 0.1);
  --shadow-cta: 0 6px 18px rgba(241, 100, 30, 0.24);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --container-max: 1120px;
}

/* Base Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg-ivory);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

button,
a {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--etsy-orange);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 16px;
}

/* --------------------------------------------------------------------------
   1. Top Utility Shipping Bar
   -------------------------------------------------------------------------- */
.announcement-bar {
  background: var(--ink-primary);
  color: #f7efe5;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 9px 14px;
  line-height: 1.35;
}

.announcement-bar[hidden] {
  display: none;
}

/* --------------------------------------------------------------------------
   2. Sticky Boutique Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 246, 240, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-primary);
  min-width: 0;
}

.brand-emblem {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(181, 130, 63, 0.35);
  flex-shrink: 0;
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-terracotta);
}

.brand-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brand-gold);
  margin-top: 2px;
  white-space: nowrap;
}

.header-shop-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--ink-primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, transform 0.15s ease;
  box-shadow: var(--shadow-xs);
}

.header-shop-btn:hover {
  border-color: var(--etsy-orange);
  color: var(--etsy-orange);
  background: var(--etsy-orange-soft);
}

.header-shop-btn:active {
  transform: scale(0.98);
}

.header-shop-btn .etsy-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--etsy-orange);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   3. Compact High-Trust Hero (Keeps Products Immediately Accessible!)
   -------------------------------------------------------------------------- */
.hero {
  padding: 24px 0 18px;
}

.hero-card {
  position: relative;
  background: linear-gradient(155deg, #ffffff 0%, #f7f0e6 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 18px 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -70px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(181, 130, 63, 0.14) 0%, rgba(181, 130, 63, 0) 70%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-terracotta);
  background: var(--brand-gold-soft);
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.hero-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(28px, 6.8vw, 42px);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink-primary);
  max-width: 18ch;
}

.hero-subtitle {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-secondary);
  max-width: 58ch;
}

/* Honest Trust Badges Row */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-primary);
}

.trust-pill svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.trust-pill--reviews svg {
  color: var(--etsy-orange);
}

.trust-pill--protection svg {
  color: var(--sage-ink);
}

.trust-pill--shipping svg {
  color: var(--brand-terracotta);
}

/* Dual Navigation Actions (Browse Products Below OR Jump Straight to Etsy Shop) */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.btn-outline-etsy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--ink-primary);
  background: transparent;
  color: var(--ink-primary);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-outline-etsy:hover {
  background: var(--ink-primary);
  color: #ffffff;
}

.btn-soft-anchor {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--ink-primary);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.18s ease, transform 0.15s ease;
}

.btn-soft-anchor:hover {
  background: var(--brand-terracotta);
}

.btn-soft-anchor:active {
  transform: scale(0.985);
}

/* --------------------------------------------------------------------------
   4. Ad-Spotlight Section (?p=PRODUCT_ID Deep-Link Message Match)
   -------------------------------------------------------------------------- */
.spotlight-section {
  padding: 4px 0 18px;
}

.spotlight-section[hidden] {
  display: none;
}

.spotlight-wrap {
  background: var(--bg-surface);
  border: 1.5px solid var(--brand-gold);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-md);
}

.spotlight-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-terracotta);
  margin-bottom: 12px;
}

.spotlight-kicker svg {
  width: 14px;
  height: 14px;
  color: var(--etsy-orange);
  flex-shrink: 0;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: center;
}

/* --------------------------------------------------------------------------
   5. Catalog Controls (Category Pills + Count)
   -------------------------------------------------------------------------- */
.catalog-section {
  padding: 6px 0 36px;
  scroll-margin-top: 78px;
}

.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.section-heading-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.section-heading {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 600;
  color: var(--ink-primary);
}

.item-count {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-muted);
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  max-width: 100%;
}

.filter-pills::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.filter-pill:hover {
  border-color: var(--ink-primary);
  color: var(--ink-primary);
}

.filter-pill.is-active {
  background: var(--ink-primary);
  border-color: var(--ink-primary);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   6. Conversion-Optimized Product Cards
   -------------------------------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

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

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--bg-sand);
  overflow: hidden;
  cursor: pointer;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card:hover .product-media img {
  transform: scale(1.03);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(6px);
  color: var(--ink-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: var(--shadow-xs);
}

.product-price-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--ink-primary);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 6px 16px rgba(38, 24, 18, 0.28);
}

.photo-count-pill {
  position: absolute;
  bottom: 11px;
  right: 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(38, 24, 18, 0.72);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  backdrop-filter: blur(6px);
}

.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 15px 15px 16px;
}

.product-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.product-category {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-gold);
}

.shipping-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
}

.shipping-chip--free {
  background: var(--sage-bg);
  color: var(--sage-ink);
  border: 1px solid var(--sage-border);
}

.shipping-chip--flat {
  background: var(--bg-sand);
  color: var(--ink-secondary);
}

.product-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.18;
  color: var(--ink-primary);
  cursor: pointer;
}

.product-subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.45;
}

/* High-Visibility Price Box (Intentional Friction Filter for Budget Qualification) */
.price-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #fbf6ef;
  border: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  font-variant-numeric: tabular-nums;
}

.price-current {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.05;
  color: var(--ink-primary);
  letter-spacing: -0.025em;
}

.price-currency-code {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.price-compare {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: line-through;
}

.price-save {
  font-size: 12px;
  font-weight: 700;
  color: var(--etsy-orange);
  background: var(--etsy-orange-soft);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.price-shipping-note {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.price-shipping-note.is-free {
  color: var(--sage-ink);
}

.price-fallback {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-terracotta);
}

/* Primary Etsy Conversion CTA */
.product-cta-wrap {
  margin-top: auto;
  padding-top: 14px;
}

.btn-etsy-buy {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--etsy-orange);
  color: #ffffff;
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-cta);
  transition: background-color 0.16s ease, transform 0.14s ease, box-shadow 0.16s ease;
}

.btn-etsy-buy:hover {
  background: var(--etsy-orange-hover);
  box-shadow: 0 8px 22px rgba(241, 100, 30, 0.3);
}

.btn-etsy-buy:active {
  background: var(--etsy-orange-active);
  transform: scale(0.985);
}

.btn-etsy-buy:disabled,
.btn-etsy-buy.is-sold-out {
  background: #c7bdb4;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-etsy-buy svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.cta-microtrust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--ink-muted);
}

/* Compact adjustments if user enables 2-col mobile grid */
.product-grid.mobile-cols-2 .product-title {
  font-size: 18px;
}

.product-grid.mobile-cols-2 .product-subtitle {
  font-size: 12px;
}

.product-grid.mobile-cols-2 .btn-etsy-buy {
  font-size: 13px;
  padding: 10px 10px;
}

.product-grid.mobile-cols-2 .price-current {
  font-size: 24px;
}

/* --------------------------------------------------------------------------
   7. Atelier Credibility Pillars
   -------------------------------------------------------------------------- */
.pillars-section {
  padding: 10px 0 32px;
}

.pillars-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.pillar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.pillar-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg-sand);
  color: var(--brand-terracotta);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pillar-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-primary);
}

.pillar-desc {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   8. Buyer Confidence FAQ Accordion
   -------------------------------------------------------------------------- */
.faq-section {
  padding: 8px 0 36px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 15px 18px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  width: 18px;
  height: 18px;
  color: var(--brand-terracotta);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 18px 16px;
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.6;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

/* --------------------------------------------------------------------------
   9. Bottom Full Etsy Shop Conversion Card
   -------------------------------------------------------------------------- */
.shop-banner-section {
  padding: 0 0 42px;
}

.shop-banner {
  background: linear-gradient(135deg, #2b1a14 0%, #44251a 100%);
  color: #fbf7f1;
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.shop-banner-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e4ba82;
}

.shop-banner-title {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(26px, 6vw, 34px);
  font-weight: 600;
  line-height: 1.15;
}

.shop-banner-text {
  margin: 10px auto 20px;
  max-width: 48ch;
  font-size: 14px;
  color: rgba(251, 247, 241, 0.84);
}

.btn-banner-etsy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  background: var(--etsy-orange);
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(241, 100, 30, 0.35);
  transition: background-color 0.16s ease, transform 0.14s ease;
}

.btn-banner-etsy:hover {
  background: var(--etsy-orange-hover);
}

.btn-banner-etsy:active {
  transform: scale(0.985);
}

/* --------------------------------------------------------------------------
   10. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-sand);
  padding: 26px 0 34px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-terracotta);
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 10px 0 12px;
}

.footer-links a {
  color: var(--ink-primary);
  font-weight: 600;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--etsy-orange);
  text-decoration: underline;
}

.footer-note {
  margin: 0 auto;
  max-width: 56ch;
  color: var(--ink-muted);
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   11. Quick View Modal (Multi-Photo Gallery + Instant Etsy Checkout)
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(24, 15, 11, 0.62);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 820px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  transition: transform 0.22s ease;
}

.modal-backdrop.is-open .modal-panel {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.modal-close:hover {
  background: var(--ink-primary);
  color: #ffffff;
}

.modal-content-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.modal-gallery {
  background: var(--bg-sand);
  padding: 14px;
}

.modal-main-img-wrap {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-sand-deep);
}

.modal-main-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.modal-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
}

.modal-thumb {
  width: 58px;
  height: 72px;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.72;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.modal-thumb.is-active,
.modal-thumb:hover {
  opacity: 1;
  border-color: var(--etsy-orange);
}

.modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.modal-info {
  padding: 20px 18px 24px;
  display: flex;
  flex-direction: column;
}

.modal-info .product-meta-row {
  padding-right: 46px;
}

.modal-highlights {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

.modal-highlights li svg {
  width: 16px;
  height: 16px;
  color: var(--sage-ink);
  margin-top: 2px;
  flex-shrink: 0;
}

.modal-secondary-link {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  background: none;
  border: none;
}

.modal-secondary-link:hover {
  color: var(--ink-primary);
}

/* --------------------------------------------------------------------------
   12. Built-in Meta Pixel Debug Panel (ONLY visible with ?debug=1)
   -------------------------------------------------------------------------- */
.debug-panel {
  position: fixed;
  right: 12px;
  left: 12px;
  bottom: 12px;
  z-index: 120;
  max-width: 360px;
  margin-left: auto;
  background: #1b1614;
  color: #f6efe8;
  border: 1px solid #49382e;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}

.debug-panel[hidden] {
  display: none;
}

.debug-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #352922;
}

.debug-title {
  font-weight: 700;
  color: #f4a261;
}

.debug-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #e2d6cc;
  cursor: pointer;
}

.debug-log {
  max-height: 150px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.debug-entry {
  background: #271f1b;
  border-left: 3px solid var(--etsy-orange);
  padding: 6px 8px;
  border-radius: 4px;
  word-break: break-word;
}

/* --------------------------------------------------------------------------
   13. Responsive Breakpoints (Tablet & Desktop)
   -------------------------------------------------------------------------- */
@media (min-width: 640px) {
  .container {
    padding-inline: 24px;
  }

  .hero-card {
    padding: 32px 30px 28px;
  }

  .product-grid,
  .product-grid.mobile-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .spotlight-grid {
    grid-template-columns: 280px 1fr;
    gap: 24px;
  }

  .pillars-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }

  .modal-panel {
    border-radius: var(--radius-lg);
  }

  .modal-content-grid {
    grid-template-columns: 1fr 1fr;
  }

  .modal-info {
    padding: 28px 26px;
  }
}

@media (min-width: 960px) {
  .product-grid,
  .product-grid.mobile-cols-2 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }

  .shop-banner {
    padding: 38px 32px;
  }
}

/* Subtle Spinner for Redirect State */
.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
