/* ==========================================================================
   Memory Jewells — Ephemeral Elegance shop styles
   Scoped under .mj-shop-root so nothing leaks into the active theme's
   header/footer/global styles, and the theme can't leak into this either.
   ========================================================================== */

/* Neutralize Elementor's own column/container padding around the
   Shortcode widget so our .wrap centering is the only thing that applies.
   Safe to keep even on Elementor Canvas, where this padding is usually
   already zero, but some themes/Elementor versions still add a little. */
.elementor-widget-shortcode:has(.mj-shop-root),
.elementor-widget-shortcode .mj-shop-root {
  margin-left: 0;
  margin-right: 0;
}
.elementor-element:has(> .elementor-widget-wrap .mj-shop-root),
.elementor-column:has(.mj-shop-root) > .elementor-widget-wrap,
.elementor-container:has(.mj-shop-root) {
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: 100% !important;
}

/* Astra theme: its content container (.ast-container) and Elementor's own
   page wrapper sometimes keep small asymmetric padding even with the
   header/footer disabled per-page. Neutralize so nothing skews our
   centering off the true viewport center. */
.ast-container:has(.mj-shop-root),
body.ast-no-sidebar .mj-shop-root,
.ast-separate-container .mj-shop-root {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.elementor .elementor-widget-container:has(.mj-shop-root) {
  margin: 0 !important;
  padding: 0 !important;
}

.mj-shop-root {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;

  --surface:#fbf9f4;
  --surface-dim:#dbdad5;
  --surface-bright:#fbf9f4;
  --surface-container-lowest:#ffffff;
  --surface-container-low:#f5f3ee;
  --surface-container:#f0eee9;
  --surface-container-high:#eae8e3;
  --surface-container-highest:#e4e2dd;
  --on-surface:#1b1c19;
  --on-surface-variant:#4e4639;
  --inverse-surface:#30312e;
  --inverse-on-surface:#f2f1ec;
  --outline:#7f7667;
  --outline-variant:#d1c5b4;

  --primary:#c5a059;
  --on-primary:#ffffff;
  --primary-container:#c5a059;
  --on-primary-container:#4e3700;
  --inverse-primary:#e9c176;

  --secondary:#1e293b;
  --on-secondary:#ffffff;
  --secondary-container:#d5e0f8;
  --on-secondary-container:#586377;

  --tertiary:#5f5e5b;
  --on-tertiary:#ffffff;

  --background:#fbf9f4;
  --on-background:#1b1c19;

  --deep-gold:#8e6f36;
  --charcoal-text:#334155;
  --linen-white:#ffffff;

  --radius-sm:0.125rem;
  --radius:0.25rem;
  --radius-md:0.375rem;
  --radius-lg:0.5rem;

  --margin-desktop:64px;
  --max-width:1280px;

  --hover-shadow:0px 4px 20px rgba(30,41,59,0.05);

  background: var(--background);
  color: var(--charcoal-text);
  font-family: 'Hanken Grotesk', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.mj-shop-root * { box-sizing: border-box; }
.mj-shop-root h1, .mj-shop-root h2, .mj-shop-root h3, .mj-shop-root h4 {
  font-family: 'Playfair Display', serif;
  color: var(--on-surface);
  margin: 0;
}
.mj-shop-root a { color: inherit; text-decoration: none; }
.mj-shop-root img { max-width: 100%; display: block; }
.mj-shop-root .wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--margin-desktop); }

