/* GLOBAL RED THEME OVERRIDE - FINAL SOLUTION
   This file ensures ALL mobile elements stay red-themed
   Load this LAST to override everything else */

/* HAMBURGER MENU LINES - ABSOLUTE RED OVERRIDE */
.burger-line,
.hamburger-line,
button.mobile-menu-toggle > span,
.mobile-header .mobile-menu-toggle > span,
.mobile-menu-toggle span {
    width: 24px !important;
    height: 3px !important;
    background: #dc3545 !important;
    background-color: #dc3545 !important;
    border-radius: 2px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 1px 2px rgba(220, 53, 69, 0.3) !important;
    display: block !important;
    margin: 3px 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    content: '' !important;
    position: relative !important;
    border: none !important;
    outline: none !important;
}

/* HAMBURGER HOVER STATES */
.mobile-menu-toggle:hover .burger-line,
.mobile-menu-btn:hover .burger-line,
.mobile-menu-toggle:hover .hamburger-line,
.mobile-menu-btn:hover .hamburger-line,
button.mobile-menu-toggle:hover > span {
    background: #c82333 !important;
    transform: scaleY(1.3) !important;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.6) !important;
}

/* MOBILE ICONS - ALL RED */
.mobile-actions i,
.mobile-actions a i,
.mobile-actions button i,
.cart-link i,
.wishlist-link i,
.mobile-cart-btn i,
.mobile-wishlist-btn i,
.mobile-header i,
.mobile-header-content i,
[class*="mobile"] i,
header i {
    color: #dc3545 !important;
    font-size: 20px !important;
}

/* COUNT BADGES - ALL RED */
.cart-count,
.wishlist-count,
.mobile-cart-count,
.mobile-wishlist-count,
[class*="count"],
span[class*="count"] {
    background: #dc3545 !important;
    color: white !important;
    border: 2px solid white !important;
    font-weight: 700 !important;
}

/* MOBILE HOVER STATES */
.mobile-actions a:hover,
.mobile-actions button:hover,
.cart-link:hover,
.wishlist-link:hover {
    background: rgba(220, 53, 69, 0.1) !important;
}

.mobile-actions a:hover i,
.mobile-actions button:hover i,
.cart-link:hover i,
.wishlist-link:hover i {
    color: #c82333 !important;
    transform: scale(1.1) !important;
}

