/* =================================================
   RESET + GLOBAL (GOOGLE MATERIAL STYLE)
================================================= */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family: 'Google Sans', Roboto, -apple-system, Segoe UI, Arial, sans-serif;
}

:root{
  --bg:#f8f9fa;               /* Google Light Grey */
  --panel:#ffffff;            /* Pure White */
  --card:#ffffff;
  --card2:#f1f3f4;           /* Google Input Background */
  --primary:#1a73e8;          /* Google Blue */
  --accent:#174ea6;           /* Google Dark Blue */
  --success:#1e8e3e;          /* Google Green */
  --danger:#d93025;           /* Google Red */
  --warning:#f9ab00;          /* Google Yellow */
  --text:#202124;             /* Google Dark Charcoal */
  --muted:#5f6368;            /* Google Grey Text */
  --border:#dadce0;           /* Google Light Border */
}

body{
  background:var(--bg);
  color:var(--text);
  line-height:1.5;
  padding-bottom:64px;
}

/* =================================================
   TOPBAR / DESKTOP NAV
================================================= */
.topbar{
  background:var(--panel);
  padding:12px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  position:sticky;
  top:0;
  z-index:999;
  border-bottom:1px solid var(--border);
  box-shadow:0 1px 3px rgba(60,64,67,0.08);
}

.topbar h1{
  font-size:18px;
  font-weight:600;
  white-space:nowrap;
  color:var(--text);
}

.topbar nav{
  display:flex;
  gap:16px;
  align-items:center;
}

.topbar nav a{
  color:var(--muted);
  font-size:14px;
  font-weight:500;
  text-decoration:none;
}

.topbar nav a:hover{
  color:var(--primary);
}

/* =================================================
   MOBILE NAV
================================================= */
.m-nav{
  display:none;
  background:var(--panel);
  padding:10px 15px;
  border-bottom:1px solid var(--border);
  position:relative !important;
  z-index:10000 !important;
}

.m-nav-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:18px;
  background:transparent;
  color:var(--text);
}

.m-nav .logo{
  font-weight:600;
  color:var(--primary);
}

.m-search{
  margin-top:8px;
}

.m-search input{
  width:100%;
}

.menu-btn{
  position:relative;
  z-index:10001;
  cursor:pointer;
  user-select:none;
}

/* =================================================
   CATEGORY DRAWER (MOBILE MENU)
================================================= */
.cat-menu{
  position:fixed !important;
  top:0 !important;
  left:-260px;
  width:260px !important;
  height:100% !important;
  background:var(--panel) !important;
  z-index:10002 !important;
  transition:transform .3s ease, left .3s ease !important;
  padding:20px 15px !important;
  overflow-y:auto;
  box-shadow:4px 0 15px rgba(0,0,0,0.1) !important;
  display:block !important;
}

.cat-menu.active{
  left:0 !important;
  transform:translateX(0) !important;
}

.cat-item,
.mobile-item{
  padding:12px 14px;
  border-radius:8px;
  background:var(--card2) !important;
  margin-bottom:8px;
  cursor:pointer;
  font-size:14px;
  color:var(--text) !important;
  font-weight:500 !important;
  text-decoration:none !important;
  display:block !important;
}

.cat-item:hover,
.mobile-item:hover{
  background:#e8f0fe !important;
  color:var(--primary) !important;
}

.cat-menu .cat-item{
  display:block !important;
  background:#e8f0fe !important;
  color:var(--primary) !important;
  text-decoration:none !important;
  font-size:15px !important;
  font-weight:600 !important;
  padding:12px 14px !important;
  border-radius:8px !important;
  margin-bottom:8px !important;
}

.cat-menu .cat-item:hover{
  background:#d2e3fc !important;
  color:var(--accent) !important;
}

#mobileUserMenu a{
  display:block;
  padding:12px 10px;
  font-size:15px;
  color:var(--text) !important;
  text-decoration:none;
  font-weight:500;
}

.menu-divider{
  border:none;
  height:1px;
  background:var(--border);
  margin:15px 0;
}

/* BACKDROP OVERLAY */
.menu-overlay, #menuOverlay{
  position:fixed;
  inset:0;
  background:rgba(32,33,36,0.4);
  z-index:1000;
  display:none;
  opacity:0;
  pointer-events:none;
  transition:.3s;
}

.menu-overlay.active, #menuOverlay.show{
  display:block !important;
  opacity:1;
  pointer-events:auto;
}

/* =================================================
   SEARCH / FILTER / SORT
================================================= */
.nav-search,
.nav-select{
  padding:8px 14px;
  border-radius:20px;
  border:1px solid var(--border);
  background:var(--card2);
  color:var(--text);
  font-size:13px;
  outline:none;
}

.nav-search:focus, .nav-select:focus{
  background:#fff;
  border-color:var(--primary);
  box-shadow:0 0 0 2px rgba(26,115,232,0.2);
}

