/* ================= Modern E-Com Override (SCOPED) ================= */
:root {
  --primary: #1b6be6;
  --secondary: #f7fafc;
  --accent: #ffd700;
  --text: #0F172A;
  --muted: #64748B;
  --hair: #E5E7EB;
  --soft: #F5F7FB;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 24px rgba(2, 6, 23, .08);
}

/* Mobile and Tablet: Show top header and main search */
@media only screen and (max-width: 1199px) {
  /* Hide mobile search standalone on desktop */
  .mobile-search-standalone {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

@media (min-width: 768px){
  header{ display:block !important; visibility:visible !important; opacity:1 !important; position:fixed; top:0; width:100%; z-index:9999; }
  .top_header{ display:block !important; visibility:visible !important; opacity:1 !important; }
  .main-search{ display:block !important; visibility:visible !important; opacity:1 !important; }
  .main-search form{ display:flex !important; }
  .main-header{ display:block !important; visibility:visible !important; opacity:1 !important; }
  .logo-area{ display:block !important; visibility:visible !important; opacity:1 !important; }
}
  /* Top Header - OVERRIDE ALL OTHER RULES */
  .top_header {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: #1d2224 !important;
    position: relative !important;
    z-index: 1001 !important;
    height: auto !important;
    min-height: 60px !important;
    overflow: visible !important;
  }
  
  .top_header .container {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .top_header a {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .top_header marquee {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 20px !important;
  }
  
  /* Main Search */
  .main-search {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1000 !important;
  }
  
  /* Mobile Search */
  .mobile-search {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1000 !important;
  }
  
  /* Fix mobile header layout - search bar positioning - OVERRIDE ALL OTHER RULES */
  .mobile-header {
    display: block !important;
    background-color: #fff !important;
    position: relative !important;
    z-index: 1000 !important;
    height: auto !important;
    min-height: 70px !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .mobile-logo {
    display: grid !important;
    grid-template-columns: 20% 60% 20% !important;
    text-align: center !important;
    font-size: 16px !important;
    height: 70px !important;
    align-items: center !important;
    gap: 10px !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .menu-logo {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .menu-logo img {
    width: auto !important;
    height: 50px !important;
    margin: 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* Hide the old mobile search bar that was positioned absolutely */
  .mobile-header .mobile-search {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }
  
  .mobile-header .mobile-search form {
    display: flex !important;
    border: 1px solid #ff0018 !important;
    border-radius: 5px !important;
    background: #fff !important;
    height: 40px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
  }
  
  .mobile-header .mobile-search form input {
    flex: 1 !important;
    padding: 0 15px !important;
    border: none !important;
    outline: none !important;
    background: #fff !important;
    color: #000 !important;
    font-size: 14px !important;
    text-align: left !important;
  }
  
  .mobile-header .mobile-search form button {
    background: #ff0018 !important;
    flex: 0 0 40px !important;
    border: none !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .mobile-header .mobile-search form button i {
    color: #fff !important;
    font-size: 16px !important;
  }
  
  /* Style the standalone mobile search bar below mobile-header */
  .mobile-search-standalone {
    display: block !important;
    background-color: #fff !important;
    border-top: 1px solid #e9ecef !important;
    padding: 15px !important;
    margin: 30px 0 0 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 999 !important;
  }
  
  .mobile-search-standalone form {
    display: flex !important;
    border: 1px solid #ff0018 !important;
    border-radius: 25px !important;
    overflow: hidden !important;
    background: #fff !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
  }
  
  .mobile-search-standalone form input {
    flex: 1 !important;
    padding: 12px 15px !important;
    border: none !important;
    outline: none !important;
    font-size: 14px !important;
    background: transparent !important;
  }
  
  .mobile-search-standalone form button {
    background: #ff0018 !important;
    flex: 0 0 45px !important;
    border: none !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background-color 0.3s !important;
  }
  
  .mobile-search-standalone form button:hover {
    background: #d10014 !important;
  }
  
  .mobile-search-standalone form button i {
    color: #fff !important;
    font-size: 16px !important;
  }
  
  .menu-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .menu-bag {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* OVERRIDE any conflicting display: none rules */
  .logo-area,
  .menu-area,
  .header-left,
  .header-right {
    display: none !important;
  }
  
  /* Ensure mobile elements are always visible */
  .mobile-header,
  .mobile-header *,
  .top_header,
  .top_header * {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* Specific overrides for grid elements */
  .mobile-logo {
    display: grid !important;
  }
  
  .menu-logo {
    display: flex !important;
  }
  
  .menu-bar {
    display: flex !important;
  }
  
  .menu-bag {
    display: flex !important;
  }
  
  .mobile-header .mobile-search {
    display: block !important;
  }
  
  .mobile-header .mobile-search form {
    display: flex !important;
  }
  
  .mobile-header .mobile-search form input {
    display: block !important;
  }
  
  .mobile-header .mobile-search form button {
    display: flex !important;
  }
  
  .top_header .container {
    display: flex !important;
  }
  
  .top_header a {
    display: block !important;
  }
  
  .top_header marquee {
    display: block !important;
  }
}

/* Mobile specific styles */
@media only screen and (max-width: 767px) {
  .top_header {
    padding: 8px 0 !important;
  }
  
  .top_header .container {
    flex-direction: column !important;
    gap: 10px !important;
  }
  
  .top_header a {
    min-width: auto !important;
    width: 100% !important;
    font-size: 16px !important;
    padding: 8px 12px !important;
  }
  
  .top_header marquee {
    font-size: 14px !important;
    text-align: center !important;
  }
  
  .main-search {
    margin: 15px 0 !important;
    padding: 0 15px !important;
  }
  
  .main-search form {
    height: 45px !important;
  }
  
  .main-search form input {
    font-size: 14px !important;
    padding-left: 15px !important;
  }
  
  .main-search form button {
    flex: 0 0 50px !important;
  }
  
  .main-search form button svg {
    width: 20px !important;
    height: 20px !important;
  }
}

/* Tablet specific styles */
@media only screen and (min-width: 768px) and (max-width: 1199px) {
  .top_header {
    padding: 10px 0 !important;
  }
  
  .top_header .container {
    flex-direction: row !important;
    gap: 15px !important;
  }
  
  .top_header a {
    min-width: 250px !important;
    font-size: 18px !important;
    padding: 10px 15px !important;
  }
  
  .top_header marquee {
    font-size: 15px !important;
  }
  
  .main-search {
    margin: 20px 0 !important;
    padding: 0 20px !important;
  }
  
  .main-search form {
    height: 50px !important;
  }
  
  .main-search form input {
    font-size: 16px !important;
    padding-left: 20px !important;
  }
  
  .main-search form button {
    flex: 0 0 60px !important;
  }
  
  .main-search form button svg {
    width: 22px !important;
    height: 22px !important;
  }
}

/* Desktop: Hide mobile search, show main search */
@media only screen and (min-width: 1200px) {
  .mobile-search {
    display: none !important;
  }
  
  .main-search {
    display: block !important;
  }
  
  .top_header {
    display: block !important;
  }
}

/* Use only inside .theme-modern to avoid regressions */
body.theme-modern {
  font-family: "Poppins", Arial, sans-serif;
  color: var(--text);
  background: #fff;
}

/* Header / navbar */
body.theme-modern .header,
body.theme-modern .topbar,
body.theme-modern .navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  box-shadow: var(--shadow);
  backdrop-filter: saturate(120%) blur(6px);
}

body.theme-modern .navbar a,
body.theme-modern .menu a {
  transition: color .2s ease;
}

body.theme-modern .navbar a:hover,
body.theme-modern .menu a:hover {
  color: var(--primary);
}

/* Search */
body.theme-modern .searchbox input,
body.theme-modern .header .search input {
  border: 1px solid var(--hair);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

/* Generic cards/sections */
body.theme-modern .section,
body.theme-modern .home-section {
  margin: 24px 0;
}

body.theme-modern .card,
body.theme-modern .product-card,
body.theme-modern .product-box,
body.theme-modern .single-product,
body.theme-modern .item-product {
  position: relative;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}

body.theme-modern .product-card:hover,
body.theme-modern .product-box:hover,
body.theme-modern .single-product:hover {
  transform: translateY(-2px);
}

/* Grid helper (applies to common wrappers) */
body.theme-modern .grid,
body.theme-modern .product-grid,
body.theme-modern .products,
body.theme-modern .row.products,
body.theme-modern .product-listing {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1200px) {
  body.theme-modern .grid,
  body.theme-modern .product-grid,
  body.theme-modern .products,
  body.theme-modern .row.products,
  body.theme-modern .product-listing {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  body.theme-modern .grid,
  body.theme-modern .product-grid,
  body.theme-modern .products,
  body.theme-modern .row.products,
  body.theme-modern .product-listing {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  body.theme-modern .grid,
  body.theme-modern .product-grid,
  body.theme-modern .products,
  body.theme-modern .row.products,
  body.theme-modern .product-listing {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Thumbnails */
body.theme-modern .product-thumb,
body.theme-modern .image,
body.theme-modern .product-img,
body.theme-modern .thumb {
  aspect-ratio: 1/1;
  background: var(--soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.theme-modern .product-thumb img,
body.theme-modern .product-img img,
body.theme-modern .image img,
body.theme-modern .thumb img {
  max-height: 88%;
  object-fit: contain;
  transition: transform .18s ease;
}

body.theme-modern .product-card:hover .product-thumb img {
  transform: scale(1.04);
}

/* Badges (sale/new/hot) */
body.theme-modern .badges,
body.theme-modern .badge-wrap {
  position: absolute;
  left: 10px;
  top: 10px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

body.theme-modern .badge,
body.theme-modern .tag,
body.theme-modern .label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  padding: 4px 8px;
  border-radius: 999px;
  line-height: 1;
}

body.theme-modern .badge--sale {
  background: #EF4444;
}

body.theme-modern .badge--new {
  background: #22C55E;
}

body.theme-modern .badge--hot {
  background: #F59E0B;
}

/* Content area */
body.theme-modern .product-content,
body.theme-modern .product-info,
body.theme-modern .content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.theme-modern .product-title,
body.theme-modern .title,
body.theme-modern .name {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Price */
body.theme-modern .price-area,
body.theme-modern .prices {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

body.theme-modern .price,
body.theme-modern .current-price {
  font-weight: 800;
  font-size: 18px;
  color: #0B1324;
}

body.theme-modern .old-price,
body.theme-modern .compare {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 14px;
}

body.theme-modern .discount-pill {
  background: #FFF8CC;
  color: #8A6E00;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
}

/* CTA buttons */
body.theme-modern .btn,
body.theme-modern .button {
  border-radius: 12px;
}

body.theme-modern .btn-primary,
body.theme-modern .button-primary,
body.theme-modern .btn-buy {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: #fff;
  border: 0;
  font-weight: 800;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  transition: transform .18s ease, filter .18s ease;
}

body.theme-modern .btn-primary:hover,
body.theme-modern .btn-buy:hover {
  filter: brightness(.95);
  transform: translateY(-1px);
}

body.theme-modern .actions,
body.theme-modern .product-actions {
  margin-top: auto;
  padding: 0 12px 12px;
}

/* Forms (checkout/login/register quick pass) */
body.theme-modern .form-control,
body.theme-modern input[type="text"],
body.theme-modern input[type="tel"],
body.theme-modern input[type="email"],
body.theme-modern select,
body.theme-modern textarea {
  border: 1px solid var(--hair);
  border-radius: 12px;
  padding: 10px 12px;
}

body.theme-modern .form-control:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27, 107, 230, .15);
}

/* Footer */
body.theme-modern footer,
body.theme-modern .footer {
  border-top: 1px solid var(--hair);
  background: #fff;
  padding-top: 24px;
}

/* ---------- Lazyload helpers (Prompt 8) ---------- */
body.theme-modern img[loading="lazy"] {
  content-visibility: auto;
  contain-intrinsic-size: 300px 300px;
}

body.theme-modern .lqip {
  filter: blur(12px);
  transition: filter .3s ease;
}

body.theme-modern .lqip.loaded {
  filter: blur(0);
}

/* ================= Hot Deal Product Cards ================= */

/* Grid container */
body.theme-modern :where(.product_slider.owl-carousel) {
    gap: 16px;
}

/* Card wrapper */
body.theme-modern :where(.product_item.wist_item) {
    position: relative;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

body.theme-modern :where(.product_item.wist_item):hover {
    transform: translateY(-2px);
}

/* Card inner container */
body.theme-modern :where(.product_item_inner) {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Thumbnail wrapper */
body.theme-modern :where(.pro_img) {
    aspect-ratio: 1/1;
    background: #F6F8FC;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

body.theme-modern :where(.pro_img img) {
    object-fit: contain;
    max-height: 88%;
    transition: transform 0.18s ease;
}

body.theme-modern :where(.product_item.wist_item):hover .pro_img img {
    transform: scale(1.04);
}

/* Card content */
body.theme-modern :where(.pro_des) {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

/* Product title */
body.theme-modern :where(.pro_name a) {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

/* Price container */
body.theme-modern :where(.pro_price) {
    margin-top: auto;
    padding: 0 12px;
}

body.theme-modern :where(.pro_price p) {
    font-size: 18px;
    font-weight: 800;
    color: #0B1324;
    margin: 0;
}

body.theme-modern :where(.pro_price del) {
    color: #64748B;
    text-decoration: line-through;
    font-size: 14px;
    font-weight: 400;
}

/* Button wrapper */
body.theme-modern :where(.pro_btn) {
    padding: 12px;
    margin-top: auto;
}

body.theme-modern :where(.cart_btn.order_button) {
    width: 100%;
}

/* Button styling */
body.theme-modern :where(.addcartbutton),
body.theme-modern :where(.pro_btn button) {
    border-radius: 12px;
    font-weight: 800;
    padding: 10px 12px;
    background: linear-gradient(90deg, #1b6be6, #00C2FF);
    color: #fff;
    border: 0;
    box-shadow: 0 8px 20px rgba(27, 107, 230, 0.18);
    transition: transform 0.18s ease, filter 0.18s ease;
    width: 100%;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    cursor: pointer;
}

body.theme-modern :where(.addcartbutton):hover,
body.theme-modern :where(.pro_btn button):hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
}

/* Category page button styling */
body.theme-modern.page-category :where(.cart_btn.order_button a) {
    background: linear-gradient(90deg, #1b6be6, #007bff) !important;
    color: white !important;
    font-weight: bold !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 20px rgba(27, 107, 230, 0.18);
    transition: all 0.3s ease !important;
    border: none !important;
}

body.theme-modern.page-category :where(.cart_btn.order_button a):hover {
    background: linear-gradient(90deg, #1557c7, #0056b3) !important;
    box-shadow: 0 12px 25px rgba(27, 107, 230, 0.25);
    transform: translateY(-1px);
}

/* Discount badge */
body.theme-modern :where(.sale-badge) {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
}

body.theme-modern :where(.sale-badge-text) {
    background: #EF4444;
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

/* Rating stars */
body.theme-modern :where(.fas.fa-star),
body.theme-modern :where(.fas.fa-star-half-alt),
body.theme-modern :where(.far.fa-star) {
    color: #FCD34D;
    font-size: 14px;
    margin: 0 1px;
}

/* ================= Performance & Layout Optimizations ================= */

/* Image performance optimization */
body.theme-modern :where(.pro_img img) {
    content-visibility: auto;
    contain-intrinsic-size: 300px 300px;
}

/* Title text clamping */
body.theme-modern :where(.pro_name a) {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* Card height consistency */
body.theme-modern :where(.product_item.wist_item) {
    min-height: auto;
}

/* Push actions to bottom for equal heights */
body.theme-modern :where(.pro_btn) {
    margin-top: auto;
}

/* ================= Star Rating Alignment Fix ================= */

/* ================= Hot Deal Verification Beacon ================= */
body.theme-modern :where(.hotdeal_product)::after {
    content: "HotDeal style ✓";
    position: sticky;
    top: 8px;
    right: 8px;
    float: right;
    background: #1b6be6;
    color: #fff;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 12px;
    z-index: 10;
}

/* Star rating icons alignment */
body.theme-modern :where(.fa-star),
body.theme-modern :where(.fas.fa-star),
body.theme-modern :where(.far.fa-star),
body.theme-modern :where(.rating i) {
    font-size: 14px;
    vertical-align: middle;
    line-height: 1;
    display: inline-block;
    margin-right: 2px;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
}

/* Remove extra spacing from last star */
body.theme-modern :where(.fa-star):last-child,
body.theme-modern :where(.fas.fa-star):last-child,
body.theme-modern :where(.far.fa-star):last-child,
body.theme-modern :where(.rating i):last-child {
    margin-right: 0;
}

/* Ensure parent containers don't add extra spacing */
body.theme-modern :where(.rating),
body.theme-modern :where(.star-rating) {
    line-height: 1;
    padding: 0;
    margin: 0;
}

/* Debugging beacon */
body.theme-modern::after {
    content: "override ✓";
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: #10B981;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 9999;
    pointer-events: none;
}

/* Modern ALL CATEGORIES Menu Styling */
body.theme-modern :where(.sidebar-menu.side__bar) {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 0;
    margin: 0;
    max-height: 400px;
}

/* ALL CATEGORIES header bar */
body.theme-modern :where(.sidebar-menu .categories) {
    background: #dc2626 !important;
    color: white !important;
    font-weight: bold !important;
    font-size: 15px !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 14px !important;
    margin: 0 !important;
    border-radius: 8px 8px 0 0 !important;
}

body.theme-modern :where(.sidebar-menu .categories i) {
    margin-right: 8px !important;
    color: white !important;
}

/* Custom scrollbar */
body.theme-modern :where(.sidebar-menu.side__bar)::-webkit-scrollbar {
    width: 6px;
}

/* Fix gap between ALL CATEGORIES bar and first item */
body.theme-modern .sidebar-menu {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(2,6,23,.06);
}

body.theme-modern :where(.sidebar-menu) :where(.hideshow) {
    margin-top: 8px;
    padding-top: 4px;
}

body.theme-modern :where(.sidebar-menu) :where(.hideshow) > li:first-child > a {
    border-top: 1px solid #E5E7EB;
    border-radius: 8px 8px 0 0;
}

/* Polished category list hover/active states */
body.theme-modern .sidebar-menu .hideshow > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
    padding: 10px 14px;
    color: #1E293B;
    font-weight: 500;
    border-bottom: 1px solid #E2E8F0;
    transition: all 180ms ease;
    text-decoration: none;
}

body.theme-modern .sidebar-menu .hideshow > li:last-child > a {
    border-bottom: none;
}

body.theme-modern .sidebar-menu .hideshow > li > a .fa-chevron-right {
    color: #94A3B8;
    transition: color 180ms ease;
}

body.theme-modern .sidebar-menu .hideshow > li > a:hover {
    background: linear-gradient(90deg, #EEF4FF 0%, #FFFFFF 100%);
    color: #1B6BE6;
}

body.theme-modern .sidebar-menu .hideshow > li > a:hover .fa-chevron-right {
    color: #1B6BE6;
}

/* Force visual gap if contact still exists */
body.theme-modern .sidebar-menu .hideshow {
    margin-top: 12px !important;
}

/* Mobile Safe Offsets - Prevent content overlap with fixed header/tabbar */
@media (max-width: 992px) {
    /* Main content wrappers - apply top padding for fixed header */
    body.theme-modern main,
    body.theme-modern .container,
    body.theme-modern .page-content,
    body.theme-modern .category-page {
        padding-top: var(--header-h, 56px);
    }
    
    /* Apply bottom padding when tabbar is present */
    body.theme-modern.has-tabbar main,
    body.theme-modern.has-tabbar .container,
    body.theme-modern.has-tabbar .page-content,
    body.theme-modern.has-tabbar .category-page {
        padding-bottom: calc(var(--tabbar-h, 64px) + env(safe-area-inset-bottom));
    }
    
    /* Fallback: apply to body if no reliable wrapper found */
    body.theme-modern {
        padding-top: var(--header-h, 56px);
    }
    
    body.theme-modern.has-tabbar {
        padding-bottom: calc(var(--tabbar-h, 64px) + env(safe-area-inset-bottom));
    }
    
    /* Ensure proper z-index stacking */
    body.theme-modern .topbar,
    body.theme-modern .header,
    body.theme-modern .navbar,
    body.theme-modern #navbar_top,
    body.theme-modern .main-header,
    body.theme-modern .mobile-logo {
        z-index: 1020;
    }
    
    body.theme-modern .mobile-bottom-nav,
    body.theme-modern .mobile-tabbar,
    body.theme-modern .footer-nav,
    body.theme-modern .footer_nav {
        z-index: 1030;
    }
    
    /* Reset body padding on larger screens */
    @media (min-width: 993px) {
        body.theme-modern {
            padding-top: 0;
            padding-bottom: 0;
        }
        
        body.theme-modern main,
        body.theme-modern .container,
        body.theme-modern .page-content,
        body.theme-modern .category-page {
            padding-top: 0;
            padding-bottom: 0;
        }
    }
}

/* Category page spacing polish */
@media (max-width: 992px) {
  body.theme-modern :where(.category-page, .category, .product-grid, .products, .row.products, .product-listing) {
    margin-top: 8px;
  }
  
  body.theme-modern :where(.home-slider-container, .main_slider) {
    margin-top: calc(var(--header-h, 56px));
    overflow: hidden;
    border-radius: 10px;
  }
  
  body.theme-modern :where(.category-header, .filter-bar, .sort-bar) [style*="position: sticky"],
  body.theme-modern :where(.category-header, .filter-bar, .sort-bar) [style*="position: fixed"] {
    top: var(--header-h, 56px);
  }
}

@media (max-width: 640px) {
  body.theme-modern :where(.category-page, .category, .product-grid, .products, .row.products, .product-listing) {
    margin-top: 10px;
  }
}

/* Mobile bottom menu (tabbar) improvements */
body.theme-modern :where(.mobile-bottom-nav, .mobile-tabbar, .footer-nav) {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  padding-bottom: env(safe-area-inset-bottom);
  background: #ffffff;
  border-top: 1px solid #E5E7EB;
  height: auto;
  min-height: 56px;
}

/* Body padding when tabbar is present */
html.has-tabbar body,
html.has-tabbar main,
html.has-tabbar .page-content {
  padding-bottom: calc(var(--tabbar-h, 64px) + env(safe-area-inset-bottom));
}

body.theme-modern :where(.sidebar-menu.side__bar)::-webkit-scrollbar-track {
    background: #F3F6FB;
    border-radius: 10px;
}

body.theme-modern :where(.sidebar-menu.side__bar)::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}

body.theme-modern :where(.sidebar-menu.side__bar)::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* List styling */
body.theme-modern :where(.sidebar-menu .hideshow) {
    list-style: none;
    padding: 0;
    margin: 0 !important;
    background: #fff;
    border-radius: 0 0 8px 8px;
}

/* Item styling */
body.theme-modern :where(.sidebar-menu .hideshow > li) {
    margin: 0;
    padding: 0;
}

/* Link styling */
body.theme-modern :where(.sidebar-menu .hideshow > li > a) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 10px 14px;
    font-size: 14.5px;
    font-weight: 500;
    color: #1f2937;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid #e5e7eb;
    margin: 0;
}

body.theme-modern :where(.sidebar-menu .hideshow > li:last-child > a) {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

/* Image in links */
body.theme-modern :where(.hideshow > li > a img) {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    flex-shrink: 0;
    vertical-align: middle;
}

/* Chevron styling */
body.theme-modern :where(.sidebar-menu .hideshow > li > a .fa-solid.fa-chevron-right) {
    color: #9ca3af;
    font-size: 12px;
    flex-shrink: 0;
    vertical-align: middle;
    transition: color 0.2s ease;
}

/* Hover and focus states */
body.theme-modern :where(.sidebar-menu .hideshow > li > a:hover),
body.theme-modern :where(.sidebar-menu .hideshow > li > a:focus) {
    background: linear-gradient(90deg, #eef4ff 0%, #ffffff 100%);
    color: #1b6be6;
}

body.theme-modern :where(.sidebar-menu .hideshow > li > a:hover .fa-solid.fa-chevron-right),
body.theme-modern :where(.sidebar-menu .hideshow > li > a:focus .fa-solid.fa-chevron-right) {
    color: #1b6be6;
}

/* ===== Mobile safe gap fixes ===== */
@media (max-width: 576px) {
  /* 1) Respect JS height but clamp (fallback if JS delays) */
  main {
    padding-top: clamp(48px, var(--header-h, 56px), 92px);
  }

  /* 2) First section never pushes down */
  main > *:first-child {
    margin-top: 0 !important;
  }

  /* 3) Common search wrappers often leave big gaps */
  .search-area,
  .search-wrapper,
  form.search,
  .search,
  .search-box,
  .header-search {
    margin-bottom: 8px !important;
  }

  /* 4) Sliders frequently ship with top margins */
  .owl-carousel,
  .home-slider,
  #home-slider,
  .hero,
  .hero-area,
  .banner-slider {
    margin-top: 0 !important;
  }

  /* 5) Kill any negative margins that break flow */
  [class*="section"],
  .section,
  .section-area {
    margin-top: max(0px, var(--section-mt, 0px)) !important;
  }
}
body.theme-modern :where(.sidebar-menu .hideshow > li > a:focus-visible) {
    background: #f3f4f6;
    color: #2563eb;
    outline: none;
}

/* Enhanced focus-visible ring */
body.theme-modern :where(.sidebar-menu .hideshow > li > a:focus-visible) {
    box-shadow: 0 0 0 3px rgba(27, 107, 230, 0.16);
}

/* Mobile font size adjustment */
@media (max-width: 640px) {
    body.theme-modern :where(.sidebar-menu .hideshow > li > a) {
        font-size: 14px;
    }
}

/* Global Mobile Offset System */
@media (max-width: 992px) {
    /* Content offset only once */
    body.theme-modern :where(main, .page-content, .container) {
        padding-top: var(--header-h, 56px);
    }
    
    /* Prevent sideways scroll */
    body.theme-modern :where(body) {
        overflow-x: hidden;
    }
    
    /* Bottom safe area when tabbar exists */
    body.theme-modern html.has-tabbar :where(main, .page-content, .container) {
        padding-bottom: calc(var(--tabbar-h, 64px) + env(safe-area-inset-bottom));
    }
}

body.theme-modern :where(.sidebar-menu .hideshow > li > a:hover .fa-solid.fa-chevron-right),
body.theme-modern :where(.sidebar-menu .hideshow > li > a:focus-visible .fa-solid.fa-chevron-right) {
    color: #2563eb;
}

/* Submenu styling */
body.theme-modern :where(.sidebar-submenu.side__barsub) {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 4px;
    margin: 4px 0;
    z-index: 1000;
}

body.theme-modern :where(.sidebar-submenu.side__barsub li) {
    border-bottom: 1px solid #E2E8F0;
}

body.theme-modern :where(.sidebar-submenu.side__barsub li:last-child) {
    border-bottom: none;
}

body.theme-modern :where(.sidebar-submenu.side__barsub li a) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 10px 12px;
    font-size: 14.5px;
    font-weight: 500;
    color: #1E293B;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid #E2E8F0;
}

body.theme-modern :where(.sidebar-submenu.side__barsub li:first-child a) {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

body.theme-modern :where(.sidebar-submenu.side__barsub li:last-child a) {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    border-bottom: none;
}

body.theme-modern :where(.sidebar-submenu.side__barsub li a:hover),
body.theme-modern :where(.sidebar-submenu.side__barsub li a:focus-visible) {
    background: #F8FAFC;
    color: #2563EB;
    outline: none;
}

body.theme-modern :where(.sidebar-submenu.side__barsub li a .fa-solid.fa-chevron-right) {
    color: #94A3B8;
    font-size: 12px;
    transition: color 0.2s ease;
}

body.theme-modern :where(.sidebar-submenu.side__barsub li a:hover .fa-solid.fa-chevron-right) {
    color: #2563EB;
}

/* Child menu styling */
body.theme-modern :where(.sidebar-childmenu.side__barchild) {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 4px;
    margin: 4px 0;
    z-index: 1000;
}

body.theme-modern :where(.sidebar-childmenu.side__barchild li) {
    border-bottom: 1px solid #E2E8F0;
}

body.theme-modern :where(.sidebar-childmenu.side__barchild li:last-child) {
    border-bottom: none;
}

body.theme-modern :where(.sidebar-childmenu.side__barchild li a) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 10px 12px;
    font-size: 14.5px;
    font-weight: 500;
    color: #1E293B;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid #E2E8F0;
}

body.theme-modern :where(.sidebar-childmenu.side__barchild li:first-child a) {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

body.theme-modern :where(.sidebar-childmenu.side__barchild li:last-child a) {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    border-bottom: none;
}

body.theme-modern :where(.sidebar-childmenu.side__barchild li a:hover),
body.theme-modern :where(.sidebar-childmenu.side__barchild li a:focus-visible) {
    background: #F8FAFC;
    color: #2563EB;
    outline: none;
}

body.theme-modern :where(.sidebar-childmenu.side__barchild li a .fa-solid.fa-chevron-right) {
    color: #94A3B8;
    font-size: 12px;
    transition: color 0.2s ease;
}

body.theme-modern :where(.sidebar-childmenu.side__barchild li a:hover .fa-solid.fa-chevron-right) {
    color: #2563EB;
}

/* Active state styling for current category */
body.theme-modern :where(.hideshow > li.is-active > a),
body.theme-modern :where(.hideshow > li.is-open > a) {
  background: #E8F0FF !important;
  color: #1b6be6 !important;
  font-weight: 700 !important;
  box-shadow: inset 3px 0 0 #1b6be6 !important;
}

/* Active state for submenu items */
body.theme-modern :where(.sidebar-submenu.side__barsub li.is-active > a),
body.theme-modern :where(.sidebar-submenu.side__barsub li.is-open > a) {
  background: #E8F0FF !important;
  color: #1b6be6 !important;
  font-weight: 700 !important;
  box-shadow: inset 3px 0 0 #1b6be6 !important;
}

/* ALL CATEGORIES Dropdown Panel Fixes */
body.theme-modern :where(.menu-area .Cat_menu) {
  position: absolute;
  top: calc(100% + 4px) !important;
  background: #ffffff !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
  z-index: 1000 !important;
  border: 1px solid rgba(0, 0, 0, 0.075) !important;
  border-radius: 4px;
  overflow: hidden;
}

/* Ensure dropdown never overlaps header */
body.theme-modern :where(.main-header.sticky .menu-area .cat_bar:hover .Cat_menu),
body.theme-modern :where(.main-header .menu-area .cat_bar:hover .Cat_menu) {
  top: calc(100% + 4px) !important;
}

/* Active state dropdown positioning */
body.theme-modern :where(.main-header .menu-area .cat_bar.active .Cat_menu) {
  top: calc(100% + 4px) !important;
}

/* Category List Items Styling */
body.theme-modern :where(ul.Cat_menu li) {
  padding: 12px 0 !important;
  border-bottom: 1px solid #E2E8F0 !important;
  transition: all 180ms ease-in-out !important;
}

body.theme-modern :where(ul.Cat_menu li:last-child) {
  border-bottom: none !important;
}

body.theme-modern :where(ul.Cat_menu li a) {
  color: #1E293B !important;
  font-weight: 500 !important;
  font-size: 14.5px !important;
  padding: 0 15px !important;
  display: block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  transition: all 180ms ease-in-out !important;
}

body.theme-modern :where(ul.Cat_menu li a span) {
  color: inherit !important;
  font-weight: inherit !important;
}

body.theme-modern :where(ul.Cat_menu li a i) {
  opacity: 0.55 !important;
  transition: opacity 180ms ease-in-out !important;
}

/* Hover Effects */
body.theme-modern :where(ul.Cat_menu li:hover) {
  background: linear-gradient(90deg, #EEF4FF 0%, #FFFFFF 100%) !important;
}

body.theme-modern :where(ul.Cat_menu li:hover a) {
  color: #1B6BE6 !important;
}

body.theme-modern :where(ul.Cat_menu li:hover a i) {
  opacity: 0.9 !important;
}

/* Category list items styling */
body.theme-modern .menu-area .Cat_menu ul li a {
    color: #1E293B !important;
    font-weight: 500 !important;
    font-size: 14.5px !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color 180ms ease-in-out, color 180ms ease-in-out;
}

body.theme-modern .menu-area .Cat_menu ul li a:hover {
    background: linear-gradient(90deg, #EEF4FF 0%, #FFFFFF 100%) !important;
    color: #1B6BE6 !important;
}

body.theme-modern .menu-area .Cat_menu ul li a img.float-right {
    opacity: 0.55;
    transition: opacity 180ms ease-in-out;
}

body.theme-modern .menu-area .Cat_menu ul li a:hover img.float-right {
    opacity: 0.9;
}

body.theme-modern .menu-area .Cat_menu ul li:not(:last-child) {
    border-bottom: 1px solid #E2E8F0;
}

/* Sidebar and Slider Layout Fixes */
body.theme-modern .slider-section {
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Main row container alignment */
body.theme-modern .slider-section .row,
body.theme-modern .container .row:has(.col-sm-3.hidetosm, .col-sm-3.filter_sidebar) {
    align-items: flex-start;
    margin: 0;
}

/* Sidebar column styling */
body.theme-modern .col-sm-3.hidetosm,
body.theme-modern .col-sm-3.filter_sidebar {
    padding-top: 12px;
    padding-bottom: 12px;
    padding-right: 8px;
    margin-top: 0;
}

/* Sidebar menu container */
body.theme-modern .sidebar-menu {
    margin-top: 0;
    padding: 0;
    min-height: 360px;
}

/* Slider column styling */
body.theme-modern .col-sm-9 {
    padding-left: 8px;
    margin-top: 0;
}

/* Home slider container */
body.theme-modern .home-slider-container {
    padding: 0;
    margin: 0;
}

/* Slider item height consistency */
body.theme-modern .slider-item {
    height: 360px;
    min-height: 360px;
}

/* Category product container */
body.theme-modern .category-product.main_product_inner {
    min-height: 360px;
}

/* Filter sidebar styling */
body.theme-modern .filter_sidebar {
    padding-top: 12px;
    padding-bottom: 12px;
}

/* Home slider image styling */
body.theme-modern :where(.home-slider-container .main_slider .slider-item img) {
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important;
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 400px !important;
}

/* Slider navigation arrows */
body.theme-modern :where(.home-slider-container .main_slider .slick-prev,
.home-slider-container .main_slider .slick-next) {
    width: 36px !important;
    height: 36px !important;
    background: rgba(0,0,0,0.45) !important;
    border-radius: 50% !important;
    border: none !important;
    z-index: 10 !important;
    transition: background 0.3s ease !important;
}

body.theme-modern :where(.home-slider-container .main_slider .slick-prev:hover,
.home-slider-container .main_slider .slick-next:hover) {
    background: rgba(0,0,0,0.65) !important;
}

body.theme-modern :where(.home-slider-container .main_slider .slick-prev:before,
.home-slider-container .main_slider .slick-next:before) {
    color: white !important;
    font-size: 14px !important;
    line-height: 1 !important;
}

/* Responsive max-heights for slider images */
@media (max-width: 1024px) and (min-width: 768px) {
    body.theme-modern :where(.home-slider-container .main_slider .slider-item img) {
        max-height: 280px !important;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 767px) {
    body.theme-modern :where(.home-slider-container .main_slider .slider-item img) {
        max-height: 220px !important;
    }
    
    /* Stack sidebar below slider on mobile */
    body.theme-modern .col-sm-3.hidetosm {
        order: 2;
        margin-top: 16px;
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
    
    body.theme-modern .col-sm-9 {
        order: 1;
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Adjust slider height for mobile */
    body.theme-modern .slider-item {
        height: 200px;
        min-height: 200px;
    }
    
    /* Reset sidebar min-height on mobile */
    body.theme-modern .sidebar-menu {
        min-height: auto;
    }
}

@media (max-width: 992px){
  /* Make only the wrapper hold the safe offset, not the hero as well */
  body.theme-modern :where(main, .page-content, .container){
    padding-top: var(--header-h, 56px);
    /* prevent margin-collapsing with first child */
    overflow: auto;
  }

  /* Reset any extra top margin added to hero/slider */
  body.theme-modern :where(.home-slider-container, .main_slider, .hero, .banner-wrap){
    margin-top: 0 !important;
  }

  /* kill bottom gaps from slider wrappers */
  body.theme-modern :where(.home-slider-container, .main_slider, .owl-carousel){
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  /* tame big dots */
  body.theme-modern :where(.home-slider-container .owl-dots){
    margin-top: 8px !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
  }
  body.theme-modern :where(.home-slider-container .owl-dots .owl-dot){
    width: 6px; height: 6px; border-radius: 999px;
  }
  /* hide decorative pseudo shadow on mobile, if any */
  body.theme-modern :where(.home-slider-container)::before,
  body.theme-modern :where(.home-slider-container)::after{
    content: none !important;
  }
  /* some themes add a 'slider-shadow' or 'placeholder' block */
  body.theme-modern :where(.slider-shadow, .banner-placeholder){ display:none !important; }

  /* give normal small gap to the next section only */
  body.theme-modern :where(.home-slider-container) + :where(.section, .home-section, .categories, .category-grid){
    margin-top: 12px !important;
  }
}

/* Remove excess space under slider on mobile */
body.theme-modern {
  @media (max-width: 992px){
    :where(.home-slider-container, .main_slider, .owl-carousel){ margin-bottom:0 !important; padding-bottom:0 !important; }
    :where(.home-slider-container .owl-nav){ margin-top:4px !important; }
    :where(.home-slider-container .owl-dots){ margin:6px 0 0 0 !important; padding:0 !important; min-height:0 !important; }
    /* remove decorative pseudo gap if present */
    :where(.home-slider-container)::before,
    :where(.home-slider-container)::after{ content:none !important; }
    /* first section after slider uses a compact gap only */
    :where(.home-slider-container) + :where(.homeproduct, .section, .home-section, .categories, .category-grid){ margin-top:8px !important; }
  }
  
  @media (max-width: 992px){
    :where(.category-page, .category, .product-grid, .products, .row.products, .product-listing){ margin-top:8px; }
    /* cards don't add extra bottom gaps */
    :where(.product-card, .product-box, .single-product, .item-product){ margin-bottom:12px; }
    /* remove stray hr/spacer blocks */
    :where(.spacer, .hr, .section-divider, .banner-placeholder){ display:none !important; }
  }
}

@media (max-width: 640px){
  :where(.product-card, .product-box, .single-product, .item-product){
    display:flex; flex-direction:column; border-radius:12px;
  }
  :where(.product-content, .product-info, .content){ padding:10px 12px; gap:6px }
  :where(.actions, .product-actions){ margin-top:auto; padding:0 12px 12px }
  /* avoid layout jump */
  :where(.product-thumb, .image, .product-img){ aspect-ratio:1/1; }
}

@media (max-width: 992px){
  html.has-tabbar :where(.product-listing, .category-page, .page-content){ padding-bottom: calc(var(--tabbar-h,64px) + 16px) }
  :where(.mobile-bottom-nav, .mobile-tabbar, .footer-nav){
    position:fixed; left:0; right:0; bottom:0; z-index:1030;
    padding-bottom: env(safe-area-inset-bottom); background:#fff; border-top:1px solid #E5E7EB;
    min-height:56px;
  }
}

/* Mobile Off-Canvas Menu */
@media (max-width: 992px) {
    /* Hide desktop menu on mobile */
    body.theme-modern :where(.sidebar-menu.side__bar) {
        position: fixed;
        top: 0;
        left: 0;
        width: 86vw;
        max-width: 360px;
        height: 100vh;
        z-index: 9999;
        transform: translateX(-100%);
        transition: transform 220ms ease;
        overflow-y: auto;
        box-shadow: 4px 0 24px rgba(2, 6, 23, 0.15);
        padding: 20px 12px;
    }
    
    /* Open state */
    body.theme-modern :where(.sidebar-menu.side__bar.is-open) {
        transform: translateX(0);
    }
    
    /* Backdrop overlay */
    .menu-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(2, 6, 23, 0.35);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 220ms ease, visibility 220ms ease;
    }
    
    .menu-backdrop.is-open {
        opacity: 1;
        visibility: visible;
    }
    
    /* Body scroll lock */
    body.menu-open {
        overflow: hidden;
    }
    
    html.menu-open {
        overflow: hidden;
    }
    
    /* Mobile menu header */
    body.theme-modern :where(.sidebar-menu.side__bar)::before {
        content: "Categories";
        display: block;
        font-size: 18px;
        font-weight: 700;
        color: #1F2937;
        padding-bottom: 16px;
        margin-bottom: 16px;
        border-bottom: 2px solid #E5E7EB;
    }
    
    /* Adjust submenu styling for mobile */
    body.theme-modern :where(.sidebar-submenu.side__barsub) {
        margin: 8px 0;
        padding: 8px;
    }
    
    body.theme-modern :where(.sidebar-submenu.side__barsub li a) {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    body.theme-modern :where(.sidebar-childmenu.side__barchild li a) {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    /* Improve touch targets on mobile */
    body.theme-modern :where(.hideshow > li > a) {
        height: 48px;
        padding: 0 16px;
        font-size: 16px;
    }
    
    /* Custom scrollbar for mobile */
    body.theme-modern :where(.sidebar-menu.side__bar)::-webkit-scrollbar {
        width: 4px;
    }
}

/* Safe caps + feedback breaker */
/* Mobile Header Fixed Positioning */
@media (max-width: 992px) {
  .mobile-header.sticky {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    background: #fff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
  }
  
  /* Body padding to compensate for fixed header */
  body {
    padding-top: 70px !important;
  }
  
  /* Remove extra margins from slider and content areas */
  .slider-section {
    margin-top: 0 !important;
    margin-bottom: 5px !important;
    padding-top: 0 !important;
  }
  
  .slider-section .container {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  
  .bottoads_area {
    margin-top: 0 !important;
    padding-top: 10px !important;
    margin-bottom: 5px !important;
  }
  
  /* Welcome message area adjustments */
  .container-fluid {
    padding-top: 0 !important;
  }
  
  /* Remove any extra spacing from main content */
  main, .main-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  
  /* Specific fixes for home slider */
  .home-slider-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  .main_slider {
    margin-top: 0 !important;
  }
  
  /* Remove gaps from sections */
  .homeproduct {
    margin-top: 0 !important;
    padding-top: 15px !important;
  }
  
  /* Fix any container spacing issues */
  .container {
    padding-top: 0 !important;
  }
  
  .row {
    margin-top: 0 !important;
  }
  
  /* Mobile search area fixes - Enhanced visibility */
  .mobile-search {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 10px !important;
    background-color: #fff !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    z-index: 999 !important;
  }
  
  /* Ensure mobile search form is visible */
  .mobile-search form {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    border: 1px solid #ff0018 !important;
    border-radius: 5px !important;
    background-color: #fff !important;
    height: 40px !important;
    overflow: hidden !important;
    position: relative !important;
  }
  
  /* Mobile search input styling */
  .mobile-search form input {
    flex: 1 !important;
    padding-left: 15px !important;
    border: none !important;
    outline: none !important;
    background: #fff !important;
    color: #000 !important;
    font-size: 14px !important;
  }
  
  /* Mobile search button styling */
  .mobile-search form button {
    background-color: #ff0018 !important;
    flex: 0 0 60px !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
  }
  
  /* Override any conflicting main-search rules */
  .main-search.mobile-search {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 !important;
    padding: 15px 16px !important;
    padding-top: 0 !important;
  }
  
  /* Ensure no extra spacing after mobile header */
  .mobile-header + * {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}

@media (max-width: 576px) {
  /* মাপ নেওয়ার সময় padding-top শূন্য করতে helper class */
  html.ms-measure main { padding-top: 0 !important; }

  /* প্রথম সেকশনে extra top space বন্ধ */
  main > *:first-child { margin-top: 0 !important; }

  /* slider/search ব্লকে টপ মার্জিন থাকলে শূন্য করুন */
  .owl-carousel, .home-slider, #home-slider, .hero, .banner-slider { margin-top: 0 !important; }
  .search-area, .search-wrapper, .header-search, form.search { margin-bottom: 8px !important; }
  
  /* Additional gap fixes for mobile */
  .slider-section .container-fluid {
    padding-top: 0 !important;
  }
  
  .welcome-message, .welcome-area {
    margin-top: 0 !important;
    padding-top: 10px !important;
  }
  
  /* Force mobile search visibility on small screens */
  .mobile-search {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

