/* ── Large Desktop (1400px+) ── */
@media (min-width: 1400px) {
  :root {
    --container-max: 1360px;
  }

  .hero-headline {
    font-size: 4.8rem;
  }

  .hero-float-el.el-2 {
    right: 10%;
  }
}

/* ── Desktop (1024px - 1399px) ── */
@media (max-width: 1399px) {
  .hero-float-el.el-2 {
    display: none;
  }
}

/* ── Tablet Landscape (992px - 1199px) ── */
@media (max-width: 1199px) {
  :root {
    --section-padding: 80px 0;
  }

  .overview-grid {
    gap: 48px;
  }

  .collage-img--large {
    height: 340px;
  }

  .collage-img--top,
  .collage-img--bottom {
    height: 162px;
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-item:nth-child(2) {
    border-right: none;
  }

  .stat-item:nth-child(3) {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .stat-item:nth-child(4) {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
}

/* ── Tablet Portrait (768px - 991px) ── */
@media (max-width: 991px) {
  :root {
    --section-padding: 70px 0;
  }

  /* Top Header */
  .top-header-left .email-link {
    display: none;
  }

  .top-header-inner {
    gap: 12px;
  }

  /* Navbar */
  .navbar-nav-links {
    display: none;
  }

  .navbar-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Hero */
  .hero-float-el {
    display: none;
  }

  .hero-headline {
    font-size: 2.6rem;
  }

  /* Overview */
  .overview-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .overview-header {
    margin-bottom: 36px;
  }

  .overview-visual {
    order: -1;
  }

  .collage-img--large {
    height: 300px;
  }

  .collage-img--top,
  .collage-img--bottom {
    height: 144px;
  }

  .collage-badge {
    bottom: -12px;
    left: -8px;
  }

  .overview-stats-row {
    gap: 0;
  }

  /* Why Us */
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .stat-item:nth-child(2) {
    border-top: none;
  }

  .stat-item:last-child {
    border-bottom: none;
  }

  /* Certifications */
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-strip {
    gap: 20px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  /* Products swiper stays clipped */
}

/* ── Mobile (below 768px) ── */
@media (max-width: 767px) {
  :root {
    --section-padding: 60px 0;
  }

  body {
    font-size: 15px;
  }

  /* Top Header */
  #top-header {
    padding: 7px 0;
  }

  .top-header-inner {
    flex-direction: row;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
  }

  .top-header-left {
    flex-wrap: nowrap;
    gap: 10px;
    font-size: 0.74rem;
  }

  .top-header-right {
    gap: 8px;
  }

  .social-icons-top {
    display: none;
  }

  .top-bar-divider {
    display: none;
  }

  /* Navbar */
  .navbar-logo img {
    height: 42px;
  }

  .navbar-inner {
    padding: 12px 0;
  }

  /* Hero */
  #hero {
    min-height: 600px;
  }

  .hero-headline {
    font-size: 2rem;
  }

  .hero-desc {
    font-size: 0.92rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .hero-actions .btn-primary-gl,
  .hero-actions .btn-outline-gl {
    width: 100%;
    justify-content: center;
    max-width: 100%;
  }

  .scroll-indicator {
    display: none;
  }

  .hero-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 0.85rem;
  }

  .hero-prev {
    left: 12px !important;
  }

  .hero-next {
    right: 12px !important;
  }

  /* Overview */
  .overview-grid {
    gap: 32px;
  }

  .overview-collage {
    grid-template-columns: 1fr 0.7fr;
    gap: 8px;
  }

  .collage-img--large {
    height: 240px;
  }

  .collage-img--top,
  .collage-img--bottom {
    height: 114px;
  }

  .collage-badge {
    left: -4px;
    bottom: -10px;
    padding: 12px 16px;
  }

  .collage-badge-num {
    font-size: 1.8rem;
  }

  .overview-stats-row {
    flex-wrap: wrap;
  }

  .overview-stat {
    min-width: 80px;
  }

  /* Why Us */
  .why-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .why-card {
    padding: 28px 22px;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-item {
    padding: 28px 16px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  /* Certifications */
  .cert-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .cert-badge {
    padding: 20px 16px 16px;
  }

  .cert-body {
    padding: 14px 14px 16px;
  }

  .trust-strip {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    padding: 24px;
  }

  /* CTA */
  .cta-actions {
    flex-direction: column;
    align-items: center;
  }

  .cta-actions .btn-white-gl,
  .cta-actions .btn-outline-gl {
    width: 100%;
    justify-content: center;
    max-width: 320px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .footer-bottom-links {
    justify-content: center;
  }

  /* WhatsApp */
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
  }

  .whatsapp-btn {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }

  .whatsapp-tooltip {
    display: none;
  }
}

/* ── Small Mobile (below 480px) ── */
@media (max-width: 479px) {
  .hero-headline {
    font-size: 1.75rem;
  }

  .cert-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .top-header-left {
    font-size: 0.7rem;
    gap: 8px;
  }

  .top-whatsapp {
    padding: 4px 10px;
    font-size: 0.72rem;
  }

  .top-lang-btn {
    padding: 4px 7px;
    font-size: 0.72rem;
  }

  .container-xl {
    padding: 0 16px;
  }
}

/* ── Print ── */
@media print {
  #top-header,
  #main-navbar,
  .hero-nav-btn,
  .scroll-indicator,
  .whatsapp-float,
  #footer {
    display: none;
  }

  #hero {
    min-height: auto;
  }
}

/* ── RTL Support Preparation ── */
[dir="rtl"] {
  .top-header-left {
    flex-direction: row-reverse;
  }

  .top-header-right {
    flex-direction: row-reverse;
  }

  .navbar-inner {
    flex-direction: row-reverse;
  }

  .overview-grid {
    direction: rtl;
  }

  .footer-grid {
    direction: rtl;
  }

  .footer-links a {
    flex-direction: row-reverse;
  }

  .footer-contact-item {
    flex-direction: row-reverse;
  }
}

/* ── About Us v5 — Responsive ── */
@media (max-width: 960px) {
  .ov-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .ov-collage {
    order: -1;
  }

  .ov-col-img--top {
    height: 260px;
  }

  .ov-col-img--bl,
  .ov-col-img--br {
    height: 160px;
  }
}

@media (max-width: 600px) {
  .ov-pillars {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   PRODUCT DETAILS PAGE — Responsive Fixes
   ============================================================ */

/* ── Tablet Portrait (below 991px) ── */
@media (max-width: 991px) {
  .pd-page-hero {
    min-height: 260px;
    padding-bottom: 36px;
  }

  .pd-page-hero-title {
    font-size: 1.8rem;
  }

  .pd-page-hero-subtitle {
    font-size: 0.88rem;
  }

  .product-details-hero {
    padding: 40px 0;
  }
}

/* ── Mobile (below 768px) ── */
@media (max-width: 767px) {
  /* Hero */
  .pd-page-hero {
    min-height: 220px;
    padding-bottom: 28px;
  }

  .pd-page-hero-title {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .pd-page-hero-subtitle {
    font-size: 0.84rem;
  }

  .pd-page-hero-breadcrumb {
    font-size: 0.75rem;
    flex-wrap: wrap;
    gap: 4px;
  }

  /* Main section */
  .product-details-hero {
    padding: 28px 0 40px;
  }

  /* Image slider */
  .pd-main-swiper {
    height: 280px;
  }

  /* Specs table — fix the fixed 160px column causing overflow */
  .pd-spec-row {
    grid-template-columns: 1fr;
  }

  .pd-spec-label {
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 8px 16px;
    font-size: 0.78rem;
  }

  .pd-spec-value {
    padding: 8px 16px;
    font-size: 0.82rem;
  }

  .pd-specs-title {
    font-size: 0.75rem;
    padding: 10px 16px;
  }

  /* Cert badges */
  .pd-cert-badges {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Product title */
  .pd-title {
    font-size: 1.5rem;
    word-break: break-word;
  }

  /* Actions buttons */
  .pd-actions {
    flex-direction: column;
    gap: 10px;
  }

  .pd-actions .btn-primary-gl,
  .pd-actions .btn-dark-gl {
    width: 100%;
    justify-content: center;
  }

  /* Description */
  .pd-description {
    font-size: 0.88rem;
  }

  /* Related products section */
  .related-section-header {
    text-align: center;
  }

  .related-section-header .section-title {
    font-size: 1.6rem;
  }
}

/* ── Small Mobile (below 480px) ── */
@media (max-width: 479px) {
  .pd-page-hero-title {
    font-size: 1.3rem;
  }

  .pd-main-swiper {
    height: 240px;
  }

  .pd-thumb-swiper .swiper-wrapper {
    height: 70px;
  }

  .pd-thumb-swiper .swiper-slide {
    height: 70px !important;
  }

  .pd-title {
    font-size: 1.3rem;
  }

  .pd-cert-badge {
    font-size: 0.72rem;
    padding: 3px 10px;
  }
}
