/* =========================================================================
   GemLux — Luxury Gemstone & Jewelry Design System
   Palette: Onyx black · Ivory white · Champagne gold · Emerald · Sapphire
   ========================================================================= */

:root {
    --gl-black: #0d0d10;
    --gl-ink: #16161c;
    --gl-charcoal: #232330;
    --gl-ivory: #faf8f4;
    --gl-cream: #f4efe7;
    --gl-gold: #c9a24b;
    --gl-gold-light: #e6cd8a;
    --gl-gold-dark: #a17e2e;
    --gl-emerald: #0f9d58;
    --gl-emerald-deep: #05502e;
    --gl-sapphire: #1e4fd8;
    --gl-sapphire-deep: #0b1e4d;
    --gl-ruby: #c81d45;
    --gl-muted: #8a8676;
    --gl-line: #e7e1d6;
    --gl-line-dark: #2c2c38;

    --gl-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    --gl-sans: 'Jost', 'Inter', 'Helvetica Neue', Arial, sans-serif;

    --gl-shadow-sm: 0 4px 18px rgba(20, 18, 14, .06);
    --gl-shadow: 0 12px 40px rgba(20, 18, 14, .10);
    --gl-shadow-lg: 0 28px 70px rgba(20, 18, 14, .16);
    --gl-radius: 16px;
    --gl-radius-lg: 26px;
    --gl-ease: cubic-bezier(.22, .61, .36, 1);
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }

body {
    font-family: var(--gl-sans);
    color: var(--gl-ink);
    background: var(--gl-ivory);
    letter-spacing: .01em;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .serif { font-family: var(--gl-serif); font-weight: 600; letter-spacing: .005em; }
.text-gold { color: var(--gl-gold) !important; }
.bg-onyx { background: var(--gl-black) !important; }
.bg-ink { background: var(--gl-ink) !important; }
.bg-cream { background: var(--gl-cream) !important; }

a { color: inherit; text-decoration: none; transition: color .25s var(--gl-ease); }
a:hover { color: var(--gl-gold-dark); }

.container-xl { max-width: 1320px; }

.eyebrow {
    font-family: var(--gl-sans);
    text-transform: uppercase;
    letter-spacing: .32em;
    font-size: .72rem;
    font-weight: 600;
    color: var(--gl-gold-dark);
}

.section { padding: 5rem 0; }
.section-tight { padding: 3rem 0; }

.section-head { text-align: center; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3rem); margin: .4rem 0 .6rem; }
.section-head p { color: var(--gl-muted); max-width: 620px; margin: 0 auto; }

.gold-rule {
    width: 64px; height: 2px; margin: 1rem auto 0;
    background: linear-gradient(90deg, transparent, var(--gl-gold), transparent);
}

