/* =========================================
   RS Event Hire - Responsive Overrides
   ========================================= */

#site-header,
#site-footer,
#site-extras {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 1100px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .catalog-layout { grid-template-columns: 1fr; gap: 24px; }
  .filter-sidebar {
    position: static;
    margin-bottom: 8px;
  }
  .detail-grid { gap: 32px; }
  .guide-grid { grid-template-columns: 1fr; }
  .rail-nav { display: none; }

  .d-none-mobile { display: none !important; }
  .nav-toggle { display: grid; place-items: center; }
  .header-cta { display: none; }

  .main-nav {
    position: fixed;
    top: calc(var(--header-h) + var(--topbar-h));
    left: 0;
    right: 0;
    z-index: 150;
    background: #0a0a0a;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 24px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    transform: translateY(-130%);
    transition: transform 300ms ease;
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - var(--header-h) - var(--topbar-h));
    overflow-y: auto;
    overflow-x: hidden;
    gap: 0;
    pointer-events: none;
  }
  .main-nav.open {
    transform: translateY(0);
    pointer-events: auto;
  }
  .main-nav > a,
  .main-nav .nav-dropdown-toggle {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #e8e8e8;
    width: 100%;
    justify-content: space-between;
    white-space: normal;
  }
  .main-nav > a.active::after,
  .main-nav .nav-dropdown.active > .nav-dropdown-toggle::after { display: none; }

  .nav-dropdown { width: 100%; }
  .nav-dropdown-menu {
    position: static;
    transform: none !important;
    min-width: auto;
    box-shadow: none;
    border: none;
    background: var(--color-bg);
    padding: 4px 8px;
    margin: 4px 0 8px;
    border-radius: var(--radius-sm);
    opacity: 1;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transition: max-height 250ms ease, padding 200ms ease, visibility 0s linear 250ms;
  }
  .nav-dropdown-menu::before { display: none; }
  .nav-dropdown.open .nav-dropdown-menu {
    visibility: visible;
    max-height: 600px;
    transition: max-height 350ms ease, padding 200ms ease, visibility 0s;
  }
  .nav-dropdown-menu a { padding: 10px 8px; }

  .logo-img {
    height: 52px !important;
    max-height: 52px !important;
    max-width: min(160px, 38vw) !important;
  }
  .site-footer .logo-img {
    height: 80px !important;
    max-height: 80px !important;
    max-width: 200px !important;
  }

  .detail-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  #quoteLayout { grid-template-columns: 1fr !important; }
}

@media (max-width: 900px) {
  .section { padding: 60px 0; }
  .topbar-info { gap: 14px; font-size: 12px; }

  .hero-slide,
  .hero-slide.active {
    transform: none;
    transition: opacity 0.7s ease, visibility 0s linear 0.7s;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #0a0a0a;
  }
  .hero-slide.active {
    transition: opacity 0.7s ease, visibility 0s;
  }
  .hero-slide::before {
    background: linear-gradient(110deg, rgba(0, 0, 0, 0.75) 0%, rgba(10, 10, 10, 0.45) 55%, rgba(0, 0, 0, 0.3) 100%);
  }
}

/* Tablet: tune hero & card imagery */
@media (max-width: 768px) {
  .hero-slide {
    background-size: contain;
    background-position: center center;
    background-color: #0a0a0a;
  }
  .category-card-img,
  .product-card-img:not(.product-card-img--contain) {
    aspect-ratio: 16 / 10;
  }
  .range-card { min-height: 260px; }
  .range-card-img { background-position: center center; }
}

