/* Import Shop BD Core v2.1.2 — design tokens overridden inline per-site via
   admin settings (see isbd_get_settings + wp_add_inline_style). */
:root{
  --isbd-primary:#173F35;
  --isbd-bg:#FBF8F1;
  --isbd-accent:#D79A32;
  --isbd-text:#171717;
  --isbd-muted:#6B7280;
  --isbd-border:#E7E2D8;
  --isbd-success:#1f9d55;
  --isbd-radius:12px;
  --isbd-bottom-nav-height:60px;

  /* Deliberate z-index scale (spec §54) — every fixed/overlay element in
     this file references one of these tokens instead of an arbitrary
     number, so stacking order stays intentional as the plugin grows. */
  --isbd-z-header:100;
  --isbd-z-mega-menu:200;
  --isbd-z-bottom-nav:8000;
  --isbd-z-whatsapp:9000;
  --isbd-z-cart-overlay:9400;
  --isbd-z-cart-drawer:9500;
  --isbd-z-modal:9600;
}



.isbd-homepage{background:var(--isbd-bg);}

/* Mega menu */
.isbd-mega-menu{background:var(--isbd-primary);position:relative;z-index:var(--isbd-z-mega-menu);}
/* v2.1.2: hidden from first paint until isbd-scripts.js confirms a safe
   placement (after header, or before main content) and adds
   .isbd-positioned. If no safe target is ever found, it stays hidden —
   it is never shown at the wp_body_open position it starts at. */