@media (prefers-reduced-motion: reduce) {
  .mj-shop-root * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.mj-shop-root :focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* ---------- Page intro ---------- */
.mj-shop-root .page-intro { padding: 48px 0 0; }
.mj-shop-root .crumb {
  font-size: 13px; color: var(--on-surface-variant); margin-bottom: 24px;
  letter-spacing: 0.02em; font-weight: 500;
}
.mj-shop-root .crumb a:hover { color: var(--deep-gold); }
.mj-shop-root .intro-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 48px; align-items: center; padding-bottom: 48px;
}
.mj-shop-root .intro-text .eyebrow {
  font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--deep-gold); font-weight: 600; margin-bottom: 16px;
}
.mj-shop-root .intro-text h1 {
  font-size: 48px; font-weight: 700; line-height: 56px; letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.mj-shop-root .intro-text p {
  font-size: 18px; line-height: 28px; color: var(--on-surface-variant); max-width: 480px;
  font-weight: 400; margin: 0;
}
.mj-shop-root .trust-row { display: flex; gap: 32px; margin-top: 32px; flex-wrap: wrap; }
.mj-shop-root .trust-item {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 600; color: var(--on-surface); letter-spacing: 0.02em;
}
.mj-shop-root .trust-item svg { width: 18px; height: 18px; color: var(--deep-gold); flex-shrink: 0; }

/* ---------- Locket reveal ---------- */
.mj-shop-root .mj-hero-custom-image {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  object-fit: cover;
}
.mj-shop-root .locket-stage { display: flex; justify-content: center; align-items: center; width: 100%; }
.mj-shop-root .locket-stage-inner { width: 100%; text-align: center; }
.mj-shop-root .locket { position: relative; width: 300px; height: 300px; cursor: pointer; margin: 0 auto; max-width: 100%; display: inline-block; }
.mj-shop-root .locket-face, .mj-shop-root .locket-open {
  position: absolute; inset: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  backface-visibility: hidden;
  transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s;
}
.mj-shop-root .locket-face {
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,0.55), transparent 45%),
    linear-gradient(155deg, var(--inverse-primary), var(--primary) 55%, var(--deep-gold));
  border: 1px solid var(--outline-variant);
  opacity: 1; visibility: visible; z-index: 2;
}
.mj-shop-root .locket-face::before {
  content: ""; width: 74%; height: 74%; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.6);
}
.mj-shop-root .locket-face .hint {
  position: absolute; bottom: -32px; left: 0; right: 0;
  text-align: center; font-size: 12px; font-weight: 600;
  color: var(--on-surface-variant); letter-spacing: 0.05em; text-transform: uppercase;
}
.mj-shop-root .locket-open {
  background: radial-gradient(circle, var(--secondary) 0%, var(--inverse-surface) 100%);
  opacity: 0; visibility: hidden; z-index: 1;
  border: 1px solid var(--outline-variant); overflow: hidden;
}
.mj-shop-root .locket-open .beam {
  position: absolute; inset: -10%;
  background: conic-gradient(from 200deg, transparent 0deg, rgba(197,160,89,0.4) 40deg, transparent 90deg);
  animation: mj-spin 7s linear infinite;
}
.mj-shop-root .locket-open .projection {
  position: relative; z-index: 2; width: 96px; height: 96px;
  display: flex; align-items: center; justify-content: center;
}
.mj-shop-root .locket-open .projection::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(233,193,118,0.9) 0%, rgba(197,160,89,0.35) 55%, transparent 78%);
  filter: blur(2px);
}
.mj-shop-root .locket-open .projection svg {
  position: relative; width: 38px; height: 38px;
  color: var(--inverse-surface);
  filter: drop-shadow(0 0 6px rgba(255,236,200,0.9));
}
@keyframes mj-spin { to { transform: rotate(360deg); } }
.mj-shop-root .locket.is-open .locket-face { opacity: 0; visibility: hidden; transform: scale(0.92); z-index: 1; }
.mj-shop-root .locket.is-open .locket-open { opacity: 1; visibility: visible; transform: scale(1); z-index: 2; }
.mj-shop-root .locket-caption {
  text-align: center; margin-top: 40px; font-size: 14px;
  color: var(--on-surface-variant); font-style: italic;
  font-family: 'Playfair Display', serif; font-weight: 500;
}

/* ---------- Stats panel (running ticker) ---------- */
.mj-shop-root .mj-stats-panel {
  background: var(--secondary); margin: 40px 0 0; padding: 28px 0;
  position: relative; overflow: hidden;
}
.mj-shop-root .mj-stats-panel::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(197,160,89,0.18), transparent 45%);
  pointer-events: none; z-index: 1;
}
.mj-shop-root .mj-stats-panel::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, var(--secondary) 0%, transparent 8%, transparent 92%, var(--secondary) 100%);
}
.mj-shop-root .mj-stats-track {
  display: flex; width: max-content;
  animation: mj-stats-scroll 22s linear infinite;
}
.mj-shop-root .mj-stats-panel:hover .mj-stats-track { animation-play-state: paused; }
.mj-shop-root .mj-stats-seq { display: flex; flex-shrink: 0; }
.mj-shop-root .mj-stat-item {
  display: flex; align-items: baseline; gap: 10px;
  padding: 0 48px; white-space: nowrap; position: relative;
}
.mj-shop-root .mj-stat-item::after {
  content: ""; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--deep-gold);
}
.mj-shop-root .mj-stat-value {
  font-family: 'Playfair Display', serif; font-weight: 700;
  font-size: 30px; line-height: 1; color: var(--inverse-primary);
}
.mj-shop-root .mj-stat-label {
  font-size: 13px; font-weight: 600;
  color: var(--inverse-on-surface); letter-spacing: 0.03em; text-transform: uppercase;
}
@keyframes mj-stats-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .mj-shop-root .mj-stats-track { animation: none; }
}

