
/* ============== CSS VARIABLES ============== */
:root{
  --sg-yellow: #ffd800;
  --sg-orange: #f5a623;
  --sg-green: #0a9150;
  --sg-blue: #1e88e5;
  --sg-slate: #232a32;
  --sg-gray: #6b7280;
  --sg-bg: #f7f7f9;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 10px 30px rgba(0,0,0,.1);
  --shadow-soft: 0 6px 18px rgba(0,0,0,.08);
}

/* ============== RESET + BASE ============== */
*{ box-sizing: border-box; }
html, body{ margin:0; padding:0; }
body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif;
  color: #222;
  background: var(--sg-bg);
  line-height: 1.6;
}
img{ max-width:100%; height:auto; display:block; }
a{ color: var(--sg-green); text-decoration: none; }
a:hover{ text-decoration: underline; }
h1,h2,h3{ line-height: 1.2; margin: 0 0 .5rem 0; }

.sg-container{ width:min(1200px, 92vw); margin:0 auto; }
.muted{ color: var(--sg-gray); }

/* ============== HEADER ============== */
.sg-header{
  position: sticky; top:0; z-index:1000;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.sg-header-inner{
  display: grid; grid-template-columns: 1fr auto; align-items:center; gap: 1rem;
  padding: .75rem 0;
}
.sg-brand img{ max-height:48px; }
.sg-site-title{ font-weight:700; font-size:1.1rem; color:#111; }

.sg-nav{ display:flex; align-items:center; gap:1rem; }
.sg-menu{ display:flex; gap:1rem; list-style:none; margin:0; padding:0; }
.sg-menu a{ color:#222; font-weight:500; }
.sg-cta{ display:flex; gap:.5rem; }
.sg-burger{ display:none; background:none; border:0; padding:.5rem; cursor:pointer; }
.sg-burger span{ display:block; width:24px; height:2px; background:#111; margin:5px 0; transform-origin:left center; transition:transform .2s ease; }

/* ============== BUTTONS ============== */
.btn{ display:inline-flex; gap:.5rem; align-items:center; justify-content:center; padding:.65rem 1rem; border-radius:999px; border:2px solid transparent; font-weight:700; box-shadow: var(--shadow-soft); }
.btn:hover{ transform: translateY(-1px); box-shadow: var(--shadow); text-decoration:none; }
.btn:active{ transform: translateY(0); }
.btn-primary{ background: var(--sg-green); color:#fff; }
.btn-outline{ background:#fff; color:#111; border-color:#ddd; }
.btn-ghost{ background:transparent; color:#111; border-color:transparent; }
.btn-lg{ padding:.85rem 1.25rem; font-size:1.05rem; }

/* ============== HERO ============== */
.hero{
  position: relative;
  background: linear-gradient(135deg, var(--sg-yellow), var(--sg-orange));
  color:#111;
  overflow:hidden;
}
.hero-inner{
  display:grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items:center; 
  padding: clamp(2rem, 5vw, 5rem) 0;
}
.hero-copy .lead{ font-size:1.15rem; color:#333; max-width:60ch; }
.hero-ctas{ display:flex; gap:.75rem; margin-top:1rem; flex-wrap:wrap; }
.hero-card{
  background: rgba(255,255,255,0.6);
  border:1px solid rgba(255,255,255,0.8);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.glass{ backdrop-filter: blur(18px) saturate(140%); }
.voucher-amounts{ display:flex; gap:.5rem; }
.voucher-amounts span{
  background:#fff; padding:.5rem .75rem; border-radius: 12px; font-weight:800; box-shadow: var(--shadow-soft);
}
.qr-demo{ display:flex; gap:1rem; align-items:center; margin-top:1rem; }
.qr-box{ width:84px; height:84px; background: repeating-linear-gradient(45deg,#000 0 6px,#fff 6px 12px); border-radius: 10px; box-shadow: var(--shadow); }

.hero-wave{
  position:absolute; left:0; right:0; bottom:-1px; height:80px;
  background: radial-gradient(120% 120% at 50% -20%, transparent 54%, rgba(30,136,229,.25) 55%, transparent 70%),
              radial-gradient(130% 120% at 60% -40%, transparent 60%, rgba(30,136,229,.2) 61%, transparent 75%);
}

/* ============== MERCHANT GRID ============== */
.merchant-filters{ padding: 2.5rem 0; }
.merchant-filters h2{ font-size:1.75rem; margin-bottom: .5rem; }
.filters{ display:flex; gap:.5rem; flex-wrap:wrap; align-items:center; margin-bottom:1rem; }
.pill{
  border:1px solid #ddd; background:#fff; color:#111; padding:.5rem .75rem; border-radius:999px; cursor:pointer;
}
.pill.is-active, .pill:hover{ border-color: var(--sg-green); }
.filters .search{ flex:1; min-width:220px; padding:.6rem .75rem; border-radius:999px; border:1px solid #ddd; }

.merchant-grid{
  display:grid; grid-template-columns: repeat(3, 1fr); gap:1rem;
}
.card{
  background:#fff; border-radius: var(--radius); box-shadow: var(--shadow-soft); overflow:hidden; transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover{ transform: translateY(-3px); box-shadow: var(--shadow); }
.card .thumb{ aspect-ratio:16/9; background:#f2f2f5; overflow:hidden; }
.card .thumb img{ width:100%; height:100%; object-fit:cover; }
.card-body{ padding: .9rem 1rem; }
.card-title{ margin: 0 0 .25rem; font-size: 1.05rem; }

/* ============== WALLET ============== */
.wallet{ padding: 1.5rem 0 3rem; }
.wallet-badges{ display:flex; gap:.75rem; flex-wrap:wrap; }
.wallet-badge{
  display:inline-flex; gap:.5rem; align-items:center; padding:.6rem .9rem; border-radius:999px; background:#fff; border:1px solid #eee; box-shadow: var(--shadow-soft); font-weight:600;
}
.icon-wallet{ width:18px; height:18px; display:inline-block; border-radius:4px; background: linear-gradient(135deg, var(--sg-blue), var(--sg-green)); }

/* ============== FOOTER ============== */
.sg-footer{ background: var(--sg-slate); color:#e6eaef; padding: 2rem 0; }
.sg-trust{ display:flex; align-items:center; justify-content:space-between; gap:1rem; padding-bottom:1rem; border-bottom:1px solid rgba(255,255,255,.1); margin-bottom:1rem; }
.trust-logos{ display:flex; align-items:center; gap:1rem; }
.trust-logos img{ height:40px; width:auto; border-radius:6px; background:#fff; padding:.25rem; }
.sg-footer-grid{ display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:1rem; }
.sg-footer-menu{ display:flex; gap:.75rem; list-style:none; padding:0; margin:0; }
.sg-copy{ color:#b8c0cc; font-size:.9rem; }

/* ============== CONTENT ============== */
.sg-content{ padding: 2rem 0; }
.sg-article{ background:#fff; padding:1rem 1.2rem; border-radius: var(--radius); box-shadow: var(--shadow-soft); }

/* ============== MERCHANT SINGLE ============== */
.sg-merchant{ padding: 2rem 0 3rem; }
.merchant-header{ display:grid; gap:1rem; grid-template-columns: 1fr 1fr; align-items:center; }
.merchant-thumb img{ border-radius: var(--radius); box-shadow: var(--shadow-soft); }

/* ============== RESPONSIVE ============== */
@media (max-width: 960px){
  .hero-inner{ grid-template-columns: 1fr; }
  .merchant-grid{ grid-template-columns: 1fr 1fr; }
  .sg-menu{ display:none; }
  .sg-burger{ display:block; }
}
@media (max-width: 640px){
  .merchant-grid{ grid-template-columns: 1fr; }
  .sg-trust{ flex-direction:column; align-items:flex-start; }
}


/* ===== WOW UPGRADES v1.1 ===== */
:root{
  --petal1:#f8c63a;
  --petal2:#ffb44d;
  --petal3:#ffd800;
  --glass: rgba(255,255,255,0.6);
}
@media (prefers-color-scheme: dark){
  :root{ --sg-bg:#0b0f14; --sg-slate:#0b0f14; }
  body{ color: #e8eef7; }
  .sg-header{ background: rgba(11,15,20,.7); border-bottom-color: rgba(255,255,255,.08); }
  .card, .sg-article{ background:#121821; }
  .btn-outline{ color:#eaeff6; border-color:#2b3542; }
  .wallet-badge{ background:#121821; border-color:#2b3542; }
  .sg-footer{ background:#070b10; }
}

/* Big curved hero with petal particles */
.hero{ border-bottom-left-radius: 48px; border-bottom-right-radius: 48px; box-shadow: 0 30px 60px rgba(0,0,0,.12) inset; }
.hero:before{
  content:""; position:absolute; inset: -10% -20% auto -20%;
  height: 160%; background: radial-gradient(50% 40% at 20% 10%, rgba(255,255,255,.35) 0%, transparent 70%);
  transform: rotate(6deg);
}
.hero .hero-card{ transform: rotate(-2deg); }
.hero .hero-card:hover{ transform: rotate(0deg) translateY(-2px); }

/* Particle canvas overlay */
#petal-canvas{ position:absolute; inset:0; pointer-events:none; mix-blend-mode:soft-light; opacity:.45; }

/* Voucher selector */
.voucher-amounts span{ cursor:pointer; transition:transform .15s ease, box-shadow .15s ease; }
.voucher-amounts span:hover{ transform: translateY(-2px) scale(1.03); box-shadow: var(--shadow); }
.voucher-amounts span.is-active{ outline:3px solid var(--sg-green); }

/* Stats strip */
.stats{ margin: 2rem auto; background:#fff; border-radius: 20px; padding: 1rem; display:grid; grid-template-columns: repeat(4,1fr); gap: .5rem; box-shadow: var(--shadow-soft); }
.stats .stat{ text-align:center; padding:.75rem; border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.6)); }
.stats .num{ font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight:900; }
@media(max-width: 820px){ .stats{ grid-template-columns: repeat(2,1fr);} }

/* Merchant carousel (snap) */
.merchant-carousel{ display:flex; gap:1rem; overflow:auto; scroll-snap-type:x mandatory; padding-bottom:.5rem; }
.merchant-carousel .card{ scroll-snap-align:start; min-width: clamp(260px, 42vw, 360px); }

/* Sticky mobile buy CTA */
@media(max-width: 820px){
  .sticky-buy{
    position: fixed; z-index: 1100; left:0; right:0; bottom:12px; display:flex; justify-content:center;
  }
  .sticky-buy .btn{ box-shadow: 0 8px 26px rgba(10,145,80,.4); }
}

/* Focus rings */
:focus-visible{ outline: 3px solid var(--sg-blue); outline-offset: 2px; border-radius: 8px; }