.nav-search::placeholder{color:var(--muted);}

/* =================================================
   SLIDER
================================================= */
.slider{
  width:100% !important;
  height:260px !important;
  aspect-ratio:16/9;
  margin:14px auto !important;
  border-radius:16px !important;
  overflow:hidden !important;
  background:var(--card2) !important;
  position:relative !important;
  z-index:1 !important;
  box-shadow:0 2px 8px rgba(60,64,67,0.1);
}

.slides{
  display:flex !important;
  width:100% !important;
  height:100% !important;
  transition:transform .4s ease !important;
}

.slides img, .slider img{
  width:100% !important;
  height:100% !important;
  flex-shrink:0 !important;
  object-fit:cover !important;
  display:block !important;
}

@media(min-width:768px){
  .slider{
    height:520px !important;
  }
}

/* =================================================
   PRODUCTS SECTION & GRID
================================================= */
.products{
  padding:12px;
  position:relative;
  z-index:1;
}

#product-list{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
}

/* =================================================
   PRODUCT CARD (GOOGLE WHITE CARD)
================================================= */
.product-box{
  background:var(--card);
  border-radius:12px;
  padding:12px;
  border:1px solid var(--border);
  box-shadow:0 1px 3px rgba(60,64,67,0.08);
  margin-bottom:0px;
  transition:box-shadow 0.2s ease;
}

.product-box:hover{
  box-shadow:0 4px 12px rgba(60,64,67,0.15);
}

/* =================================================
   PRODUCT IMAGE (ASPECT RATIO 4:5)
================================================= */
.img-wrap, .product-box .img-wrap{
  width:100%;
  aspect-ratio:4 / 5;
  background:#fff;
  border-radius:8px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid #f1f3f4;
}

.img-wrap img, .product-box .img-wrap img{
  width:100%;
  height:100%;
  object-fit:contain;
}

/* =================================================
   PRODUCT TEXT & PRICES
================================================= */
.product-box h3,
.productTop h3 {
  font-size:15px;
  font-weight:600;
  margin:8px 0 2px;
  color:var(--text) !important;
  line-height:1.4;
}

.product-box p{
  font-size:12px;
  color:var(--muted);
}

.productTop{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-top:10px;
}

.price-box {
  margin:6px 0;
}

.price-box .mrp, .mrp {
  color:var(--muted);
  text-decoration:line-through;
  font-size:13px;
  margin-right:6px;
}

.price-box .discount, .off {
  color:var(--success);
  font-size:13px;
  font-weight:600;
  display:inline-block;
}

.price-box .sale-price, .price {
  font-size:18px;
  font-weight:700;
  color:var(--text);
}

.price-line{
  display:flex;
  gap:8px;
  align-items:center;
}

/* =================================================
   BUTTONS (GOOGLE PRIMARY BUTTON)
================================================= */
button, .btn-submit, .btn-search{
  margin-top:8px;
  width:100%;
  padding:10px;
  border:none;
  border-radius:8px;
  background:var(--primary);
  color:#fff;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  transition:background 0.2s ease;
}

button:hover, .btn-submit:hover, .btn-search:hover{
  background:var(--accent);
}

/* WISHLIST BUTTON */
.wishBtn{
  width:36px;
  height:36px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:var(--card2);
  border:1px solid var(--border);
  font-size:18px;
  color:var(--muted);
  cursor:pointer;
  user-select:none;
  transition:0.2s;
  flex-shrink:0;
}

.wishBtn:hover{
  background:#e8f0fe;
  color:var(--primary);
}

.wishBtn.active{
  color:var(--danger);
  border-color:var(--danger);
  background:#fce8e6;
}

/* =================================================
   QUANTITY BUTTONS
================================================= */
.qty-box{
  display:flex !important;
  flex-direction:row !important;
  justify-content:center !important;
  align-items:center !important;
  background:var(--card2);
  border-radius:20px;
  padding:4px 10px;
  gap:10px !important;
  width:fit-content !important;
  margin:8px auto;
  border:1px solid var(--border);
}

.qty-box > *{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
}

.qty-btn, .fk-btn, .qty-box button, .qbtn button{
  width:28px !important;
  height:28px !important;
  background:#ffffff !important;
  color:var(--muted) !important;
  border-radius:50% !important;
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  font-size:16px !important;
  font-weight:700 !important;
  cursor:pointer !important;
  border:1px solid var(--border) !important;
  padding:0 !important;
}

.qty-btn:hover, .fk-btn:hover{
  background:var(--primary) !important;
  color:#fff !important;
}

.qty-num, .qnum, .fk-num, .qty-box span, .qty-box input{
  min-width:24px !important;
  width:auto !important;
  text-align:center !important;
  font-size:14px !important;
  font-weight:700 !important;
  color:var(--text) !important;
  background:transparent !important;
  border:none !important;
}

