/* ============================================================
   Vishwanath Traders — PRODUCTS PAGE responsive (Samsung-style)
   Scoped to body#products-page so other pages stay unaffected.
   - Samsung-style side drawer nav (matches homepage)
   - Product cards stay IDENTICAL to desktop (only grid cols change)
   - Mobile filter bottom-sheet (sidebar hidden on mobile)
   ============================================================ */

/* ---- Navbar: hamburger + drawer, hide desktop nav ---- */
@media (max-width: 992px) {
  body#products-page .navbar .hamburger { display: flex; }
  /* Restore hamburger 3-bar icon (shared `.navbar *` rule zeroes all transforms) */
  body#products-page .navbar .hamburger span {
    position: absolute;
    left: 50%;
    margin-left: -11px;
    transform: translateY(0) !important;
  }
  body#products-page .navbar .hamburger span:nth-child(1) { transform: translateY(-7px) !important; }
  body#products-page .navbar .hamburger span:nth-child(2) { transform: translateY(0) !important; }
  body#products-page .navbar .hamburger span:nth-child(3) { transform: translateY(7px) !important; }
  body#products-page .navbar .hamburger.active span:nth-child(1) { transform: translateY(0) rotate(45deg) !important; }
  body#products-page .navbar .hamburger.active span:nth-child(2) { transform: translateY(0) !important; opacity: 0; }
  body#products-page .navbar .hamburger.active span:nth-child(3) { transform: translateY(0) rotate(-45deg) !important; }
  body#products-page .nav-center,
  body#products-page .nav-links { display: none; }
  body#products-page .navbar .cta-btn { display: none; }
  body#products-page .nav-right { gap: 4px; margin-left: auto; margin-right: 4px; }
  body#products-page .navbar { height: 60px; padding: 0 10px; }
  body#products-page .nav-container { height: 60px; }
  /* Golden diagonal navbar accent — slightly wider on mobile only (desktop untouched) */
  body#products-page .navbar::before { width: 47%; }

  /* Sticky offsets follow the 60px navbar */
  body#products-page .mobile-search-bar { top: 60px; }
  body#products-page .fs-bar { top: 60px; }
}

/* ---- Hero product banner & page intro — organised vertical rhythm ----
   Shared CSS pushed `.product-hero` 56px below the sticky search bar (big gap).
   We tighten it and give the banner balanced spacing all the way to the filter bar. */
@media (max-width: 992px) {
  body#products-page .product-hero { margin-top: 0; padding: 12px 0 20px; }
  body#products-page .product-hero-container { width: 100%; }
  body#products-page .product-carousel-banner {
    height: 200px;
    border-radius: 12px;
    margin: 0 12px 14px;
    width: auto;
  }
  body#products-page .product-carousel-banner .carousel-track img { height: 100%; width: 100%; object-fit: cover; }
  body#products-page .product-cards-row { margin-bottom: 20px; }
  body#products-page .section-divider--thick { margin-bottom: 10px; }
  body#products-page .section-divider--bottom { margin-top: 16px; }
  body#products-page .info-banner { margin: 16px 12px 8px; text-align: center; }
  body#products-page .info-banner h1 { font-size: 18px; line-height: 1.35; }
  body#products-page .info-banner p { font-size: 13px; max-width: 100%; }
}

/* ---- Hero category cards (Samsung floating square-cards) ----
   Mobile: organized 2x2 square grid (instead of 4 long vertical cards).
   Cards stay square & rounded like Samsung; desktop 4-in-row untouched. */
@media (max-width: 768px) {
  body#products-page .product-cards-row {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 0 auto 28px;
    padding: 0 12px;
    align-items: stretch;
  }
  body#products-page .product-card {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    padding: 0;
  }
  body#products-page .product-card img { width: 100%; height: 100%; object-fit: cover; }
  body#products-page .product-card .card-label { font-size: 15px; }
}

@media (max-width: 380px) {
  body#products-page .product-cards-row { gap: 10px; padding: 0 10px; }
}

/* ---- Filter area mobile: sidebar hidden, full-width grid ---- */
@media (max-width: 992px) {
  body#products-page .filter-sidebar { display: none; }
  body#products-page .filter-container { flex-direction: column; padding: 0 12px; }
  body#products-page .product-grid-container { width: 100%; }
  body#products-page .filter-toggle-mobile { display: inline-flex !important; align-items: center; gap: 6px; }
}

/* ---- Filter / Sort bar — Samsung-style organized ----
   Mobile: two clean rows.
     Row 1 (fs-left):  "All Products › All Displays (23 Products)" — compact title
     Row 2 (fs-right): [Filter btn] [scrollable category pills ...] [Sort ▾]
   Pills scroll horizontally; Filter & Sort stay pinned. */
