:root{--blue:#1A3C6E;--blue-d:#102e57;--orange:#F7941D;--bg:#f4f6f9;--line:#e8edf2;--text:#2D2D2D;--muted:#777}
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;background:var(--bg);color:var(--text);line-height:1.5}
a{text-decoration:none;color:inherit}
img{max-width:100%;display:block}
button{font:inherit;cursor:pointer}
.container{width:94%;max-width:1240px;margin:auto}

/* header */
header{background:var(--blue);position:sticky;top:0;z-index:100;box-shadow:0 2px 10px rgba(0,0,0,.15)}
.hbar{display:flex;align-items:center;gap:18px;padding:12px 0}
.logo{display:flex;align-items:center;gap:8px;color:#fff;font-weight:800;font-size:22px;flex-shrink:0}
.logo img{width:36px;height:36px;border-radius:9px;background:#fff}
.search{flex:1;display:flex;max-width:720px}
.search input{flex:1;border:0;padding:0 16px;height:42px;border-radius:9px 0 0 9px;font-size:15px;outline:none;min-width:0}
.search button{border:0;background:var(--orange);color:#fff;padding:0 20px;font-weight:700;border-radius:0 9px 9px 0}
.hlinks{display:flex;gap:16px;align-items:center;color:#fff;font-weight:600;font-size:14px;flex-shrink:0}
.cart-link{position:relative;background:rgba(255,255,255,.12);padding:9px 14px;border-radius:9px}
.cart-count{position:absolute;top:-6px;right:-6px;background:var(--orange);color:#fff;font-size:11px;font-weight:800;min-width:20px;height:20px;border-radius:10px;display:flex;align-items:center;justify-content:center;padding:0 5px}
.cart-count:empty{display:none}

/* hero */
.hero{margin:20px auto;background:linear-gradient(120deg,var(--blue) 0%,#2a5a9e 100%);border-radius:16px;color:#fff;padding:42px 40px;display:flex;justify-content:space-between;align-items:center;gap:24px;flex-wrap:wrap}
.hero h1{font-size:36px;line-height:1.15;margin-bottom:10px}
.hero h1 span{color:var(--orange)}
.hero p{color:#dbe6f2;max-width:520px;margin-bottom:18px}
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 22px;border-radius:9px;font-weight:700;border:0;transition:.2s}
.btn-o{background:var(--orange);color:#fff}.btn-o:hover{filter:brightness(.93)}
.btn-b{background:var(--blue);color:#fff}.btn-b:hover{background:var(--blue-d)}
.btn-w{background:#fff;color:var(--blue);border:1.5px solid var(--blue)}

/* sections */
.sec{background:#fff;border-radius:14px;padding:20px;margin-bottom:20px}
.sec-h{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.sec-h h2{font-size:20px;color:var(--blue)}
.sec-h a{color:var(--orange);font-weight:700;font-size:14px}
.cats{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px}
.cat{border:1px solid var(--line);border-radius:12px;padding:16px 10px;text-align:center;transition:.2s;background:#fff}
.cat:hover{border-color:var(--blue);transform:translateY(-3px);box-shadow:0 8px 20px rgba(0,0,0,.07)}
.cat .ic{width:48px;height:48px;border-radius:12px;background:#eef4fb;color:var(--blue);margin:0 auto 8px;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:20px;overflow:hidden}
.cat .ic img{width:100%;height:100%;object-fit:cover}
.cat b{display:block;font-size:14px;color:var(--blue);line-height:1.3}
.cat small{color:var(--muted);font-size:12px}

/* products */
.grid{display:grid;grid-template-columns:repeat(5,1fr);gap:14px}
.card{background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden;display:flex;flex-direction:column;transition:.2s}
.card:hover{box-shadow:0 10px 28px rgba(0,0,0,.1);transform:translateY(-3px)}
.card .im{aspect-ratio:1/1;background:#fff;display:flex;align-items:center;justify-content:center;padding:8px}
.card .im img{width:100%;height:100%;object-fit:contain}
.card .bd{padding:12px;display:flex;flex-direction:column;gap:4px;flex:1}
.card .tag{font-size:11px;font-weight:700;color:var(--orange);text-transform:uppercase;letter-spacing:.4px}
.card h3{font-size:14px;font-weight:600;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:38px}
.price{color:var(--blue);font-weight:800;font-size:17px;margin-top:auto;padding-top:6px}
.stars{color:var(--orange);font-size:12px}
.stars span{color:var(--muted)}
.oos{color:#c0392b;font-size:12px;font-weight:700}

/* listing */
.listing{display:grid;grid-template-columns:240px 1fr;gap:20px;align-items:start}
.filters{background:#fff;border-radius:14px;padding:18px;position:sticky;top:80px}
.filters h3{font-size:15px;color:var(--blue);margin:14px 0 8px}
.filters h3:first-child{margin-top:0}
.filters .fl{display:flex;flex-direction:column;gap:2px;max-height:300px;overflow:auto}
.filters .fl a{padding:7px 10px;border-radius:8px;font-size:14px}
.filters .fl a:hover{background:#eef4fb}
.filters .fl a.on{background:var(--blue);color:#fff;font-weight:700}
.price-r{display:flex;gap:6px}
.price-r input{width:100%;border:1px solid var(--line);border-radius:8px;padding:8px;font-size:14px;min-width:0}
.crumb{font-size:14px;color:var(--muted);margin-bottom:12px}
.crumb a{color:var(--blue);font-weight:600}
.pager{display:flex;justify-content:center;gap:6px;margin-top:22px;flex-wrap:wrap}
.pager button{border:1px solid var(--line);background:#fff;border-radius:8px;min-width:40px;height:40px;font-weight:700;color:var(--blue)}
.pager button.on{background:var(--blue);color:#fff;border-color:var(--blue)}
.pager button:disabled{opacity:.4;cursor:default}
.count{color:var(--muted);font-size:14px;margin-bottom:12px}

.svc-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.svc{border:1px solid var(--line);border-radius:12px;padding:20px;background:#fff}
.svc-i{width:48px;height:48px;border-radius:12px;background:#eef4fb;display:flex;align-items:center;justify-content:center;font-size:24px;margin-bottom:10px}
.svc h3{color:var(--blue);font-size:17px;margin-bottom:4px}
.svc p{color:#666;font-size:14px}
@media(max-width:1000px){.svc-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.svc-grid{grid-template-columns:1fr}}
.auth-link{background:rgba(255,255,255,.12);padding:9px 14px;border-radius:9px}
.authbox{max-width:440px;margin:30px auto;background:#fff;border-radius:14px;padding:26px;box-shadow:0 6px 24px rgba(0,0,0,.06)}
.authbox h2{color:var(--blue);margin-bottom:6px}
.authbox .sub{color:var(--muted);font-size:14px;margin-bottom:6px}
.authbox label{display:block;font-weight:700;font-size:14px;margin:12px 0 4px}
.authbox label small{font-weight:400;color:var(--muted)}
.authbox input{width:100%;border:1px solid var(--line);border-radius:9px;padding:11px 12px;font-size:15px;font-family:inherit}
.authbox input:focus{outline:2px solid #cfe0f5;border-color:var(--blue)}
.authbox .btn{width:100%;margin-top:16px}
.ferr{color:#c0392b;font-size:14px;margin-top:10px;min-height:18px}
.alt{text-align:center;margin-top:14px;font-size:14px;color:var(--muted)}.alt a{color:var(--blue);font-weight:700}
.prof{display:grid;grid-template-columns:120px 1fr;gap:10px 14px;margin:14px 0;font-size:15px}.prof b{color:var(--muted);font-weight:600}
.badge{display:inline-block;padding:3px 10px;border-radius:20px;font-size:12px;font-weight:700;background:#eef4fb;color:var(--blue)}
.b-Pending{background:#fff4e0;color:#9a6200}.b-Processing{background:#e6f0ff;color:#1a56b8}.b-Dispatched{background:#efe8ff;color:#5a2fb0}.b-Delivered{background:#e3f6e8;color:#1e7a3c}.b-Cancelled{background:#fde8e6;color:#b03226}.b-Approved{background:#e6f0ff;color:#1a56b8}.b-OnTheWay{background:#efe8ff;color:#5a2fb0}.b-Completed{background:#e3f6e8;color:#1e7a3c}
select.addr,input.addr{width:100%;border:1px solid var(--line);border-radius:9px;padding:11px 12px;font-size:15px;font-family:inherit;background:#fff}
.bl{display:block;font-weight:700;font-size:14px;margin:14px 0 4px}
.orow{display:block;border:1px solid var(--line);border-radius:12px;padding:14px;margin-bottom:12px;background:#fff;transition:.2s}
.orow:hover{border-color:var(--blue);box-shadow:0 6px 18px rgba(0,0,0,.06)}
.orow .top{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:8px}
.thumbs2{display:flex;gap:6px;margin-bottom:8px}.thumbs2 img{width:48px;height:48px;object-fit:contain;border:1px solid var(--line);border-radius:8px;background:#fff}
.steps{display:flex;margin:16px 0 6px}.steps .st{flex:1;text-align:center;font-size:12px;color:var(--muted)}
.steps .st:before{content:"";display:block;width:14px;height:14px;border-radius:50%;background:var(--line);margin:0 auto 6px}
.steps .st.on{color:var(--blue);font-weight:700}.steps .st.on:before{background:var(--blue)}
.ibox{max-width:780px;margin:0 auto}
.srow{display:grid;grid-template-columns:64px 1fr auto;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line)}
.srow:last-of-type{border-bottom:0}
.srow>div:last-child{white-space:nowrap}
.srow img{width:64px;height:64px;object-fit:contain;border:1px solid var(--line);border-radius:8px;background:#fff}
.trow{display:flex;justify-content:space-between;gap:10px;padding:4px 0}
.ok{background:#e3f6e8;color:#1e7a3c;border-radius:10px;padding:12px 14px;font-weight:600;margin:18px 0 14px}
textarea.addr{width:100%;border:1px solid var(--line);border-radius:9px;padding:11px 12px;font-size:15px;font-family:inherit;min-height:84px;resize:vertical}
textarea.addr:focus{outline:2px solid #cfe0f5;border-color:var(--blue)}
/* detail */
.detail{display:grid;grid-template-columns:420px 1fr;gap:30px}
.gal .main{border:1px solid var(--line);border-radius:14px;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;padding:10px;background:#fff}
.gal .main img{width:100%;height:100%;object-fit:contain}
.thumbs{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.thumbs img{width:64px;height:64px;object-fit:contain;border:2px solid var(--line);border-radius:8px;cursor:pointer;background:#fff}
.thumbs img.on{border-color:var(--blue)}
.info h1{font-size:24px;color:var(--blue);line-height:1.3;margin-bottom:8px}
.info .big{font-size:30px;font-weight:800;color:var(--orange);margin:10px 0}
.meta{color:var(--muted);font-size:14px;margin-bottom:6px}
.meta b{color:var(--text)}
.opt{margin:14px 0}
.opt label{font-weight:700;font-size:14px;display:block;margin-bottom:6px}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{border:1.5px solid var(--line);background:#fff;border-radius:8px;padding:7px 14px;font-size:14px}
.chip.on{border-color:var(--blue);background:#eef4fb;color:var(--blue);font-weight:700}
.qty{display:inline-flex;border:1px solid var(--line);border-radius:9px;overflow:hidden;background:#fff}
.qty button{border:0;background:#f4f6f9;width:38px;height:38px;font-size:18px;font-weight:700}
.qty span{min-width:44px;display:flex;align-items:center;justify-content:center;font-weight:700}
.actions{display:flex;gap:10px;margin-top:18px;flex-wrap:wrap}
.desc{white-space:pre-line;color:#555;font-size:15px}

/* cart */
.crow{display:grid;grid-template-columns:80px 1fr auto auto;gap:14px;align-items:center;padding:14px 0;border-bottom:1px solid var(--line)}
.crow:last-child{border-bottom:0}
.crow img{width:80px;height:80px;object-fit:contain;border:1px solid var(--line);border-radius:10px;background:#fff}
.crow h4{font-size:15px;color:var(--blue)}
.crow small{color:var(--muted)}
.rm{background:none;border:0;color:#c0392b;font-size:13px;font-weight:700}
.sum{display:flex;justify-content:space-between;font-size:18px;font-weight:800;color:var(--blue);padding-top:16px}
.note{background:#fff7ea;border:1px solid #fbe0b5;color:#8a5a0a;border-radius:10px;padding:12px 14px;font-size:14px;margin-top:14px}

.empty,.loading,.err{text-align:center;padding:50px 20px;color:var(--muted)}
.err{color:#c0392b}
.spin{width:34px;height:34px;border:4px solid var(--line);border-top-color:var(--blue);border-radius:50%;animation:s 1s linear infinite;margin:0 auto 12px}
@keyframes s{to{transform:rotate(360deg)}}
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%) translateY(80px);background:var(--blue);color:#fff;padding:12px 22px;border-radius:10px;font-weight:600;transition:.3s;z-index:300;opacity:0}
.toast.show{transform:translateX(-50%) translateY(0);opacity:1}

footer{background:#2D2D2D;color:#c4c4c4;margin-top:30px;padding:30px 0;font-size:14px}
footer .fi{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}
footer a{color:#fff;font-weight:600}

@media(max-width:1000px){.grid{grid-template-columns:repeat(3,1fr)}.listing{grid-template-columns:1fr}.filters{position:static}.detail{grid-template-columns:1fr}}
@media(max-width:640px){.grid{grid-template-columns:repeat(2,1fr);gap:10px}.hbar{flex-wrap:wrap}.search{order:3;flex-basis:100%;max-width:none}.hlinks .hide-m{display:none}.hero{padding:28px 22px}.hero h1{font-size:27px}.crow{grid-template-columns:64px 1fr;}.crow img{width:64px;height:64px}.crow .qty,.crow .tot{grid-column:2}}