/* ------------------------------------------------------------------ buttons */
.btn { border-radius: 999px; font-weight: 500; letter-spacing: .04em; padding: .7rem 1.7rem; transition: all .3s var(--gl-ease); }
.btn-gold {
    background: linear-gradient(135deg, var(--gl-gold-light), var(--gl-gold));
    color: var(--gl-black); border: none; box-shadow: 0 8px 24px rgba(201, 162, 75, .3);
}
.btn-gold:hover { background: linear-gradient(135deg, var(--gl-gold), var(--gl-gold-dark)); color: #000; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(201, 162, 75, .42); }
.btn-onyx { background: var(--gl-black); color: var(--gl-ivory); border: none; }
.btn-onyx:hover { background: var(--gl-charcoal); color: #fff; transform: translateY(-2px); }
.btn-outline-gold { border: 1.5px solid var(--gl-gold); color: var(--gl-gold-dark); background: transparent; }
.btn-outline-gold:hover { background: var(--gl-gold); color: var(--gl-black); }
.btn-outline-ivory { border: 1.5px solid rgba(255,255,255,.6); color: #fff; background: transparent; }
.btn-outline-ivory:hover { background: #fff; color: var(--gl-black); }

/* ------------------------------------------------------------------ topbar + header */
.gl-topbar { background: var(--gl-black); color: #cfcabb; font-size: .78rem; letter-spacing: .06em; }
.gl-topbar a { color: #cfcabb; }
.gl-topbar a:hover { color: var(--gl-gold-light); }

.gl-header { background: rgba(250,248,244,.88); backdrop-filter: blur(14px); border-bottom: 1px solid var(--gl-line); position: sticky; top: 0; z-index: 1030; }
.gl-brand { font-family: var(--gl-serif); font-size: 1.85rem; font-weight: 700; letter-spacing: .04em; color: var(--gl-black); display: inline-flex; align-items: center; gap: .5rem; }
.gl-brand .gem { width: 26px; height: 26px; }
.gl-brand span { color: var(--gl-gold); }

.gl-nav a { font-size: .82rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 500; color: var(--gl-ink); padding: .4rem 0; position: relative; }
.gl-nav a::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 1.5px; background: var(--gl-gold); transition: width .3s var(--gl-ease); }
.gl-nav a:hover::after, .gl-nav .active > a::after { width: 100%; }

.gl-icon-btn { position: relative; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--gl-ink); transition: all .25s var(--gl-ease); }
.gl-icon-btn:hover { background: var(--gl-cream); color: var(--gl-gold-dark); }
.gl-badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--gl-gold); color: #000; font-size: .66rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* mega-menu dropdown */
.gl-mega { position: absolute; left: 0; right: 0; top: 100%; background: #fff; box-shadow: var(--gl-shadow-lg); border-top: 2px solid var(--gl-gold); opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .3s var(--gl-ease); z-index: 1040; }
.gl-mega-wrap:hover .gl-mega { opacity: 1; visibility: visible; transform: translateY(0); }
.gl-mega h6 { font-family: var(--gl-sans); text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; color: var(--gl-gold-dark); margin-bottom: .9rem; }
.gl-mega ul { list-style: none; padding: 0; margin: 0; columns: 2; }
.gl-mega li { margin-bottom: .5rem; }
.gl-mega a { font-size: .88rem; color: var(--gl-ink); }
.gl-mega a:hover { color: var(--gl-gold-dark); padding-left: 4px; }

/* search */
.gl-search { position: relative; }
.gl-search input { border: 1px solid var(--gl-line); border-radius: 999px; padding: .55rem 2.6rem .55rem 1.2rem; background: #fff; font-size: .9rem; width: 260px; transition: width .3s var(--gl-ease), box-shadow .3s; }
.gl-search input:focus { width: 320px; outline: none; box-shadow: 0 0 0 3px rgba(201,162,75,.18); border-color: var(--gl-gold); }
.gl-suggest { position: absolute; top: 110%; left: 0; right: 0; background: #fff; border-radius: 14px; box-shadow: var(--gl-shadow-lg); overflow: hidden; display: none; z-index: 1050; }
.gl-suggest.show { display: block; }
.gl-suggest a { display: flex; gap: .8rem; align-items: center; padding: .7rem 1rem; border-bottom: 1px solid var(--gl-cream); }
.gl-suggest a:hover { background: var(--gl-cream); }
.gl-suggest img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; }

/* ------------------------------------------------------------------ hero */
.gl-hero { position: relative; }
.gl-hero-slide { position: relative; min-height: 620px; display: flex; align-items: center; background-size: cover; background-position: center; }
.gl-hero-slide::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,8,12,.88) 0%, rgba(8,8,12,.55) 45%, rgba(8,8,12,.15) 100%); }
.gl-hero-content { position: relative; z-index: 2; color: #fff; max-width: 640px; }
.gl-hero-content h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.04; color: #fff; }
.gl-hero-content .eyebrow { color: var(--gl-gold-light); }
.gl-hero-content p { font-size: 1.12rem; color: rgba(255,255,255,.86); max-width: 520px; }

.carousel-indicators [data-bs-target] { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.5); border: none; }
.carousel-indicators .active { background: var(--gl-gold); }

/* ------------------------------------------------------------------ product card */
.product-card { background: #fff; border-radius: var(--gl-radius); overflow: hidden; box-shadow: var(--gl-shadow-sm); transition: transform .35s var(--gl-ease), box-shadow .35s var(--gl-ease); height: 100%; display: flex; flex-direction: column; border: 1px solid var(--gl-line); }
.product-card:hover { transform: translateY(-6px); box-shadow: var(--gl-shadow-lg); }
.product-card .media { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--gl-black); }
.product-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--gl-ease); }
.product-card:hover .media img { transform: scale(1.06); }
.product-card .badges { position: absolute; top: .8rem; left: .8rem; display: flex; flex-direction: column; gap: .4rem; z-index: 2; }
.pill { font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .3rem .6rem; border-radius: 999px; }
.pill-sale { background: var(--gl-ruby); color: #fff; }
.pill-new { background: var(--gl-emerald); color: #fff; }
.pill-best { background: var(--gl-gold); color: #000; }
.pill-out { background: #6b6b6b; color: #fff; }
.pill-cert { background: var(--gl-ink); color: var(--gl-gold-light); }
.product-card .meta-line { font-size: .72rem; color: var(--gl-muted); display: block; margin-top: .1rem; }

.card-actions { position: absolute; top: .8rem; right: .8rem; display: flex; flex-direction: column; gap: .5rem; z-index: 2; opacity: 0; transform: translateX(12px); transition: all .3s var(--gl-ease); }
.product-card:hover .card-actions { opacity: 1; transform: translateX(0); }
.card-act { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--gl-ink); display: flex; align-items: center; justify-content: center; box-shadow: var(--gl-shadow-sm); border: none; transition: all .25s; }
.card-act:hover { background: var(--gl-gold); color: #000; }
.card-act.active { background: var(--gl-ruby); color: #fff; }

.product-card .body { padding: 1.1rem 1.2rem 1.3rem; flex: 1; display: flex; flex-direction: column; }
.product-card .cat { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gl-muted); }
.product-card .title { font-family: var(--gl-serif); font-size: 1.15rem; line-height: 1.25; margin: .3rem 0 .5rem; color: var(--gl-black); }
.product-card .title a:hover { color: var(--gl-gold-dark); }
.product-card .price { margin-top: auto; display: flex; align-items: baseline; gap: .5rem; }
.product-card .price .now { font-size: 1.15rem; font-weight: 600; color: var(--gl-black); }
.product-card .price .was { font-size: .9rem; color: var(--gl-muted); text-decoration: line-through; }
.stars { color: var(--gl-gold); font-size: .8rem; letter-spacing: .05em; }
.stars .muted { color: var(--gl-line); }

.add-cart-btn { margin-top: .9rem; width: 100%; }

/* ------------------------------------------------------------------ category tiles */
.cat-tile { position: relative; border-radius: var(--gl-radius); overflow: hidden; aspect-ratio: 4/5; display: block; }
.cat-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--gl-ease); }
.cat-tile:hover img { transform: scale(1.08); }
.cat-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8,8,12,.72), transparent 60%); }
.cat-tile .label { position: absolute; left: 1.2rem; bottom: 1.1rem; z-index: 2; color: #fff; }
.cat-tile .label h3 { color: #fff; font-size: 1.4rem; margin: 0; }
.cat-tile .label span { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gl-gold-light); }

/* stone chips */
.stone-chip { display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center; }
.stone-chip .orb { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; box-shadow: var(--gl-shadow); border: 2px solid #fff; transition: transform .3s var(--gl-ease); }
.stone-chip:hover .orb { transform: scale(1.08) rotate(-3deg); }
.stone-chip .orb img { width: 100%; height: 100%; object-fit: cover; }
.stone-chip span { font-size: .82rem; font-weight: 500; }

/* ------------------------------------------------------------------ glass promo */
.glass { background: rgba(255,255,255,.08); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.18); border-radius: var(--gl-radius-lg); }

/* ------------------------------------------------------------------ breadcrumb */
.gl-crumb { font-size: .8rem; letter-spacing: .05em; color: var(--gl-muted); }
.gl-crumb a { color: var(--gl-muted); }
.gl-crumb a:hover { color: var(--gl-gold-dark); }
.gl-crumb .sep { margin: 0 .5rem; color: var(--gl-line); }

/* ------------------------------------------------------------------ filters sidebar */
.filter-panel { background: #fff; border: 1px solid var(--gl-line); border-radius: var(--gl-radius); padding: 1.4rem; }
.filter-group { border-bottom: 1px solid var(--gl-cream); padding: 1rem 0; }
.filter-group:last-child { border-bottom: none; }
.filter-group h6 { font-family: var(--gl-sans); text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 700; margin-bottom: .8rem; }
.filter-group .form-check-label { font-size: .88rem; }

/* ------------------------------------------------------------------ product detail */
.pd-gallery-main { border-radius: var(--gl-radius); overflow: hidden; background: var(--gl-black); aspect-ratio: 1/1; }
.pd-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb { border-radius: 10px; overflow: hidden; cursor: pointer; border: 2px solid transparent; aspect-ratio: 1/1; background: var(--gl-black); }
.pd-thumb.active { border-color: var(--gl-gold); }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-price { font-size: 2rem; font-weight: 600; color: var(--gl-black); }
.pd-price .was { font-size: 1.2rem; color: var(--gl-muted); text-decoration: line-through; margin-left: .6rem; font-weight: 400; }
.spec-table { width: 100%; }
.spec-table td { padding: .6rem 0; border-bottom: 1px solid var(--gl-cream); font-size: .92rem; }
.spec-table td:first-child { color: var(--gl-muted); width: 42%; }
.spec-table td:last-child { font-weight: 500; }
.qty-box { display: inline-flex; align-items: center; border: 1px solid var(--gl-line); border-radius: 999px; overflow: hidden; }
.qty-box button { width: 42px; height: 46px; border: none; background: transparent; font-size: 1.1rem; }
.qty-box input { width: 52px; text-align: center; border: none; height: 46px; }
.trust-row { display: flex; gap: 1.5rem; flex-wrap: wrap; color: var(--gl-muted); font-size: .84rem; }
.trust-row .ti { display: flex; align-items: center; gap: .5rem; }

/* ------------------------------------------------------------------ timeline */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 1.6rem 2.4rem; }
.timeline li::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--gl-line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--gl-line); }
.timeline li.done .dot { background: var(--gl-emerald); border-color: var(--gl-emerald); }
.timeline li.current .dot { background: var(--gl-gold); border-color: var(--gl-gold); box-shadow: 0 0 0 5px rgba(201,162,75,.2); }
.timeline .t-title { font-weight: 600; }
.timeline .t-time { font-size: .8rem; color: var(--gl-muted); }

