/* ============================================================
   BazarBD Theme – Main Stylesheet  (mobile-first)
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&display=swap');

/* ── CSS Custom Properties ── */
:root {
  --primary:       #E24B4A;
  --primary-dk:    #B83130;
  --primary-lt:    #FCEBEB;
  --text:          #1c1c1e;
  --text-2:        #636366;
  --text-3:        #aeaeb2;
  --bg:            #f2f2f7;
  --surface:       #ffffff;
  --border:        rgba(0,0,0,.08);
  --border-2:      rgba(0,0,0,.14);
  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     14px;
  --radius-xl:     20px;
  --shadow-sm:     0 1px 4px rgba(0,0,0,.07);
  --shadow:        0 3px 14px rgba(0,0,0,.09);
  --shadow-lg:     0 8px 30px rgba(0,0,0,.13);
  --nav-h:         56px;          /* mobile */
  --trans:         .18s ease;
  --container:     1280px;
}

/* ── Reset ── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;}
body{
  font-family:'Hind Siliguri','Noto Sans Bengali',sans-serif;
  font-size:14px;line-height:1.6;
  color:var(--text);background:var(--bg);
  -webkit-font-smoothing:antialiased;
}
img{display:block;max-width:100%;height:auto;}
a{text-decoration:none;color:inherit;}
ul{list-style:none;}
button,input,select,textarea{font-family:inherit;}
button{cursor:pointer;border:none;background:none;}

/* ── Utility ── */
.container{width:100%;max-width:var(--container);margin-inline:auto;padding-inline:16px;}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;}

/* ============================================================
   NAVBAR  (mobile-first sticky)
   ============================================================ */
#bz-header{
  position:sticky;top:0;z-index:1000;
  background:var(--surface);
  border-bottom:1px solid var(--border);
  height:var(--nav-h);
}
.bz-nav{
  display:flex;align-items:center;gap:10px;
  height:100%;padding-inline:14px;
}

/* Brand */
.bz-brand{
  font-size:20px;font-weight:700;
  color:var(--primary);white-space:nowrap;letter-spacing:-.4px;
  flex-shrink:0;line-height:1;
}
.bz-brand span{color:var(--text);}

/* Hamburger (mobile) */
.bz-hamburger{
  display:flex;flex-direction:column;justify-content:center;
  gap:5px;width:36px;height:36px;border-radius:var(--radius-sm);
  transition:background var(--trans);flex-shrink:0;
}
.bz-hamburger:hover{background:var(--bg);}
.bz-hamburger span{
  display:block;height:2px;background:var(--text-2);
  border-radius:2px;transition:all var(--trans);
}
.bz-hamburger.is-open span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.bz-hamburger.is-open span:nth-child(2){opacity:0;}
.bz-hamburger.is-open span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}

/* Search – hidden on small screens, shown on md+ */
.bz-search{
  display:none;flex:1;
}
.bz-search form{display:flex;width:100%;}
.bz-search input{
  flex:1;height:38px;padding:0 14px;
  border:1.5px solid var(--border-2);border-right:none;
  border-radius:var(--radius) 0 0 var(--radius);
  background:var(--bg);color:var(--text);font-size:13px;
  transition:border-color var(--trans),background var(--trans);
}
.bz-search input:focus{outline:none;border-color:var(--primary);background:var(--surface);}
.bz-search button[type=submit]{
  height:38px;padding:0 16px;
  background:var(--primary);color:#fff;
  border-radius:0 var(--radius) var(--radius) 0;
  font-size:13px;font-weight:600;
  display:flex;align-items:center;gap:5px;
  transition:background var(--trans);
}
.bz-search button[type=submit]:hover{background:var(--primary-dk);}
.bz-search button svg{width:15px;height:15px;}

/* Nav Actions */
.bz-actions{display:flex;align-items:center;gap:2px;margin-left:auto;}

/* Icon button shared */
.bz-icon-btn{
  display:flex;flex-direction:column;align-items:center;gap:1px;
  padding:5px 8px;border-radius:var(--radius-sm);
  color:var(--text-2);font-size:10px;line-height:1;
  transition:background var(--trans),color var(--trans);
}
.bz-icon-btn:hover,.bz-icon-btn.is-open{background:var(--bg);color:var(--text);}
.bz-icon-btn svg{width:21px;height:21px;}

