:root{
  --bg:#f4f7fb;
  --surface:#ffffff;
  --surface-2:#f8fbff;
  --text:#152233;
  --muted:#6a7a8c;
  --line:#dfe7f1;
  --primary:#1668d8;
  --primary-dark:#0f57b9;
  --soft:#edf5ff;
  --shadow:0 16px 38px rgba(22,46,77,.08);
  --shadow-soft:0 10px 24px rgba(15,35,60,.06);
  --radius:22px;
  --radius-md:14px;
  --radius-sm:10px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family:'Inter',sans-serif;background:linear-gradient(180deg,#f8fbff 0%,#f2f6fb 100%);color:var(--text)}
body{min-height:100vh;display:flex;flex-direction:column;overflow-x:hidden}
a{text-decoration:none;color:inherit}
img{display:block;max-width:100%}
button,input,select,textarea{font:inherit}
.container{max-width:1380px;margin:0 auto;padding:0 20px}

/* Public header */
.site-header{position:sticky;top:0;z-index:40;background:rgba(255,255,255,.96);backdrop-filter:blur(14px);border-bottom:1px solid rgba(223,231,241,.92)}
.site-header-main{min-height:82px;display:grid;grid-template-columns:220px 1fr auto;align-items:center;gap:20px}
.site-logo{display:flex;align-items:center;height:58px;max-width:210px;overflow:hidden}
.site-logo img{max-height:42px;width:auto;max-width:100%;object-fit:contain}
.site-main-nav{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;flex-wrap:wrap}
.site-main-nav a,.site-category-bar-inner a{padding:11px 14px;border-radius:var(--radius-sm);color:#29425f;font-weight:700;font-size:14px;white-space:nowrap;transition:.2s ease}
.site-main-nav a:hover,.site-category-bar-inner a:hover{background:var(--soft);color:var(--primary-dark)}
.site-actions{display:flex;align-items:center;gap:10px}
.btn,.primary-btn,.ghost-btn,.danger-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:var(--radius-sm);padding:12px 16px;border:1px solid transparent;font-weight:700;transition:.2s ease;cursor:pointer;line-height:1;white-space:nowrap}
.btn-soft,.ghost-btn{background:#fff;border-color:var(--line);color:#29425f}
.btn-soft:hover,.ghost-btn:hover{background:#f8fbff;border-color:#cfd9e5}
.btn-primary,.primary-btn{background:linear-gradient(135deg,#1668d8,#4594ff);color:#fff;box-shadow:0 10px 24px rgba(22,104,216,.18)}
.btn-primary:hover,.primary-btn:hover{transform:translateY(-1px)}
.danger-btn{background:#fff1f1;border-color:#f3caca;color:#b42318}
.danger-btn:hover{background:#ffe7e7}
.cart-badge{min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#fff;color:var(--primary);display:inline-grid;place-items:center;font-size:12px;font-weight:800}
.site-category-bar{border-top:1px solid rgba(223,231,241,.8);background:#fbfdff}
.site-category-bar-inner{min-height:48px;display:flex;align-items:center;gap:8px;overflow:auto;padding-top:6px;padding-bottom:6px}
.flash{margin:16px auto 0;padding:14px 16px;border-radius:var(--radius-sm);border:1px solid}
.flash-success{background:#eafaf0;border-color:#c9ecd6;color:#256944}
.flash-danger,.flash-error{background:#fff0f0;border-color:#f1caca;color:#a13b3b}
.flash-info{background:#f1f7ff;border-color:#d3e3ff;color:#265689}

/* Generic cards and layout */
.section{padding:18px 0 28px;position:relative;z-index:1}
.section-head{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:18px}
.section-title{font-size:32px;margin:0 0 6px}
.section-desc,.muted{margin:0;color:var(--muted);line-height:1.7}
.panel,.panel-card,.product-card,.category-card,.filter-card,.gallery-card,.summary-card,.options-card,.usp-card,.quick-card,.admin-card,.stat-card,.hero-main,.hero-side{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.panel,.panel-card{padding:24px}
.table-wrap{width:100%;overflow:auto}
.table{width:100%;border-collapse:collapse}
.table th,.table td{padding:14px 12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}
.table th{font-size:13px;color:#6a7b8f;background:#f8fbff}
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:18px}
.filter-bar{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.checkbox-row{display:flex;align-items:center;gap:10px;padding:12px 14px;border:1px solid var(--line);border-radius:var(--radius-sm);background:#fbfdff}
.input,.select,textarea,input[type="text"],input[type="password"],input[type="email"],input[type="number"],select{width:100%;padding:13px 14px;border-radius:var(--radius-sm);border:1px solid #d5e0ec;background:#fff;outline:none}
.input:focus,.select:focus,textarea:focus,input:focus,select:focus{border-color:#86b6ff;box-shadow:0 0 0 4px rgba(22,104,216,.08)}

/* Admin header + login */
.admin-top{padding:18px 0;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:50}
.admin-head{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
.logo-wrap{display:flex;align-items:center;flex:0 0 auto}
.admin-layout{display:grid;gap:18px}
.login-wrap{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at top left,#edf6ff,transparent 36%),linear-gradient(180deg,#f8fbff,#eef3f9)}
.login-wrap .admin-card{padding:32px;max-width:460px;width:100%}
.login-wrap .site-logo{margin:0 auto 20px;justify-content:center;max-width:none;height:auto;overflow:visible}
.login-wrap .site-logo img{max-height:52px}
.login-wrap h1,.login-wrap h2{margin:0 0 8px;text-align:center}
.login-wrap .muted{text-align:center;margin-bottom:20px}
.login-wrap form{display:grid;gap:14px}
.login-wrap .primary-btn,
.login-wrap button[type="submit"]{width:100%;min-height:48px}
.admin-card{padding:28px;max-width:460px;width:100%}
.admin-top + .container{margin-top:18px}
.quick-list{display:grid;gap:12px}
.quick-item{display:block;padding:16px 18px;border-radius:var(--radius-md);border:1px solid var(--line);background:#fcfdff;box-shadow:none}
.quick-item strong{display:block;margin-bottom:6px;font-size:16px;color:#152233}
.quick-item span,.quick-item p,.quick-item small{color:var(--muted);line-height:1.6}
.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.stat-card{padding:22px}
.stat-card strong{display:block;font-size:30px;margin-bottom:8px}
.table td .ghost-btn,.table td .danger-btn{min-height:36px;padding:9px 12px;font-size:13px}

/* Home and product UI */
.hero-section{padding:28px 0 18px}
.hero-shell{display:grid;grid-template-columns:1.15fr .85fr;gap:22px}
.hero-main{padding:34px}.hero-side{padding:18px;display:grid;gap:16px}
.hero-kicker{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:var(--radius-sm);background:var(--soft);color:var(--primary-dark);font-weight:800;font-size:12px}
.hero-title{font-size:48px;line-height:1.03;margin:14px 0 12px}
.hero-text{max-width:760px;color:var(--muted);font-size:16px;line-height:1.75;margin:0}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}
.hero-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:24px}
.hero-stat{padding:18px;border-radius:var(--radius-md);background:var(--surface-2);border:1px solid var(--line)}
.hero-stat strong{display:block;font-size:24px;margin-bottom:6px}
.hero-stat span{color:var(--muted);font-size:14px}
.promo-card{border-radius:var(--radius-md);padding:20px;background:linear-gradient(180deg,#f8fbff 0%,#edf5ff 100%);border:1px solid #dbe8f7}
.promo-card strong{display:block;font-size:18px;margin-bottom:8px}
.category-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:18px}
.category-card{overflow:hidden;transition:.2s ease}
.category-card:hover,.product-card:hover{transform:translateY(-2px);box-shadow:0 18px 42px rgba(22,46,77,.11)}
.category-visual{height:150px;background:linear-gradient(135deg,#eef5ff,#fafdff);display:grid;place-items:center;border-bottom:1px solid var(--line);font-size:46px}
.category-body{padding:18px}.category-body h3{margin:0 0 8px;font-size:18px;line-height:1.35}.category-body p{margin:0;color:var(--muted);font-size:14px;line-height:1.6}
.product-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.product-card{overflow:hidden;display:flex;flex-direction:column;min-width:0}
.product-media{aspect-ratio:4/3;background:#fff;display:grid;place-items:center;padding:18px;border-bottom:1px solid var(--line)}
.product-media img{max-height:190px;object-fit:contain}
.product-body{padding:18px;display:flex;flex-direction:column;gap:10px;flex:1;min-width:0}
.product-brand-row{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--muted);font-size:13px}
.product-title-sm{font-size:17px;line-height:1.45;margin:0;min-height:48px}
.product-price-row{display:flex;align-items:end;justify-content:space-between;gap:12px;flex-wrap:wrap}
.price-main{font-size:28px;font-weight:800;color:#13263b}.price-old{font-size:14px;color:#96a5b6;text-decoration:line-through}
.tag{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;background:var(--soft);color:var(--primary-dark);font-size:12px;font-weight:800}
.usp-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}.usp-card{padding:20px}.usp-card strong{display:block;margin-bottom:8px;font-size:18px}
.page-hero{padding:24px 0 8px}.breadcrumb{font-size:13px;color:#8090a3;margin-bottom:10px}.category-shell{display:grid;grid-template-columns:300px 1fr;gap:22px}
.filter-card{padding:22px;height:max-content;position:sticky;top:112px}.filter-card h3{margin:0 0 14px;font-size:20px}.filter-list{display:grid;gap:10px}
.filter-link{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 15px;border:1px solid var(--line);border-radius:var(--radius-sm);background:#fbfdff;font-weight:600;color:#30455f}
.filter-link:hover{background:var(--soft)}
.product-detail-page{padding:26px 0 34px}.product-detail-layout{display:grid;grid-template-columns:.95fr .8fr 1.1fr;gap:22px;align-items:start}
.gallery-card{padding:24px;min-height:520px;display:grid;place-items:center}.gallery-card img{max-height:420px;object-fit:contain}
.summary-card{padding:24px;position:sticky;top:112px}.summary-card .brand{color:var(--muted);font-size:14px;margin-bottom:8px}.summary-card h1{font-size:34px;line-height:1.15;margin:0 0 10px}.summary-card p{color:var(--muted);line-height:1.7}
.price-stack{display:grid;gap:12px;margin:20px 0}.price-line{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}.price-line:last-child{border-bottom:0}.price-line strong{font-size:18px}
.summary-note{padding:14px 16px;border-radius:var(--radius-sm);background:#f6faff;border:1px solid #d7e8ff;color:#355070;font-size:14px;line-height:1.6}
.options-card{padding:24px}.options-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:18px}.options-head h3{margin:0;font-size:24px}.options-head p{margin:6px 0 0;color:var(--muted);line-height:1.6}
.sale-switch{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:18px}.sale-option input,.option-item input{display:none}
.sale-pill,.option-pill,.sale-mode-card{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px;border:1px solid var(--line);border-radius:var(--radius-sm);background:#fbfdff;cursor:pointer;transition:.2s ease;min-height:82px}
.sale-pill:hover,.option-pill:hover,.sale-mode-card:hover{border-color:#b8d5ff;background:#f5faff}.sale-option input:checked + .sale-pill,.option-item input:checked + .option-pill{border-color:#7fb2ff;background:#edf5ff;box-shadow:inset 0 0 0 1px #7fb2ff}
.sale-pill span:first-child,.option-pill span:first-child{font-weight:700;color:#22364d;line-height:1.45}.sale-pill strong,.option-pill strong{white-space:nowrap;font-size:14px;color:#0f57b9}
.option-groups{display:grid;gap:18px}.option-group{padding:18px;border:1px solid var(--line);border-radius:var(--radius-md);background:#fff}.option-group h4{margin:0 0 14px;font-size:16px}.option-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.qty-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:18px;margin-top:18px;border-top:1px solid var(--line)}.qty-row .input{max-width:110px}
.options-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}
.direct-buy-box{display:flex;align-items:flex-start;gap:14px;border:1px solid #dbe8f7;background:linear-gradient(180deg,#f8fbff 0%,#ffffff 100%);border-radius:var(--radius-md);padding:18px}.direct-buy-icon{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:#0f766e;color:#fff;font-weight:700;flex:0 0 38px}.option-groups.is-disabled{opacity:.45}

/* Footer */
.site-footer{margin-top:auto;background:#fff;border-top:1px solid rgba(223,231,241,.95)}
.site-footer-inner{min-height:92px;display:flex;align-items:center;justify-content:space-between;gap:18px}
.footer-brand{display:flex;align-items:center;gap:14px}.footer-brand img{height:34px;width:auto}.footer-brand p{margin:4px 0 0;color:var(--muted);font-size:14px}.footer-links{display:flex;align-items:center;gap:18px;flex-wrap:wrap;color:var(--muted)}

@media (max-width:1280px){.category-grid{grid-template-columns:repeat(4,1fr)}.product-grid{grid-template-columns:repeat(3,1fr)}.product-detail-layout{grid-template-columns:1fr 1fr}.summary-card{position:static}.options-card{grid-column:1/-1}}
@media (max-width:1100px){.admin-head{flex-direction:column;align-items:flex-start}.filter-bar{justify-content:flex-start}}
@media (max-width:1024px){.hero-shell,.category-shell,.checkout-grid,.stat-grid{grid-template-columns:1fr}.category-grid{grid-template-columns:repeat(3,1fr)}.product-grid,.usp-grid{grid-template-columns:repeat(2,1fr)}.site-header-main{grid-template-columns:1fr;justify-items:start;padding:14px 0}.site-main-nav{justify-content:flex-start}.site-actions{width:100%;justify-content:flex-start}.filter-card{position:static}.gallery-card{min-height:420px}}
@media (max-width:700px){.container{padding:0 16px}.hero-title{font-size:34px}.hero-stats,.category-grid,.product-grid,.usp-grid,.option-grid,.sale-switch,.stat-grid{grid-template-columns:1fr}.section-head,.toolbar,.site-footer-inner,.footer-brand,.admin-head{flex-direction:column;align-items:flex-start}.product-detail-layout{grid-template-columns:1fr}.site-logo img{max-height:38px}.site-main-nav a,.site-category-bar-inner a{padding:10px 12px}}
