/*
Theme Name: B-Day Store
Theme URI: https://b-day.pk
Author: Gulf Smart Advisory
Description: Daraz.pk-style e-commerce WordPress theme for b-day. Requires WooCommerce.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
Text Domain: bday
WC requires at least: 8.0
WC tested up to: 9.0
*/

/* ── Variables ─────────────────────────────────────────────── */
:root{
  --bday-primary:#F1AF25;
  --bday-primary-dark:#D1930F;
  --bday-secondary:#235480;
  --bday-flash:#F57224;
  --bday-flash-red:#E4002B;
  --bday-bg:#F5F5F5;
  --bday-text:#212121;
  --bday-text-light:#757575;
  --bday-border:#E6E6E6;
  --bday-sale:#E4002B;
  --bday-radius:4px;
  --bday-shadow:0 1px 3px rgba(0,0,0,.08);
  --bday-shadow-hover:0 4px 14px rgba(0,0,0,.14);
}

/* ── Reset / Base ───────────────────────────────────────────── */
*{box-sizing:border-box;}
body{margin:0;background:var(--bday-bg);color:var(--bday-text);font-family:'Roboto','Segoe UI',-apple-system,BlinkMacSystemFont,Arial,sans-serif;font-size:14px;line-height:1.5;}
img{max-width:100%;height:auto;display:block;}
a{color:inherit;text-decoration:none;}
ul{list-style:none;margin:0;padding:0;}
.container{max-width:1200px;margin:0 auto;padding:0 12px;}
h1,h2,h3,h4{margin:0 0 12px;font-weight:500;}
.btn{display:inline-block;background:var(--bday-primary);color:var(--bday-secondary);padding:10px 22px;border-radius:var(--bday-radius);border:none;cursor:pointer;font-weight:700;font-size:14px;}