@media (max-width: 992px) {
  body#products-page .fs-bar { padding: 12px 0; }
  body#products-page .fs-container {
    flex-direction: column;
    gap: 10px;
    padding: 0 12px;
    align-items: stretch;
  }
  body#products-page .fs-left {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px 8px;
    align-items: center;
  }
  body#products-page .fs-left .fs-heading { font-size: 16px; }
  body#products-page .fs-left .fs-count { font-size: 12px; white-space: nowrap; }

  /* Row 2: controls */
  body#products-page .fs-right {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow: hidden;
  }
  body#products-page .fs-pills {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  body#products-page .fs-pills::-webkit-scrollbar { display: none; }
  body#products-page .fs-pill { flex: 0 0 auto; font-size: 12px; padding: 5px 14px; }
  body#products-page .fs-sort { flex: 0 0 auto; margin-left: 0; }
  body#products-page .fs-select { font-size: 12px; padding: 6px 30px 6px 12px; }
  body#products-page .filter-toggle-mobile { flex: 0 0 auto; }
}

/* ---- Product cards: SAME card as desktop, only fewer columns ----
   Shared style.css compacts cards on mobile (120px images, tiny fonts).
   We restore the EXACT desktop card look; grid collapses to fewer cols. */
@media (max-width: 992px) {
  body#products-page .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  body#products-page .product-grid-card {
    width: 100%;
    height: auto;
    border-radius: 12px;
  }
  body#products-page .product-grid-card img {
    width: 100%;
    height: 230px;
    object-fit: contain;
    padding: 8px 8px 0;
    display: block;
    margin-top: 0;
  }
  body#products-page .product-content { margin-top: 0; padding: 8px 12px 0; }
  body#products-page .product-brand { font-size: 15px; }
  body#products-page .product-model { font-size: 14px; }
  body#products-page .product-title { font-size: 15px; -webkit-line-clamp: 3; }
  body#products-page .product-usage { font-size: 13px; }
  body#products-page .product-size { font-size: 15px; }
  body#products-page .product-divider { margin: 6px 0 10px; }
  body#products-page .product-cta { padding: 10px 12px 12px; }
  body#products-page .quote-btn { min-width: 0; width: 100%; height: 38px; font-size: 15px; }
}

@media (max-width: 768px) {
  body#products-page .product-grid-card img { height: 170px; }
}

@media (max-width: 480px) {
  /* Single column keeps each card at desktop-like proportions */
  body#products-page .product-grid { grid-template-columns: 1fr; gap: 16px; }
  body#products-page .product-grid-card img { height: 280px; }
}

/* ---- Footer cleanup (accordion-collapsed footer stays expanded) ---- */
@media (max-width: 992px) {
  body#products-page .footer h3,
  body#products-page .footer h4 {
    font-size: 15px !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: default !important;
    display: block !important;
    justify-content: flex-start !important;
    padding: 0 !important;
    margin: 0 0 12px !important;
    color: #E6C369 !important;
  }
  body#products-page .footer h3::after,
  body#products-page .footer h4::after { content: none !important; }
  body#products-page .footer .footer-col ul {
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  body#products-page .footer .footer-col ul li { font-size: 14px !important; margin-bottom: 9px !important; }
  body#products-page .footer .footer-col p:not(.legal):not(.tagline) {
    max-height: none !important;
    overflow: visible !important;
    padding: 0 0 6px !important;
    margin: 0 !important;
  }
  body#products-page .footer .footer-col { flex-direction: column; gap: 4px; }
  body#products-page .footer .footer-col > h4 { margin-top: 22px !important; }
  body#products-page .footer .footer-col:first-child h3 {
    font-size: 22px !important;
    text-transform: none;
    color: #FFFFFF !important;
    margin-bottom: 10px !important;
  }
  body#products-page .footer .footer-col:first-child p { font-size: 14px !important; line-height: 1.65 !important; }
  body#products-page .footer .footer-social { margin-top: 14px; }
  body#products-page .footer .footer-bottom { margin-top: 32px; }
}

@media (max-width: 768px) {
  body#products-page .footer .footer-container {
    grid-template-columns: 1fr 1fr !important;
    gap: 28px;
  }
  body#products-page .footer { padding: 40px 16px; }
}

@media (max-width: 420px) {
  body#products-page .footer .footer-container { grid-template-columns: 1fr !important; }
}

/* ============================================================
   Samsung-style mobile NAVIGATION DRAWER (products page)
   Full-height drawer sliding in from the RIGHT (same as homepage)
   ============================================================ */
