/* ==========================================================================
   SPANISH PIZZA PINDI GHEB - DEDICATED RESPONSIVE BREAKPOINTS
   Zero overlapping elements across 320px, 375px, 390px, 430px, 768px, 1024px, 1280px, 1440px, 1920px
   ========================================================================== */

/* 1. LARGE DESKTOP & SCREENS (1280px to 1920px) */
@media screen and (min-width: 1440px) {
  :root {
    --container-max: 1320px;
  }
  .hero-title {
    font-size: 3.8rem;
  }
}

/* 2. MEDIUM DESKTOP & LAPTOP (1025px to 1279px) */
@media screen and (max-width: 1279px) {
  .nav-list {
    gap: 16px;
  }
  .nav-link {
    font-size: 0.9rem;
  }
  .header-order-btn {
    padding: 10px 18px;
    font-size: 0.88rem;
  }
  .hero-grid {
    gap: 30px;
  }
  .footer-top-row {
    grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
    gap: 30px;
  }
}

/* 3. TABLETS & SMALL LAPTOPS (Break desktop nav to mobile before crowding: 1080px down) */
@media screen and (max-width: 1080px) {
  /* Switch to mobile hamburger navigation */
  .desktop-nav {
    display: none !important;
  }

  .mobile-toggle-btn {
    display: flex !important;
  }

  .top-info-right .top-hours {
    display: none;
  }
  .top-info-sep:last-of-type {
    display: none;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
    margin: 0 auto;
  }

  .hero-pill-badge {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-btn-group {
    justify-content: center;
  }

  .hero-trust-badges {
    justify-content: center;
  }

  .hero-visual-col {
    margin-top: 20px;
  }

  .hero-img-frame {
    max-width: 420px;
    transform: none !important;
  }

  .hero-main-img {
    height: 380px;
  }

  .about-split {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-img-collage {
    order: -1;
    max-width: 540px;
    margin: 0 auto;
  }

  .order-workflow-grid {
    grid-template-columns: 1fr;
  }

  .order-form-card {
    position: static;
    top: auto;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-top-row {
    grid-template-columns: 1fr 1fr;
    gap: 40px 30px;
  }
}

/* 4. TABLETS PORTRAIT & LARGE PHONES (768px down) */
@media screen and (max-width: 768px) {
  :root {
    --header-height: 72px;
  }

  .top-info-bar {
    font-size: 0.76rem;
  }

  .top-info-inner {
    flex-direction: column;
    gap: 6px;
    padding-top: 6px;
    padding-bottom: 6px;
    text-align: center;
  }

  .top-info-left {
    justify-content: center;
    gap: 10px;
  }

  .top-info-item.top-location {
    display: none; /* Keep top bar clean on mobile */
  }

  .top-info-sep {
    display: none;
  }

  .brand-logo {
    height: 40px;
  }

  .cart-btn-label {
    display: none; /* Show only icon + badge to save header width */
  }

  .cart-trigger-btn {
    padding: 8px 12px;
  }

  .header-order-btn span {
    display: none; /* Show only icon or compact version */
  }
  .header-order-btn {
    padding: 10px 14px;
    border-radius: var(--radius-full);
  }
  .header-order-btn .btn-icon-left {
    margin: 0;
  }

  .home-hero {
    padding: 50px 0 70px;
    min-height: auto;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subheading {
    font-size: 1.15rem;
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .hero-floating-card {
    left: 10px;
    right: 10px;
    bottom: -15px;
    padding: 10px 14px;
  }

  .section-pad {
    padding: 55px 0;
  }

  .section-head {
    margin-bottom: 32px;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .food-cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .deals-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    columns: 2 180px;
    column-gap: 14px;
  }

  .gallery-item {
    margin-bottom: 14px;
  }

  .cta-banner {
    padding: 40px 20px;
  }

  .floating-whatsapp-btn {
    width: 52px;
    height: 52px;
    right: 16px;
    bottom: 20px;
  }

  .floating-wa-icon {
    font-size: 28px;
  }

  .floating-wa-tooltip {
    display: none; /* Avoid screen clutter on mobile devices */
  }

  .lightbox-prev, .lightbox-next {
    display: none; /* Swipe & keyboard friendly */
  }

  .lightbox-close {
    top: -40px;
    right: 10px;
  }
}

/* 5. PHONES (430px down: iPhone 14 Pro Max, 15 Plus, Samsung S24) */
@media screen and (max-width: 430px) {
  .site-container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand-logo {
    height: 36px;
  }

  .header-inner {
    gap: 8px;
  }

  .header-actions {
    gap: 8px;
  }

  .cart-trigger-btn {
    padding: 7px 10px;
  }

  .mobile-toggle-btn {
    width: 38px;
    height: 38px;
    padding: 6px;
  }

  .hero-title {
    font-size: 1.9rem;
  }

  .hero-btn-group .btn {
    width: 100%;
  }

  .hero-img-frame {
    max-width: 100%;
  }

  .hero-main-img {
    height: 300px;
  }

  .deal-actions {
    grid-template-columns: 1fr;
  }

  .order-type-switch {
    grid-template-columns: 1fr;
  }

  .footer-top-row {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .footer-bottom-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* 6. COMPACT PHONES (375px down: iPhone SE, Pixel 5) */
@media screen and (max-width: 375px) {
  .top-info-left span {
    font-size: 0.74rem;
  }

  .brand-logo {
    height: 32px;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .filter-tab-btn {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .cart-drawer {
    width: 100vw;
    max-width: 100vw;
  }

  .toast-container {
    left: 14px;
    right: 14px;
    bottom: 80px; /* Above floating WhatsApp button */
  }
}

/* 7. ULTRA COMPACT & LEGACY DEVICES (320px: iPhone 5/SE1, Galaxy Fold cover) */
@media screen and (max-width: 320px) {
  .brand-logo {
    height: 28px;
  }

  .header-order-btn {
    display: none; /* Conserve header space; mobile drawer has prominent Order Now */
  }

  .hero-title {
    font-size: 1.55rem;
  }

  .btn {
    padding: 10px 18px;
    font-size: 0.85rem;
  }

  .gallery-grid {
    columns: 1;
  }

  .feature-box {
    padding: 24px 16px;
  }
}

/* 8. PREVENT HORIZONTAL OVERFLOW & SYSTEM FIXES */
body, html {
  max-width: 100%;
  overflow-x: hidden !important;
}

/* Accessibility Focus States */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
}

/* Smooth Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