/* status badges */
.status-badge { font-size: .72rem; font-weight: 600; letter-spacing: .06em; padding: .3rem .7rem; border-radius: 999px; text-transform: uppercase; display: inline-block; }
.st-pending { background: #fff3cd; color: #8a6d00; }
.st-confirmed { background: #cfe2ff; color: #084298; }
.st-packed { background: #e2d9f3; color: #59359a; }
.st-shipped { background: #cff4fc; color: #055160; }
.st-out_for_delivery { background: #d1e7dd; color: #0a5c36; }
.st-delivered, .st-completed { background: #d1e7dd; color: #0f5132; }
.st-cancelled, .st-returned { background: #f8d7da; color: #842029; }
.st-refunded { background: #e2e3e5; color: #41464b; }

/* ------------------------------------------------------------------ footer */
.gl-footer { background: var(--gl-black); color: #b9b4a6; padding: 4.5rem 0 0; }
.gl-footer h5 { color: #fff; font-family: var(--gl-sans); text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; margin-bottom: 1.3rem; }
.gl-footer a { color: #b9b4a6; font-size: .9rem; display: inline-block; margin-bottom: .6rem; }
.gl-footer a:hover { color: var(--gl-gold-light); }
.gl-footer .brand { font-family: var(--gl-serif); font-size: 1.8rem; color: #fff; }
.gl-footer .brand span { color: var(--gl-gold); }
.footer-social a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--gl-line-dark); display: inline-flex; align-items: center; justify-content: center; margin: 0 .35rem 0 0; }
.footer-social a:hover { background: var(--gl-gold); color: #000; border-color: var(--gl-gold); }
.footer-bottom { border-top: 1px solid var(--gl-line-dark); margin-top: 3rem; padding: 1.4rem 0; font-size: .82rem; }
.pay-icons span { font-size: .74rem; letter-spacing: .08em; border: 1px solid var(--gl-line-dark); border-radius: 6px; padding: .3rem .6rem; color: #cfcabb; }

/* newsletter band */
.newsletter-band { background: linear-gradient(135deg, var(--gl-emerald-deep), var(--gl-sapphire-deep)); color: #fff; border-radius: var(--gl-radius-lg); }
.newsletter-band input { border-radius: 999px; border: none; padding: .8rem 1.4rem; }

/* toast */
.gl-toast-wrap { position: fixed; top: 90px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: .6rem; }
.gl-toast { background: var(--gl-black); color: #fff; border-left: 3px solid var(--gl-gold); border-radius: 10px; padding: .9rem 1.2rem; box-shadow: var(--gl-shadow-lg); min-width: 260px; animation: slidein .3s var(--gl-ease); font-size: .9rem; }
.gl-toast.err { border-left-color: var(--gl-ruby); }
@keyframes slidein { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--gl-ease), transform .7s var(--gl-ease); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ------------------------------------------------------------------ admin */
.admin-shell { display: flex; min-height: 100vh; background: #f4f5f7; }
.admin-side { width: 264px; background: var(--gl-black); color: #cfcabb; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand { font-family: var(--gl-serif); font-size: 1.5rem; color: #fff; padding: 1.5rem; border-bottom: 1px solid var(--gl-line-dark); }
.admin-side .brand span { color: var(--gl-gold); }
.admin-side a { display: flex; align-items: center; gap: .8rem; padding: .8rem 1.5rem; color: #b9b4a6; font-size: .9rem; }
.admin-side a:hover, .admin-side a.active { background: rgba(201,162,75,.12); color: #fff; border-right: 3px solid var(--gl-gold); }
.admin-main { flex: 1; min-width: 0; }
.admin-topbar { background: #fff; border-bottom: 1px solid #e7e7ea; padding: 1rem 1.6rem; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; }
.admin-content { padding: 1.8rem; }
.stat-card { background: #fff; border-radius: 14px; padding: 1.4rem; box-shadow: var(--gl-shadow-sm); border: 1px solid #edeef0; }
.stat-card .val { font-size: 1.8rem; font-weight: 700; font-family: var(--gl-serif); }
.stat-card .lbl { color: var(--gl-muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.admin-card { background: #fff; border-radius: 14px; box-shadow: var(--gl-shadow-sm); border: 1px solid #edeef0; }
.admin-table { width: 100%; }
.admin-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gl-muted); padding: .9rem 1rem; border-bottom: 1px solid #eee; text-align: left; }
.admin-table td { padding: .9rem 1rem; border-bottom: 1px solid #f2f2f4; font-size: .9rem; vertical-align: middle; }
.admin-table tr:hover td { background: #fafafb; }

/* account nav */
.acct-nav { background: #fff; border: 1px solid var(--gl-line); border-radius: var(--gl-radius); overflow: hidden; }
.acct-nav a { display: flex; align-items: center; gap: .8rem; padding: .9rem 1.2rem; border-bottom: 1px solid var(--gl-cream); font-size: .92rem; }
.acct-nav a:last-child { border-bottom: none; }
.acct-nav a.active { background: var(--gl-cream); color: var(--gl-gold-dark); font-weight: 600; }

/* utilities */
.hover-lift { transition: transform .3s var(--gl-ease), box-shadow .3s; }
.hover-lift:hover { transform: translateY(-4px); box-shadow: var(--gl-shadow); }
.divider-dot { color: var(--gl-gold); }
.text-muted-2 { color: var(--gl-muted) !important; }

@media (max-width: 991px) {
    .gl-search input { width: 180px; }
    .gl-search input:focus { width: 200px; }
    .admin-side { position: fixed; left: -264px; z-index: 1050; transition: left .3s; }
    .admin-side.open { left: 0; }
    .section { padding: 3.2rem 0; }
}
