/* ==========================================================================
   CHUDHARY PARFUMS (Chudhary Parfums Pakistan)
   HAUTE PARFUMERIE MOBILE RESPONSIVENESS & LUXURY TOGGLER SYSTEM
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Universal Mobile Safeguards & Touch Resets
   -------------------------------------------------------------------------- */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

a, button, input, select, textarea {
  touch-action: manipulation;
}

/* Prevent iOS Safari auto-zoom on input focus by ensuring >= 16px font-size */
@media (max-width: 768px) {
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="tel"],
  input[type="search"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Desktop Defaults: Hide Mobile Bottom Bar and Mobile Sidebar / Dropdown */
.mobile-bottom-bar {
  display: none !important;
}

.mobile-dropdown-backdrop,
.mobile-sidebar-backdrop,
.mobile-nav-dropdown,
.mobile-sidebar-drawer {
  display: none;
}

/* --------------------------------------------------------------------------
   2. Responsive Header & Luxury Animated Toggler (<991px)
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  /* Flexbox Layout for Mobile Navbar (Clean Spacing) */
  .navbar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    height: 60px !important;
    padding: 0 16px !important;
  }

  .nav-center-wing {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-shrink: 0 !important;
  }

  .nav-wing-left {
    display: none !important;
  }

  .nav-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }

  /* ------------------------------------------------------------------------
     Animated Mobile Hamburger Toggler (3-Bar to Gold X)
     ------------------------------------------------------------------------ */
  .mobile-menu-btn {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    border-radius: 8px !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative !important;
    z-index: 10002 !important;
    outline: none !important;
  }

  .mobile-menu-btn:hover,
  .mobile-menu-btn:active {
    border-color: var(--brand-gold) !important;
    box-shadow: 0 0 14px var(--brand-gold-glow) !important;
  }

  /* 3-Bar Toggler Icon Structure */
  .toggler-bars {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 20px;
    height: 16px;
    pointer-events: none;
  }

  .toggler-bars .bar {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, background-color 0.2s ease;
    transform-origin: center;
  }

  /* When Toggler is Active (Sidebar Drawer is Open): Transforms into Gold X */
  .mobile-menu-btn.active {
    border-color: var(--brand-gold) !important;
    background: var(--bg-card) !important;
    box-shadow: 0 0 16px var(--brand-gold-glow) !important;
  }

  .mobile-menu-btn.active .bar-1 {
    transform: translateY(6px) rotate(45deg);
    background-color: var(--brand-gold);
  }

  .mobile-menu-btn.active .bar-2 {
    opacity: 0;
    transform: scaleX(0);
  }

  .mobile-menu-btn.active .bar-3 {
    transform: translateY(-6px) rotate(-45deg);
    background-color: var(--brand-gold);
  }

  /* Header Theme Toggle Button */
  .theme-toggle-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 8px !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
  }

  .theme-toggle-btn:hover,
  .theme-toggle-btn:active {
    border-color: var(--brand-gold) !important;
    color: var(--brand-gold) !important;
    box-shadow: 0 0 12px var(--brand-gold-glow) !important;
  }

  .theme-toggle-btn svg {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .theme-toggle-btn:active svg {
    transform: rotate(180deg) scale(0.9);
  }

  /* ------------------------------------------------------------------------
     Luxury Drop-Down Mobile Navigation Menu (Haute Parfumerie Dropdown)
     ------------------------------------------------------------------------ */
  /* Backdrop overlay covering the screen behind the header */
  .mobile-dropdown-backdrop,
  .mobile-sidebar-backdrop {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(8, 8, 12, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-dropdown-backdrop.active,
  .mobile-sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  /* Header Navbar is sticky with elevated z-index so dropdown unfolds cleanly above backdrop */
  .header {
    position: sticky !important;
    top: 0 !important;
    z-index: 10001 !important;
  }

  /* Dropdown Menu attached directly beneath the Header */
  .mobile-nav-dropdown,
  .mobile-sidebar-drawer {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: calc(85vh - 60px);
    max-height: calc(85dvh - 60px);
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    border-bottom: 2px solid var(--border-gold);
    border-left: none;
    border-right: none;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55), 0 0 24px var(--brand-gold-glow);
    z-index: 10001;
    transform: translate3d(0, -14px, 0);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.25s ease;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  /* Fallback if appended directly to document.body */
  body > .mobile-nav-dropdown,
  body > .mobile-sidebar-drawer {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
  }

  .mobile-nav-dropdown.active,
  .mobile-sidebar-drawer.active {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Custom Slim Gold Scrollbar for Dropdown Menu */
  .mobile-nav-dropdown::-webkit-scrollbar,
  .mobile-sidebar-drawer::-webkit-scrollbar {
    width: 5px;
  }

  .mobile-nav-dropdown::-webkit-scrollbar-track,
  .mobile-sidebar-drawer::-webkit-scrollbar-track {
    background: transparent;
  }

  .mobile-nav-dropdown::-webkit-scrollbar-thumb,
  .mobile-sidebar-drawer::-webkit-scrollbar-thumb {
    background: var(--border-gold);
    border-radius: 10px;
  }

  /* Redundant sidebar header is suppressed in dropdown layout */
  .mobile-sidebar-header {
    display: none !important;
  }

  /* Dropdown Topbar / Atmosphere Toolbar */
  .mobile-dropdown-toolbar {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
  }

  /* ------------------------------------------------------------------------
     Interactive Theme Toggler Switch Row (Sidebar)
     ------------------------------------------------------------------------ */
  .mobile-sidebar-theme-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
  }

  .theme-toggle-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .theme-toggle-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
  }

  .theme-toggle-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
  }

  .theme-switch-slider {
    position: relative;
    width: 60px;
    height: 32px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-gold);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.25);
  }

  .theme-switch-slider:hover,
  .theme-switch-slider:active {
    box-shadow: 0 0 14px var(--brand-gold-glow), inset 0 2px 6px rgba(0,0,0,0.25);
  }

  .theme-switch-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    color: var(--brand-gold);
    z-index: 1;
    pointer-events: none;
  }

  .theme-switch-thumb {
    position: absolute;
    top: 3px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brand-gold);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease;
  }

  /* When Dark Mode is Active: Thumb moves to right */
  .theme-switch-slider.is-dark .theme-switch-thumb {
    transform: translateX(28px);
  }

  .theme-switch-slider.is-dark {
    background: #0f1015;
    border-color: var(--brand-gold);
  }

  /* Quick Actions (Search Scents & Theme Palette Modal Trigger) */
  .mobile-sidebar-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
  }

  .mobile-sidebar-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 38px;
  }

  .mobile-sidebar-action-btn:active {
    transform: scale(0.97);
    border-color: var(--brand-gold);
  }

  /* Dropdown Navigation Links */
  .mobile-sidebar-nav,
  .mobile-dropdown-nav {
    flex: 1;
    padding: 12px 14px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  @media (min-width: 580px) and (max-width: 991px) {
    .mobile-sidebar-nav,
    .mobile-dropdown-nav {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px 12px;
      padding: 14px 20px;
    }
    .mobile-sidebar-section-label {
      grid-column: 1 / -1;
    }
  }

  .mobile-sidebar-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 10px 10px 4px 10px;
  }

  .mobile-sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 14px;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    position: relative;
  }

  .mobile-sidebar-link:hover,
  .mobile-sidebar-link:active {
    background: var(--bg-secondary);
    color: var(--brand-gold);
    border-color: var(--border-color);
    transform: translateX(3px);
  }

  .mobile-sidebar-link.active {
    background: rgba(212, 160, 23, 0.09);
    border-color: var(--border-gold);
    color: var(--brand-gold);
    font-weight: 700;
  }

  .mobile-sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: var(--brand-gold);
    border-radius: 3px;
  }

  .mobile-sidebar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: var(--brand-gold);
  }

  .mobile-sidebar-text {
    flex: 1;
  }

  .sidebar-pill {
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
  }

  .sidebar-pill-gold {
    font-size: 0.66rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--brand-gold);
    color: #0b0c10;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  /* Sidebar Footer */
  .mobile-sidebar-footer {
    padding: 16px 18px 20px 18px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
  }

  .mobile-sidebar-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    background: #25D366;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 44px;
  }

  .mobile-sidebar-whatsapp:active {
    transform: scale(0.97);
  }

  .mobile-sidebar-tagline {
    text-align: center;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 10px;
    letter-spacing: 0.4px;
  }
}