/* FORCE OVERRIDE ANY ORANGE/BLUE COLORS */
[style*="color: #ff6b35"] { color: #dc3545 !important; }
[style*="color: #e67e22"] { color: #dc3545 !important; }
[style*="color: #f39c12"] { color: #dc3545 !important; }
[style*="color: #3498db"] { color: #dc3545 !important; }
[style*="color: #007bff"] { color: #dc3545 !important; }
[style*="color: orange"] { color: #dc3545 !important; }
[style*="color: blue"] { color: #dc3545 !important; }

[style*="background: #ff6b35"] { background: #dc3545 !important; }
[style*="background: #e67e22"] { background: #dc3545 !important; }
[style*="background: #f39c12"] { background: #dc3545 !important; }
[style*="background: #3498db"] { background: #dc3545 !important; }
[style*="background: #007bff"] { background: #dc3545 !important; }

/* SUPER SPECIFIC SELECTORS FOR STUBBORN ELEMENTS */
body .mobile-actions i,
body .mobile-header i,
body .burger-line,
body .hamburger-line,
body button.mobile-menu-toggle > span,
body .cart-count,
body .wishlist-count {
    background: #dc3545 !important;
}

/* FINAL NUCLEAR OPTION - FORCE RED ON EVERYTHING */
.mobile-header *[class*="icon"],
.mobile-actions *[class*="icon"],
.mobile-actions *[style*="color"],
.mobile-header *[style*="color"] {
    color: #dc3545 !important;
}

/* NUCLEAR HAMBURGER FIX - FORCE DISPLAY AND RED COLOR */
.mobile-menu-toggle span,
.mobile-menu-toggle > span,
button.mobile-menu-toggle span,
button.mobile-menu-toggle > span,
.mobile-header .mobile-menu-toggle span,
.mobile-header .mobile-menu-toggle > span {
    display: block !important;
    background: #dc3545 !important;
    background-color: #dc3545 !important;
    width: 24px !important;
    height: 3px !important;
    margin: 3px auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    border-radius: 2px !important;
    content: '' !important;
    position: relative !important;
    border: none !important;
    outline: none !important;
    box-shadow: 0 1px 2px rgba(220, 53, 69, 0.3) !important;
}

/* Ensure toggle is always visible on mobile */
@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
    z-index: 10005 !important;
    width: 30px !important;
    height: 30px !important;
    background: transparent !important;
    border: none !important;
    padding: 6px !important;
  }
  
  /* Force hamburger spans to be visible and red */
  .mobile-menu-toggle span {
    width: 24px !important;
    height: 3px !important;
    background: #dc3545 !important;
    background-color: #dc3545 !important;
    display: block !important;
    margin: 2px 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    border-radius: 2px !important;
  }
}

/* Keep header fixed at the top and prevent scroll-hide */
header.modern-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 12000 !important;
}
header.modern-header.scrolled-down {
  transform: none !important;
}

/* Remove any unintended top spacing globally */
html, body {
  margin-top: 0 !important;
  padding-top: 0 !important;
}


/* Cart sidebar layout: ensure actions always visible and content scrolls */
.cart-sidebar-content {
  display: grid !important;
  grid-template-rows: 1fr auto auto !important; /* items | summary | actions */
  height: 100% !important;
}
.cart-sidebar-items { min-height: 0 !important; overflow-y: auto !important; }

/* Mobile cart sidebar: shorten content so action buttons always fit */
@media (max-width: 768px) {
  .cart-sidebar {
    width: 92vw !important;
  }
  .cart-sidebar-content {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100vh - 16px) !important;
  }
  .cart-sidebar-header {
    padding: 10px !important;
  }
  /* Reduce scrollable area to keep actions visible */
  .cart-sidebar-items {
    max-height: calc(100vh - 340px) !important;
    overflow-y: auto !important;
    flex: 1 1 auto !important;
  }
  /* Ensure space for bottom safe area and keep actions visible */
  .cart-sidebar-actions {
    position: sticky !important;
    bottom: 0 !important;
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom)) !important;
    background: #ffffff !important;
    z-index: 2 !important;
  }
}

@media (max-width: 480px) {
  .cart-sidebar-items {
    max-height: calc(100vh - 380px) !important;
  }
}

/* Mobile typography and spacing reductions for cart sidebar */
@media (max-width: 768px) {
  .cart-sidebar { font-size: 14px !important; }
  .cart-sidebar-header { padding: 8px 10px !important; }
  .cart-sidebar-header h3 { font-size: 16px !important; line-height: 1.2 !important; }
  .cart-sidebar .close-sidebar { font-size: 16px !important; }

  .cart-sidebar-items .sidebar-item { padding: 10px 8px !important; }
  .cart-sidebar-items .product-name {
    font-size: 13px !important;
    line-height: 1.3 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
  }
  .cart-sidebar-items .product-details { font-size: 12px !important; line-height: 1.3 !important; }
  .cart-sidebar-items .product-variant, .cart-sidebar-items .product-qty { font-size: 11px !important; }
  .cart-sidebar-items .product-price { font-size: 13px !important; }

  .cart-sidebar-summary { font-size: 12px !important; padding: 10px 12px !important; }

  .cart-sidebar-actions { gap: 8px !important; }
  .cart-sidebar-actions .btn-view-cart, .cart-sidebar-actions .btn-checkout {
    min-height: 42px !important;
    padding: 9px 12px !important;
    font-size: 13.5px !important;
  }
}

@media (max-width: 480px) {
  .cart-sidebar { font-size: 12.5px !important; }
  .cart-sidebar-header h3 { font-size: 14px !important; }
  .cart-sidebar-items .product-name { font-size: 12px !important; -webkit-line-clamp: 2; }
  .cart-sidebar-summary { font-size: 11.5px !important; padding: 8px 10px !important; }
  .cart-sidebar-actions .btn-view-cart, .cart-sidebar-actions .btn-checkout {
    min-height: 38px !important;
    padding: 8px 10px !important;
    font-size: 12.5px !important;
  }
}

/* Mobile: hide hero subtitle text in slider/hero */
@media (max-width: 768px) {
  .hero-subtitle { display: none !important; }
}

/* Vertical Navigation Layout Fixes */
.product-content-wrapper,
.products-content-wrapper {
  width: 100%;
}

/* Mobile layout adjustments for vertical nav */
@media (max-width: 768px) {
  /* Product detail page with vertical nav */
  .row {
    margin: 0;
  }
  
  .col-md-3,
  .col-md-9 {
    padding: 0 15px;
  }
  
  .col-md-3 {
    margin-bottom: 10px;
    padding: 0;
  }
  
  .product-content-wrapper {
    padding: 0;
  }
  
  /* Adjust container for mobile */
  .product-detail {
    margin-top: 0;
  }
  
  /* Fix breadcrumb spacing */
  .breadcrumb-container {
    margin-bottom: 10px;
  }
  
  /* Make vertical nav full width on mobile */
  .vertical-nav {
    margin: 0 -15px 15px -15px;
  }
}

@media (max-width: 480px) {
  .col-md-3,
  .col-md-9 {
    padding: 0 10px;
  }
  
  .vertical-nav {
    margin: 0 -10px 10px -10px;
  }
}