/* ── Top Bar ─────────────────────────────────────────────────── */
.bday-topbar{background:var(--bday-secondary);color:#e4e9f0;font-size:12px;overflow:hidden;}
.bday-topbar .container{display:flex;justify-content:flex-end;align-items:center;gap:14px;height:36px;flex-wrap:nowrap;overflow-x:auto;}
.bday-topbar a{color:#e4e9f0;white-space:nowrap;}
.bday-topbar a:hover{color:#fff;}
.bday-topbar .sep{opacity:.4;flex-shrink:0;}

/* ── Header ──────────────────────────────────────────────────── */
.bday-header{background:#fff;position:sticky;top:0;z-index:999;box-shadow:0 1px 4px rgba(0,0,0,.08);}
.bday-header-inner{display:flex;align-items:center;gap:20px;padding:8px 0;min-height:116px;}
.bday-logo{flex-shrink:0;}
.bday-logo img{height:100px;width:auto;}
.bday-logo-video{height:92px;width:auto;display:block;}
.bday-search{flex:1;display:flex;min-width:0;}
.bday-search input{flex:1;min-width:0;border:2px solid var(--bday-primary);border-right:none;border-radius:2px 0 0 2px;padding:10px 14px;font-size:14px;outline:none;}
.bday-search button{background:var(--bday-primary);border:none;color:var(--bday-secondary);padding:0 20px;border-radius:0 2px 2px 0;cursor:pointer;font-size:13px;font-weight:700;display:flex;align-items:center;gap:6px;white-space:nowrap;}
.bday-header-actions{display:flex;align-items:center;gap:20px;flex-shrink:0;}
.bday-header-actions a{display:flex;align-items:center;position:relative;color:var(--bday-secondary);}
.bday-header-actions svg{width:26px;height:26px;stroke:var(--bday-secondary);}
.bday-cart-count{position:absolute;top:-8px;right:-10px;background:var(--bday-flash);color:#fff;font-size:11px;font-weight:700;border-radius:50%;min-width:18px;height:18px;padding:0 4px;display:flex;align-items:center;justify-content:center;}

/* ── Homepage Hero ───────────────────────────────────────────── */
.bday-hero-zone{padding:16px 0;}
.bday-hero-grid{display:grid;grid-template-columns:210px 1fr 240px;gap:12px;}
.bday-cat-sidebar{background:#fff;border-radius:var(--bday-radius);box-shadow:var(--bday-shadow);overflow:hidden;height:400px;overflow-y:auto;}
.bday-cat-sidebar li a{display:flex;align-items:center;gap:10px;padding:9px 14px;font-size:13px;color:var(--bday-text);border-left:3px solid transparent;transition:all .12s ease;}
.bday-cat-sidebar li a:hover{background:#fafafa;color:var(--bday-flash);border-left-color:var(--bday-flash);}
.bday-cat-sidebar li a svg{width:18px;height:18px;stroke:var(--bday-secondary);flex-shrink:0;}
.bday-slider{position:relative;border-radius:var(--bday-radius);overflow:hidden;height:400px;background:linear-gradient(135deg,var(--bday-secondary),#3a76ab);}
.bday-slide{position:absolute;inset:0;display:none;align-items:center;padding:0 56px;color:#fff;}
.bday-slide.active{display:flex;}
.bday-slide-content h2{font-size:36px;margin-bottom:10px;line-height:1.15;}
.bday-slide-content p{font-size:16px;opacity:.9;margin-bottom:22px;}
.bday-slider-arrow{position:absolute;top:50%;transform:translateY(-50%);width:34px;height:44px;background:rgba(255,255,255,.35);color:#fff;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:20px;z-index:3;}
.bday-slider-arrow.prev{left:0;border-radius:0 4px 4px 0;}
.bday-slider-arrow.next{right:0;border-radius:4px 0 0 4px;}
.bday-slider-dots{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);display:flex;gap:7px;z-index:3;}
.bday-slider-dots span{width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,.5);cursor:pointer;}
.bday-slider-dots span.active{background:#fff;width:20px;border-radius:4px;}
.bday-hero-side{display:flex;flex-direction:column;gap:12px;}
.bday-hero-side-card{flex:1;border-radius:var(--bday-radius);overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:16px;color:#fff;font-weight:600;box-shadow:var(--bday-shadow);}

/* ── Services strip ──────────────────────────────────────────── */
.bday-services{background:#fff;border-radius:var(--bday-radius);box-shadow:var(--bday-shadow);display:grid;grid-template-columns:repeat(4,1fr);margin-top:4px;}
.bday-service{display:flex;align-items:center;gap:12px;padding:14px 16px;border-right:1px solid var(--bday-border);}
.bday-service:last-child{border-right:none;}
.bday-service svg{width:28px;height:28px;stroke:var(--bday-flash);flex-shrink:0;}
.bday-service .txt strong{display:block;font-size:13px;color:var(--bday-text);}
.bday-service .txt span{font-size:11px;color:var(--bday-text-light);}

/* ── Section panels ──────────────────────────────────────────── */
.bday-section{margin-top:16px;}
.bday-panel{background:#fff;border-radius:var(--bday-radius);box-shadow:var(--bday-shadow);overflow:hidden;}
.bday-panel-head{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid var(--bday-border);}
.bday-panel-head h2{font-size:20px;margin:0;color:var(--bday-secondary);text-transform:uppercase;letter-spacing:.5px;font-weight:700;}
.bday-panel-head a{font-size:13px;color:var(--bday-flash);font-weight:600;}
.bday-flash-head{display:flex;align-items:center;gap:16px;padding:14px 16px;border-bottom:1px solid var(--bday-border);flex-wrap:wrap;}
.bday-flash-head .fs-title{display:flex;align-items:center;gap:8px;font-size:22px;font-weight:700;color:var(--bday-flash);text-transform:uppercase;}
.bday-flash-timer{display:flex;gap:5px;align-items:center;font-size:13px;}
.bday-flash-timer .box{background:var(--bday-secondary);color:#fff;padding:4px 7px;border-radius:3px;font-weight:700;font-family:monospace;font-size:14px;}
.bday-flash-head .fs-more{margin-left:auto;font-size:13px;color:var(--bday-flash);font-weight:600;}

/* ── Product cards (homepage grids) ─────────────────────────── */
.bday-product-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:0;}
.bday-product-card{background:#fff;border:1px solid transparent;overflow:hidden;position:relative;transition:box-shadow .15s,border-color .15s;}
.bday-product-card:hover{box-shadow:var(--bday-shadow-hover);border-color:var(--bday-border);z-index:2;}
.bday-product-thumb{position:relative;aspect-ratio:1/1;background:#fff;overflow:hidden;display:flex;align-items:center;justify-content:center;}
.bday-product-thumb img{width:100%;height:100%;object-fit:cover;}
.bday-badge{position:absolute;top:0;left:0;background:var(--bday-flash);color:#fff;font-size:11px;font-weight:700;padding:2px 7px;}
.bday-product-info{padding:8px 10px 12px;}
.bday-product-title{font-size:13px;color:var(--bday-text);line-height:1.35;height:36px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin-bottom:6px;}
.bday-product-price{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;margin-bottom:4px;}
.bday-price-now{font-size:15px;font-weight:600;color:var(--bday-flash);}
.bday-price-old{font-size:12px;color:var(--bday-text-light);text-decoration:line-through;}
.bday-price-off{font-size:11px;color:var(--bday-text-light);}
.bday-product-meta{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:var(--bday-text-light);}
.bday-product-rating .stars{color:#FFC400;}
.bday-sold{font-size:11px;color:var(--bday-text-light);}

/* ── Category tiles ──────────────────────────────────────────── */
.bday-cat-tiles{display:grid;grid-template-columns:repeat(8,1fr);}
.bday-cat-tile{border-right:1px solid var(--bday-border);border-bottom:1px solid var(--bday-border);padding:14px 8px;text-align:center;transition:box-shadow .15s;}
.bday-cat-tile:hover{box-shadow:var(--bday-shadow-hover);z-index:2;position:relative;}
.bday-cat-tile .icon-wrap{width:60px;height:60px;margin:0 auto 8px;display:flex;align-items:center;justify-content:center;}
.bday-cat-tile .icon-wrap svg{width:32px;height:32px;stroke:var(--bday-secondary);}
.bday-cat-tile .icon-wrap img{width:60px;height:60px;object-fit:contain;}
.bday-cat-tile span{font-size:12px;color:var(--bday-text);display:block;}

/* ── Just For You ────────────────────────────────────────────── */
.bday-jfy-head{padding:16px;border-bottom:3px solid var(--bday-flash);background:#fff;border-radius:var(--bday-radius) var(--bday-radius) 0 0;}
.bday-jfy-head h2{font-size:22px;margin:0;color:var(--bday-secondary);text-transform:uppercase;text-align:center;letter-spacing:1px;font-weight:700;}
.bday-jfy-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-top:12px;}
.bday-jfy-grid .bday-product-card{border:1px solid var(--bday-border);border-radius:var(--bday-radius);}
.bday-load-more{display:block;margin:20px auto;background:#fff;border:1px solid var(--bday-border);color:var(--bday-secondary);padding:11px 60px;border-radius:var(--bday-radius);font-weight:600;cursor:pointer;font-size:14px;}
.bday-load-more:hover{border-color:var(--bday-flash);color:var(--bday-flash);}

/* ── Footer ──────────────────────────────────────────────────── */
.bday-footer{background:#fff;margin-top:24px;border-top:3px solid var(--bday-secondary);}
.bday-footer-top{display:grid;grid-template-columns:repeat(5,1fr);gap:24px;padding:32px 0 24px;}
.bday-footer-col h4{color:var(--bday-text);font-size:14px;margin-bottom:12px;font-weight:700;}
.bday-footer-col ul li{margin-bottom:9px;font-size:13px;color:var(--bday-text-light);}
.bday-footer-col a{color:var(--bday-text-light);}
.bday-footer-col a:hover{color:var(--bday-flash);}
.bday-footer-pay{margin-top:12px;}
.bday-footer-pay strong{display:block;font-size:12px;margin-bottom:8px;color:var(--bday-text);}
.bday-payment-icons{display:flex;gap:6px;flex-wrap:wrap;}
.bday-payment-icons span{background:var(--bday-secondary);color:#fff;font-size:10px;font-weight:700;padding:4px 8px;border-radius:3px;}
.bday-footer-bottom{border-top:1px solid var(--bday-border);padding:14px 0;font-size:12px;color:var(--bday-text-light);text-align:center;}

/* ── WhatsApp float ──────────────────────────────────────────── */
.bday-whatsapp-float{position:fixed;bottom:20px;right:20px;width:52px;height:52px;background:#25D366;border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 14px rgba(0,0,0,.25);z-index:9999;transition:transform .15s;}
.bday-whatsapp-float:hover{transform:scale(1.08);}

/* ── Breadcrumb ──────────────────────────────────────────────── */
.bday-breadcrumb{background:#fff;padding:10px 0;font-size:12px;color:var(--bday-text-light);border-bottom:1px solid var(--bday-border);}
.bday-breadcrumb a{color:var(--bday-text-light);}
.bday-breadcrumb a:hover{color:var(--bday-flash);}

/* ── Shop Page ───────────────────────────────────────────────── */

/* Category pill strip — scrollable on all screens */
.bday-shop-cat-strip{
  display:flex;
  flex-wrap:nowrap;
  gap:8px;
  padding:12px 0;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.bday-shop-cat-strip::-webkit-scrollbar{display:none;}
.bday-shop-cat-pill{
  display:inline-block;
  flex-shrink:0;
  padding:7px 16px;
  border-radius:999px;
  border:1.5px solid var(--bday-border);
  background:#fff;
  color:var(--bday-text);
  font-size:13px;
  font-weight:500;
  white-space:nowrap;
  transition:all .15s;
}
.bday-shop-cat-pill:hover,
.bday-shop-cat-pill.active{
  border-color:var(--bday-secondary);
  background:var(--bday-secondary);
  color:#fff;
}

/* Filter button — hidden on desktop */
.bday-filter-btn{display:none;}

/* Sidebar overlay — hidden by default */
.bday-filter-overlay{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  z-index:1099;
}
.bday-filter-overlay.is-open{display:block;}

/* Close button — hidden on desktop */
.bday-filter-close{display:none;}

/* Shop layout: sidebar on right, main on left */
.bday-shop-layout{
  display:grid;
  grid-template-columns:1fr 220px;
  gap:20px;
  padding:12px 0 40px;
  align-items:start;
}

/* Sidebar — sticky on desktop */
.bday-sidebar{
  background:#fff;
  border-radius:var(--bday-radius);
  box-shadow:var(--bday-shadow);
  padding:18px;
  position:sticky;
  top:16px;
  max-height:calc(100vh - 32px);
  overflow-y:auto;
}
.bday-sidebar h4{
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.5px;
  color:var(--bday-text);
  margin-bottom:12px;
  padding-bottom:8px;
  border-bottom:2px solid var(--bday-secondary);
}
.bday-sidebar .widget{margin-bottom:20px;}
.bday-sidebar ul li{margin-bottom:5px;font-size:13px;}
.bday-sidebar ul li a{
  color:var(--bday-text-light);
  display:flex;
  justify-content:space-between;
  padding:4px 0;
  transition:color .12s;
}
.bday-sidebar ul li a:hover{color:var(--bday-flash);}

/* Shop top bar */
.bday-shop-topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:#fff;
  border-radius:var(--bday-radius);
  box-shadow:var(--bday-shadow);
  padding:12px 16px;
  margin-bottom:12px;
  flex-wrap:wrap;
  gap:8px;
}
.bday-shop-topbar-left{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.bday-shop-title{font-size:16px;font-weight:700;color:var(--bday-secondary);margin:0;}
.bday-shop-count{font-size:12px;color:var(--bday-text-light);background:var(--bday-bg);padding:3px 10px;border-radius:999px;}
.bday-shop-topbar-right .woocommerce-ordering select{
  border:1.5px solid var(--bday-border);
  border-radius:var(--bday-radius);
  padding:7px 10px;
  font-size:13px;
  color:var(--bday-text);
  outline:none;
  cursor:pointer;
  max-width:160px;
}

/* Product grid — 3 cols on desktop */
.bday-shop-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;}
.bday-shop-grid .bday-product-card{border:1px solid var(--bday-border);border-radius:var(--bday-radius);background:#fff;}
.bday-shop-grid .bday-product-card:hover{box-shadow:var(--bday-shadow-hover);border-color:var(--bday-secondary);}

/* Pagination */
.bday-shop-pagination{margin-top:20px;display:flex;justify-content:center;}
.bday-shop-pagination .woocommerce-pagination ul{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;}
.bday-shop-pagination .woocommerce-pagination ul li a,
.bday-shop-pagination .woocommerce-pagination ul li span{
  display:flex;align-items:center;justify-content:center;
  width:36px;height:36px;
  border:1.5px solid var(--bday-border);
  border-radius:var(--bday-radius);
  background:#fff;font-size:13px;color:var(--bday-text);transition:all .15s;
}
.bday-shop-pagination .woocommerce-pagination ul li a:hover,
.bday-shop-pagination .woocommerce-pagination ul li span.current{
  background:var(--bday-secondary);border-color:var(--bday-secondary);color:#fff;
}

/* No products */
.bday-no-products{background:#fff;border-radius:var(--bday-radius);box-shadow:var(--bday-shadow);padding:60px 20px;text-align:center;color:var(--bday-text-light);}
.bday-no-products p{margin:0 0 18px;font-size:15px;}
.bday-btn-primary{display:inline-block;background:var(--bday-flash);color:#fff;font-weight:600;font-size:14px;padding:11px 26px;border-radius:var(--bday-radius);border:none;cursor:pointer;}

/* ── Cart / Checkout pages ───────────────────────────────────── */
.bday-cart-layout{display:grid;grid-template-columns:1fr 320px;gap:20px;align-items:start;}
.cart-collaterals{background:#fff;border-radius:var(--bday-radius);box-shadow:var(--bday-shadow);padding:18px;}
.cart-collaterals .cart_totals h2{font-size:15px;margin:0 0 14px;padding-bottom:10px;border-bottom:1px solid var(--bday-border);}
.cart-collaterals table.shop_table{width:100%;border-collapse:collapse;font-size:13.5px;}
.cart-collaterals table.shop_table th{text-align:left;font-weight:500;color:var(--bday-text-light);padding:8px 0;}
.cart-collaterals table.shop_table td{text-align:right;padding:8px 0;}
.cart-collaterals table.shop_table tr{border-bottom:1px solid var(--bday-border);}
.cart-collaterals .order-total td,.cart-collaterals .order-total th{font-size:16px;font-weight:700;color:var(--bday-secondary);}
.cart-collaterals .wc-proceed-to-checkout{margin-top:16px;}
.cart-collaterals .checkout-button{display:block;width:100%;text-align:center;background:var(--bday-flash);color:#fff;font-weight:700;font-size:14.5px;padding:13px;border-radius:var(--bday-radius);}

/* ── Tablet (≤1024px) ────────────────────────────────────────── */
@media (max-width:1024px){
  .bday-hero-grid{grid-template-columns:1fr;}
  .bday-cat-sidebar{display:none;}
  .bday-hero-side{flex-direction:row;}
  .bday-services{grid-template-columns:repeat(2,1fr);}
  .bday-product-grid,.bday-jfy-grid{grid-template-columns:repeat(4,1fr);}
  .bday-cat-tiles{grid-template-columns:repeat(4,1fr);}
  .bday-footer-top{grid-template-columns:repeat(3,1fr);}
  .bday-shop-layout{grid-template-columns:200px 1fr;}
  .bday-shop-grid{grid-template-columns:repeat(3,1fr);}
}

/* ── Mobile (≤640px) ─────────────────────────────────────────── */
@media (max-width:640px){

  /* Top bar — hide on mobile (too crowded) */
  .bday-topbar{display:none;}

  /* Header */
  .bday-header-inner{flex-wrap:wrap;gap:10px;min-height:0;padding:10px 0;}
  .bday-logo{width:100%;display:flex;justify-content:flex-start;}
  .bday-logo-video{height:70px;}
  .bday-logo img{height:70px;}
  .bday-search{order:3;width:100%;}
  .bday-header-actions{margin-left:auto;}

  /* Homepage sections */
  .bday-hero-zone{padding:10px 0;}
  .bday-hero-grid{grid-template-columns:1fr;}
  .bday-slider{height:240px;}
  .bday-slide{padding:0 30px;}
  .bday-slide-content h2{font-size:22px;}
  .bday-slide-content p{font-size:13px;margin-bottom:14px;}
  .bday-hero-side{flex-direction:row;}
  .bday-hero-side-card{min-height:90px;font-size:13px;}
  .bday-services{grid-template-columns:repeat(2,1fr);}
  .bday-service{padding:10px 12px;gap:8px;}
  .bday-service svg{width:22px;height:22px;}
  .bday-service .txt strong{font-size:12px;}
  .bday-service .txt span{font-size:10px;}
  .bday-product-grid,.bday-jfy-grid{grid-template-columns:repeat(2,1fr);}
  .bday-cat-tiles{grid-template-columns:repeat(4,1fr);}
  .bday-jfy-head h2{font-size:18px;}
  .bday-footer-top{grid-template-columns:repeat(2,1fr);}

  /* ─ Shop page mobile ─ */

  /* Category pills already scroll — just shrink font */
  .bday-shop-cat-pill{font-size:12px;padding:6px 12px;}

  /* Show filter button */
  .bday-filter-btn{
    display:flex;
    align-items:center;
    gap:6px;
    background:#fff;
    border:1.5px solid var(--bday-border);
    border-radius:var(--bday-radius);
    padding:8px 16px;
    font-size:13px;
    font-weight:600;
    color:var(--bday-text);
    margin-bottom:10px;
    cursor:pointer;
    width:fit-content;
  }

  /* Shop layout: single column, sidebar overlaid */
  .bday-shop-layout{
    display:block;
    padding:0 0 30px;
  }

  /* Sidebar: always fixed off-screen, JS opens it */
  .bday-sidebar{
    position:fixed !important;
    top:0 !important;
    left:0 !important;
    right:auto !important;
    height:100vh !important;
    width:82vw !important;
    max-width:300px !important;
    z-index:1100 !important;
    overflow-y:auto !important;
    transform:translateX(-110%) !important;
    transition:transform .28s ease !important;
    border-radius:0 !important;
    box-shadow:4px 0 20px rgba(0,0,0,.2) !important;
    padding:16px !important;
    max-height:none !important;
  }
  .bday-sidebar.is-open{
    transform:translateX(0) !important;
  }

  /* Close button visible */
  .bday-filter-close{
    display:flex !important;
    justify-content:flex-end;
    font-size:30px;
    font-weight:300;
    line-height:1;
    cursor:pointer;
    margin-bottom:12px;
    color:var(--bday-text-light);
    background:none;
    border:none;
    width:100%;
    padding:0;
  }

  /* Shop topbar */
  .bday-shop-topbar{flex-direction:column;align-items:flex-start;padding:10px 12px;gap:6px;margin-bottom:10px;}
  .bday-shop-title{font-size:15px;}
  .bday-shop-topbar-right .woocommerce-ordering select{max-width:100%;width:100%;}

  /* Product grid: 2 columns */
  .bday-shop-grid{grid-template-columns:repeat(2,1fr);gap:8px;}
  .bday-shop-grid .bday-product-info{padding:6px 8px 10px;}
  .bday-shop-grid .bday-product-title{font-size:12px;height:32px;}
  .bday-shop-grid .bday-price-now{font-size:13px;}

  /* Cart */
  .bday-cart-layout{grid-template-columns:1fr;}
}