/* =================================================
   SIZES & COLORS
================================================= */
.colorRow{
  display:flex;
  gap:10px;
  margin:12px 0;
  flex-wrap:wrap;
  align-items:center;
}

.colorItem{
  width:32px;
  height:32px;
  border-radius:50%;
  cursor:pointer;
  border:2px solid var(--border);
  transition:0.2s;
  background:#eee;
}

.colorItem:hover{
  transform:scale(1.1);
}

.activeColor{
  border:2px solid var(--primary);
  transform:scale(1.15);
  box-shadow:0 0 0 2px rgba(26,115,232,0.3);
}

.sizeRow, .sizeList{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:12px 0;
}

.sizeItem, .sizeTag{
  min-width:42px;
  height:36px;
  padding:0 12px;
  border-radius:8px;
  cursor:pointer;
  font-size:13px;
  font-weight:600;
  background:var(--panel) !important;
  color:var(--text) !important;
  border:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:center;
  transition:0.2s;
}

.sizeItem:hover, .sizeTag:hover{
  border-color:var(--primary);
  color:var(--primary) !important;
}

.activeSize{
  background:var(--primary) !important;
  border-color:var(--primary) !important;
  color:#fff !important;
}

/* =================================================
   SIMILAR PRODUCTS & ORDERS
================================================= */
#similarBox{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(140px,1fr));
  gap:12px;
  padding:12px;
}

#similarBox .product-box{
  cursor:pointer;
  transition:.2s;
}

#similarBox .product-box:hover{
  transform:translateY(-2px);
}

.order-item{
  display:flex;
  gap:12px;
  align-items:center;
  margin:8px 0;
  padding:10px;
  background:var(--panel);
  border-radius:8px;
  border:1px solid var(--border);
}

.order-img{
  width:60px;
  height:60px;
  object-fit:cover;
  border-radius:6px;
  border:1px solid var(--border);
}

/* =================================================
   PRODUCT IMAGE GALLERY
================================================= */
.gallery{
  width:100%;
}

#mainImg{
  width:100%;
  height:320px;
  object-fit:contain;
  background:#fff;
  border-radius:12px;
  display:block;
  border:1px solid var(--border);
}

.thumbRow{
  display:flex;
  gap:10px;
  margin-top:12px;
  overflow-x:auto;
  padding-bottom:4px;
}

.thumb{
  width:72px;
  height:72px;
  border-radius:8px;
  object-fit:cover;
  background:#fff;
  border:2px solid var(--border);
  cursor:pointer;
  flex-shrink:0;
  transition:.2s;
}

.thumb:hover{
  border-color:var(--primary);
}

.activeThumb{
  border-color:var(--primary);
  box-shadow:0 0 0 2px rgba(26,115,232,0.3);
}

/* =================================================
   CHECKOUT PREMIUM GOOGLE UI
================================================= */
.checkout-wrap{
  max-width:520px;
  margin:auto;
  padding:14px;
}

.checkout-card{
  background:var(--panel);
  border-radius:12px;
  padding:20px;
  margin-bottom:18px;
  border:1px solid var(--border);
  box-shadow:0 1px 3px rgba(60,64,67,0.08);
}

.checkout-card h3{
  font-size:18px;
  margin-bottom:14px;
  color:var(--text);
}

.checkout-card label{
  display:block;
  margin:12px 0 4px;
  font-size:13px;
  color:var(--muted);
  font-weight:500;
}

.checkout-card input,
.checkout-card textarea,
.form-group input, 
.form-group textarea{
  width:100%;
  background:var(--card2);
  border:1px solid var(--border);
  color:var(--text);
  border-radius:8px;
  padding:12px;
  font-size:14px;
  outline:none;
  transition:.2s;
}

.checkout-card textarea, .form-group textarea{
  min-height:90px;
  resize:none;
}

.checkout-card input:focus,
.checkout-card textarea:focus,
.form-group input:focus,
.form-group textarea:focus{
  background:#fff;
  border-color:var(--primary);
  box-shadow:0 0 0 2px rgba(26,115,232,0.2);
}

.checkout-card input::placeholder,
.checkout-card textarea::placeholder{
  color:var(--muted);
}

#summary p{
  background:var(--card2);
  padding:12px;
  border-radius:8px;
  margin-bottom:10px;
  line-height:1.6;
  border:1px solid var(--border);
}

.checkout-card hr{
  border:none;
  border-top:1px solid var(--border);
  margin:16px 0;
}

.total-line{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:12px;
  font-size:20px;
  font-weight:700;
  color:var(--text);
}

#couponMsg{
  margin-top:10px;
  font-size:13px;
  font-weight:600;
}

