/* ===== DAIO Storefront — themable templates ===== */
:root{
  --bg:#ffffff; --surface:#ffffff; --surface-2:#f6f8fb; --text:#1c2733; --muted:#6b7b8c;
  --primary:#2E75B6; --primary-2:#215a90; --on-primary:#ffffff; --accent:#ff7a59;
  --border:#e6ecf2; --radius:14px; --radius-sm:10px;
  --font:"Segoe UI",Roboto,Helvetica,Arial,sans-serif; --headfont:var(--font);
  --shadow:0 10px 30px rgba(20,40,70,.08); --shadow-sm:0 4px 14px rgba(20,40,70,.07);
  --maxw:1200px;
}
/* ---------- Themes ---------- */
body.theme-classic{ --primary:#2E75B6; --primary-2:#215a90; --accent:#ff7a59; }
body.theme-midnight{ --bg:#0c1422; --surface:#121d31; --surface-2:#0f1828; --text:#eaf1fb; --muted:#9fb2cc;
  --primary:#ffd24a; --primary-2:#e6b73a; --on-primary:#1a1300; --accent:#34c3ff; --border:#23314a; --shadow:0 12px 40px rgba(0,0,0,.5); }
body.theme-minimal{ --primary:#111111; --primary-2:#000000; --accent:#111111; --radius:0; --radius-sm:0;
  --border:#e2e2e2; --surface-2:#fafafa; --shadow:none; --shadow-sm:none; }
body.theme-vibrant{ --primary:#ff3e6c; --primary-2:#e02e59; --accent:#7b2ff7; --bg:#fff7fb; --surface-2:#fff0f6; --radius:20px; --radius-sm:14px; }
body.theme-elegant{ --primary:#b8860b; --primary-2:#9c7109; --accent:#1c2733; --bg:#fbf8f1; --surface:#fffdf8; --surface-2:#f4eede;
  --text:#2b2620; --muted:#8a7f6b; --border:#e7ddc7; --headfont:Georgia,"Times New Roman",serif; --radius:8px; }
body.theme-coral{ --primary:#ff6f61; --primary-2:#e85a4e; --accent:#2ec4b6; --surface-2:#fff3f1; --radius:18px; }
body.theme-forest{ --primary:#1b7f5a; --primary-2:#136146; --accent:#d4a017; --bg:#f6faf7; --surface-2:#eef6f1; --radius:12px; }
body.theme-grape{ --primary:#6f42c1; --primary-2:#5a34a0; --accent:#ffb703; --bg:#faf8ff; --surface-2:#f3eeff; --radius:16px; }

*{box-sizing:border-box;}
body.store{ margin:0; background:var(--bg); color:var(--text); font-family:var(--font); line-height:1.55; }
.store a{ color:inherit; text-decoration:none; }
.store .wrap{ max-width:var(--maxw); margin:0 auto; padding:0 20px; }
.store h1,.store h2,.store h3{ font-family:var(--headfont); color:var(--text); margin:0 0 .4em; }
.btn{ display:inline-flex; align-items:center; gap:.5rem; border:0; cursor:pointer; font-weight:700;
  padding:.7rem 1.25rem; border-radius:var(--radius-sm); background:var(--primary); color:var(--on-primary); transition:.15s; font-size:.95rem; }
.btn:hover{ background:var(--primary-2); transform:translateY(-1px); }
.btn.outline{ background:transparent; color:var(--primary); border:2px solid var(--primary); }
.btn.outline:hover{ background:var(--primary); color:var(--on-primary); }
.btn.lg{ padding:.9rem 1.8rem; font-size:1.05rem; }
.btn.block{ width:100%; justify-content:center; }
.muted{ color:var(--muted); }

/* Header */
.store-header{ position:sticky; top:0; z-index:50; background:var(--surface); border-bottom:1px solid var(--border); box-shadow:var(--shadow-sm); }
.store-header .bar{ display:flex; align-items:center; gap:24px; height:72px; }
.brand{ display:flex; align-items:center; gap:10px; font-family:var(--headfont); font-weight:800; font-size:1.35rem; }
.brand img{ height:38px; width:auto; }
.nav{ display:flex; gap:20px; flex:1; flex-wrap:wrap; }
.nav a{ font-weight:600; color:var(--muted); }
.nav a:hover{ color:var(--primary); }
.header-actions{ display:flex; align-items:center; gap:14px; }
.cart-link{ position:relative; font-size:1.3rem; color:var(--text); }
.cart-badge{ position:absolute; top:-8px; right:-10px; background:var(--accent); color:#fff; border-radius:999px; font-size:.7rem; font-weight:700; padding:1px 6px; }

/* Hero */
.hero{ position:relative; color:#fff; border-radius:var(--radius); overflow:hidden; margin:26px 0; min-height:380px; display:flex; align-items:center;
  background:linear-gradient(120deg,var(--primary),var(--primary-2)); }
.hero.with-img::before{ content:""; position:absolute; inset:0; background-size:cover; background-position:center; background-image:var(--hero-img); }
.hero.with-img::after{ content:""; position:absolute; inset:0; background:linear-gradient(120deg,rgba(0,0,0,.55),rgba(0,0,0,.2)); }
.hero .hero-in{ position:relative; padding:48px; max-width:620px; }
.hero h1{ color:#fff; font-size:2.6rem; line-height:1.1; }
.hero p{ font-size:1.15rem; opacity:.95; margin-bottom:1.2rem; }

/* Sections */
.section{ margin:40px 0; }
.section-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.section-head h2{ font-size:1.6rem; margin:0; }

/* Product grid */
.grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:22px; }
.cat-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:18px; }
.card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow-sm); transition:.18s; display:flex; flex-direction:column; }
.card:hover{ transform:translateY(-4px); box-shadow:var(--shadow); }
.card .thumb{ aspect-ratio:1/1; background:var(--surface-2); display:flex; align-items:center; justify-content:center; overflow:hidden; }
.card .thumb img{ width:100%; height:100%; object-fit:cover; }
.card .thumb .ph{ color:var(--muted); font-size:2.4rem; }
.card .body{ padding:14px 16px; display:flex; flex-direction:column; gap:6px; flex:1; }
.card .title{ font-weight:700; font-size:1rem; }
.card .cat{ font-size:.78rem; color:var(--muted); text-transform:uppercase; letter-spacing:.5px; }
.price{ font-weight:800; color:var(--primary); font-size:1.15rem; }
.price .was{ color:var(--muted); text-decoration:line-through; font-weight:500; font-size:.9rem; margin-left:6px; }
.badge-sale{ background:var(--accent); color:#fff; font-size:.7rem; font-weight:700; padding:2px 8px; border-radius:999px; }
.badge-out{ background:#9aa7b4; color:#fff; font-size:.7rem; font-weight:700; padding:2px 8px; border-radius:999px; }
.card .foot{ margin-top:auto; padding-top:8px; }

.cat-card{ position:relative; border-radius:var(--radius); overflow:hidden; aspect-ratio:4/3; background:var(--surface-2); display:flex; align-items:flex-end; box-shadow:var(--shadow-sm); }
.cat-card img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.cat-card span{ position:relative; width:100%; padding:14px; font-weight:700; color:#fff; background:linear-gradient(transparent,rgba(0,0,0,.7)); }

/* Product detail */
.pdp{ display:grid; grid-template-columns:1fr 1fr; gap:40px; margin:30px 0; }
.pdp .gallery{ background:var(--surface-2); border-radius:var(--radius); aspect-ratio:1/1; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.pdp .gallery img{ width:100%; height:100%; object-fit:cover; }
.pdp h1{ font-size:2rem; }
.pdp .price{ font-size:1.8rem; margin:10px 0; }
.qty{ width:80px; padding:.6rem; border:1px solid var(--border); border-radius:var(--radius-sm); }

/* Tables / cart */
.tbl{ width:100%; border-collapse:collapse; background:var(--surface); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow-sm); }
.tbl th,.tbl td{ padding:14px 16px; border-bottom:1px solid var(--border); text-align:left; }
.tbl th{ background:var(--surface-2); font-size:.85rem; text-transform:uppercase; letter-spacing:.5px; color:var(--muted); }
.summary{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:22px; box-shadow:var(--shadow-sm); }
.summary .row{ display:flex; justify-content:space-between; margin-bottom:10px; }
.summary .total{ font-size:1.3rem; font-weight:800; border-top:1px solid var(--border); padding-top:12px; }
.field{ margin-bottom:14px; } .field label{ display:block; font-weight:600; margin-bottom:5px; font-size:.9rem; }
.field input,.field textarea{ width:100%; padding:.7rem; border:1px solid var(--border); border-radius:var(--radius-sm); font-family:inherit; background:var(--surface); color:var(--text); }
.two-col{ display:grid; grid-template-columns:2fr 1fr; gap:30px; align-items:start; }

/* Footer */
.store-footer{ background:var(--surface-2); border-top:1px solid var(--border); margin-top:60px; padding:40px 0 24px; color:var(--muted); }
.store-footer .cols{ display:flex; flex-wrap:wrap; gap:40px; justify-content:space-between; }
.store-footer a{ color:var(--muted); display:block; padding:3px 0; } .store-footer a:hover{ color:var(--primary); }
.store-footer h4{ color:var(--text); margin-bottom:10px; }
.empty-state{ text-align:center; padding:60px 20px; color:var(--muted); }

@media(max-width:820px){ .pdp,.two-col{ grid-template-columns:1fr; } .hero h1{ font-size:2rem; } .nav{ display:none; } }