/* User dropdown */
.bz-user{position:relative;}
.bz-dropdown{
  display:none;position:absolute;right:0;top:calc(100%+8px);
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);
  min-width:195px;padding:6px;z-index:999;
}
.bz-dropdown.is-open{display:block;}
.bz-dropdown a{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;border-radius:var(--radius-sm);
  font-size:13px;color:var(--text);
  transition:background var(--trans);
}
.bz-dropdown a:hover{background:var(--bg);}
.bz-dropdown a svg{width:16px;height:16px;color:var(--text-2);flex-shrink:0;}
.bz-dropdown .dd-signin{color:var(--primary)!important;font-weight:700;}
.bz-dd-sep{height:1px;background:var(--border);margin:4px 0;}

/* Cart badge */
.bz-cart{position:relative;}
.bz-cart-badge{
  position:absolute;top:1px;right:2px;
  background:var(--primary);color:#fff;
  font-size:9px;font-weight:700;
  border-radius:9px;min-width:16px;height:16px;
  display:flex;align-items:center;justify-content:center;
  padding:0 3px;line-height:1;
}

/* Mobile search bar – full row below nav */
.bz-mobile-search{
  background:var(--surface);
  border-bottom:1px solid var(--border);
  padding:8px 14px;
}
.bz-mobile-search form{display:flex;}
.bz-mobile-search input{
  flex:1;height:38px;padding:0 14px;
  border:1.5px solid var(--border-2);border-right:none;
  border-radius:var(--radius) 0 0 var(--radius);
  background:var(--bg);color:var(--text);font-size:14px;
}
.bz-mobile-search input:focus{outline:none;border-color:var(--primary);}
.bz-mobile-search button{
  height:38px;padding:0 16px;
  background:var(--primary);color:#fff;
  border-radius:0 var(--radius) var(--radius) 0;
  font-size:14px;font-weight:600;
  display:flex;align-items:center;gap:5px;
}
.bz-mobile-search svg{width:16px;height:16px;}

/* Mobile drawer menu */
.bz-mobile-menu{
  display:none;position:fixed;
  inset:0;z-index:999;
}
.bz-mobile-menu.is-open{display:block;}
.bz-menu-overlay{
  position:absolute;inset:0;
  background:rgba(0,0,0,.45);
}
.bz-menu-drawer{
  position:absolute;left:0;top:0;bottom:0;
  width:min(280px,85vw);
  background:var(--surface);
  box-shadow:var(--shadow-lg);
  overflow-y:auto;
  display:flex;flex-direction:column;
  transform:translateX(-100%);
  transition:transform .3s ease;
}
.bz-mobile-menu.is-open .bz-menu-drawer{transform:translateX(0);}
.bz-drawer-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px;border-bottom:1px solid var(--border);
}
.bz-drawer-head .bz-brand{font-size:19px;}
.bz-drawer-close{
  width:32px;height:32px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  color:var(--text-2);transition:background var(--trans);
}
.bz-drawer-close:hover{background:var(--bg);}
.bz-drawer-close svg{width:18px;height:18px;}
.bz-drawer-body{padding:10px;}
.bz-drawer-link{
  display:flex;align-items:center;gap:10px;
  padding:11px 12px;border-radius:var(--radius-sm);
  font-size:14px;color:var(--text);
  transition:background var(--trans);
}
.bz-drawer-link:hover{background:var(--bg);color:var(--primary);}
.bz-drawer-link svg{width:18px;height:18px;color:var(--text-2);}
.bz-drawer-sep{height:1px;background:var(--border);margin:6px 0;}
.bz-drawer-section{
  font-size:11px;font-weight:600;letter-spacing:.07em;
  text-transform:uppercase;color:var(--text-3);
  padding:12px 12px 4px;
}

/* ============================================================
   BANNER SLIDER
   ============================================================ */