/* =================================================
   COUPONS & ADMIN CARDS
================================================= */
.coupon-wrapper, .saved-section{
  max-width:500px;
  margin:20px auto;
  padding:0 15px;
}

.coupon-card, .admin-card{
  background:var(--panel);
  padding:20px;
  border-radius:12px;
  border:1px solid var(--border);
  box-shadow:0 1px 3px rgba(60,64,67,0.08);
  text-align:center;
}

.form-group{ margin-bottom:12px; text-align:left; }
.form-group label{ display:block; font-size:13px; margin-bottom:4px; color:var(--muted); }

.btn-review{
  display:inline-block;
  padding:8px 16px;
  background:#e8f0fe;
  color:var(--primary);
  text-decoration:none;
  border-radius:20px;
  font-weight:600;
  margin-bottom:15px;
}

.coupon-display-box, .coupon-box{
  background:#e8f0fe;
  border:1px dashed var(--primary);
  padding:15px;
  border-radius:8px;
  margin-top:15px;
}

.coupon-code-text, .coupon-code-val{
  font-size:24px;
  font-weight:700;
  color:var(--primary);
  margin:8px 0;
}

.search-input{
  width:100%;
  padding:12px;
  margin:12px 0;
  font-size:15px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--card2);
  text-transform:uppercase;
  outline:none;
}

.btn-apply{
  width:100%;
  padding:10px;
  background:var(--success);
  color:#fff;
  border:none;
  border-radius:8px;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  margin-top:8px;
}

.btn-remove{
  width:100%;
  padding:10px;
  background:var(--danger);
  color:#fff;
  border:none;
  border-radius:8px;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  margin-top:8px;
}

.badge-applied{
  color:var(--success);
  font-weight:600;
  background:#e6f4ea;
  padding:4px 8px;
  border-radius:4px;
}

.badge-active{
  color:#e37400;
  font-weight:600;
  background:#ffe0b2;
  padding:4px 8px;
  border-radius:4px;
}

/* =================================================
   ADMIN ORDER NAV BAR
================================================= */
.admin-nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:center;
  padding:10px;
}

.admin-nav button{
  flex:1;
  min-width:120px;
  padding:10px;
  border:none;
  border-radius:8px;
  background:var(--primary);
  color:#fff;
  font-weight:600;
  cursor:pointer;
}

.admin-nav .danger{
  background:var(--danger);
}

/* =================================================
   RESPONSIVE
================================================= */
.noScroll{ overflow:hidden; }

@media(max-width:768px){
  .topbar{display:none;}
  .m-nav{display:block;}
  #mainImg{ height:280px; }
  .thumb{ width:65px; height:65px; }
  .checkout-wrap{ padding:10px; }
  .checkout-card{ padding:16px; }
}

@media(min-width:900px){
  #product-list{
    grid-template-columns:repeat(4,1fr);
  }
}

@media(max-width:600px){
  .admin-nav button{
    min-width:45%;
  }
}

/* =================================================
   AUTOMATIC DARK MODE (FIXED LIGHT & DARK TEXTS)
================================================= */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;          /* ব্যাকগ্রাউন্ড ডার্ক গ্রে */
    --panel: #1e1e1e;       /* কার্ড ও প্যানেল ব্যাকগ্রাউন্ড */
    --card: #1e1e1e;        
    --card2: #2d2d2d;       /* ইনপুট ও বাটন ব্যাকগ্রাউন্ড */
    --primary: #8ab4f8;     /* ডার্ক মোডের জন্য হালকা নীল */
    --accent: #d2e3fc;      
    --text: #ffffff;        /* ডার্ক মোডে লেখা সম্পূর্ণ স্পষ্ট সাদা */
    --muted: #bdc1c6;       /* আবছা টেক্সট স্পষ্ট করার জন্য হালকা গ্রে */
    --border: #3c4043;      /* ডার্ক বর্ডার */
  }

  /* প্রোডাক্ট নেম ও গুরুত্বপূর্ণ টেক্সট ডার্ক মোডে স্পষ্ট সাদা দেখাবে */
  .product-box h3, 
  .productTop h3,
  .topbar h1,
  .m-nav-top {
    color: #ffffff !important;
  }

  /* প্রোডাক্টের দাম ও ডিসকাউন্ট টেস্ট ডার্ক মোড অ্যাডজাস্টমেন্ট */
  .price-box .sale-price, 
  .price {
    color: #ffffff !important;
  }

  /* কার্ড এবং ছবি ব্যাকগ্রাউন্ড ডার্ক মোডে অ্যাডজাস্টমেন্ট */
  .img-wrap, .product-box .img-wrap {
    background: #1e1e1e !important;
    border-color: #3c4043 !important;
  }

  .img-wrap img, .product-box .img-wrap img, .slides img {
    filter: brightness(0.95);
  }

  .topbar, .product-box, .checkout-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  }
}