/* ---------- Category tiles ---------- */
.mj-shop-root .cat-section { padding: 8px 0 48px; }
.mj-shop-root .cat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.mj-shop-root .cat-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; height: 230px;
  border: 1px solid var(--outline-variant);
  background: linear-gradient(155deg, var(--inverse-primary), var(--deep-gold));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.mj-shop-root .cat-card:hover { transform: translateY(-3px); box-shadow: var(--hover-shadow); }
.mj-shop-root .cat-card img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.mj-shop-root .cat-card:hover img { transform: scale(1.05); }
.mj-shop-root .cat-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(30,41,59,0) 35%, rgba(30,41,59,0.72) 100%);
}
.mj-shop-root .cat-card-label { position: absolute; left: 24px; bottom: 20px; right: 24px; color: var(--linen-white); z-index: 2; }
.mj-shop-root .cat-card-label .cat-name { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 600; }
.mj-shop-root .cat-card-label .cat-count {
  font-size: 12px; color: var(--inverse-primary); margin-top: 4px;
  font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
}
.mj-shop-root .cat-card.img-fallback {
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Toolbar ---------- */
.mj-shop-root .toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; border-top: 1px solid var(--outline-variant); border-bottom: 1px solid var(--outline-variant);
  margin-bottom: 40px; flex-wrap: wrap; gap: 16px;
}
.mj-shop-root .filter-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.mj-shop-root .pill {
  padding: 9px 18px; border-radius: 9999px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--outline-variant); background: var(--linen-white); color: var(--on-surface);
  cursor: pointer; transition: all 0.2s ease; font-family: 'Hanken Grotesk', sans-serif;
}
.mj-shop-root .pill.active { background: var(--secondary); color: var(--on-secondary); border-color: var(--secondary); }
.mj-shop-root .pill:hover:not(.active) { border-color: var(--primary); color: var(--deep-gold); }
.mj-shop-root .result-meta { display: flex; align-items: center; gap: 18px; font-size: 13px; color: var(--on-surface-variant); font-weight: 500; }
.mj-shop-root .sort-select {
  border: 1px solid var(--outline-variant); background: var(--linen-white);
  padding: 9px 14px; border-radius: var(--radius); font-size: 13px; font-weight: 600;
  color: var(--on-surface); cursor: pointer; font-family: 'Hanken Grotesk', sans-serif;
}
.mj-shop-root .sort-select:focus { border-color: var(--primary); }

/* ---------- Product grid ---------- */
.mj-shop-root .grid-section { padding-bottom: 96px; position: relative; }
.mj-shop-root .product-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  transition: opacity 0.2s ease;
}
.mj-shop-root .product-grid.is-loading { opacity: 0.4; pointer-events: none; }
.mj-shop-root .card {
  background: var(--linen-white); border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--outline-variant);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex; flex-direction: column;
}
.mj-shop-root .card:hover { transform: translateY(-4px); box-shadow: var(--hover-shadow); }
.mj-shop-root .card-media-link { display: block; }
.mj-shop-root .card-media { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--surface-container); }
.mj-shop-root .card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.mj-shop-root .card:hover .card-media img { transform: scale(1.04); }
.mj-shop-root .card-media.img-fallback {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(155deg, var(--inverse-primary), var(--primary));
}
.mj-shop-root .card-media.img-fallback::after {
  content: "Photo coming soon"; font-size: 12px; font-weight: 600; letter-spacing: 0.03em;
  color: rgba(255,255,255,0.92);
}
.mj-shop-root .badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--primary-container); color: var(--on-primary-container);
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 4px 9px; border-radius: var(--radius-sm); z-index: 2;
}
.mj-shop-root .badge.stock { background: var(--surface-container-highest); color: var(--on-surface-variant); }
.mj-shop-root .reveal-affordance {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(255,255,255,0.94); border: 1px solid var(--outline-variant); color: var(--secondary);
  font-size: 11px; font-weight: 700; padding: 6px 10px; border-radius: 9999px;
  display: flex; align-items: center; gap: 5px;
  opacity: 0; transform: translateY(6px); transition: all 0.25s ease; z-index: 2;
}
.mj-shop-root .card:hover .reveal-affordance { opacity: 1; transform: translateY(0); }
.mj-shop-root .reveal-affordance svg { width: 12px; height: 12px; }
.mj-shop-root .quick-add {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  background: var(--secondary); color: var(--on-secondary);
  text-align: center; padding: 11px; border-radius: var(--radius-md);
  font-size: 13px; font-weight: 600;
  opacity: 0; transform: translateY(8px); transition: all 0.25s ease; z-index: 2; cursor: pointer;
}
.mj-shop-root .quick-add.is-disabled { background: var(--outline); cursor: default; }
.mj-shop-root .card:hover .quick-add { opacity: 1; transform: translateY(0); }
.mj-shop-root .card:hover .reveal-affordance { display: none; }
.mj-shop-root .card-media.is-out-of-stock { filter: grayscale(0.4); opacity: 0.85; }
.mj-shop-root .card-body { padding: 16px 16px 18px; }
.mj-shop-root .card-cat {
  font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--deep-gold); font-weight: 600; margin-bottom: 6px;
}
.mj-shop-root .card-title {
  font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 600;
  color: var(--on-surface); line-height: 1.3; margin-bottom: 8px;
}
.mj-shop-root .card-title a:hover { color: var(--deep-gold); }
.mj-shop-root .card-rating { display: flex; align-items: center; gap: 5px; margin-bottom: 10px; }
.mj-shop-root .stars { color: var(--primary); font-size: 12px; letter-spacing: 1px; }
.mj-shop-root .rating-count { font-size: 11.5px; color: var(--outline); font-weight: 500; }
.mj-shop-root .card-price { font-size: 15px; font-weight: 700; color: var(--on-surface); }
.mj-shop-root .card-price del {
  font-size: 13px; font-weight: 500; color: var(--outline); text-decoration: line-through;
  margin-right: 8px; opacity: 1;
}
.mj-shop-root .card-price ins {
  text-decoration: none; font-weight: 700;
}
.mj-shop-root .card-price .woocommerce-Price-currencySymbol { font-size: inherit; }
.mj-shop-root .no-products {
  grid-column: 1 / -1; text-align: center; padding: 64px 0;
  color: var(--on-surface-variant); font-size: 15px;
}