@media (max-width: 600px) {
  :root { --header-h: 72px; --topbar-h: 0px; }
  .container { padding-left: 16px; padding-right: 16px; }
  .topbar { display: none; }
  .section { padding: 48px 0; }

  .main-nav {
    top: var(--header-h);
    max-height: calc(100vh - var(--header-h));
  }

  .site-header .container {
    gap: 10px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero, .hero-track {
    min-height: min(58svh, 480px);
    max-height: none;
  }
  .hero-slide {
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #0a0a0a;
  }
  .hero-content {
    padding: 40px 0 80px;
    max-width: 100%;
  }
  .hero h1 { font-size: clamp(1.65rem, 7vw, 2.25rem); margin-bottom: 14px; }
  .hero p { font-size: 15px; line-height: 1.55; margin-bottom: 24px; }
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .hero-cta .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }
  .hero-nav { display: none; }
  .hero-dots {
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero-dots button {
    width: 28px;
    min-height: 8px;
    padding: 0;
  }

  .guide-card { grid-template-columns: 1fr; }
  .guide-card-img { min-height: 180px; }
  .guide-grid { gap: 16px; }
  .range-card { min-height: 220px; }
  .range-grid { gap: 16px; }
  .range-card-img {
    background-size: cover;
    background-position: center center;
  }
  .product-rail > .product-card { flex: 0 0 min(220px, 85vw); }
  .product-rail > .product-card .product-card-img {
    aspect-ratio: 16 / 10;
  }

  .trust-strip .container {
    justify-content: flex-start;
    gap: 16px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    scrollbar-width: none;
    max-width: 100%;
  }
  .trust-strip .container::-webkit-scrollbar { display: none; }
  .trust-item {
    flex: 0 0 auto;
    min-width: 140px;
    max-width: 200px;
  }

  .promo-bar {
    font-size: 11px;
    padding: 8px 12px;
    line-height: 1.4;
    text-align: center;
    white-space: normal;
  }
  .promo-bar a { display: inline-block; margin-top: 2px; }
  .logo-mark { height: 42px; max-width: 96px; }

  .footer-cols { grid-template-columns: 1fr; gap: 32px; padding-bottom: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .catalog-layout { gap: 16px; }
  .filter-sidebar {
    padding: 16px;
    margin-bottom: 0;
  }
  .filter-group { padding: 12px 0; }
  .filter-chips { gap: 6px; }
  .chip {
    padding: 8px 12px;
    font-size: 12px;
    min-height: 36px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .category-card-img img,
  .product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  .category-card-img--contain {
    aspect-ratio: 3 / 4;
    max-height: min(72vw, 320px);
  }
  .category-card-img--contain img {
    object-fit: contain;
    object-position: center;
    padding: 12px;
  }
  .product-card-img:not(.product-card-img--contain) {
    aspect-ratio: 16 / 10;
    max-height: none;
  }
  .product-card-img--contain {
    aspect-ratio: 4 / 3;
    max-height: min(72vw, 320px);
  }
  .product-card-img--contain img {
    padding: 10px;
    object-fit: contain;
    object-position: center;
  }
  .product-card-marquee-specs strong {
    word-break: break-word;
    text-align: right;
    max-width: 58%;
  }
  .detail-gallery-main {
    aspect-ratio: 4 / 3;
    max-height: min(70vw, 72svh);
  }
  .detail-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  .detail-gallery-main--contain {
    aspect-ratio: 1 / 1;
    max-height: min(85vw, 360px);
  }
  .detail-gallery-main--contain img {
    padding: 12px;
    object-fit: contain;
    object-position: center;
  }
  .detail-gallery-thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
  }
  .detail-gallery-thumbs img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
  }
  .about-image {
    aspect-ratio: 4 / 3;
    max-height: min(70vw, 360px);
  }
  .about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  .guide-card-img {
    min-height: 200px;
    aspect-ratio: 16 / 10;
    background-size: cover;
    background-position: center;
  }
  .product-card-body { padding: 14px 14px 16px; }
  .product-card-body h3 { font-size: 14px; }
  .product-actions { flex-direction: column; }
  .product-actions .btn { width: 100%; min-height: 44px; }

  .category-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  .product-grid[style] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .product-grid[style] img {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 20px;
  }
  .toolbar-controls { width: 100%; }
  .toolbar-controls .select-control {
    width: 100%;
    min-height: 44px;
    max-width: 100%;
  }

  .nav-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .page-banner {
    padding: 40px 0 32px;
    overflow: hidden;
  }
  .page-banner h1 { font-size: clamp(1.5rem, 6vw, 2rem); }
  .page-banner p {
    font-size: 14px;
    line-height: 1.5;
    padding-right: 0;
  }
  .section-title { margin-bottom: 32px; }
  .section-title p { padding: 0 4px; }

  .cta-banner-inner { text-align: center; padding: 0 8px; }
  .cta-banner .btn { width: 100%; max-width: 320px; }

  .form-card { padding: 22px; }
  .calc-card { padding: 20px; }
  .calc-row { grid-template-columns: 1fr; }

  .contact-info-card { padding: 20px; }
  .faq-grid { grid-template-columns: 1fr !important; }
  .map-embed { height: 240px; }

  .fab-whatsapp { bottom: 16px; right: 16px; width: 50px; height: 50px; font-size: 22px; }
  .drawer { width: 100%; max-width: 100%; }

  .lightbox img { max-width: calc(100vw - 32px); }
}

@media (max-width: 380px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
}