@media (max-width: 992px) {
  body#products-page .mobile-menu-sheet {
    position: fixed !important;
    top: 0 !important;
    left: auto !important;
    right: 0 !important;
    width: min(360px, 88vw) !important;
    max-width: none !important;
    max-height: 100vh !important;
    height: 100vh !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s cubic-bezier(0.6, 0, 0.4, 1) !important;
    border-radius: 0 !important;
    box-shadow: -6px 0 30px rgba(0,0,0,0.18) !important;
    display: flex !important;
    flex-direction: column;
    pointer-events: auto;
    opacity: 1;
    z-index: 2000 !important;
  }
  body#products-page .mobile-menu-sheet.active {
    transform: translateX(0) !important;
    opacity: 1;
  }
  body#products-page .mobile-menu-sheet .menu-header {
    background: #0F3334;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 0;
    flex: 0 0 auto;
  }
  body#products-page .mobile-menu-sheet .menu-header img { height: 30px; }
  body#products-page .mobile-menu-sheet .menu-header .menu-header-brand {
    font-family: 'CalSans', sans-serif;
    font-size: 15px;
    color: #FFFFFF;
    flex: 1;
  }
  body#products-page .mobile-menu-sheet .menu-close {
    position: static;
    margin-left: auto;
    color: #FFFFFF;
    font-size: 26px;
    opacity: 0.9;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 2px 4px;
  }
  body#products-page .mobile-menu-sheet .menu-search {
    flex: 0 0 auto;
    position: relative;
    padding: 10px 16px;
    border-bottom: 1px solid #EAECEF;
    background: #FFFFFF;
  }
  body#products-page .mobile-menu-sheet .menu-search i {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    font-size: 14px;
    pointer-events: none;
  }
  body#products-page .mobile-menu-sheet .menu-search-input {
    width: 100%;
    padding: 10px 30px 10px 34px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #111827;
    background: #F9FAFB;
    outline: none;
  }
  body#products-page .mobile-menu-sheet .menu-search-input:focus {
    border-color: #0F3334;
    background: #FFFFFF;
  }
  body#products-page .mobile-menu-sheet .menu-search-results {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 100%;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
    z-index: 5;
    max-height: 220px;
    overflow-y: auto;
    display: none;
  }
  body#products-page .mobile-menu-sheet .menu-search-results.open { display: block; }
  body#products-page .mobile-menu-sheet .menu-search-results a {
    display: block;
    padding: 10px 14px;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #F3F4F6;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
  }
  body#products-page .mobile-menu-sheet .menu-search-results a:active,
  body#products-page .mobile-menu-sheet .menu-search-results a:hover { background: #F3F4F6; }
  body#products-page .mobile-menu-sheet .menu-list {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    list-style: none;
    padding: 6px 0;
    margin: 0;
  }
  body#products-page .mobile-menu-sheet .menu-list li.menu-label {
    font-family: 'CalSans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px 20px 6px;
  }
  body#products-page .mobile-menu-sheet .menu-list li:first-child.menu-label { padding-top: 10px; }
  body#products-page .mobile-menu-sheet .menu-list li a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 20px;
    color: #111827;
    text-decoration: none;
    font-size: 15px;
    font-family: 'Roboto', sans-serif;
    border-bottom: none;
    transition: background 0.15s;
  }
  body#products-page .mobile-menu-sheet .menu-list li a:active,
  body#products-page .mobile-menu-sheet .menu-list li a:hover { background: #F3F6F5; }
  body#products-page .mobile-menu-sheet .menu-list li a i {
    width: 20px;
    text-align: center;
    color: #0F3334;
    font-size: 15px;
  }
  body#products-page .mobile-menu-sheet .menu-footer {
    flex: 0 0 auto;
    border-top: 1px solid #EAECEF;
    padding: 14px 20px 20px;
    background: #FFFFFF;
  }
  body#products-page .mobile-menu-sheet .menu-footer .menu-footer-q {
    margin: 0 0 8px;
    font-size: 13px;
    color: #9CA3AF;
    font-family: 'Inter', sans-serif;
  }
  body#products-page .mobile-menu-sheet .menu-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
  }
  body#products-page .mobile-menu-sheet .menu-footer .menu-call-btn {
    background: #0F3334;
    color: #FFFFFF;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 15px;
    justify-content: center;
    margin-bottom: 8px;
  }
  body#products-page .mobile-menu-sheet .menu-footer .menu-contact-link {
    color: #0F3334;
    font-size: 14px;
    justify-content: center;
    padding: 4px;
  }
  body#products-page .mobile-menu-sheet .menu-footer .menu-call-btn i { color: #EBC569; }
  body#products-page .mobile-menu-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    display: none;
  }
  body#products-page .mobile-menu-overlay.active { display: block !important; }
}