/* ==========================================================================
   CHAUDHARY PERFUMES (chaudharyperfumes.pk)
   PREMIUM MOBILE OPTIMIZATION & STICKY BOTTOM NAV SYSTEM
   ========================================================================== */

/* Universal Reset & Mobile Safeguards */
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 */
@media (max-width: 768px) {
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="tel"],
  input[type="search"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Hide Mobile Bottom Bar on Desktop & PC */
.mobile-bottom-bar {
  display: none !important;
}

/* Visual Card Hover Glow */
.product-card {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease !important;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-gold) !important;
  box-shadow: 0 10px 30px var(--brand-gold-glow) !important;
}

/* Clean Mobile Optimization (<768px) */
@media (max-width: 768px) {
  body {
    padding-bottom: 60px !important; /* Space for bottom bar */
  }

  .container {
    padding: 0 14px;
  }

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

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

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

  /* Sticky Bottom Quick-Access Bar (Mobile Only) */
  .mobile-bottom-bar {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 58px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
    z-index: 998;
    justify-content: space-around;
    align-items: center;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .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.72rem;
    font-weight: 600;
    gap: 2px;
    flex: 1;
    height: 100%;
    position: relative;
    cursor: pointer;
  }

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

  .mobile-bottom-nav-item .icon {
    font-size: 1.18rem;
    line-height: 1;
  }

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

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

  .header {
    height: 56px;
  }

  .navbar {
    height: 56px;
  }

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

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

  .nav-actions {
    gap: 6px;
  }

  .btn-icon {
    width: 36px;
    height: 36px;
    font-size: 0.92rem;
  }

  /* Mobile Slide Drawer Menu */
  .nav-links {
    position: fixed;
    top: 56px;
    left: -100%;
    width: 260px;
    height: calc(100vh - 56px);
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 18px;
    gap: 12px;
    transition: left 0.25s ease;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    overflow-y: auto;
  }

  .nav-links.active {
    left: 0;
  }

  .nav-link {
    font-size: 0.95rem;
    width: 100%;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
  }

  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  /* 1. INDEX / HOMEPAGE HERO SECTION */
  .hero-section {
    padding: 24px 0 20px 0 !important;
  }

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

  .hero-title {
    font-size: 1.85rem !important;
    line-height: 1.2 !important;
    margin-bottom: 10px !important;
  }

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

  .hero-grid .btn {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

  /* HIDE EXTRA CLUTTER ON MOBILE */
  .perfume-collections-section {
    display: none !important;
  }

  .hero-section div[style*="position: absolute"],
  .hero-section div[style*="border-radius: 30px"] {
    display: none !important;
  }

  .product-notes {
    display: none !important;
  }

  .product-actions {
    display: none !important;
  }

  .story-card img {
    display: none !important;
  }

  .footer-grid > div:nth-child(2),
  .footer-grid > div:nth-child(3) {
    display: none !important;
  }

  /* 1. INDEX / HOMEPAGE HERO SECTION */
  .shop-layout {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

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

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

  .product-card {
    padding: 10px !important;
    border-radius: 10px !important;
    border: 1px solid var(--border-color) !important;
    background: var(--bg-card);
  }

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

  .product-title {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    margin-bottom: 2px !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: 6px !important;
  }

  .product-actions {
    flex-direction: column !important;
    gap: 4px !important;
  }

  .product-actions .btn {
    width: 100% !important;
    padding: 7px 8px !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    min-height: 36px;
    border-radius: 6px !important;
  }

  /* 3. ABOUT PAGE */
  .about-hero-grid,
  .story-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    text-align: center;
  }

  /* 4. CONTACT PAGE */
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

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

  /* 5. AUTH / LOGIN PAGE */
  .auth-container {
    padding: 20px 14px !important;
    max-width: 100% !important;
  }

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

  /* 6. DASHBOARD PAGE */
  .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: 8px !important;
  }

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

  /* Story Card Section */
  .story-card {
    grid-template-columns: 1fr !important;
    padding: 18px 14px !important;
    gap: 16px !important;
    text-align: center;
  }

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

  /* Customer Reviews */
  #reviews-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !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: 8px;
    text-align: center;
    font-size: 0.78rem;
  }

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

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

/* Extra Small Devices (<380px) */
@media (max-width: 380px) {
  .shop-catalog-grid,
  .product-grid {
    gap: 6px !important;
  }

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

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