.bz-banner{padding:12px 14px 0;}
.bz-slider{
  position:relative;border-radius:var(--radius-xl);
  overflow:hidden;background:#111;
  user-select:none;-webkit-user-select:none;
}
.bz-track{
  display:flex;will-change:transform;
  transition:transform .48s cubic-bezier(.4,0,.2,1);
}
.bz-slide{
  min-width:100%;height:190px;
  display:flex;align-items:center;
  padding:0 24px;position:relative;overflow:hidden;
}
.bz-slide::after{
  content:'';position:absolute;inset:0;
  background:linear-gradient(90deg,rgba(0,0,0,.6) 0%,rgba(0,0,0,.15) 60%,transparent 100%);
  pointer-events:none;
}
.bz-slide-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.bz-slide-1{background:linear-gradient(135deg,#1a1a2e,#3C3489);}
.bz-slide-2{background:linear-gradient(135deg,#0d5c45,#1a9e72);}
.bz-slide-3{background:linear-gradient(135deg,#7a2200,#D85A30);}
.bz-slide-content{position:relative;z-index:2;max-width:360px;}
.bz-slide-tag{
  display:inline-block;background:var(--primary);color:#fff;
  font-size:10px;font-weight:700;padding:2px 10px;
  border-radius:20px;margin-bottom:8px;letter-spacing:.05em;
  text-transform:uppercase;
}
.bz-slide-content h2{
  font-size:18px;font-weight:700;color:#fff;
  line-height:1.25;margin-bottom:6px;
}
.bz-slide-content p{
  color:rgba(255,255,255,.72);font-size:12px;
  margin-bottom:12px;line-height:1.5;
}
.bz-slide-btn{
  display:inline-flex;align-items:center;gap:6px;
  background:#fff;color:var(--text);
  font-size:12px;font-weight:700;
  padding:8px 16px;border-radius:var(--radius-sm);
  transition:transform var(--trans),box-shadow var(--trans);
}
.bz-slide-btn:hover{transform:translateY(-2px);box-shadow:var(--shadow);}
.bz-slide-btn svg{width:13px;height:13px;}

/* Arrow buttons */
.bz-arr{
  position:absolute;top:50%;transform:translateY(-50%);z-index:10;
  background:rgba(255,255,255,.88);
  width:32px;height:32px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  box-shadow:var(--shadow-sm);
  transition:background var(--trans);
}
.bz-arr:hover{background:#fff;}
.bz-arr svg{width:16px;height:16px;}
.bz-prev{left:10px;}
.bz-next{right:10px;}

/* Dots */
.bz-dots{
  position:absolute;bottom:10px;left:50%;transform:translateX(-50%);
  display:flex;gap:5px;z-index:10;
}
.bz-dot{
  width:6px;height:6px;border-radius:50%;
  background:rgba(255,255,255,.38);
  transition:all .25s;padding:0;
}
.bz-dot.is-on{background:#fff;width:18px;border-radius:4px;}

/* ============================================================
   CATEGORY FILTER
   ============================================================ */
.bz-cats{padding:16px 14px 0;}
.bz-section-title{
  font-size:14px;font-weight:700;color:var(--text);
  margin-bottom:10px;display:flex;align-items:center;gap:8px;
}
.bz-section-title::after{content:'';flex:1;height:1px;background:var(--border);}
.bz-pills{
  display:flex;gap:8px;
  overflow-x:auto;padding-bottom:6px;
  scrollbar-width:none;
}
.bz-pills::-webkit-scrollbar{display:none;}
.bz-pill{
  display:inline-flex;align-items:center;gap:6px;
  padding:7px 14px;border-radius:30px;white-space:nowrap;
  border:1.5px solid var(--border-2);background:var(--surface);
  color:var(--text-2);font-size:12px;font-weight:500;
  transition:all var(--trans);flex-shrink:0;
}
.bz-pill img,.bz-pill svg{width:16px;height:16px;object-fit:contain;}
.bz-pill:hover{border-color:var(--primary);color:var(--primary);background:var(--primary-lt);}
.bz-pill.is-on{background:var(--primary);color:#fff;border-color:var(--primary);}

/* ============================================================
   PRODUCTS GRID  (2 col mobile → 3 col → 4 col desktop)
   ============================================================ */
.bz-products{padding:16px 14px 40px;}

/* WooCommerce overrides */
.woocommerce ul.products,
.woocommerce-page ul.products{
  display:grid!important;
  grid-template-columns:repeat(2,1fr)!important;
  gap:10px!important;
  margin:0!important;padding:0!important;
  list-style:none!important;float:none!important;
}
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product{
  background:var(--surface)!important;
  border:1px solid var(--border)!important;
  border-radius:var(--radius-lg)!important;
  overflow:hidden!important;
  transition:transform var(--trans),box-shadow var(--trans)!important;
  margin:0!important;padding:0!important;
  float:none!important;width:auto!important;
  display:flex!important;flex-direction:column!important;
  position:relative!important;
}
.woocommerce ul.products li.product:hover{
  transform:translateY(-3px)!important;
  box-shadow:var(--shadow)!important;
}
/* Thumbnail */
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link{
  display:block;overflow:hidden;
}
.woocommerce ul.products li.product img{
  width:100%!important;aspect-ratio:1!important;
  object-fit:cover!important;margin:0!important;
  transition:transform .35s ease!important;
}
.woocommerce ul.products li.product:hover img{transform:scale(1.05)!important;}
/* Sale badge */
.woocommerce ul.products li.product .onsale{
  position:absolute!important;top:8px!important;left:8px!important;
  background:var(--primary)!important;color:#fff!important;
  font-size:10px!important;font-weight:700!important;
  padding:2px 8px!important;border-radius:5px!important;
  margin:0!important;z-index:3!important;
  min-height:unset!important;min-width:unset!important;line-height:1.4!important;
}
/* Product title */
.woocommerce ul.products li.product .woocommerce-loop-product__title{
  font-size:12px!important;font-weight:600!important;
  color:var(--text)!important;
  padding:8px 10px 2px!important;margin:0!important;
  line-height:1.4!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
  overflow:hidden!important;
}
/* Price */
.woocommerce ul.products li.product .price{
  display:flex!important;align-items:baseline!important;gap:5px!important;
  padding:2px 10px 8px!important;margin:0!important;
  font-size:14px!important;font-weight:700!important;
  color:var(--primary)!important;
}
.woocommerce ul.products li.product .price del{
  font-size:11px!important;color:var(--text-3)!important;font-weight:400!important;
}
.woocommerce ul.products li.product .price ins{text-decoration:none!important;}
/* Stars */
.woocommerce ul.products li.product .star-rating{
  margin:0 10px 5px!important;font-size:11px!important;
}
/* Add to cart */
.woocommerce ul.products li.product .button{
  display:block!important;
  margin:0 10px 10px!important;
  padding:8px!important;
  background:var(--primary)!important;color:#fff!important;
  border:none!important;border-radius:var(--radius-sm)!important;
  font-size:12px!important;font-weight:600!important;
  text-align:center!important;width:calc(100% - 20px)!important;
  transition:background var(--trans)!important;
}
.woocommerce ul.products li.product .button:hover{background:var(--primary-dk)!important;}
.woocommerce ul.products li.product .button.added{background:#2a9d5c!important;}

/* Wishlist overlay */
.bz-wish{
  position:absolute;top:8px;right:8px;
  background:rgba(255,255,255,.88);
  width:30px;height:30px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  color:var(--text-2);box-shadow:var(--shadow-sm);
  z-index:3;opacity:0;transition:opacity var(--trans),background var(--trans);
}
.woocommerce ul.products li.product:hover .bz-wish{opacity:1;}
.bz-wish:hover{background:var(--primary);color:#fff;}
.bz-wish.is-on{opacity:1;background:var(--primary);color:#fff;}
.bz-wish svg{width:14px;height:14px;}

/* ============================================================
   PAGINATION
   ============================================================ */
.woocommerce-pagination ul{
  display:flex!important;gap:5px!important;
  justify-content:center!important;
  margin-top:28px!important;padding:0!important;list-style:none!important;
}
.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  width:36px!important;height:36px!important;
  border-radius:var(--radius-sm)!important;
  border:1px solid var(--border-2)!important;
  font-size:13px!important;background:var(--surface)!important;
  color:var(--text)!important;text-decoration:none!important;
  transition:all var(--trans)!important;
}
.woocommerce-pagination ul li a:hover{border-color:var(--primary)!important;color:var(--primary)!important;}
.woocommerce-pagination ul li span.current{
  background:var(--primary)!important;color:#fff!important;border-color:var(--primary)!important;
}

/* ============================================================
   NOTICES
   ============================================================ */
.woocommerce-message,.woocommerce-info,.woocommerce-error{
  border-top:3px solid var(--primary)!important;
  border-radius:var(--radius)!important;font-size:13px!important;
}

/* ============================================================
   FOOTER
   ============================================================ */
#bz-footer{
  background:#1a1a1a;color:rgba(255,255,255,.5);
  padding:32px 16px 16px;margin-top:0;
}
.bz-footer-grid{
  display:grid;grid-template-columns:1fr 1fr;
  gap:28px;max-width:var(--container);margin-inline:auto;
  padding-bottom:24px;border-bottom:1px solid rgba(255,255,255,.08);
  margin-bottom:16px;
}
.bz-footer-brand-name{font-size:20px;font-weight:700;color:var(--primary);}
.bz-footer-brand-name span{color:#fff;}
.bz-footer-desc{font-size:12px;margin-top:8px;line-height:1.65;}
.bz-footer-col h4{color:#fff;font-size:13px;font-weight:600;margin-bottom:10px;}
.bz-footer-col li{margin-bottom:7px;}
.bz-footer-col a{font-size:12px;color:rgba(255,255,255,.48);transition:color var(--trans);}
.bz-footer-col a:hover{color:var(--primary);}
.bz-footer-bottom{
  text-align:center;font-size:11px;
  max-width:var(--container);margin-inline:auto;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ── 480px+: slightly bigger font ── */
@media(min-width:480px){
  .bz-slide{height:210px;}
  .bz-slide-content h2{font-size:20px;}
  .bz-slide-content p{display:block;}
}

/* ── 640px+: 3-col products, show desktop search ── */
@media(min-width:640px){
  :root{--nav-h:60px;}
  .woocommerce ul.products,
  .woocommerce-page ul.products{
    grid-template-columns:repeat(3,1fr)!important;
    gap:12px!important;
  }
  .bz-search{display:flex;}
  .bz-mobile-search{display:none!important;}
  .bz-hamburger{display:none;}
  .bz-slide{height:240px;padding:0 36px;}
  .bz-slide-content h2{font-size:22px;}
  .bz-banner{padding:14px 20px 0;}
  .bz-cats,.bz-products{padding-inline:20px;}
  .bz-footer-grid{grid-template-columns:1.5fr 1fr 1fr 1fr;}
}

/* ── 1024px+: 4-col products ── */
@media(min-width:1024px){
  :root{--nav-h:64px;}
  .woocommerce ul.products,
  .woocommerce-page ul.products{
    grid-template-columns:repeat(4,1fr)!important;
    gap:14px!important;
  }
  .bz-slide{height:280px;padding:0 64px;}
  .bz-slide-content h2{font-size:26px;}
  .bz-slide-content p{font-size:13px;}
  .bz-slide-btn{font-size:13px;padding:10px 22px;}
  .bz-banner{padding:20px 24px 0;}
  .bz-cats,.bz-products{padding-inline:24px;}
  .bz-nav{padding-inline:24px;}
}

/* ── 1280px+ container padding ── */
@media(min-width:1280px){
  .bz-nav,.bz-banner .inner,
  .bz-cats,.bz-products,#bz-footer .inner{max-width:var(--container);margin-inline:auto;}
}

/* ============================================================
   CATEGORY PILL COUNT BADGE
   ============================================================ */
.bz-pill-count {
  font-size:10px;color:var(--text-3);
  background:var(--bg);border-radius:10px;
  padding:1px 6px;line-height:1.4;
}
.bz-pill.is-on .bz-pill-count{background:rgba(255,255,255,.2);color:rgba(255,255,255,.8);}

/* ============================================================
   PLACEHOLDER CARDS (shown when WooCommerce not active)
   ============================================================ */
.bz-placeholder-grid{
  display:grid;grid-template-columns:repeat(2,1fr);
  gap:10px;list-style:none;
}
.bz-placeholder-card{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius-lg);overflow:hidden;
}
.bz-ph-img{width:100%;aspect-ratio:1;background:var(--bg);}
.bz-ph-body{padding:10px;}
.bz-ph-line{height:12px;background:var(--bg);border-radius:6px;margin-bottom:8px;}
.bz-ph-line.w80{width:80%;}
.bz-ph-line.w50{width:50%;}
.bz-ph-btn{height:32px;background:var(--bg);border-radius:var(--radius-sm);}

/* ============================================================
   FOOTER – mobile 2-col → desktop 4-col
   ============================================================ */
.bz-footer-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px 20px;
  max-width:var(--container);margin-inline:auto;
  padding-bottom:22px;
  border-bottom:1px solid rgba(255,255,255,.08);
  margin-bottom:14px;
}
/* brand row spans full width on mobile */
.bz-footer-grid .bz-footer-col:first-child,
.bz-footer-grid .bz-footer-col:last-child{grid-column:1/-1;}

@media(min-width:640px){
  .bz-footer-grid{grid-template-columns:1.6fr 1fr 1fr 1fr;}
  .bz-footer-grid .bz-footer-col:first-child,
  .bz-footer-grid .bz-footer-col:last-child{grid-column:auto;}
  .bz-placeholder-grid{grid-template-columns:repeat(3,1fr);}
}
@media(min-width:1024px){
  .bz-placeholder-grid{grid-template-columns:repeat(4,1fr);}
}