/* --------------------------------------------------------------------------
   3. Mobile Screen Optimizations (<768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  body {
    padding-bottom: 76px !important; /* Adequate buffer for 62px sticky bottom bar + safe area */
  }

  .container {
    padding: 0 16px;
  }

  .section-padding {
    padding: 36px 0 !important;
  }

  .section-title {
    font-size: 1.65rem !important;
    margin-bottom: 6px !important;
  }

  .section-subtitle {
    font-size: 0.88rem !important;
    margin-bottom: 22px !important;
  }

  /* Sticky Bottom Quick-Access Bar (Haute Parfumerie 5-Item Navigation) */
  .mobile-bottom-bar {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-gold);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
    z-index: 9998;
    justify-content: space-around;
    align-items: center;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .mobile-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.70rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    gap: 3px;
    flex: 1;
    height: 100%;
    position: relative;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 6px 0;
    outline: none;
    transition: color 0.2s ease, transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-bottom-nav-item:active {
    transform: scale(0.92);
  }

  .mobile-bottom-nav-item svg {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.2s ease, fill 0.2s ease;
  }

  .mobile-bottom-nav-item.active,
  .mobile-bottom-nav-item:hover {
    color: var(--brand-gold) !important;
  }

  .mobile-bottom-nav-item.active svg {
    transform: translateY(-1px);
    stroke: var(--brand-gold);
  }

  .mobile-bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 2.5px;
    background: var(--brand-gold);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--brand-gold-glow);
  }

  .bottom-nav-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  .mobile-bottom-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: var(--brand-gold) !important;
    color: #0b0c10 !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    border-radius: 10px;
    min-width: 17px;
    height: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    border: 1.5px solid var(--bg-card);
    line-height: 1;
  }

  /* Reposition Floating WhatsApp Button above bottom bar */
  .whatsapp-float {
    bottom: 74px !important;
    left: 14px !important;
    padding: 8px 14px !important;
    font-size: 0.78rem !important;
    border-radius: 20px !important;
    z-index: 990 !important;
  }

  /* Hide Desktop Floating Cart on mobile screens since Bottom Bar has dedicated live Bag */
  .floating-cart-btn {
    display: none !important;
  }

  /* Top Bar */
  .top-bar {
    font-size: 0.72rem;
    padding: 6px 10px;
    text-align: center;
    background: var(--bg-secondary);
  }

  .logo {
    font-size: 1.05rem;
    gap: 8px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
  }

  .nav-actions {
    gap: 6px;
  }

  .btn-icon {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
  }

  /* ------------------------------------------------------------------------
     Homepage Hero Section
     ------------------------------------------------------------------------ */
  .hero-section {
    padding: 28px 0 24px 0 !important;
  }

  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    text-align: center;
  }

  .hero-title {
    font-size: 1.95rem !important;
    line-height: 1.22 !important;
    margin-bottom: 12px !important;
  }

  .hero-subtitle {
    font-size: 0.88rem !important;
    line-height: 1.6 !important;
    margin: 0 auto 20px auto !important;
  }

  .hero-grid .btn {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    min-height: 46px;
  }

  .hero-section img {
    max-width: 260px !important;
    width: 100%;
    margin: 0 auto;
  }

  /* ------------------------------------------------------------------------
     Shop Catalog Category Pills & Horizontal Scroll
     ------------------------------------------------------------------------ */
  .shop-cat-pills-wrap {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 8px !important;
    padding: 4px 4px 12px 4px !important;
    margin-bottom: 24px !important;
    scrollbar-width: none !important;
  }

  .shop-cat-pills-wrap::-webkit-scrollbar {
    display: none !important;
  }

  .shop-cat-pill {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  /* ------------------------------------------------------------------------
     Shop Catalog & Product Cards
     Purchase Actions / Buttons are Prominent & Accessible
     ------------------------------------------------------------------------ */
  .shop-layout {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .filter-sidebar {
    position: relative;
    top: 0;
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
  }

  .shop-catalog-grid,
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  .product-card {
    padding: 12px 10px !important;
    border-radius: 12px !important;
    border: 1px solid var(--border-color) !important;
    background: var(--bg-card);
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  .product-card img,
  .product-img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
    width: 100%;
  }

  .product-title {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    margin-bottom: 3px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .product-price {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    color: var(--brand-gold) !important;
    margin-bottom: 8px !important;
  }

  .product-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
    margin-top: auto !important;
  }

  .product-actions .btn {
    width: 100% !important;
    padding: 8px 10px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    min-height: 38px !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
  }

  /* ------------------------------------------------------------------------
     Checkout Page Mobile Optimizations
     ------------------------------------------------------------------------ */
  .checkout-wrap {
    padding: 24px 14px !important;
  }

  .checkout-grid {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }

  .checkout-card {
    padding: 22px 16px !important;
    border-radius: 12px !important;
  }

  .form-row-2 {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .checkout-pm-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .pm-pill {
    padding: 13px 14px !important;
    min-height: 50px !important;
  }

  .btn-checkout-submit {
    min-height: 52px !important;
    font-size: 0.95rem !important;
    padding: 14px 20px !important;
  }

  /* ------------------------------------------------------------------------
     About & Heritage Page
     ------------------------------------------------------------------------ */
  .about-hero-grid,
  .story-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    text-align: center;
  }

  .story-card {
    grid-template-columns: 1fr !important;
    padding: 20px 16px !important;
    gap: 18px !important;
    text-align: center;
  }

  .story-card img {
    max-width: 200px !important;
    margin: 0 auto;
  }

  /* ------------------------------------------------------------------------
     Contact & Concierge Page
     ------------------------------------------------------------------------ */
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }

  .contact-form-card,
  .contact-info-card {
    padding: 22px 16px !important;
    border-radius: 12px !important;
  }

  /* ------------------------------------------------------------------------
     Auth & Dashboard Pages
     ------------------------------------------------------------------------ */
  .auth-container {
    padding: 20px 14px !important;
    max-width: 100% !important;
  }

  .auth-card {
    padding: 24px 16px !important;
    border-radius: 12px !important;
  }

  .dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .dashboard-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Pakistani Trust Badges Grid */
  .pak-trust-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .pak-trust-card,
  .pak-trust-item {
    padding: 14px 10px !important;
    border-radius: 10px !important;
  }

  /* Customer Reviews */
  #reviews-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .review-card {
    padding: 16px 14px !important;
    border-radius: 10px !important;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
  }

  .footer-brand {
    grid-column: 1 / -1;
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    font-size: 0.78rem;
  }

  /* Modals & Cart Drawer */
  .cart-drawer {
    width: 100% !important;
    max-width: 100% !important;
  }

  .search-modal,
  #review-modal > div,
  #order-tracker-modal > div,
  .global-tracker-modal {
    width: 92% !important;
    max-height: 85vh !important;
    padding: 20px 16px !important;
  }
}

