/* ═══════════════════════════════════════════════════════
   EMLATICRETE — RESPONSIVE CSS
   Breakpoints: 1024px (tablet), 768px (mobile), 480px (small)
   ═══════════════════════════════════════════════════════ */

/* ── Global ── */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

/* ════════════════════════════════
   TABLET  ≤ 1024px
════════════════════════════════ */
@media (max-width: 1024px) {
  .cat-strip-grid        { grid-template-columns: repeat(2, 1fr); }
  .why-grid              { grid-template-columns: repeat(2, 1fr); }
  .products-grid         { grid-template-columns: repeat(3, 1fr); }
  .about-grid            { grid-template-columns: 1fr; text-align: center; }
  .footer-grid           { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .product-detail-grid   { grid-template-columns: 1fr; gap: 2rem; }
  .contact-grid          { grid-template-columns: 1fr; gap: 2rem; }
  .dealer-banner         { grid-template-columns: 1fr; gap: 2rem; }
  .dealer-benefits-grid  { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid          { grid-template-columns: repeat(2, 1fr); }
  .section               { padding: 60px 4%; }
}

/* ════════════════════════════════
   MOBILE  ≤ 768px
════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Navbar ── */
  .navbar {
    padding: 0 4%;
    height: 64px;
  }

  .navbar-logo {
    height: 38px;
  }

  .nav-toggle {
    display: flex;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1.5rem 5%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 999;
    gap: 0;
    overflow-y: auto;
    align-items: flex-start;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 13px 0;
    font-size: 1rem;
    width: 100%;
  }

  .nav-links a::after { display: none; }

  .nav-cta {
    margin-top: 0.8rem;
    text-align: center;
    width: 100%;
    justify-content: center;
    border-radius: 8px !important;
  }

  /* ── Page Hero ── */
  .page-hero {
    padding: 36px 4% !important;
    text-align: left !important;
  }

  .page-hero h1 {
    font-size: 1.8rem !important;
    line-height: 1.25;
    text-align: left;
  }

  .page-hero p {
    font-size: 0.9rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: left;
  }

  .breadcrumb {
    justify-content: flex-start !important;
    flex-wrap: wrap;
  }

  /* ── Hero (home) ── */
  .hero {
    min-height: 80vh;
    padding: 5rem 4% 3rem;
  }

  .hero-image { display: none; }

  .hero h1 { font-size: clamp(1.8rem, 7vw, 2.4rem) !important; }

  .hero-btns { flex-wrap: wrap; gap: 0.8rem; }

  /* ── Section ── */
  .section {
    padding: 36px 4%;
  }

  /* ── Product Filter Buttons ── */
  .product-filter-row {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-bottom: 1.5rem;
  }

  .product-filter-row .btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  /* ── Products Grid ── */
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem;
  }

  .product-card-img {
    /* Let aspect-ratio handle height — no fixed height that crops images */
    aspect-ratio: 3 / 2;
  }

  .product-card-body {
    padding: 1rem;
  }

  /* ── Category Section Header ── */
  .cat-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  /* ── Gallery Filter Row ── */
  .gallery-filter-row {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-bottom: 1.5rem;
  }

  .gallery-filter-row .btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  /* ── Gallery Grid ── */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }

  .gallery-item {
    aspect-ratio: 1 / 1;
  }

  /* ── Dealer Benefits ── */
  .dealer-benefits-section {
    padding: 36px 4%;
  }

  .dealer-benefits-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  /* ── Dealer Banner ── */
  .dealer-banner {
    display: flex !important;
    flex-direction: column;
    gap: 2rem;
    padding: 30px 12px;
  }

  .dealer-banner h2 {
    font-size: 1.5rem !important;
  }

  /* ── Dealer Form ── */
  .dealer-form-box {
    padding: 1.2rem;
    border-radius: 12px;
  }

  .dealer-form-box h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-align: center;
  }

  .form-group {
    margin-bottom: 1rem;
  }

  .form-group label {
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 10px 14px;
  }

  .dealer-submit-btn {
    width: 100%;
    justify-content: center;
  }

  /* ── Forms ── */
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* Prevents iOS zoom */
  }

  /* ── Feature Icons ── */
  .feature-icons {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 2rem;
  }

  /* ── Contact Grid ── */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* ── Product Detail ── */
  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .product-image-box {
    min-height: auto;
    padding: 0;
  }

  .product-image-box img {
    max-height: 280px;
  }

  .product-actions {
    flex-direction: column;
    gap: 0.8rem;
  }

  .product-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* ── Tab Navigation ── */
  .tab-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .tab-btn {
    white-space: nowrap;
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  /* ── Stats Bar ── */
  .stats-bar {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem;
    padding: 36px 4%;
  }

  /* ── CTA Strip ── */
  .cta-strip {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
    padding: 36px 4%;
  }

  .cta-strip h2 {
    font-size: 1.5rem !important;
  }

  /* ── Why Grid ── */
  .why-grid {
    grid-template-columns: 1fr;
  }

  /* ── Cat Strip ── */
  .cat-strip-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ── Footer ── */
  .footer {
    padding: 36px 4% 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* ── Buttons ── */
  .btn {
    min-height: 44px;
  }

  /* ── Section Title ── */
  .section-title {
    font-size: 1.6rem !important;
  }
}

/* ════════════════════════════════
   SMALL MOBILE  ≤ 480px
════════════════════════════════ */
@media (max-width: 480px) {

  /* Single column everything */
  .products-grid {
    grid-template-columns: 1fr !important;
  }

  /* Product card image - squarer ratio on small phones */
  .product-card-img {
    aspect-ratio: 1 / 1;
  }

  /* Product detail image */
  .product-image-box {
    padding: 0;
  }

  .product-image-box img {
    max-height: 220px;
  }

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

  .gallery-item {
    aspect-ratio: 4 / 3;
  }

  .dealer-benefits-grid {
    grid-template-columns: 1fr !important;
  }

  .stats-bar {
    grid-template-columns: 1fr !important;
  }

  .cat-strip-grid {
    grid-template-columns: 1fr;
  }

  /* Hero buttons: stack */
  .hero-btns {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-btns .btn,
  .btn-lg {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* Page hero */
  .page-hero {
    padding: 28px 4% !important;
  }

  .page-hero h1 {
    font-size: 1.5rem !important;
  }

  /* Sections */
  .section {
    padding: 28px 4%;
  }

  .dealer-benefits-section {
    padding: 28px 4%;
  }

  /* Font size: prevents iOS auto-zoom */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
  }
  /* WhatsApp Pulse */
  .whatsapp-float {
    animation: whatsapp-pulse 2s infinite;
  }
}

@keyframes whatsapp-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}
