/* ============================================
   RESPONSIVE DESIGN – MOBILE FIRST
   ============================================ */

/* ============================================
   MOBILE (320px - 767px) - Base Styles Already Mobile-First
   ============================================ */

@media (max-width: 767px) {
  :root {
    --font-size-5xl: 2.5rem;
    --font-size-4xl: 2rem;
    --font-size-3xl: 1.5rem;
    --font-size-2xl: 1.25rem;
  }

  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  .main-image {
    max-height: 55vh;
    object-fit: contain !important;
  }

  .container {
    padding: 0 var(--spacing-md);
  }

  section, 
  .page-header, 
  .product-detail-section {
    padding: var(--spacing-xl) 0;
  }

  header .container {
    padding: var(--spacing-md);
  }

  /* Navigation Mobile */
  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    flex-direction: column;
    padding: var(--spacing-xl) var(--spacing-md);
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--color-border);
    gap: var(--spacing-lg);
  }
  
  nav.active {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  /* Hero Section Mobile */
  .hero {
    min-height: 85vh;
    align-items: flex-end;
    padding-bottom: var(--spacing-xl);
  }
  
  .hero-image {
    background-position: right top;
  }

  .hero-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.85) 90%);
  }
  
  .hero-content {
    margin-top: 0;
    text-align: center;
  }

  .hero-content h1 {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--spacing-md);
  }

  .hero-content p {
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-xl);
  }

  .hero-cta {
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
  }

  .hero-cta .btn {
    width: 100%;
    max-width: 300px;
  }

  /* Section Header Mobile */
  .section-header {
    margin-bottom: var(--spacing-2xl);
  }

  .section-header h2 {
    font-size: var(--font-size-3xl);
  }

  /* Grid Mobile - Explicitly 1 column */
  .arrivals-grid,
  .featured-grid,
  .categories-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--spacing-md);
  }
  
  /* Make product cards responsive on mobile */
  .product-image-wrapper {
    padding-bottom: 125%;
  }
  
  .product-actions {
    flex-direction: row;
  }
  
  .product-actions .btn {
    font-size: 0.75rem;
    padding: 0.75rem;
  }

  /* Category Card Mobile */
  .category-card {
    height: 300px;
  }

  .category-name {
    font-size: var(--font-size-2xl);
  }

  /* The Nava Varna Experience Mobile */
  .experience-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .experience-image {
    padding-bottom: 100%;
  }

  /* Gallery Mobile - 2 columns for smaller images */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 250px;
    gap: var(--spacing-xs);
  }

  .gallery-item.tall,
  .gallery-item.wide {
    grid-column: span 1;
    grid-row: span 1;
  }

  /* Visit Store Mobile */
  .visit-store-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .store-map {
    height: 300px;
  }

  /* Footer Mobile */
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: center;
  }

  /* Filters Section */
  .filters-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .filters-section {
    position: static;
  }

  /* Product Detail Page Mobile */
  .product-detail-container {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--spacing-xl);
  }
  
  .product-gallery {
    position: relative;
    top: 0;
  }

  /* Button Mobile */
  .btn {
    white-space: normal;
    height: auto;
  }
  
  .btn-lg,
  .product-actions-detail .btn {
    padding: 0.875rem 1rem;
  }

  .contact-section {
    padding: var(--spacing-xl) var(--spacing-md);
  }

  .whatsapp-floating {
    bottom: var(--spacing-md);
    right: var(--spacing-md);
  }

  #scrollToTopBtn {
    bottom: var(--spacing-md);
    left: var(--spacing-md);
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
}

/* ============================================
   TABLET (768px - 1023px)
   ============================================ */

@media (min-width: 768px) and (max-width: 1023px) {
  .hero-content h1 {
    font-size: var(--font-size-5xl);
  }

  /* Grid Tablet - Explicitly 2 columns */
  .arrivals-grid,
  .featured-grid,
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl) var(--spacing-lg);
  }

  /* The Nava Varna Experience Tablet */
  .experience-content {
    grid-template-columns: 1fr;
  }
  
  .experience-image {
    padding-bottom: 60%;
  }

  /* Visit Store Tablet */
  .visit-store-content {
    grid-template-columns: 1fr;
  }

  .store-map {
    height: 400px;
  }

  /* Gallery Tablet */
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-item.tall {
    grid-row: span 2;
  }

  .gallery-item.wide {
    grid-column: span 2;
  }

  /* Footer Tablet */
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   SMALL DESKTOP (1024px - 1279px)
   ============================================ */

@media (min-width: 1024px) {
  /* Small Desktop - 3 columns */
  .arrivals-grid,
  .featured-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   LARGE DESKTOP (1280px+)
   ============================================ */

@media (min-width: 1280px) {
  /* Large Desktop - 4 columns */
  .arrivals-grid,
  .featured-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
  /* Ensure WhatsApp button is large enough */
  .whatsapp-floating a {
    width: 65px;
    height: 65px;
  }
  
  /* Ensure hover states are persistent or removed on touch */
  .product-image-wrapper img {
    transform: none !important;
  }
  
  .category-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
  }
}
