
:root{--blue:#102a82;--blue2:#182fc3;--orange:#ff8a00;--ink:#11131a;--muted:#5e6475;--line:#e3e6ee;--soft:#f7f8fc;--green:#059447;--red:#b51c15;--radius:16px}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:Arial,Helvetica,sans-serif;color:var(--ink);background:#fff;line-height:1.5}
a{text-decoration:none;color:inherit}
img{max-width:100%;display:block}
button,input,select,textarea{font:inherit}
.wrap{width:min(1180px,92%);margin:auto}
.wrap-wide{width:min(1500px,96%);margin:auto}

/* Header */
.market-header{background:#fff;position:sticky;top:0;z-index:50;box-shadow:0 1px 0 var(--line)}
.market-head-inner{width:min(1500px,96%);height:80px;margin:auto;display:grid;grid-template-columns:auto minmax(280px,1fr) auto;align-items:center;gap:38px}
.brand{display:flex;align-items:center;gap:10px;white-space:nowrap}.logo{width:46px;height:46px;border:8px solid var(--blue);border-right-color:var(--orange);border-radius:50%;display:grid;place-items:center;color:var(--blue);font-size:.8rem}.brand strong{display:block;color:var(--blue);font-size:1.35rem;line-height:1}.brand small{display:block;color:var(--orange);font-weight:800;font-size:.76rem;margin-top:7px}
.header-search{display:flex;min-width:0}.header-search input{width:100%;height:46px;border:1px solid #d9ddea;border-right:0;border-radius:7px 0 0 7px;padding:0 18px;color:#3e4559;background:#fff}.header-search button{width:52px;border:0;border-radius:0 6px 6px 0;background:var(--blue);color:#fff;font-size:25px;font-weight:900;cursor:pointer}
.market-nav{display:flex;align-items:center;gap:25px;font-weight:800;font-size:.96rem;white-space:nowrap}.market-nav>a:not(.basket):hover{color:var(--blue)}.basket{background:var(--blue);color:#fff;padding:11px 15px;border-radius:28px;display:flex;align-items:center;gap:7px}.basket b{background:var(--orange);width:27px;height:27px;border-radius:50%;display:grid;place-items:center}
#menu{display:none;border:0;background:transparent;font-size:26px}
.category-rail{border-top:1px solid #f2f3f8;border-bottom:1px solid var(--line);background:#fff}
.category-rail-inner{width:min(1500px,96%);margin:auto;display:flex;justify-content:space-between;align-items:center;overflow-x:auto;scrollbar-width:none}
.category-rail-inner::-webkit-scrollbar{display:none}.category-rail a{display:flex;align-items:center;gap:10px;padding:14px 12px;white-space:nowrap;color:#19235f;font-size:.94rem}.category-rail a:hover{color:var(--orange);box-shadow:inset 0 -3px var(--orange)}.category-rail span{font-size:20px}

/* Shop */
.market-shop{padding:28px 0 70px}.shop-title-row{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:15px}.shop-title-row h1{font-size:clamp(2rem,3vw,2.65rem);line-height:1.08;margin:0 0 4px;letter-spacing:-.03em}.shop-title-row p{margin:0;color:var(--muted);font-size:1rem}.results-meta{color:#555d75;white-space:nowrap}
.market-filters{display:flex;justify-content:flex-end;gap:10px;margin:0 0 22px}.market-filters select{width:auto;min-width:190px;height:44px;border:1px solid #d9deea;border-radius:6px;padding:0 13px;background:#fff}
.market-products{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px}
.market-card{border:1px solid #dfe3ed;border-radius:14px;overflow:hidden;background:#fff;display:flex;flex-direction:column;transition:.18s ease;min-width:0}.market-card:hover{transform:translateY(-2px);box-shadow:0 10px 28px #12215112}.market-pic{height:205px;background:#fff;display:grid;place-items:center;padding:13px;position:relative}.market-pic img{width:100%;height:100%;object-fit:contain}.market-pic em{position:absolute;top:10px;left:10px;background:var(--orange);color:#111;padding:4px 7px;border-radius:6px;font-style:normal;font-size:.68rem;font-weight:900}.pbody{padding:12px 14px 14px;display:flex;flex-direction:column;flex:1}.pbody>small{color:#596075;font-size:.76rem}.pname{font-weight:800;font-size:1rem;line-height:1.25;margin:5px 0;min-height:40px}.stockline{margin:4px 0 5px;min-height:21px}.instock,.lowstock,.outstock{font-size:.78rem;font-weight:800}.instock{color:var(--green)}.lowstock{color:#aa6500}.outstock{color:var(--red)}.price{color:#0d2cbb;font-size:1.12rem;font-weight:900;margin:0 0 10px}.price del{font-size:.78rem;color:#8b91a2}.pbody form{margin-top:auto}.market-add{width:100%;min-height:44px;border-radius:8px;background:var(--blue);color:#fff;border:0;font-weight:800;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px}.market-add:hover:not(:disabled){background:#091f6c}.market-add:disabled{opacity:1;background:#2b19c8;cursor:not-allowed}

/* Home */
.store-hero{background:linear-gradient(120deg,#f5f7ff,#fff7ed);padding:58px 0;border-bottom:1px solid var(--line)}.store-hero-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:45px;align-items:center}.store-hero h1{font-size:clamp(2.7rem,5vw,5rem);line-height:.98;letter-spacing:-.055em;margin:8px 0 20px;max-width:850px}.store-hero p{font-size:1.12rem;color:#4f566a;max-width:720px}.tag{color:var(--orange);font-size:.75rem;font-weight:900;letter-spacing:.14em}.buttons{display:flex;gap:10px;margin:25px 0}.btn{display:inline-flex;align-items:center;justify-content:center;padding:11px 17px;min-height:44px;border-radius:8px;border:0;font-weight:800;cursor:pointer}.orange{background:var(--orange);color:#111}.white{background:#fff;border:1px solid var(--line);color:var(--blue)}.blue{background:var(--blue);color:#fff}.hero-points{display:flex;gap:22px;flex-wrap:wrap;color:#22305f;font-weight:700}.hero-market-card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:27px;box-shadow:0 20px 55px #102a8210}.hero-market-card h3{margin-top:0;font-size:1.35rem}.hero-depts{display:grid;grid-template-columns:1fr 1fr;gap:12px}.hero-depts a{border:1px solid var(--line);border-radius:12px;padding:17px;font-weight:800}.hero-depts span{display:block;font-size:28px;margin-bottom:6px}.section{padding:58px 0}.soft{background:var(--soft)}.heading{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:22px}.heading h2{font-size:2rem;margin:4px 0 0}.heading>a{color:var(--blue);font-weight:800}.department-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:13px}.department-grid>a{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px;min-height:145px;display:flex;flex-direction:column;justify-content:flex-end}.dept-icon{width:46px;height:46px;border-radius:50%;background:#f1efff;color:var(--blue);display:grid;place-items:center;font-size:1.4rem;font-weight:900;margin-bottom:auto}.department-grid strong{margin-top:14px}.department-grid small{color:var(--muted);margin-top:4px}

/* Generic existing page support */
.banner{background:linear-gradient(135deg,#f1f3ff,#fff2e4);padding:45px 0}.banner h1{font-size:clamp(2.2rem,4vw,4rem);margin:5px 0}.detail{display:grid;grid-template-columns:1fr 1fr;gap:50px;align-items:center}.detailpic{background:var(--soft);border-radius:22px;min-height:460px;display:grid;place-items:center;padding:25px}.detailpic img{max-height:420px}.bigprice{font-size:2rem;font-weight:900;color:var(--blue)}.addline{display:flex;gap:10px;margin:20px 0}.addline input{width:90px}.two{display:grid;grid-template-columns:1fr 360px;gap:28px;align-items:start}.summary,.formcard,.tablebox,.success,.contacts div{border:1px solid var(--line);border-radius:15px;padding:22px;background:#fff}.cartrow{display:grid;grid-template-columns:65px 1fr 80px 90px 65px;gap:12px;align-items:center;border:1px solid var(--line);border-radius:13px;padding:12px;margin-bottom:10px}.mini{width:58px;height:58px;background:var(--blue);color:#fff;display:grid;place-items:center;border-radius:10px;font-size:.7rem;font-weight:900}.remove{border:0;background:none;color:#a71919}.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.wide{grid-column:1/-1}label{display:flex;flex-direction:column;gap:5px;font-weight:700;margin-bottom:12px}input,select,textarea{padding:12px;border:1px solid #d5d9e4;border-radius:8px}.choice{flex-direction:row;align-items:center;border:1px solid var(--line);padding:12px;border-radius:9px}.choice input{width:auto}.about{display:grid;grid-template-columns:1fr .8fr;gap:45px;align-items:center}.about img{border-radius:20px}.contacts{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.stats div{background:var(--blue);color:#fff;border-radius:14px;padding:20px}.tablebox{overflow:auto}table{width:100%;border-collapse:collapse;min-width:650px}th,td{padding:11px;border-bottom:1px solid var(--line);text-align:left}.flash{padding:12px;margin-top:10px;border-radius:8px}.flash.success{background:#e7f7ed;color:#12653c}.flash.error,.error{background:#ffe8e8;color:#8d1919}.empty{text-align:center;padding:50px;background:var(--soft);border-radius:18px;grid-column:1/-1}.faq{max-width:900px}.faq details{border:1px solid var(--line);border-radius:12px;padding:0 18px;margin-bottom:12px}.faq summary{padding:18px 0;font-weight:800;cursor:pointer}.policy{max-width:900px}.contactsplit{display:grid;grid-template-columns:1fr 1fr;gap:24px}.narrow{max-width:520px}.narrowwide{max-width:850px}

/* Footer */
footer{background:#08175b;color:#fff;padding-top:50px;margin-top:30px}.foot{display:grid;grid-template-columns:1.2fr .8fr 1fr 1fr;gap:35px}.foot a{display:block;color:#dce1ff;margin:6px 0}.foot p{color:#dce1ff}.foot b{color:#ffb35b}.copy{text-align:center;border-top:1px solid #ffffff22;margin-top:35px;padding:18px;color:#c9d0f5}

/* Responsive */
@media(max-width:1280px){.market-products{grid-template-columns:repeat(5,1fr)}.department-grid{grid-template-columns:repeat(4,1fr)}.market-head-inner{gap:20px}.market-nav{gap:16px}}
@media(max-width:1050px){.market-products{grid-template-columns:repeat(4,1fr)}.market-head-inner{grid-template-columns:auto 1fr auto}.market-nav{display:none;position:absolute;top:80px;left:0;right:0;background:#fff;padding:18px;flex-direction:column;border-bottom:1px solid var(--line)}.market-nav.open{display:flex}.market-nav .basket{justify-content:center}#menu{display:block}.category-rail-inner{justify-content:flex-start;gap:12px}.store-hero-grid,.detail,.two,.about,.contactsplit{grid-template-columns:1fr}.foot{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.market-head-inner{height:auto;min-height:78px;grid-template-columns:1fr auto}.header-search{grid-column:1/-1;grid-row:2;padding-bottom:12px}.market-brand strong{font-size:1.05rem}.market-brand small{font-size:.62rem}.market-products{grid-template-columns:repeat(2,1fr);gap:10px}.market-pic{height:170px}.pbody{padding:10px}.pname{font-size:.9rem}.market-filters,.shop-title-row{align-items:stretch;flex-direction:column}.market-filters select{width:100%}.department-grid{grid-template-columns:repeat(2,1fr)}.hero-depts{grid-template-columns:1fr}.store-hero{padding:38px 0}.section{padding:42px 0}.formgrid,.contacts,.stats,.foot{grid-template-columns:1fr}.wide{grid-column:auto}}
@media(max-width:430px){.market-products{grid-template-columns:1fr 1fr}.market-pic{height:150px}.market-card .price{font-size:1rem}.market-add{font-size:.78rem}.category-rail a{padding:11px 8px}.store-hero h1{font-size:2.55rem}}


/* V5.2 — Consistent product image cards */
.market-card .market-pic {
    width: 100%;
    height: 220px !important;
    min-height: 220px;
    max-height: 220px;
    padding: 12px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
}

.market-card .market-pic img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain !important;
    object-position: center;
    display: block;
}

.market-card .pbody {
    position: relative;
    z-index: 2;
    background: #fff;
}

.market-card .pname {
    display: block;
    min-height: 42px;
    overflow: visible;
}

@media (max-width: 760px) {
    .market-card .market-pic {
        height: 180px !important;
        min-height: 180px;
        max-height: 180px;
    }
}

@media (max-width: 430px) {
    .market-card .market-pic {
        height: 155px !important;
        min-height: 155px;
        max-height: 155px;
        padding: 8px;
    }
}

/* V5.3 order confirmation */
.order-confirmation{max-width:850px;margin:auto;text-align:center;padding:38px}
.success-icon{width:64px;height:64px;border-radius:50%;background:#e8f8ef;color:#078646;display:grid;place-items:center;margin:0 auto 12px;font-size:34px;font-weight:900}
.confirmation-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:25px 0;text-align:left}
.confirmation-grid>div{border:1px solid var(--line);border-radius:12px;padding:15px;background:#fafbfe}
.confirmation-grid small{display:block;color:var(--muted);margin-bottom:4px}.confirmation-grid strong{display:block}
.confirmation-note{background:#f4f6ff;border:1px solid #dfe3f5;padding:15px;border-radius:10px;margin:18px 0}
.receipt-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
@media(max-width:700px){.confirmation-grid{grid-template-columns:1fr 1fr}}
@media(max-width:430px){.confirmation-grid{grid-template-columns:1fr}}


/* V5.4 — Floating WhatsApp chat button */
.whatsapp-float{
    position:fixed;
    right:22px;
    bottom:22px;
    z-index:9999;
    display:flex;
    align-items:center;
    gap:10px;
    background:#25D366;
    color:#fff;
    padding:12px 16px;
    border-radius:999px;
    font-weight:900;
    box-shadow:0 10px 28px rgba(0,0,0,.22);
    transition:transform .18s ease, box-shadow .18s ease;
}
.whatsapp-float:hover{
    transform:translateY(-2px);
    box-shadow:0 14px 34px rgba(0,0,0,.28);
}
.wa-icon{
    width:30px;
    height:30px;
    border-radius:50%;
    background:#fff;
    color:#25D366;
    display:grid;
    place-items:center;
    font-size:20px;
    font-weight:900;
}
.wa-label{white-space:nowrap}
@media(max-width:600px){
    .whatsapp-float{
        right:14px;
        bottom:14px;
        padding:12px;
    }
    .wa-label{display:none}
    .wa-icon{
        width:34px;
        height:34px;
        font-size:22px;
    }
}
