/*
Theme Name: Apna Bazar B2B - Storefront Child
Template: storefront
Author: Apna Bazar
Description: Responsive B2B marketplace theme with WooCommerce and Dokan compatibility.
Version: 1.2.0
Requires PHP: 7.4
Text Domain: apna-bazar-b2b
*/
:root{--navy:#092b60;--blue:#0755a5;--orange:#ff6b00;--bg:#f5f7fb;--ink:#16243b}*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;color:var(--ink);background:var(--bg)}a{color:inherit;text-decoration:none}button,input{font:inherit}.wrap{max-width:1280px;margin:auto;padding:0 20px}.topbar{background:var(--navy);color:white;font-size:13px;padding:10px 0}.topbar .wrap{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap}.mainhead{background:white;border-bottom:1px solid #e7eaf0}.headrow{display:flex;align-items:center;gap:24px;padding-top:13px;padding-bottom:13px}.brand{width:225px;flex-shrink:0}.brand img{display:block;width:100%;height:auto}.search{display:flex;flex:1;min-width:180px;border:1px solid #d4dce9;border-radius:9px;overflow:hidden}.search input{width:100%;border:0;padding:13px;outline:none}.search button,.btn{background:var(--orange);border:0;color:white;padding:12px 20px;border-radius:7px;font-weight:700;cursor:pointer}.search button{border-radius:0}.headlinks{display:flex;gap:16px;white-space:nowrap;font-size:14px}.nav{background:white;border-bottom:1px solid #e5e9f1}.navrow{display:flex;gap:24px;align-items:center;overflow-x:auto;white-space:nowrap;padding-top:13px;padding-bottom:13px;font-weight:600;font-size:14px}.navrow a:hover,.headlinks a:hover{color:var(--orange)}.navrow .sell{margin-left:auto;color:var(--orange)}.homepage{padding-top:22px;padding-bottom:45px}.hero-layout{display:grid;grid-template-columns:235px minmax(0,1fr);gap:18px}.side,.hero,.feature,.category-card,.product-card,.content-box{background:white;border-radius:12px;box-shadow:0 2px 12px #1d34550c}.side{overflow:hidden}.side h3{background:var(--navy);color:white;margin:0;padding:17px;font-size:17px}.side a{display:block;padding:12px 14px;border-bottom:1px solid #edf0f4;font-size:14px}.side a:hover{background:#f3f7ff;color:var(--blue)}.hero{min-height:375px;display:flex;align-items:center;overflow:hidden;background:linear-gradient(110deg,#07306c 0%,#0754a2 55%,#0c2a55 100%);color:white;position:relative}.hero-copy{padding:40px;max-width:600px;position:relative;z-index:1}.hero h1{font-size:clamp(32px,4vw,56px);line-height:1.1;margin:0 0 20px}.hero h1 span{color:#ffc64c}.hero p{font-size:18px;line-height:1.6}.hero-art{font-size:120px;opacity:.24;position:absolute;right:45px;bottom:30px}.features{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin:20px 0 30px}.feature{text-align:center;padding:19px 10px;font-size:13px;font-weight:700}.feature span{display:block;font-size:30px;margin-bottom:8px}.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:26px 0 16px}.section-title h2{font-size:26px;margin:0}.section-title a{color:var(--blue);font-weight:700;font-size:14px}.category-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:13px}.category-card{text-align:center;min-height:145px;padding:18px 8px;border:1px solid #e7ebf3;font-weight:700;font-size:14px}.category-card:hover{border-color:var(--orange);transform:translateY(-2px)}.category-card .emoji{font-size:49px;display:block;margin-bottom:15px}.products{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.product-card{padding:12px}.product-card img{max-width:100%;height:auto}.product-card h3{font-size:15px}.product-card .price{color:var(--orange);font-weight:700}.content-box{padding:28px;margin:30px auto;min-height:260px}.site-footer{background:var(--navy);color:white;padding:30px 0;margin-top:35px}.footer-row{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap}.woocommerce .button,.woocommerce button.button,.woocommerce input.button{background:var(--orange)!important;color:white!important}.woocommerce form .form-row input.input-text{padding:12px;border:1px solid #cbd4e2;border-radius:5px}.mobile-bottom{display:none}@media(max-width:950px){.hero-layout{grid-template-columns:1fr}.side{display:none}.features{grid-template-columns:repeat(3,1fr)}.category-grid{grid-template-columns:repeat(4,1fr)}.headlinks{font-size:12px}.brand{width:175px}}@media(max-width:640px){.topbar{font-size:11px}.topbar .wrap span:last-child{display:none}.headrow{flex-wrap:wrap;gap:10px}.brand{width:160px}.search{order:3;flex-basis:100%}.headlinks{margin-left:auto}.headlinks .cart{display:none}.navrow{gap:16px;font-size:12px}.hero{min-height:255px}.hero-copy{padding:26px}.hero h1{font-size:31px}.hero p{font-size:14px}.hero-art{font-size:70px;right:5px}.features{grid-template-columns:repeat(4,1fr);gap:5px}.feature{padding:10px 3px;font-size:10px}.feature span{font-size:24px}.category-grid{grid-template-columns:repeat(2,1fr);gap:10px}.category-card{min-height:128px}.category-card .emoji{font-size:39px}.products{grid-template-columns:repeat(2,1fr)}.section-title h2{font-size:22px}.wrap{padding-left:12px;padding-right:12px}.content-box{padding:16px;margin:16px auto}.mobile-bottom{display:flex;position:fixed;bottom:0;left:0;right:0;background:white;border-top:1px solid #dce2eb;z-index:50;justify-content:space-around;padding:10px 4px;font-size:11px;text-align:center}.mobile-bottom a{flex:1}.mobile-bottom span{display:block;font-size:21px}.site-footer{padding-bottom:85px}}
/* Child-theme layout safety */
body{display:block!important}body .site{max-width:none} .woocommerce-page .content-box,.woocommerce .content-box{max-width:1280px} .content-box .woocommerce{width:100%} .woocommerce-account .woocommerce{display:block} .woocommerce-account .woocommerce-MyAccount-navigation{float:left} .woocommerce-account .woocommerce-MyAccount-content{float:right} @media(max-width:767px){.woocommerce-account .woocommerce-MyAccount-navigation,.woocommerce-account .woocommerce-MyAccount-content{float:none;width:100%}}

/* v1.2 mobile-only navigation; desktop styles and templates remain unchanged */
.ab-mobile-toggle,.ab-mobile-cart{display:none}
@media(max-width:640px){
 body{overflow-x:hidden;padding-bottom:62px}
 .topbar{display:none}
 .mainhead{background:#073d84;border-bottom:0}
 .mainhead .headrow{display:grid;grid-template-columns:36px minmax(0,1fr) 36px;grid-template-rows:auto auto;align-items:center;gap:10px;padding:14px 14px 12px}
 .ab-mobile-toggle{display:flex;grid-column:1;grid-row:1;width:36px;height:36px;flex-direction:column;justify-content:center;gap:5px;align-items:center;background:transparent;border:0;padding:4px;cursor:pointer}
 .ab-mobile-toggle span{display:block;width:24px;height:2.5px;background:#fff;border-radius:2px}
 .brand{grid-column:2;grid-row:1;width:auto;max-width:205px;min-width:0;justify-self:center;display:flex;align-items:center}
 .brand img{max-width:100%;max-height:47px;width:auto;height:auto;object-fit:contain;background:#fff;border-radius:5px;padding:3px}
 .ab-mobile-cart{grid-column:3;grid-row:1;display:flex;align-items:center;justify-content:center;color:white;width:36px;height:36px}
 .ab-mobile-cart svg{width:28px;height:28px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round}
 .headlinks{display:none}
 .search{grid-column:1/-1;grid-row:2;order:unset;flex-basis:auto;width:100%;min-width:0;background:#fff;border-radius:9px;margin:0}
 .search input{min-width:0;flex:1;font-size:13px;padding:12px;background:white}
 .search button{padding:10px 12px;font-size:12px}
 .nav{display:none;position:absolute;top:auto;left:0;right:0;z-index:100;background:#fff;box-shadow:0 12px 18px #001b3c33}
 .nav.ab-nav-open{display:block}
 .nav .navrow{display:flex;flex-direction:column;align-items:stretch;gap:0;max-height:70vh;overflow-y:auto;padding:6px 16px;font-size:15px}
 .nav .navrow a{display:block;padding:13px 8px;border-bottom:1px solid #e9edf4}
 .nav .navrow .sell{margin-left:0}
 .homepage{padding-top:12px}
 .hero-layout{display:block}
 .hero{min-height:225px;border-radius:12px;background:linear-gradient(115deg,#082c64,#0961b7);margin:0}
 .hero-copy{padding:24px 20px;max-width:85%}
 .hero h1{font-size:26px;line-height:1.18}
 .hero h1 span{color:#fff}
 .hero p{font-size:12px;line-height:1.55}
 .hero-art{font-size:75px;right:6px;bottom:28px;opacity:.5}
 .hero .btn{display:inline-block;font-size:12px;padding:11px 13px}
 .features{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;background:#fff;border-radius:10px;padding:12px 4px;margin:12px 0 20px}
 .feature{box-shadow:none;border-radius:0;padding:5px 2px;font-size:9px;line-height:1.3}
 .feature:nth-child(5){display:none}
 .feature span{font-size:23px}
 .category-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
 .category-card{padding:10px 3px;min-height:108px;font-size:10px;line-height:1.3;border-radius:9px}
 .category-card .emoji{font-size:31px;margin-bottom:8px}
 .section-title h2{font-size:19px}
 .mobile-bottom{box-shadow:0 -3px 12px #102c4912;padding:8px 3px calc(8px + env(safe-area-inset-bottom))}
 .mobile-bottom a:first-child{color:#ff6b00;font-weight:bold}
 .mobile-bottom span{font-size:22px}
}