/* ---------- Trust strip ---------- */
.mj-shop-root .trust-strip { background: var(--surface-container-low); border-top: 1px solid var(--outline-variant); padding: 40px 0; }
.mj-shop-root .trust-strip .wrap { display: flex; gap: 48px; flex-wrap: wrap; }
.mj-shop-root .trust-block { display: flex; align-items: flex-start; gap: 16px; flex: 1; min-width: 240px; }
.mj-shop-root .trust-block svg { width: 28px; height: 28px; color: var(--deep-gold); flex-shrink: 0; margin-top: 2px; }
.mj-shop-root .trust-block h4 { font-size: 16px; margin-bottom: 4px; }
.mj-shop-root .trust-block p { font-size: 13.5px; color: var(--on-surface-variant); margin: 0; line-height: 1.5; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .mj-shop-root .wrap { padding: 0 24px; }
  .mj-shop-root .intro-grid { grid-template-columns: 1fr; gap: 24px; }
  .mj-shop-root .locket-stage { order: 2; }
  .mj-shop-root .product-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 760px) {
  .mj-shop-root .intro-text h1 { font-size: 30px; line-height: 38px; margin-bottom: 12px; }
  .mj-shop-root .intro-text p { font-size: 15.5px; line-height: 23px; max-width: none; }
  .mj-shop-root .intro-text .eyebrow { margin-bottom: 10px; }
  .mj-shop-root .trust-row { margin-top: 16px; gap: 16px; }
  .mj-shop-root .locket-stage { margin-top: 20px; }
  .mj-shop-root .locket { width: 148px; height: 148px; }
  .mj-shop-root .locket-face .hint { bottom: -26px; font-size: 11px; }
  .mj-shop-root .locket-open .projection { width: 56px; height: 56px; }
  .mj-shop-root .locket-open .projection svg { width: 22px; height: 22px; }
  .mj-shop-root .locket-caption { margin-top: 24px; font-size: 13px; }
  .mj-shop-root .cat-grid { grid-template-columns: 1fr; }
  .mj-shop-root .cat-card { height: 150px; }
  .mj-shop-root .product-grid { grid-template-columns: repeat(2,1fr); }
  .mj-shop-root .trust-strip .wrap { flex-direction: column; gap: 24px; }
  .mj-shop-root .mj-stats-panel { padding: 20px 0; margin-top: 28px; }
  .mj-shop-root .mj-stat-value { font-size: 24px; }
  .mj-shop-root .mj-stat-label { font-size: 11px; }
  .mj-shop-root .mj-stat-item { gap: 8px; padding: 0 32px; }
  .mj-shop-root .mj-stats-track { animation-duration: 16s; }
}
@media (max-width: 520px) {
  .mj-shop-root .product-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .mj-shop-root .card-body { padding: 12px; }
  .mj-shop-root .card-title { font-size: 15px; }
  .mj-shop-root .toolbar { flex-direction: column; align-items: flex-start; }
  .mj-shop-root .mj-stat-item { padding: 0 24px; }
}