/* --------------------------------------------------------------------------
   4. Extra Small Screens (<480px & <380px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .header,
  .navbar {
    height: 56px !important;
    padding: 0 10px !important;
  }

  body > .mobile-nav-dropdown,
  body > .mobile-sidebar-drawer {
    top: 56px !important;
  }

  .logo {
    gap: 6px !important;
  }

  .logo-seal-wrap {
    width: 34px !important;
    height: 34px !important;
  }

  .logo-crown-svg {
    width: 13px !important;
    height: 9px !important;
    top: -8px !important;
  }

  .logo-mark {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.82rem !important;
  }

  .logo-brand {
    font-size: 0.95rem !important;
    letter-spacing: 1.5px !important;
  }

  .logo-sub {
    display: none !important; /* Hide secondary sub-label to prevent header wrapping */
  }

  .nav-actions {
    gap: 6px !important;
  }

  .palette-trigger-btn {
    display: none !important; /* Conceal duplicate palette button; available inside drawer */
  }

  .btn-icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
  }

  .mobile-menu-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }

  .toggler-bars {
    width: 18px;
    gap: 3.5px;
  }

  .toggler-bars .bar {
    width: 18px;
  }
}

@media (max-width: 380px) {
  .shop-catalog-grid,
  .product-grid {
    gap: 8px !important;
  }

  .product-card {
    padding: 8px 6px !important;
  }

  .hero-title {
    font-size: 1.65rem !important;
  }

  .product-title {
    font-size: 0.82rem !important;
  }

  .product-price {
    font-size: 0.88rem !important;
  }

  .product-actions .btn {
    font-size: 0.74rem !important;
    padding: 7px 6px !important;
  }

  .pak-trust-grid {
    grid-template-columns: 1fr !important;
  }
}
