/* ==========================================================================
   Alam Altawasol Electronics - Responsive Stylesheet
   Mobile-First & Breakpoint Refinements (1440px -> 320px)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. LARGE SCREENS (Below 1200px)
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .expertise-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .brands-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-main-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-brand-col {
    grid-column: span 2;
  }
}

/* --------------------------------------------------------------------------
   2. TABLETS & SMALL LAPTOPS (Below 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .primary-nav {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

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

  .expertise-header-row > div:first-child {
    padding-left: 0;
  }

  .expertise-header-row > div:first-child .eyebrow {
    position: static;
    margin-bottom: 18px;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .categories-grid .category-card:last-child {
    grid-column: span 2;
  }

  .feature-grid-power,
  .feature-grid-smart {
    text-align: center;
  }

  .feature-smart-section .feature-content {
    top: 20%;
    left: 48px;
    align-items: flex-start;
    text-align: left;
  }

  .feature-section .feature-content {
    top: 20%;
    left: 48px;
    align-items: flex-start;
    text-align: left;
  }

  .feature-content {
    max-width: 100%;
    align-items: center;
    margin: 0 auto;
  }

  .stats-grid-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .stats-content {
    align-items: center;
  }

  .stats-counter-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .uae-header-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .expertise-header-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .brands-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (min-width: 700px) and (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 36px;
  }

  .about-right { padding-top: 88px; }
}

/* --------------------------------------------------------------------------
   3. TABLETS PORTRAIT & LARGE PHONES (Below 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px;
  }

  .hero-section {
    min-height: 620px;
    padding: 0;
  }

  .feature-section {
    min-height: 480px;
    margin: 6px;
  }

  .feature-appliances-section {
    margin: 0 6px 6px;
  }

  .site-footer {
    margin: 6px;
  }

  .feature-section .feature-content {
    top: 14%;
    left: 28px;
    right: 28px;
  }

  .feature-section .feature-img-power {
    object-position: 62% center;
  }

  .about-headline {
    font-size: clamp(1.85rem, 6vw, 2.5rem);
    line-height: 1.24;
  }

  .about-right { padding-top: 0; }

  .hero-slide-content { top: 26%; }

  .hero-carousel-controls { bottom: 62px; }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

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

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

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

  .categories-grid .category-card:last-child {
    grid-column: span 1;
  }

  .blogs-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .stats-counter-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    text-align: center;
  }

  .footer-cta-box {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

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

  .footer-brand-col {
    grid-column: span 1;
  }

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

/* --------------------------------------------------------------------------
   4. MOBILE PHONES (Below 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .container,
  .container-wide,
  .container-narrow {
    width: calc(100% - 32px);
  }

  .brand-logo-img {
    height: 32px;
  }

  .btn-header-cta {
    display: none;
  }

  .hero-headline {
    font-size: 2.25rem;
  }

  .hero-section { min-height: 540px; margin: 5px; }

  .hero-slide-content { width: calc(100% - 32px); top: 25%; }

  .hero-carousel-controls { bottom: 56px; gap: 10px; }

  .hero-carousel-arrow { width: 28px; height: 28px; font-size: 0.95rem; }

  .hero-carousel-dot { width: 8px; height: 8px; }

  .typewriter-cursor { width: 2.5px; height: 0.82em; margin-left: 4px; }

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

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

  .brand-card {
    min-height: 110px;
    padding: 18px 16px;
  }

  .why-card {
    padding: 24px 20px;
  }

  .why-card-title {
    font-size: 1.2rem;
  }

  .why-card-desc {
    font-size: 0.88rem;
  }

  .stats-counter-row {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .footer-cta-title {
    font-size: 1.45rem;
  }

  .modal-card {
    padding: 24px 18px;
  }
}

/* --------------------------------------------------------------------------
   5. EXTRA SMALL PHONES (Below 360px)
   -------------------------------------------------------------------------- */
@media (max-width: 360px) {
  .hero-headline {
    font-size: 1.95rem;
  }

  .stats-counter-row {
    grid-template-columns: 1fr;
  }

  .eyebrow {
    font-size: 0.65rem;
    padding: 5px 12px;
  }
}
