/* ==========================================================================
   GG2 storefront — base.css
   Shared chrome loaded by every page: tokens, reset, buttons, promo bar,
   header, nav + mega menu, section headings, footer, floating buttons,
   bottom nav, mobile site menu, category drawer, shared responsive rules.
   Page-specific rules live in home.css / product.css (loaded after this).
   ========================================================================== */

:root{
  --wine:#bf0d0e;
  --wine-dark:#3a0404;
  --gold:#c9a45c;
  --champagne:#f6efe4;
  --cream:#fffaf2;
  --ink:#1d1717;
  --muted:#7a6d66;
  --border:rgba(201,164,92,.32);
  --shadow:0 24px 60px rgba(58,4,4,.16);
  --radius:22px;
  --radius-sm:8px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{scroll-behavior:smooth}
body{margin:0;font-family:'Noto Sans TC',system-ui,sans-serif;color:var(--ink);background:var(--cream);line-height:1.7;-webkit-font-smoothing:antialiased}
a{text-decoration:none;color:inherit}
img{max-width:100%;display:block}
ul,ol{list-style:none;margin:0;padding:0}
button{border:none;background:none;cursor:pointer;font-family:inherit}
.promo-bar{background:linear-gradient(90deg,var(--wine),#7a0f24);color:#fff;font-size:13px;padding:10px 5%;text-align:center;position:relative;z-index:101}
.promo-bar a{color:var(--gold);font-weight:700}
.promo-bar .close-btn{position:absolute;right:12px;top:50%;transform:translateY(-50%);color:#fff;font-size:18px;width:28px;height:28px;display:flex;align-items:center;justify-content:center}
.header{position:sticky;top:0;z-index:100;background:rgba(255,250,242,.94);backdrop-filter:blur(14px);border-bottom:1px solid rgba(191,13,14,.1)}
.header-main{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 5%}
.logo{display:flex;align-items:center;flex-shrink:0}
.logo img{height:46px;width:auto;display:block}
.header-search{flex:1;max-width:460px;position:relative}
.header-search input{width:100%;padding:11px 44px 11px 18px;border:1.5px solid #e8e0d8;border-radius:999px;font-size:14px;font-family:inherit;background:#faf8f5;outline:none;transition:.2s}
.header-search input:focus{border-color:var(--gold);background:#fff}
.header-search button{position:absolute;right:4px;top:50%;transform:translateY(-50%);width:34px;height:34px;border-radius:50%;background:var(--wine);color:#fff;display:flex;align-items:center;justify-content:center;font-size:14px}
/* AJAX search suggestions (js/search.js renders into .search-suggest) */
.search-suggest{position:absolute;top:calc(100% + 8px);left:0;right:0;background:#fff;border:1px solid var(--border,#e8e0d8);border-radius:14px;box-shadow:0 12px 32px rgba(30,8,10,.16);z-index:70;max-height:65vh;overflow-y:auto;text-align:left}
.search-suggest-list{list-style:none;margin:0;padding:6px}
.search-suggest-list a{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:10px;text-decoration:none;color:inherit}
.search-suggest-list a:hover,.search-suggest-list a.active{background:#faf3ea}
.search-suggest-list img{width:36px;height:48px;object-fit:contain;flex:0 0 auto}
.ss-main{flex:1;min-width:0}
.ss-title{font-size:13.5px;line-height:1.35;color:#281010;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ss-price{font-size:13px;font-weight:700;color:var(--wine);white-space:nowrap}
.ss-orig{color:#a89f8d;font-weight:400;margin-left:4px}
.ss-all{display:block;padding:11px;text-align:center;font-size:13px;font-weight:600;color:var(--wine);text-decoration:none;border-top:1px solid #f0e8dc}
.header-actions{display:flex;align-items:center;gap:28px;flex-shrink:0}
.header-actions .ha-link{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:11px;color:var(--ink);position:relative}
.header-actions .ha-link .icon{font-size:20px;line-height:1}
.header-actions .cart-badge{position:absolute;top:-4px;right:2px;background:var(--wine);color:#fff;font-size:10px;width:16px;height:16px;border-radius:50%;display:flex;align-items:center;justify-content:center}
.header-actions .wishlist-badge{background:var(--gold);color:var(--wine)}
.btn{display:inline-flex;align-items:center;justify-content:center;padding:12px 22px;border-radius:999px;font-weight:600;font-size:14px;transition:.25s;border:1px solid transparent;cursor:pointer}
.btn-gold{background:var(--gold);color:#1e1209}
.btn-gold:hover{transform:translateY(-2px);box-shadow:0 14px 24px rgba(201,164,92,.28)}
.btn-outline{border-color:var(--border);color:var(--wine);background:rgba(255,255,255,.55)}
.btn-outline:hover{background:#fff}
.mobile-menu-toggle{display:none;flex-direction:column;gap:5px;padding:8px}
.mobile-menu-toggle span{display:block;width:22px;height:2px;background:var(--wine);border-radius:2px;transition:.3s}
.nav-bar{border-top:1px solid rgba(191,13,14,.08);padding:0 5%}
.nav-bar-inner{display:flex;align-items:center;gap:28px;white-space:nowrap}
.nav-item{position:relative;display:flex;align-items:center}
.nav-bar a{font-size:15px;color:#493838;position:relative;padding:12px 0 10px;font-weight:500}
.nav-bar a::after{content:'';position:absolute;bottom:4px;left:0;width:0;height:2px;background:var(--gold);transition:.25s}
.nav-bar a:hover::after,.nav-bar a.active::after{width:100%}
.nav-bar a.active{color:var(--wine);font-weight:700}
.mega-menu{display:none;position:absolute;left:0;top:100%;width:min(920px,90vw);background:#fff;border:1px solid #f0ebe4;border-radius:0 0 var(--radius) var(--radius);box-shadow:var(--shadow);padding:24px;z-index:120;white-space:normal}
.nav-item:hover .mega-menu,.nav-item:focus-within .mega-menu{display:block}
.mega-menu::before{content:'';position:absolute;left:0;right:0;top:-12px;height:12px}
.mega-menu-grid{display:grid;grid-template-columns:1.25fr 1fr 1fr 1fr;gap:24px}
.mega-feature{min-height:210px;border-radius:var(--radius-sm);padding:20px;background:linear-gradient(145deg,rgba(58,4,4,.9),rgba(191,13,14,.58)),url('https://images.unsplash.com/photo-1510812431401-41d2bd2722f3?auto=format&fit=crop&w=700&q=80') center/cover;color:#fff;display:flex;flex-direction:column;justify-content:flex-end}
.mega-feature strong{font-family:'Playfair Display','Noto Serif TC',serif;font-size:22px;line-height:1.2;margin-bottom:8px}
.mega-feature span{color:#eadcc8;font-size:13px}
.mega-col h4{margin:0 0 10px;color:var(--wine);font-size:13px;letter-spacing:.08em}
.mega-col a{display:block;padding:6px 0;color:var(--muted);font-size:13px;font-weight:500}
.mega-col a::after{display:none}
.mega-col a:hover{color:var(--wine)}
.section{padding:80px 5%}
.eyebrow{color:#e9c879;text-transform:uppercase;letter-spacing:4px;font-size:13px;font-weight:700}

/* Brand story block (dark) — shared by homepage + about page */
.story{background:var(--wine-dark);color:#fff;display:grid;grid-template-columns:1.05fr .95fr;gap:48px;align-items:center}
.story-img{min-height:440px;border-radius:var(--radius);background:var(--img) center/cover;box-shadow:var(--shadow)}
.story h2{font-family:'Playfair Display','Noto Serif TC',serif;font-size:44px;line-height:1.2;margin:0 0 18px}
.story p{color:#f1ddc3}
.trust{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin-top:32px}
.trust-card{background:rgba(255,255,255,.07);border:1px solid rgba(201,164,92,.25);border-radius:16px;padding:14px 12px;font-size:13px;white-space:nowrap}
.trust-card b{display:block;color:#e9c879;font-size:20px}
.section-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:32px}
.section-title{font-family:'Playfair Display','Noto Serif TC',serif;font-size:40px;color:var(--wine);margin:0}
.section-sub{color:var(--muted);max-width:580px;margin:8px 0 0}
.products{display:grid;grid-template-columns:repeat(4,1fr);gap:22px}
.product{background:#fff;border-radius:var(--radius);overflow:hidden;box-shadow:0 14px 36px rgba(58,4,4,.08);border:1px solid rgba(191,13,14,.08);position:relative;transition:.3s;display:flex;flex-direction:column}
.product:hover{transform:translateY(-4px);box-shadow:var(--shadow)}
.product .badge{position:absolute;top:14px;left:14px;background:var(--wine);color:#fff;padding:5px 12px;border-radius:999px;font-size:12px;z-index:2;font-weight:700}
.product .wishlist-form{position:absolute;top:12px;right:12px;z-index:2}
.product .wishlist{position:static;width:40px;height:40px;border-radius:50%;background:rgba(255,255,255,.92);display:flex;align-items:center;justify-content:center;font-size:19px;color:var(--muted);transition:.25s;cursor:pointer;border:0;padding:0}
.product .wishlist:hover{color:var(--wine);transform:scale(1.1)}
.product .wishlist.active{color:var(--wine)}
.product-img{height:230px;display:flex;align-items:center;justify-content:center;padding:16px}
.product-img a{display:flex;align-items:center;justify-content:center;height:100%;width:100%}
.product-img img{max-height:100%;max-width:100%;object-fit:contain}
.product-info{padding:20px;flex:1;display:flex;flex-direction:column}
.product .brand{font-size:11px;color:var(--muted);letter-spacing:.5px;text-transform:uppercase}
.product h3{margin:4px 0 6px;font-family:'Noto Serif TC',serif;color:#281010;font-size:17px;line-height:1.4}
.product .meta{color:var(--muted);font-size:13px}
.price{font-weight:700;color:var(--wine);font-size:22px}
.price-row{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 10px;margin-top:auto}
.orig-price{font-size:13px;color:#a89f8d;text-decoration:line-through}
.card-countdown{display:flex;justify-content:center;align-items:center;gap:5px;margin-top:8px;padding:5px;border-radius:6px;background:#fdf3f3;border:1px solid rgba(191,13,14,.18);color:var(--wine);font-size:12px;font-weight:600;line-height:1}
.card-countdown .cc-time{font-variant-numeric:tabular-nums;letter-spacing:.4px}
.product .btn{width:100%;margin-top:14px;padding:11px 16px}
.payment-icons span{padding:5px 12px;background:#f5f0e8;border-radius:4px;font-size:11px;color:var(--muted);font-weight:500}
.cta{margin:40px 5% 80px;padding:52px;border-radius:28px;background:linear-gradient(135deg,var(--wine),var(--wine-dark));color:#fff;display:flex;align-items:center;justify-content:space-between;gap:30px;box-shadow:var(--shadow)}
.cta h2{font-family:'Playfair Display','Noto Serif TC',serif;font-size:38px;margin:0}
.cta p{color:#f4dbc0;margin:10px 0 0}
.footer{background:#130407;color:#d8c0a2;padding:44px 5% 32px}
.footer-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:28px;margin-bottom:28px}
.footer-brand{display:inline-block;background:#fff;border-radius:14px;padding:10px 16px}
.footer-brand img{height:52px;width:auto;display:block}
.footer-col h4{color:#fff;font-size:14px;margin:0 0 12px;font-weight:700}
.footer-col a{display:block;font-size:13px;color:#b8a08a;padding:4px 0;transition:.2s}
.footer-col a:hover{color:var(--gold)}
.footer-bottom{border-top:1px solid rgba(255,255,255,.1);padding-top:18px;text-align:center;font-size:12px;color:#8a7060}
.float-buttons{position:fixed;right:16px;bottom:24px;display:flex;flex-direction:column;gap:10px;z-index:99}
.float-btn{width:52px;height:52px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:21px;box-shadow:0 10px 24px rgba(0,0,0,.2);transition:.25s}
.float-btn:hover{transform:scale(1.08)}
.float-btn.whatsapp{background:#25d366;color:#fff}
.float-btn.top{background:#fff;color:var(--wine);border:1px solid #e8e0d8}
.bottom-nav{position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid #f0ebe4;display:none;justify-content:space-around;padding:6px 0;z-index:100}
.bottom-nav a{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:10px;color:var(--muted);padding:4px 8px}
.bottom-nav a.active{color:var(--wine)}
.bottom-nav a .icon{font-size:20px;position:relative}
.bottom-nav a .cart-badge{position:absolute;top:-5px;right:-11px;background:var(--wine);color:#fff;font-size:9px;line-height:1;font-weight:700;min-width:15px;height:15px;padding:0 3px;border-radius:999px;display:flex;align-items:center;justify-content:center}
.mobile-site-menu{position:fixed;inset:0;z-index:230;background:var(--cream);transform:translateX(-100%);transition:.3s ease;visibility:hidden;overflow:auto}
.mobile-site-menu.active{transform:translateX(0);visibility:visible}
.site-menu-hero{padding:18px 20px 22px;background:radial-gradient(circle at 90% 10%,rgba(201,164,92,.34),transparent 34%),linear-gradient(135deg,var(--wine-dark),var(--wine));color:#fff}
.site-menu-top{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:20px}
.site-menu-logo{display:inline-block;background:#fff;border-radius:12px;padding:8px 14px}
.site-menu-logo img{height:44px;width:auto;display:block}
.site-menu-close{width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;font-size:24px;line-height:1}
.site-menu-search{position:relative}
.site-menu-search input{width:100%;padding:13px 46px 13px 16px;border:1px solid rgba(255,255,255,.24);border-radius:999px;background:rgba(255,255,255,.1);color:#fff;outline:none;font-size:14px;font-family:inherit}
.site-menu-search input::placeholder{color:rgba(255,255,255,.7)}
.site-menu-search button{position:absolute;right:5px;top:50%;transform:translateY(-50%);width:36px;height:36px;border-radius:50%;background:var(--gold);color:var(--wine-dark)}
.site-menu-body{padding:18px 20px 88px}
.site-menu-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:18px}
.site-menu-actions a{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 8px;border-radius:var(--radius-sm);background:#fff;border:1px solid #f0ebe4;color:var(--ink);font-size:12px;font-weight:600}
.site-menu-actions span{font-size:21px}
.site-menu-actions a>span{position:relative}
.site-menu-actions .cart-badge{position:absolute;top:-6px;right:-12px;background:var(--wine);color:#fff;font-size:10px;line-height:1;font-weight:700;min-width:16px;height:16px;padding:0 4px;border-radius:999px;display:flex;align-items:center;justify-content:center}
.site-menu-nav{background:#fff;border:1px solid #f0ebe4;border-radius:var(--radius);overflow:hidden}
.site-menu-nav a,.site-menu-nav button{appearance:none;background:#fff;width:100%;display:flex;align-items:center;justify-content:space-between;padding:15px 16px;border-bottom:1px solid #f5eee5;color:var(--ink);font-family:inherit;font-size:15px;font-weight:700;line-height:1.6;text-align:left}
.site-menu-nav a:last-child{border-bottom:0}
.site-menu-nav button::after,.site-menu-nav a::after{content:'›';color:var(--gold);font-size:20px;line-height:1}
.site-menu-promo{margin-top:18px;padding:18px;border-radius:var(--radius);background:linear-gradient(135deg,#fff,#f6efe4);border:1px solid var(--border)}
.site-menu-promo strong{display:block;color:var(--wine);font-family:'Playfair Display','Noto Serif TC',serif;font-size:20px;margin-bottom:4px}
.site-menu-promo p{margin:0 0 12px;color:var(--muted);font-size:13px}
.site-menu-promo a{display:inline-flex;padding:8px 14px;border-radius:999px;background:var(--wine);color:#fff;font-size:12px;font-weight:700}
.mobile-category-drawer{position:fixed;inset:0;z-index:220;pointer-events:none;visibility:hidden}
.mobile-category-drawer.active{pointer-events:auto;visibility:visible}
.drawer-backdrop{position:absolute;inset:0;background:rgba(29,23,23,.48);opacity:0;transition:.25s}
.mobile-category-drawer.active .drawer-backdrop{opacity:1}
.drawer-panel{position:absolute;left:0;right:0;bottom:0;max-height:82vh;background:#fffaf2;border-radius:24px 24px 0 0;box-shadow:0 -20px 60px rgba(58,4,4,.22);overflow:auto;transform:translateY(100%);transition:.28s ease}
.mobile-category-drawer.active .drawer-panel{transform:translateY(0)}
.drawer-header{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px 12px;background:linear-gradient(180deg,#fffaf2 72%,rgba(255,250,242,.86));border-bottom:1px solid rgba(201,164,92,.24)}
.drawer-title span{display:block;color:var(--muted);font-size:12px}
.drawer-title strong{color:var(--wine);font-family:'Playfair Display','Noto Serif TC',serif;font-size:24px;line-height:1.1}
.drawer-close{width:36px;height:36px;border-radius:50%;background:#fff;border:1px solid #eadfce;color:var(--wine);font-size:22px;line-height:1}
.drawer-feature{margin:16px 20px;padding:18px;border-radius:var(--radius);background:linear-gradient(135deg,var(--wine-dark),var(--wine));color:#fff}
.drawer-feature strong{display:block;font-family:'Playfair Display','Noto Serif TC',serif;font-size:20px;margin-bottom:4px}
.drawer-feature span{color:#eadcc8;font-size:13px}
.drawer-accordions{padding:0 20px 24px}
.drawer-accordions details{background:#fff;border:1px solid #f0ebe4;border-radius:var(--radius-sm);margin-bottom:10px;overflow:hidden}
.drawer-accordions summary{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;color:var(--ink);cursor:pointer;font-weight:700;list-style:none}
.drawer-accordions summary::-webkit-details-marker{display:none}
.drawer-accordions summary::after{content:'+';color:var(--wine);font-size:20px;line-height:1}
.drawer-accordions details[open] summary::after{content:'-'}
.drawer-links{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;padding:0 16px 16px}
.drawer-links a{padding:10px 12px;border-radius:10px;background:#faf6ef;color:var(--muted);font-size:13px;font-weight:500}
.drawer-links a:hover{color:var(--wine)}
.footer-desc{font-size:13px;color:#b8a08a;margin-top:12px}
.section-flush{padding-top:0}

/* Breadcrumb (shared by product detail, about, contact) */
.breadcrumb{padding:18px 5%;font-size:13px;color:var(--muted)}
.breadcrumb ol{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.breadcrumb a{color:var(--muted);transition:.2s}
.breadcrumb a:hover{color:var(--wine)}
.breadcrumb li:not(:last-child)::after{content:'›';margin-left:6px;color:var(--gold)}
.breadcrumb .current{color:var(--wine);font-weight:500}

/* Flash sale band + countdown (shared by homepage section and flash-sale page) */
.flash-sale{background:linear-gradient(135deg,var(--wine),var(--wine-dark));color:#fff;padding:56px 5%;text-align:center;position:relative;overflow:hidden}
.flash-sale::before{content:'';position:absolute;top:-120px;left:-120px;width:380px;height:380px;border-radius:50%;background:radial-gradient(circle,rgba(201,164,92,.22),transparent 65%)}
.flash-sale h1,.flash-sale h2{font-family:'Playfair Display','Noto Serif TC',serif;font-size:34px;margin:0 0 8px;position:relative}
.flash-sale .subtitle{font-size:15px;color:#e8ddd0;margin:0 0 22px;position:relative}
.flash-sale .products{margin-top:20px;position:relative;text-align:left}
.countdown{display:flex;justify-content:center;gap:12px;margin-bottom:26px;position:relative}
.countdown-item{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.2);border-radius:var(--radius-sm);padding:10px 14px;min-width:64px}
.countdown-item .num{font-size:26px;font-weight:700;display:block;line-height:1;font-variant-numeric:tabular-nums}
.countdown-item .label{font-size:11px;color:#e8ddd0}
/* ---- shared toast (.gg2-toast) — driven by window.gg2Toast in base.js ---- */
.gg2-toast{position:fixed;left:50%;bottom:90px;transform:translateX(-50%) translateY(12px);background:var(--wine);color:#fff;font-size:14px;padding:11px 22px;border-radius:999px;box-shadow:0 8px 24px rgba(58,4,4,.25);opacity:0;pointer-events:none;transition:.25s;z-index:320}
.gg2-toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.gg2-toast.error{background:#8a1c1c}
@media(max-width:1100px){
  .nav-bar,.header-search,.header-actions{display:none}
  .mobile-menu-toggle{display:flex}
  .logo{margin-left:auto}
  .products{grid-template-columns:repeat(2,1fr)}
  .story{grid-template-columns:1fr}
  .story-img{min-height:300px}
  .trust{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:767px){
  .breadcrumb{padding:12px 5%;font-size:12px}
  .flash-sale{padding:44px 5%}
  .flash-sale h1,.flash-sale h2{font-size:26px}
  .countdown-item{min-width:56px;padding:8px 10px}
  .countdown-item .num{font-size:22px}
  .section-title,.story h2,.cta h2{font-size:30px}
  .trust{grid-template-columns:repeat(2,1fr)}
  .header-main{padding:10px 5%}
  .logo img{height:36px}
  .section{padding:56px 5%}
  .section-head{display:block}
  .section-head .btn{margin-top:16px}
  .products{display:flex;gap:12px;overflow-x:auto;scrollbar-width:none;padding-bottom:8px;margin:0 -5%;padding-left:5%;padding-right:5%}
  .products::-webkit-scrollbar{display:none}
  .product{flex:0 0 72%;min-width:0}
  .cta{display:block;padding:36px 28px;margin:32px 5% 64px}
  .cta .btn{margin-top:20px}
  .footer-grid{grid-template-columns:repeat(2,1fr)}
  .bottom-nav{display:flex}
  body{padding-bottom:78px}
  /* keep the floating buttons above the sticky bottom nav */
  .float-buttons{bottom:92px}
}
