/*
Theme Name: Energy Stone
Theme URI: https://example.com/energy-stone
Author: Your Name
Author URI: https://example.com
Description: A calm, premium custom theme for an energy-stone (crystal) store targeting the US market. Light, airy, cream/beige luxury aesthetic inspired by leading crystal retailers (Conscious Items, No7Crystal, CRYSTAL LONDON). Native only, no third-party plugins.
Version: 3.0.0
Requires at least: 5.9
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: energy-stone
Tags: e-commerce, custom-post-types, one-column, responsive, premium
*/

/* =========================================================
   DESIGN TOKENS  (calm premium spiritual palette)
   ========================================================= */
:root{
  --bg:        #faf7f1;   /* soft warm cream */
  --bg-soft:   #f4eee4;   /* slightly deeper cream */
  --surface:   #ffffff;
  --ink:       #2b2620;
  --muted:     #8b8277;
  --line:      #eee6da;
  --sage:      #71806e;   /* muted sage green (primary) */
  --sage-deep: #55654f;
  --sage-soft: #eef1e9;
  --gold:      #b49a68;   /* soft champagne gold */
  --gold-soft: #f5eee0;
  --blush:     #ecdfd2;   /* warm taupe */
  --purple:    #6d4c8f;   /* amethyst accent (sales) */
  --purple-soft:#f1eaf6;
  --sale:      #a9503a;   /* terracotta */
  --radius:    16px;
  --radius-sm: 11px;
  --shadow:    0 14px 40px rgba(80,65,45,.10);
  --shadow-sm: 0 6px 18px rgba(80,65,45,.07);
  --font: "Inter","Segoe UI",-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
  --display: "Playfair Display",Georgia,"Times New Roman",serif;
}

/* =========================================================
   BASE
   ========================================================= */
*{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0; font-family:var(--font); color:var(--ink);
  background:var(--bg); line-height:1.7; font-size:16px; -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; height:auto; display:block; }