.isbd-mega-menu[data-isbd-reposition="1"]:not(.isbd-positioned){display:none;}
.isbd-mega-menu ul{list-style:none;display:flex;gap:0;margin:0;padding:0 16px;overflow-x:auto;}
.isbd-mega-menu a{display:block;padding:11px 13px;color:#fff;text-decoration:none;font-size:12.5px;font-weight:600;white-space:nowrap;}
.isbd-mega-menu a:hover{background:rgba(255,255,255,.12);}
.isbd-mega-menu .isbd-count{opacity:.7;font-weight:400;}
@media(max-width:899px){.isbd-mega-menu{display:none;}}

/* Hero */
.isbd-hero{padding:40px 20px;text-align:center;}
.isbd-hero h1{font-size:clamp(22px,4vw,34px);margin:0 0 8px;color:var(--isbd-primary);}
.isbd-hero p{color:var(--isbd-muted);max-width:560px;margin:0 auto 18px;font-size:14px;}
.isbd-hero-ctas{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;}
.isbd-btn{padding:12px 24px;border-radius:999px;font-weight:700;text-decoration:none;font-size:13.5px;display:inline-block;min-height:44px;line-height:20px;border:none;cursor:pointer;}
.isbd-btn-primary{background:var(--isbd-primary);color:#fff;}
.isbd-btn-outline{background:#fff;color:var(--isbd-primary);border:1.5px solid var(--isbd-primary);}

/* Trust bar (hero) */
.isbd-trust-bar{display:flex;flex-wrap:wrap;justify-content:center;gap:18px;padding:14px 20px;font-size:12.5px;color:var(--isbd-text);}

/* Category grid — desktop 5-6 cols, tablet 3-4, mobile 2 (spec §16) */
.isbd-cat-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;}
@media(min-width:640px){.isbd-cat-grid{grid-template-columns:repeat(4,1fr);}}
@media(min-width:900px){.isbd-cat-grid{grid-template-columns:repeat(5,1fr);}}
@media(min-width:1200px){.isbd-cat-grid{grid-template-columns:repeat(6,1fr);}}
.isbd-cat-card{background:#fff;border:1px solid var(--isbd-border);border-radius:var(--isbd-radius);padding:10px 8px 12px;text-align:center;text-decoration:none;color:var(--isbd-text);display:flex;flex-direction:column;align-items:center;height:100%;}
/* Real product/category image, never a generic icon — see isbd_get_category_display_image(). object-fit:contain keeps packaging/labels readable and undistorted. */
.isbd-cat-card .isbd-cat-img-wrap{width:100%;aspect-ratio:1/1;max-width:84px;background:#fff;border-radius:10px;overflow:hidden;margin:0 auto 8px;display:flex;align-items:center;justify-content:center;}
.isbd-cat-card img{width:100%;height:100%;object-fit:contain;display:block;}
.isbd-cat-name{display:block;font-size:11.5px;font-weight:700;line-height:1.3;}
.isbd-cat-count{display:block;font-size:10px;color:var(--isbd-muted);margin-top:2px;}
.isbd-cat-cta{display:block;font-size:10.5px;font-weight:700;color:var(--isbd-primary);margin-top:auto;padding-top:6px;}

/* Sections + product grid */
.isbd-section{padding:26px 20px;max-width:1240px;margin:0 auto;}
.isbd-section-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:12px;}
.isbd-section-head h2{font-size:17px;margin:0;color:var(--isbd-text);}
.isbd-sub{font-size:11.5px;color:var(--isbd-muted);}
.isbd-view-all{font-size:11.5px;font-weight:700;color:var(--isbd-primary);text-decoration:none;white-space:nowrap;}
.isbd-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;}
@media(min-width:640px){.isbd-grid{grid-template-columns:repeat(3,1fr);}}
@media(min-width:1024px){.isbd-grid{grid-template-columns:repeat(6,1fr);}}
.isbd-card{background:#fff;border:1px solid var(--isbd-border);border-radius:var(--isbd-radius);overflow:hidden;position:relative;}
.isbd-card img{width:100%;aspect-ratio:1;object-fit:contain;background:#fff;display:block;}
.isbd-badge{position:absolute;top:8px;left:8px;background:var(--isbd-accent);color:#fff;font-size:9.5px;font-weight:800;padding:3px 6px;border-radius:6px;z-index:2;}
.isbd-card-body{padding:9px;}
.isbd-card-name{font-size:11.5px;font-weight:600;margin:0 0 5px;line-height:1.3;min-height:29px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--isbd-text);}
.isbd-card-price{font-size:13px;font-weight:800;color:var(--isbd-primary);}
.isbd-add-btn{margin:0 9px 9px;width:calc(100% - 18px);background:var(--isbd-primary);color:#fff;border:none;border-radius:8px;padding:7px;font-size:10.5px;font-weight:700;min-height:32px;}
.isbd-add-btn[disabled]{background:var(--isbd-muted);}

/* Trust grid (Why Choose Us) */
.isbd-trust-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;}
@media(min-width:768px){.isbd-trust-grid{grid-template-columns:repeat(4,1fr);}}
.isbd-trust-item{background:#fff;border:1px solid var(--isbd-border);border-radius:var(--isbd-radius);padding:16px;text-align:center;}
.isbd-trust-item span{font-size:24px;display:block;margin-bottom:6px;}
.isbd-trust-item p{font-size:12.5px;font-weight:700;margin:0;}

/* Reviews */
.isbd-review-grid{display:grid;grid-template-columns:1fr;gap:14px;}
@media(min-width:768px){.isbd-review-grid{grid-template-columns:repeat(3,1fr);}}
.isbd-review-card{background:#fff;border:1px solid var(--isbd-border);border-radius:var(--isbd-radius);padding:16px;font-size:12.5px;}
.isbd-stars{color:var(--isbd-accent);margin-bottom:6px;}
.isbd-review-author{color:var(--isbd-muted);margin-top:8px;}

/* CTA band */
.isbd-cta-band{background:var(--isbd-primary);color:#fff;text-align:center;padding:30px 20px;}
.isbd-cta-band h3{margin:0 0 14px;font-size:19px;}
.isbd-cta-band .isbd-btn-primary{background:#fff;color:var(--isbd-primary);}

/* Shop/category trust strip */
.isbd-shop-trust-strip{display:flex;flex-wrap:wrap;gap:16px;padding:10px 0;font-size:12px;color:var(--isbd-muted);border-bottom:1px solid var(--isbd-border);margin-bottom:14px;}

/* Compact shop/category page header (spec §25-27) — ~120-180px total,
   deliberately no hero image and no giant logo. */
.isbd-page-header{padding:18px 0 8px;max-width:1240px;margin:0 auto;}
.isbd-breadcrumb{font-size:11.5px;color:var(--isbd-muted);margin-bottom:6px;}
.isbd-breadcrumb a{color:var(--isbd-muted);text-decoration:none;}
.isbd-page-title{font-size:clamp(20px,3vw,28px);margin:0 0 4px;color:var(--isbd-primary);}
.isbd-page-sub{font-size:13px;color:var(--isbd-muted);margin:0 0 4px;max-width:640px;}
.isbd-page-count{font-size:11.5px;color:var(--isbd-muted);margin:0;}

/* OPT-IN ONLY — off by default. If, after confirming on staging (see
   FINAL-DEPLOYMENT-GUIDE.md), your theme's old oversized shop/category
   banner matches one of these common Storefront-family selectors, add
   the body class "isbd-hide-legacy-banner" via the Orchid Store's own
   Customizer/body-class filter (not hard-coded here) to enable this. */
body.isbd-hide-legacy-banner .storefront-hero,
body.isbd-hide-legacy-banner .site-header-cart + .page-header-banner,
body.isbd-hide-legacy-banner .woocommerce-products-header--hero{display:none !important;}

/* Product page additions */
.isbd-product-trust{margin:14px 0;font-size:13px;}
.isbd-product-trust p{margin:4px 0;}
.isbd-buy-now-button{margin-top:8px;width:100%;background:var(--isbd-accent);border:none;color:#fff;border-radius:var(--isbd-radius);padding:14px 20px;font-weight:600;min-height:44px;cursor:pointer;}

/* Free delivery bar */
.isbd-free-delivery-bar{padding:10px 14px;font-size:13px;}
.isbd-free-delivery-bar p{margin:0 0 6px;}
.isbd-free-delivery-bar .isbd-progress{height:6px;background:var(--isbd-border);border-radius:999px;overflow:hidden;}
.isbd-free-delivery-bar .isbd-progress span{display:block;height:100%;background:var(--isbd-success);transition:width .3s ease;}
.isbd-free-delivery-bar.isbd-unlocked p{color:var(--isbd-success);font-weight:600;}

/* WhatsApp float */
.isbd-whatsapp-float{position:fixed;right:16px;bottom:calc(var(--isbd-bottom-nav-height) + 16px);width:56px;height:56px;background:#25D366;color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(0,0,0,0.2);z-index:var(--isbd-z-whatsapp);}
@media(min-width:1024px){.isbd-whatsapp-float{bottom:24px;}}

/* Mobile bottom nav */
.isbd-mobile-bottom-nav{display:none;position:fixed;left:0;right:0;bottom:0;height:var(--isbd-bottom-nav-height);background:#fff;border-top:1px solid var(--isbd-border);z-index:var(--isbd-z-bottom-nav);padding-bottom:env(safe-area-inset-bottom,0);}
@media(max-width:1023px){
  .isbd-mobile-bottom-nav{display:grid;grid-template-columns:repeat(5,1fr);}
  body.woocommerce-page,body.single-product{padding-bottom:var(--isbd-bottom-nav-height);}
}
.isbd-mobile-bottom-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:11px;color:var(--isbd-muted);text-decoration:none;min-height:44px;}
.isbd-mobile-bottom-nav .isbd-icon{font-size:18px;position:relative;}
.isbd-cart-count{position:absolute;top:-6px;right:-10px;background:var(--isbd-accent);color:#fff;border-radius:999px;font-size:10px;line-height:1;padding:2px 5px;min-width:14px;}

/* Cart drawer */
.isbd-cart-drawer{position:fixed;top:0;right:0;bottom:0;width:min(400px,100%);background:#fff;transform:translateX(100%);transition:transform .25s ease;z-index:var(--isbd-z-cart-drawer);display:flex;flex-direction:column;box-shadow:-4px 0 16px rgba(0,0,0,.15);}
.isbd-cart-drawer.is-open{transform:translateX(0);}
.isbd-cart-drawer-overlay{position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:var(--isbd-z-cart-overlay);display:none;}
.isbd-cart-drawer-overlay.is-open{display:block;}
.isbd-cart-drawer-items{flex:1;overflow-y:auto;padding:12px;}
.isbd-cart-drawer-item{display:flex;gap:10px;padding:10px 0;border-bottom:1px solid var(--isbd-border);}
.isbd-cart-drawer-thumb img{width:56px;height:56px;object-fit:cover;border-radius:6px;}
.isbd-cart-drawer-name{margin:0;font-size:13px;font-weight:600;}
.isbd-cart-drawer-qty{margin:2px 0 0;font-size:12px;color:var(--isbd-muted);}
.isbd-cart-drawer-footer{padding:12px;border-top:1px solid var(--isbd-border);}
.isbd-cart-drawer-subtotal-row{display:flex;justify-content:space-between;margin-bottom:10px;font-weight:600;}

@media(prefers-reduced-motion:reduce){.isbd-cart-drawer,.isbd-free-delivery-bar .isbd-progress span{transition:none;}}
