/* ========================================
   Amethez — Main Stylesheet
   Design: Purple #7c3aed | Gold #c9a84c
   ======================================== */

:root {
  --purple: #7c3aed;
  --purple-light: #a78bfa;
  --purple-dark: #5b21b6;
  --gold: #c9a84c;
  --gold-light: #e6c97a;
  --bg: #faf8f4;
  --bg-card: #ffffff;
  --text: #1a1228;
  --text-muted: #6b7280;
  --line-green: #06C755;
  --border: #e9e0f5;
  --shadow: 0 4px 24px rgba(124, 58, 237, 0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Sarabun', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.75;
}

/* ── Typography ── */
h1, h2, h3, h4, h5 {
  font-family: 'Playfair Display', serif;
  color: var(--text);
  line-height: 1.3;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); margin-bottom: 1rem; }
h3 { font-size: 1.35rem; }

a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--purple-dark); }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }

/* ── Header / Nav ── */
.site-header {
  background: rgba(250, 248, 244, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  padding: 1rem 0;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  display: flex; align-items: center; gap: 0.85rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; font-weight: 700; color: var(--gold);
}
.logo svg, .logo-img { width: 50px; height: 50px; object-fit: contain; flex-shrink: 0; }
.logo-tagline { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.15em; display: block; }

.nav-links { display: flex; gap: 0; list-style: none; align-items: center; }
.nav-links > li { position: relative; }
.nav-links > li > a {
  display: block; padding: .5rem .85rem;
  color: var(--text); font-size: 0.9rem; font-weight: 500; transition: color 0.2s;
  white-space: nowrap;
}
.nav-links > li > a:hover { color: var(--purple); }
.nav-links > li.has-drop > a::after { content: ' ▾'; font-size: .65rem; opacity: .6; }

/* Dropdown */
.nav-links .dropdown {
  display: none; position: absolute; top: calc(100% + 4px); left: 0;
  background: white; border: 1px solid #e9e0f8; border-radius: .65rem;
  box-shadow: 0 8px 28px rgba(124,58,237,.12); list-style: none;
  min-width: 180px; z-index: 200; padding: .4rem 0;
}
.nav-links li.has-drop:hover .dropdown { display: block; }
.nav-links .dropdown li a {
  display: block; padding: .55rem 1.1rem;
  color: #1a1228; font-size: .85rem; font-weight: 500;
  transition: background .15s, color .15s; white-space: nowrap;
}
.nav-links .dropdown li a:hover { background: #f3effa; color: #7c3aed; }
.nav-links .dropdown .drop-sep {
  height: 1px; background: #f0e8ff; margin: .3rem .75rem;
}

/* Mobile hamburger */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; transition: all .25s; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: fixed; top: 64px; left: 0; right: 0;
    background: white; border-bottom: 2px solid #e9e0f8;
    flex-direction: column; align-items: stretch; z-index: 190;
    padding: .75rem 0; box-shadow: 0 8px 24px rgba(0,0,0,.08);
  }
  .nav-links.open { display: flex; }
  .nav-links > li > a { padding: .7rem 1.5rem; font-size: .95rem; }
  .nav-links .dropdown {
    display: block; position: static; box-shadow: none; border: none;
    background: #f8f5ff; border-radius: 0; padding: 0;
  }
  .nav-links .dropdown li a { padding: .55rem 2.25rem; font-size: .85rem; }
  .nav-links li.has-drop > a::after { content: ' ▾'; }
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #1a1228 0%, #2d1b69 50%, #1a1228 100%);
  color: white; text-align: center; padding: 6rem 1.5rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(124,58,237,0.3) 0%, transparent 70%);
}
.hero-inner { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.hero h1 { color: white; font-size: clamp(2.5rem, 6vw, 4rem); margin-bottom: 1rem; }
.hero-gold { color: var(--gold); }
.hero p { font-size: 1.2rem; color: rgba(255,255,255,0.85); margin-bottom: 2rem; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem; border-radius: 0.5rem;
  font-family: 'Sarabun', sans-serif; font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; border: none;
}
.btn-primary { background: var(--purple); color: white; }
.btn-primary:hover { background: var(--purple-dark); color: white; transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: #1a1228; }
.btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.5); }
.btn-outline:hover { border-color: white; background: rgba(255,255,255,0.1); color: white; }
.btn-line { background: var(--line-green); color: white; }
.btn-line:hover { background: #05a647; color: white; }

/* ── Cards ── */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 1rem; padding: 1.75rem;
  box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(124,58,237,0.15); }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }

/* ── Stone Card ── */
.stone-card { text-align: center; }
.stone-card .stone-emoji { font-size: 3rem; margin-bottom: 0.75rem; display: block; }
.stone-card h3 { margin-bottom: 0.5rem; font-size: 1.15rem; }
.stone-card p { font-size: 0.9rem; color: var(--text-muted); }
.stone-card a { display: block; }
.stone-card a:hover .card { transform: translateY(-3px); }

/* ── Section Headers ── */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { margin-bottom: 0.5rem; }
.section-header p { color: var(--text-muted); max-width: 600px; margin: 0 auto; }

.gold-accent { color: var(--gold); }
.purple-accent { color: var(--purple); }