a{ color:var(--sage-deep); text-decoration:none; transition:color .15s; }
a:hover{ color:var(--gold); }
h1,h2,h3,h4{ font-family:var(--display); color:var(--ink); line-height:1.22; margin:0 0 .4em; font-weight:600; }
p{ margin:0 0 1em; }
.container{ max-width:1200px; margin:0 auto; padding:0 24px; }
.screen-reader-text{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.kicker{ display:inline-block; font-size:.72rem; letter-spacing:.3em; text-transform:uppercase; color:var(--gold); font-weight:700; margin-bottom:.7rem; }
.section{ padding:64px 0; }
.section-head{ text-align:center; max-width:640px; margin:0 auto 40px; }
.section-head h2{ font-size:2rem; margin:0 0 .25em; }
.section-head p{ color:var(--muted); margin:0; }
.see-all{ display:inline-block; margin-top:28px; font-weight:600; letter-spacing:.05em; border-bottom:1.5px solid var(--gold); padding-bottom:4px; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; font-weight:600; font-size:.95rem; letter-spacing:.02em; border-radius:999px; padding:14px 28px; cursor:pointer; border:1px solid transparent; transition:all .18s; }
.btn-primary{ background:var(--sage-deep); color:#fff; }
.btn-primary:hover{ background:var(--sage); color:#fff; transform:translateY(-1px); box-shadow:var(--shadow-sm); }
.btn-outline{ background:transparent; color:var(--ink); border-color:var(--line); }
.btn-outline:hover{ border-color:var(--ink); }
.btn-gold{ background:var(--gold); color:#fff; }
.btn-gold:hover{ background:#9c8150; color:#fff; }
.btn-wa{ background:#25D366; color:#fff; }
.btn-wa:hover{ filter:brightness(.94); color:#fff; }
.btn-block{ width:100%; }

/* =========================================================
   TOP BAR
   ========================================================= */
.topbar{ background:var(--sage-deep); color:#f2eee6; text-align:center; font-size:.8rem; letter-spacing:.05em; padding:9px 16px; }
.topbar a{ color:#fff; font-weight:600; }
.topbar a:hover{ color:var(--gold); }

/* =========================================================
   HEADER
   ========================================================= */
.site-header{ background:var(--bg); position:sticky; top:0; z-index:60; border-bottom:1px solid var(--line); transition:box-shadow .2s; }
.site-header.is-stuck{ background:rgba(250,247,241,.96); backdrop-filter:blur(6px); box-shadow:0 6px 24px rgba(80,65,45,.08); }
.header-main{ display:flex; align-items:center; gap:20px; padding:18px 0; }
.brand{ display:flex; align-items:center; gap:10px; margin-right:auto; }
.brand img.brand-logo{ height:44px; width:auto; }
.brand-name{ font-family:var(--display); font-size:1.55rem; font-weight:600; color:var(--ink); letter-spacing:.01em; }
.brand-name span{ color:var(--gold); font-style:italic; }

.header-search{ flex:1; max-width:480px; display:flex; }
.header-search form{ display:flex; width:100%; border:1px solid var(--line); border-radius:999px; overflow:hidden; background:var(--surface); }
.header-search input{ flex:1; border:none; background:transparent; padding:11px 18px; font-size:.92rem; color:var(--ink); outline:none; }
.header-search button{ border:none; background:transparent; padding:0 16px; cursor:pointer; color:var(--sage-deep); font-size:1.05rem; }

.header-icons{ display:flex; align-items:center; gap:12px; }
.icon-btn{ position:relative; width:42px; height:42px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; color:var(--ink); background:var(--surface); border:1px solid var(--line); font-size:1.1rem; transition:.15s; }
.icon-btn:hover{ border-color:var(--sage); color:var(--sage-deep); }
.icon-btn .dot{ position:absolute; top:6px; right:6px; width:8px; height:8px; border-radius:50%; background:var(--sale); }

.main-nav{ border-top:1px solid var(--line); background:var(--bg); }
.main-nav ul{ list-style:none; margin:0 auto; padding:0; display:flex; justify-content:center; gap:4px; max-width:1200px; flex-wrap:wrap; }
.main-nav li a{ display:block; padding:13px 18px; font-size:.84rem; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--ink); }
.main-nav li a:hover{ color:var(--sage-deep); }
.main-nav li.current-menu-item a, .main-nav li a.current{ color:var(--sage-deep); box-shadow:inset 0 -2px 0 var(--gold); }

.hamburger{ display:none; width:42px; height:42px; border-radius:50%; border:1px solid var(--line); background:var(--surface); font-size:1.15rem; cursor:pointer; color:var(--ink); }
.mobile-nav{ position:fixed; top:0; right:0; height:100%; width:min(320px,86vw); background:var(--surface); z-index:120; transform:translateX(100%); transition:transform .25s ease; padding:24px; box-shadow:-10px 0 40px rgba(0,0,0,.12); overflow-y:auto; }
.mobile-nav.open{ transform:translateX(0); }
.mobile-nav a{ display:block; padding:13px 6px; font-weight:600; border-bottom:1px solid var(--line); color:var(--ink); }
.mobile-nav .mnav-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.mnav-close{ border:none; background:var(--bg); width:38px; height:38px; border-radius:50%; font-size:1.1rem; cursor:pointer; }
.drawer-backdrop{ position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:110; opacity:0; pointer-events:none; transition:.2s; }
.drawer-backdrop.show{ opacity:1; pointer-events:auto; }

/* =========================================================
   HERO  (calm, soft, single lifestyle image)
   ========================================================= */
.hero{ background:linear-gradient(180deg, #fbf8f2 0%, var(--bg-soft) 100%); overflow:hidden; }
.hero-inner{ display:grid; grid-template-columns:1.05fr .95fr; gap:48px; align-items:center; padding:72px 0 90px; }
.hero-copy h1{ font-size:3rem; line-height:1.12; margin:.15em 0 .4em; }
.hero-copy h1 em{ font-style:italic; color:var(--sage-deep); }
.hero-copy p{ font-size:1.12rem; color:var(--muted); max-width:520px; }
.hero-cta{ display:flex; gap:14px; margin-top:30px; flex-wrap:wrap; }
.hero-proof{ display:flex; align-items:center; gap:10px; margin-top:30px; font-size:.9rem; color:var(--muted); }
.hero-proof .stars{ color:var(--gold); font-size:1.05rem; letter-spacing:2px; }
.hero-proof b{ color:var(--ink); }

.hero-image{ position:relative; }
.hero-image .frame{ border-radius:22px; overflow:hidden; box-shadow:var(--shadow); background:var(--blush); }
.hero-image .frame img{ width:100%; aspect-ratio:4/5; object-fit:cover; }
.hero-float{ position:absolute; left:-18px; bottom:26px; background:var(--surface); border-radius:14px; box-shadow:var(--shadow); padding:14px 18px; border:1px solid var(--line); display:flex; align-items:center; gap:12px; }
.hero-float .stars{ color:var(--gold); font-size:1rem; letter-spacing:2px; }
.hero-float .s{ font-size:.78rem; color:var(--muted); }

/* =========================================================
   TRUST STRIP
   ========================================================= */
.trust-strip{ background:var(--surface); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.trust-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:22px; padding:28px 0; }
.trust-item{ display:flex; gap:13px; align-items:center; }
.trust-item .ti{ width:44px; height:44px; border-radius:12px; background:var(--sage-soft); color:var(--sage-deep); display:flex; align-items:center; justify-content:center; font-size:1.25rem; flex:none; }
.trust-item b{ display:block; font-size:.92rem; }
.trust-item span{ font-size:.8rem; color:var(--muted); }

/* =========================================================
   SHOP BY INTENTION (category tiles)
   ========================================================= */
.cat-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; }
.cat-card{ position:relative; border-radius:var(--radius); overflow:hidden; min-height:300px; display:flex; align-items:flex-end; padding:22px; color:#fff; }
.cat-card .cc-bg{ position:absolute; inset:0; z-index:0; }
.cat-card .cc-bg img{ width:100%; height:100%; object-fit:cover; }
.cat-card .cc-bg::after{ content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(30,25,18,.55) 100%); }
.cat-card .cc-body{ position:relative; z-index:1; }
.cat-card h3{ color:#fff; font-size:1.25rem; margin:0; }
.cat-card p{ color:rgba(255,255,255,.85); font-size:.8rem; margin:2px 0 0; }

/* =========================================================
   PRODUCT GRID / CARD
   ========================================================= */
.product-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:22px; }
.product-card{ background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; display:flex; flex-direction:column; transition:transform .2s, box-shadow .2s; }
.product-card:hover{ transform:translateY(-4px); box-shadow:var(--shadow); }
.card-media{ position:relative; aspect-ratio:1/1; overflow:hidden; background:var(--bg-soft); }
.card-media img{ width:100%; height:100%; object-fit:cover; transition:transform .45s ease; }
.product-card:hover .card-media img{ transform:scale(1.04); }
.sale-badge{ position:absolute; top:12px; left:12px; z-index:2; background:var(--sale); color:#fff; font-weight:700; font-size:.66rem; letter-spacing:.08em; padding:5px 10px; border-radius:6px; text-transform:uppercase; box-shadow:0 3px 8px rgba(169,80,58,.3); }
.sold-pill{ position:absolute; top:12px; right:12px; z-index:2; background:rgba(255,255,255,.92); color:var(--ink); font-size:.68rem; font-weight:700; padding:4px 9px; border-radius:999px; }
.card-body{ padding:16px 18px 20px; display:flex; flex-direction:column; gap:7px; flex:1; }
.card-title{ font-family:var(--display); font-size:1.05rem; font-weight:600; color:var(--ink); line-height:1.35; }
.card-title a{ color:inherit; }
.card-title a:hover{ color:var(--sage-deep); }
.card-rating{ display:flex; align-items:center; gap:8px; font-size:.8rem; color:var(--muted); }

.es-price-block{ display:flex; align-items:center; flex-wrap:wrap; gap:9px; margin-top:2px; }
.es-regular-price{ font-size:1.25rem; font-weight:700; color:var(--ink); }
.es-sale-price{ font-size:1.25rem; font-weight:700; color:var(--sale); }
.es-original{ color:var(--muted); font-size:.95rem; text-decoration:line-through; }
.es-regular-view{ display:none; }
.es-price-block.es-expired .es-sale-view{ display:none; }
.es-price-block.es-expired .es-regular-view{ display:inline; }
.es-sale-view{ display:flex; align-items:center; flex-wrap:wrap; gap:9px; }
.es-countdown{ display:inline-block; width:100%; font-size:.76rem; font-weight:700; color:var(--purple); background:var(--purple-soft); border-radius:7px; padding:5px 9px; margin-top:2px; }
.es-countdown::before{ content:"⏳ "; }

.btn-add{ margin-top:auto; width:100%; background:var(--sage-deep); color:#fff; border:none; border-radius:10px; padding:12px; font-size:.9rem; font-weight:600; cursor:pointer; transition:.18s; }
.btn-add:hover{ background:var(--sage); }

/* =========================================================
   WHY US (value pillars)
   ========================================================= */
.why-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:22px; }
.why-item{ background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:26px 22px; text-align:center; }
.why-item .wi{ width:54px; height:54px; margin:0 auto 14px; border-radius:50%; background:var(--gold-soft); color:var(--gold); display:flex; align-items:center; justify-content:center; font-size:1.4rem; }
.why-item h3{ font-size:1.1rem; margin:0 0 6px; }
.why-item p{ font-size:.86rem; color:var(--muted); margin:0; }

/* =========================================================
   REVIEWS / TESTIMONIALS
   ========================================================= */
.testi-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.testi-card{ background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:22px; }
.testi-card .stars{ color:var(--gold); font-size:.95rem; letter-spacing:2px; }
.testi-card p{ margin:12px 0; font-size:.92rem; color:var(--ink); }
.testi-card .who{ font-size:.82rem; color:var(--muted); font-weight:600; }

/* =========================================================
   PRODUCT DETAIL
   ========================================================= */
.breadcrumb{ font-size:.8rem; color:var(--muted); padding:22px 0 6px; }
.breadcrumb a{ color:var(--muted); }
.product-detail{ display:grid; grid-template-columns:1fr 1fr; gap:44px; padding:26px 0 10px; align-items:start; }
.detail-media{ position:sticky; top:120px; border-radius:var(--radius); overflow:hidden; background:var(--bg-soft); box-shadow:var(--shadow-sm); }
.detail-media img{ width:100%; aspect-ratio:1/1; object-fit:cover; }
.detail-info h1{ font-size:2.1rem; }
.detail-rating{ display:flex; align-items:center; gap:10px; margin:10px 0 16px; font-size:.9rem; color:var(--muted); }
.detail-big-price .es-sale-price,.detail-big-price .es-regular-price{ font-size:2rem; }
.detail-meta{ display:flex; gap:26px; flex-wrap:wrap; color:var(--muted); font-size:.9rem; margin:20px 0; }
.detail-meta strong{ color:var(--ink); }
.detail-desc{ color:var(--muted); font-size:1.02rem; }
.ship-note{ margin:22px 0; border:1px solid var(--gold); background:var(--gold-soft); border-radius:var(--radius-sm); padding:14px 16px; font-size:.86rem; color:#6f5a33; }
.detail-actions{ display:flex; gap:14px; margin:24px 0; flex-wrap:wrap; }
.detail-actions .btn-add{ width:auto; flex:1; min-width:180px; padding:15px; }
.product-description{ border-top:1px solid var(--line); margin-top:8px; padding-top:22px; }
.product-description h3{ font-size:1.05rem; }

.reviews-section{ padding:50px 0 80px; }
.reviews-head{ display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:24px; }
.reviews-head h2{ margin:0; font-size:1.6rem; }
.review-card{ background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-sm); padding:20px 22px; margin-bottom:14px; }
.review-top{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; }
.review-name{ font-weight:600; }
.review-country{ color:var(--muted); font-size:.84rem; }
.review-date{ color:var(--muted); font-size:.8rem; }
.review-text{ margin:10px 0 0; }
.stars{ color:var(--gold); font-size:1rem; letter-spacing:2px; }
.stars .star-empty{ color:#e2dacb; }

/* =========================================================
   MODAL
   ========================================================= */
.modal-overlay{ position:fixed; inset:0; background:rgba(30,22,14,.5); display:none; align-items:center; justify-content:center; z-index:150; padding:20px; }
.modal-overlay.open{ display:flex; }
.modal-box{ background:var(--surface); border-radius:18px; max-width:430px; width:100%; padding:34px 30px; text-align:center; box-shadow:0 24px 60px rgba(0,0,0,.25); }
.modal-box .m-ico{ font-size:2.4rem; margin-bottom:6px; }
.modal-box h3{ margin:0 0 8px; font-size:1.4rem; }
.modal-box p{ color:var(--muted); margin:0 0 20px; }
.modal-close{ margin-top:16px; background:none; border:none; color:var(--muted); cursor:pointer; font-size:.88rem; text-decoration:underline; }

/* =========================================================
   FOOTER  (only copyright + WhatsApp per spec)
   ========================================================= */
.site-footer{ background:#26211a; color:#cdc3b5; text-align:center; padding:56px 20px 32px; }
.footer-brand{ font-family:var(--display); font-size:1.7rem; color:#fff; font-weight:600; letter-spacing:.02em; }
.footer-brand span{ color:var(--gold); font-style:italic; }
.footer-tagline{ color:#a99f90; margin:10px auto 26px; max-width:460px; font-size:.95rem; }
.footer-wa{ display:inline-flex; align-items:center; gap:10px; background:var(--sage-deep); color:#fff; border-radius:999px; padding:13px 28px; font-weight:600; }
.footer-wa:hover{ background:var(--sage); color:#fff; }
.footer-line{ border-top:1px solid rgba(255,255,255,.12); margin:32px auto 0; max-width:900px; }
.footer-copy{ margin:20px 0 0; font-size:.8rem; color:#8f8577; }

/* =========================================================
   PAGE / GENERIC
   ========================================================= */
.page-content{ max-width:860px; margin:0 auto; padding:50px 24px; }
.page-content img{ border-radius:var(--radius); margin:12px 0; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width:1024px){
  .product-grid{ grid-template-columns:repeat(3,1fr); }
  .cat-grid{ grid-template-columns:1fr 1fr; }
  .why-grid{ grid-template-columns:repeat(2,1fr); }
  .testi-grid{ grid-template-columns:1fr 1fr; }
  .hero-inner{ grid-template-columns:1fr; gap:30px; }
  .hero-image{ max-width:520px; }
}
@media (max-width:820px){
  .header-search{ display:none; }
  .main-nav{ display:none; }
  .hamburger{ display:inline-flex; align-items:center; justify-content:center; }
  .product-grid{ grid-template-columns:repeat(2,1fr); gap:14px; }
  .trust-grid{ grid-template-columns:repeat(2,1fr); }
  .cat-grid{ grid-template-columns:1fr 1fr; }
  .product-detail{ grid-template-columns:1fr; }
  .detail-media{ position:static; }
  .hero-copy h1{ font-size:2.2rem; }
}
@media (max-width:520px){
  .product-grid{ grid-template-columns:1fr 1fr; gap:12px; }
  .why-grid{ grid-template-columns:1fr 1fr; }
  .testi-grid{ grid-template-columns:1fr; }
  .cat-grid{ grid-template-columns:1fr; }
  .card-body{ padding:12px; }
}