/* ── Shopee Section ── */
.shopee-section {
  background: linear-gradient(135deg, #fff7ed, #fdf4ff);
  border: 2px solid var(--gold); border-radius: 1.25rem;
  padding: 2rem; margin: 3rem 0;
}
.shopee-section h3 { color: var(--gold); margin-bottom: 1rem; }
.product-card { text-align: center; }
.product-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 0.5rem; margin-bottom: 0.75rem; }
.product-card .product-name { font-size: 0.9rem; margin-bottom: 0.5rem; font-weight: 600; }
.product-card .product-price { color: var(--purple); font-size: 1.1rem; font-weight: 700; margin-bottom: 0.75rem; }
.product-card .btn { font-size: 0.85rem; padding: 0.5rem 1rem; width: 100%; justify-content: center; }

/* ── Avatar Sections ── */
.avatar-card {
  display: flex; align-items: flex-start; gap: 1.5rem;
  padding: 2rem; background: var(--bg-card);
  border-radius: 1rem; border: 1px solid var(--border);
}
.avatar-icon { font-size: 3.5rem; flex-shrink: 0; }
.avatar-card h3 { margin-bottom: 0.5rem; }
.avatar-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ── Footer ── */
.site-footer {
  background: #1a1228; color: rgba(255,255,255,0.75);
  padding: 3rem 0 1.5rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 2rem; }
.footer-brand .logo { margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; }
.footer-col h4 { color: white; margin-bottom: 1rem; font-size: 1rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: rgba(255,255,255,0.65); font-size: 0.9rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; text-align: center; font-size: 0.85rem; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .avatar-card { flex-direction: column; }
  .hero { padding: 4rem 1.5rem; }
}

/* ── Article / Stone Page ── */
.article-hero { background: linear-gradient(135deg, #2d1b69, #1a1228); color: white; padding: 4rem 1.5rem 3rem; text-align: center; }
.article-hero .article-meta { justify-content: center; }
.article-hero h1 { color: white; margin-bottom: 0.75rem; }
.article-meta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.meta-tag {
  background: rgba(255,255,255,0.15); padding: 0.25rem 0.75rem;
  border-radius: 2rem; font-size: 0.85rem;
}
.stone-belongs { display:flex; flex-wrap:wrap; gap:.35rem; justify-content:center; margin-top:.875rem; }
.sb-link { display:inline-flex; align-items:center; gap:.25rem; padding:.25rem .65rem; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); border-radius:20px; color:rgba(255,255,255,.58); font-size:.72rem; font-weight:500; text-decoration:none; transition:all .15s; }
.sb-link:hover { background:rgba(255,255,255,.16); color:rgba(255,255,255,.85); }

.article-body { max-width: 820px; margin: 0 auto; padding: 3rem 1.5rem; }
.article-body h2 { margin-top: 2.5rem; margin-bottom: 1rem; color: var(--purple-dark); }
.article-body h3 { margin-top: 1.75rem; margin-bottom: 0.75rem; }
.article-body p { margin-bottom: 1.25rem; }
.article-body ul, .article-body ol { margin: 1rem 0 1.25rem 1.5rem; }
.article-body li { margin-bottom: 0.5rem; }

.quick-facts {
  background: #f5f0ff; border-left: 4px solid var(--purple);
  border-radius: 0 0.75rem 0.75rem 0; padding: 1.5rem;
  margin: 2rem 0;
}
.quick-facts h3 { color: var(--purple); margin-bottom: 1rem; }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.fact-item { text-align: center; }
.fact-label { font-size: 0.8rem; color: var(--text-muted); display: block; }
.fact-value { font-size: 1.1rem; font-weight: 700; color: var(--purple); }

.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.benefit-item {
  background: white; border: 1px solid var(--border);
  border-radius: 0.75rem; padding: 1.25rem; text-align: center;
}
.benefit-icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }
.benefit-item h4 { font-size: 1rem; margin-bottom: 0.4rem; }
.benefit-item p { font-size: 0.85rem; color: var(--text-muted); }

.faq-item { border-bottom: 1px solid var(--border); padding: 1.25rem 0; }
.faq-question { font-weight: 700; color: var(--purple-dark); margin-bottom: 0.5rem; cursor: pointer; }
.faq-answer { color: var(--text-muted); font-size: 0.95rem; }

/* ── Admin ── */
.admin-body { background: #0f0a1e; color: #e2d9f3; min-height: 100vh; }

/* ── Inline CMS Images (article body) ── */
.cms-inline-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 12px;
  margin: 2rem 0;
  display: none;
}
.cms-inline-img[src] { display: block; }
.cms-inline-caption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: -1.5rem;
  margin-bottom: 2rem;
}

/* ── Magazine Two-Column Layout ── */
.mag-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin: 2.5rem 0;
}
.mag-col.img-right .mag-text { order: 1; }
.mag-col.img-right .mag-img  { order: 2; }
.mag-col.img-left  .mag-text { order: 2; }
.mag-col.img-left  .mag-img  { order: 1; }
.mag-col .mag-img img {
  width: 100%;
  border-radius: .75rem;
  display: block;
  object-fit: cover;
  aspect-ratio: 4/3;
}
@media (max-width: 600px) {
  .mag-col {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .mag-col .mag-img { order: -1 !important; }
  .mag-col .mag-img img {
    aspect-ratio: 16/9;
    max-height: 220px;
  }
}

/* ── SVG Icon System ── */
.site-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.site-icon use { color: currentColor; }

/* benefit grid icons */
.benefit-svg-icon {
  width: 2.75rem;
  height: 2.75rem;
  color: var(--purple);
  display: block;
  margin: 0 auto 0.6rem;
}

/* chakra icons */
.chakra-svg-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: block;
  margin: 0 auto 0.5rem;
}
