/**
 * NirmanSathi - Frontend Stylesheet
 * 100% Responsive, Mobile-First, Modern Construction Marketplace UI
 */

/* =============================================================================
   1. CSS Reset & Global Layout
============================================================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
    font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
    background-color: var(--bg-page, #F8FAFC);
    color: var(--text-body, #334155);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Defensive: form controls (esp. <select> with long option text) default to a
   content-based min-width in most browsers and don't shrink in flex/grid
   containers unless capped — this is what was blowing out mobile layouts.
   min-width:0 overrides the browser's intrinsic min-content floor so these
   can actually shrink to fit; max-width:100% then keeps them in bounds. */
input, select, textarea, button {
    min-width: 0;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button, input, select, textarea {
    font-family: inherit;
}

.container {
    width: 100%;
    max-width: var(--max-w-container, 1200px);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* =============================================================================
   2. Top Announcement Bar
============================================================================= */
.topbar {
    background-color: var(--dark, #0F172A);
    color: #D1D5DB;
    font-size: 0.825rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--dark-muted, #1E293B);
}
.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.topbar-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.topbar-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.15s;
}
.topbar-link:hover {
    color: var(--primary, #F59E0B);
}
.location-badge {
    background: rgba(245, 158, 11, 0.15);
    color: var(--primary, #F59E0B);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full, 9999px);
    font-weight: 600;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* =============================================================================
   3. Main Header & Navigation
============================================================================= */
.header {
    background: var(--bg-surface, #FFFFFF);
    border-bottom: 1px solid var(--border, #E2E8F0);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
}
.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--dark, #0F172A);
    letter-spacing: -0.02em;
    flex-shrink: 0;
}
.brand-logo span {
    color: var(--primary, #F59E0B);
}

.header-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}
.search-form {
    display: flex;
    align-items: center;
    background: var(--bg-muted, #F1F5F9);
    border: 1px solid var(--border-dark, #CBD5E1);
    border-radius: var(--radius-full, 9999px);
    padding: 0.25rem 0.5rem 0.25rem 1.15rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-form:focus-within {
    border-color: var(--primary, #F59E0B);
    background: #FFF;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}
.search-input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    color: var(--text-main, #0F172A);
    outline: none;
    padding: 0.35rem 0;
    min-width: 0;
}
.search-btn {
    background: var(--primary, #F59E0B);
    color: #FFF;
    border: none;
    border-radius: var(--radius-full, 9999px);
    padding: 0.45rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.search-btn:hover {
    background: var(--primary-hover, #D97706);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main, #0F172A);
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-md, 0.375rem);
    transition: background 0.15s, color 0.15s;
    position: relative;
    white-space: nowrap;
}
.action-btn:hover {
    background: var(--bg-muted, #F1F5F9);
    color: var(--primary-dark, #B45309);
}
.badge-count {
    background: var(--primary, #F59E0B);
    color: #FFF;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: var(--radius-full, 9999px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0px;
    right: 0px;
}
.btn-whatsapp-header {
    background: #25D366;
    color: #FFF;
    border-radius: var(--radius-full, 9999px);
    padding: 0.45rem 0.85rem;
    font-size: 0.825rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn-whatsapp-header:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* =============================================================================
   Category Chips Navigation Bar (Modern Mobile-First Touch Bar)
============================================================================= */
.subnav {
    background: #FFFFFF;
    border-top: 1px solid var(--border-light, #F1F5F9);
    border-bottom: 1px solid var(--border, #E2E8F0);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    scrollbar-width: none;
    position: relative;
    z-index: 40;
}
.subnav::-webkit-scrollbar {
    display: none;
}
.subnav-container {
    width: 100%;
    max-width: var(--max-w-container, 1200px);
    margin: 0 auto;
    padding: 0.5rem 1rem;
}
.subnav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 0.55rem;
    min-width: max-content;
    padding: 2px 0;
}
.subnav-item a {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-body, #334155);
    background: var(--bg-muted, #F1F5F9);
    border: 1px solid var(--border, #E2E8F0);
    border-radius: var(--radius-full, 9999px);
    padding: 0.35rem 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.18s ease;
    text-decoration: none;
    user-select: none;
}
.subnav-item a:hover {
    background: var(--primary-light, #FEF3C7);
    border-color: var(--primary, #F59E0B);
    color: var(--primary-dark, #B45309);
    transform: translateY(-1px);
}
.subnav-item.active a {
    background: var(--primary, #F59E0B);
    border-color: var(--primary, #F59E0B);
    color: #FFFFFF;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}
.subnav-item.subnav-all a {
    background: var(--dark, #0F172A);
    color: #FFFFFF;
    border-color: var(--dark, #0F172A);
    font-weight: 700;
}
.subnav-item.subnav-all a:hover {
    background: var(--dark-surface, #1E293B);
    border-color: var(--dark-surface, #1E293B);
    color: var(--primary, #F59E0B);
}
.subnav-desktop-only {
    display: inline-block;
}

/* =============================================================================
   4. Hero Section
============================================================================= */
.hero {
    background: linear-gradient(135deg, #111827 0%, #1F2937 100%);
    color: #FFF;
    padding: 3rem 0 3.5rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.15) 0%, transparent 60%);
    pointer-events: none;
}
.hero-content {
    max-width: 760px;
    position: relative;
    z-index: 2;
}
.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #FCD34D;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full, 9999px);
    margin-bottom: 1rem;
    max-width: 100%;
}
.hero-title {
    font-size: clamp(1.85rem, 4.5vw, 3rem);
    font-weight: 900;
    line-height: 1.18;
    letter-spacing: -0.02em;
    margin-bottom: 0.85rem;
}
.hero-title span {
    color: var(--primary, #F59E0B);
}
.hero-sub {
    font-size: clamp(0.95rem, 2.2vw, 1.15rem);
    color: #D1D5DB;
    margin-bottom: 1.75rem;
    line-height: 1.55;
}
.hero-search-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    max-width: 580px;
    width: 100%;
}
.hero-search-input {
    flex: 1;
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-md, 0.375rem);
    border: none;
    font-size: 0.95rem;
    outline: none;
    min-width: 0;
    background: #FFF;
    color: #0F172A;
}
.hero-search-btn {
    white-space: nowrap;
    padding: 0.85rem 1.35rem;
    font-size: 0.95rem;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
}
.btn-primary {
    background: var(--primary, #F59E0B);
    color: #FFF;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-md, 0.375rem);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn-primary:hover {
    background: var(--primary-hover, #D97706);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}
.btn-outline-white {
    background: transparent;
    color: #FFF;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-md, 0.375rem);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.2s;
    text-align: center;
}
.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #FFF;
}

/* =============================================================================
   5. Trust Highlights Strip
============================================================================= */
.trust-strip {
    background: #FFF;
    border-bottom: 1px solid var(--border, #E2E8F0);
    padding: 1.5rem 0;
}
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.trust-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md, 0.375rem);
    background: var(--primary-light, #FEF3C7);
    color: var(--primary-dark, #B45309);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.trust-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main, #0F172A);
    margin-bottom: 0.1rem;
}
.trust-desc {
    font-size: 0.785rem;
    color: var(--text-muted, #64748B);
}

/* =============================================================================
   6. Sections & Headings
============================================================================= */
.section {
    padding: 2.75rem 0;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.section-title {
    font-size: clamp(1.4rem, 3.5vw, 1.85rem);
    font-weight: 800;
    color: var(--text-main, #0F172A);
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}
.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted, #64748B);
}
.section-link {
    color: var(--primary-dark, #B45309);
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}
.section-link:hover {
    text-decoration: underline;
}

/* =============================================================================
   7. Categories Grid
============================================================================= */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}
.cat-card {
    background: #FFF;
    border: 1px solid var(--border, #E2E8F0);
    border-radius: var(--radius-lg, 0.5rem);
    padding: 1.25rem 0.75rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 130px;
}
.cat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0,0,0,0.1));
    border-color: var(--primary, #F59E0B);
}
.cat-icon-wrap {
    width: 48px;
    height: 48px;
    background: var(--bg-muted, #F1F5F9);
    border-radius: var(--radius-full, 9999px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--primary-dark, #B45309);
    margin-bottom: 0.65rem;
    transition: background 0.2s, color 0.2s;
}
.cat-card:hover .cat-icon-wrap {
    background: var(--primary, #F59E0B);
    color: #FFF;
}
.cat-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-main, #0F172A);
    line-height: 1.3;
}

/* =============================================================================
   8. Product Cards & Grid
============================================================================= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}
.product-card {
    background: #FFF;
    border: 1px solid var(--border, #E2E8F0);
    border-radius: var(--radius-lg, 0.5rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    width: 100%;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0,0,0,0.1));
}
.product-thumb {
    height: 160px;
    background: var(--bg-muted, #F1F5F9);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.product-thumb img {
    max-height: 135px;
    max-width: 90%;
    object-fit: contain;
    transition: transform 0.3s;
}
.product-card:hover .product-thumb img {
    transform: scale(1.04);
}
.product-badge {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    background: var(--primary, #F59E0B);
    color: #FFF;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm, 0.25rem);
    text-transform: uppercase;
}
.product-details {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.product-brand {
    font-size: 0.725rem;
    font-weight: 600;
    color: var(--primary-dark, #B45309);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}
.product-title {
    font-size: 0.925rem;
    font-weight: 700;
    color: var(--text-main, #0F172A);
    line-height: 1.35;
    margin-bottom: 0.4rem;
    min-height: 2.7em;
}
.product-meta {
    font-size: 0.775rem;
    color: var(--text-muted, #64748B);
    margin-bottom: 0.75rem;
}
.product-price-box {
    margin-top: auto;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.product-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark, #0F172A);
}
.product-unit {
    font-size: 0.8rem;
    color: var(--text-muted, #64748B);
}
.product-retail {
    font-size: 0.8rem;
    text-decoration: line-through;
    color: var(--text-light, #94A3B8);
}
.product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}
.btn-quote {
    background: var(--dark, #0F172A);
    color: #FFF;
    border-radius: var(--radius-sm, 0.25rem);
    padding: 0.55rem 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-quote:hover {
    background: var(--dark-surface, #1E293B);
}
.btn-wa-card {
    background: #25D366;
    color: #FFF;
    border-radius: var(--radius-sm, 0.25rem);
    padding: 0.55rem 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}
.btn-wa-card:hover {
    background: #1eb857;
}

/* =============================================================================
   9. How It Works Strip
============================================================================= */
.how-it-works {
    background: #FFF;
    border-top: 1px solid var(--border, #E2E8F0);
    border-bottom: 1px solid var(--border, #E2E8F0);
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.75rem;
    position: relative;
}
.step-item {
    text-align: center;
}
.step-number {
    width: 42px;
    height: 42px;
    background: var(--primary, #F59E0B);
    color: #FFF;
    font-weight: 800;
    border-radius: var(--radius-full, 9999px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.85rem;
    font-size: 1rem;
}
.step-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main, #0F172A);
    margin-bottom: 0.3rem;
}
.step-desc {
    font-size: 0.85rem;
    color: var(--text-muted, #64748B);
    line-height: 1.45;
}

/* =============================================================================
   10. Lucknow Delivery Areas Pills
============================================================================= */
.locations-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.area-pill {
    background: #FFF;
    border: 1px solid var(--border, #E2E8F0);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full, 9999px);
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-body, #334155);
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.area-pill:hover {
    border-color: var(--primary, #F59E0B);
    background: var(--primary-light, #FEF3C7);
    color: var(--primary-dark, #B45309);
}

/* =============================================================================
   11. FAQ Accordion
============================================================================= */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}
.faq-card {
    background: #FFF;
    border: 1px solid var(--border, #E2E8F0);
    border-radius: var(--radius-md, 0.375rem);
    margin-bottom: 0.75rem;
    overflow: hidden;
}
.faq-question {
    padding: 1rem 1.25rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main, #0F172A);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #FFF;
    border: none;
    width: 100%;
    text-align: left;
    gap: 0.5rem;
}
.faq-question:hover {
    background: var(--bg-muted, #F1F5F9);
}
.faq-answer {
    padding: 0 1.25rem 1rem;
    font-size: 0.875rem;
    color: var(--text-body, #334155);
    line-height: 1.55;
}

/* =============================================================================
   12. Floating WhatsApp Button
============================================================================= */
.whatsapp-float {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    background: #25D366;
    color: #FFF;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full, 9999px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
    z-index: 999;
    transition: transform 0.2s, box-shadow 0.2s;
}
.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6);
}

/* =============================================================================
   13. Footer
============================================================================= */
.footer {
    background: var(--dark, #0F172A);
    color: #9CA3AF;
    padding: 3.5rem 0 1.75rem;
    font-size: 0.875rem;
    border-top: 1px solid var(--dark-muted, #1E293B);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}
.footer-title {
    color: #FFF;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.footer-links {
    list-style: none;
}
.footer-links li {
    margin-bottom: 0.55rem;
}
.footer-links a:hover {
    color: var(--primary, #F59E0B);
}
.footer-bottom {
    border-top: 1px solid var(--dark-muted, #1E293B);
    padding-top: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8rem;
}

/* =============================================================================
   14. Mobile Responsiveness Breakpoints
============================================================================= */
@media (max-width: 900px) {
    .header-search { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .topbar { display: none; }
    
    .header-inner {
        padding: 0.55rem 0;
        gap: 0.5rem;
    }
    .brand-logo {
        font-size: 1.15rem;
    }
    .brand-logo svg {
        width: 26px;
        height: 26px;
    }
    
    /* Collapse text labels into clean app icons */
    .action-btn .btn-text,
    .btn-whatsapp-header .btn-text {
        display: none;
    }
    .action-btn {
        padding: 0.4rem 0.5rem;
        font-size: 1.05rem;
    }
    .btn-whatsapp-header {
        padding: 0.4rem 0.6rem;
        font-size: 0.95rem;
    }
    
    /* Mobile Subnav: Show only Cement, Maurang/Sand, and All Materials */
    .subnav-desktop-only {
        display: none !important;
    }
    .subnav-container {
        padding: 0.45rem 0.65rem;
    }
    .subnav-list {
        display: flex;
        justify-content: space-between;
        width: 100%;
        min-width: 0;
        gap: 0.4rem;
        padding: 0;
    }
    .subnav-item {
        flex: 1;
        min-width: 0;
    }
    .subnav-item a {
        width: 100%;
        justify-content: center;
        padding: 0.45rem 0.35rem;
        font-size: 0.8rem;
        text-align: center;
        white-space: nowrap;
    }

    .hero {
        padding: 2.25rem 0 2.75rem;
    }
    .hero-title {
        font-size: 1.95rem;
    }
    .hero-search-form {
        flex-direction: column;
        gap: 0.45rem;
    }
    .hero-search-btn {
        width: 100%;
        justify-content: center;
    }
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    .hero-actions .btn-primary,
    .hero-actions .btn-outline-white {
        width: 100%;
        justify-content: center;
    }

    /* Catalog & Filter Sidebar Mobile Layout */
    .catalog-layout {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }
    .catalog-sidebar {
        display: none;
        width: 100%;
        background: #FFF;
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        padding: 1.25rem;
        box-shadow: var(--shadow-sm);
    }
    .catalog-sidebar.show-mobile {
        display: block !important;
        animation: fadeIn 0.2s ease-in-out;
    }
    .mobile-filter-toggle-wrap {
        display: block;
        margin-bottom: 1rem;
    }
    .btn-mobile-filter-toggle {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        background: #FFF;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        font-weight: 700;
        font-size: 0.875rem;
        color: var(--text-main);
        cursor: pointer;
        box-shadow: var(--shadow-sm);
        transition: all 0.15s;
    }
    .btn-mobile-filter-toggle.active {
        border-color: var(--primary);
        background: var(--primary-light);
        color: var(--primary-dark);
    }

    /* Universal Responsive Overrides for 2-Column Desktop Grids.
       NOTE: must be minmax(0, 1fr), NOT bare 1fr — a bare 1fr track defaults to
       minmax(auto, 1fr), so any unbreakable child (e.g. a <select> with long
       option text) still forces the track back open to its content width. */
    [style*="grid-template-columns: 260px"],
    [style*="grid-template-columns: 280px"],
    [style*="grid-template-columns: 1fr 400px"],
    [style*="grid-template-columns: 1fr 340px"],
    [style*="grid-template-columns: 1fr 360px"],
    [style*="grid-template-columns: 1fr 380px"],
    [style*="grid-template-columns: 1fr 1.2fr"],
    [style*="grid-template-columns: 1.2fr 1fr"],
    [style*="grid-template-columns: 2fr 1fr"],
    [style*="grid-template-columns: 2.5fr 1fr"],
    [style*="grid-template-columns: 1.2fr 1.6fr"],
    [style*="grid-template-columns: 1.4fr 1fr"],
    [style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 1.5rem !important;
    }

    /* Cart line-item row (thumbnail + details + price/remove) */
    [style*="grid-template-columns: 80px 1fr auto"] {
        grid-template-columns: 64px minmax(0, 1fr) !important;
        gap: 0.85rem !important;
    }
    [style*="grid-template-columns: 80px 1fr auto"] > img {
        width: 64px !important;
        height: 64px !important;
    }
    [style*="grid-template-columns: 80px 1fr auto"] > div:last-child {
        grid-column: 1 / -1 !important;
        text-align: left !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding-top: 0.5rem !important;
        border-top: 1px dashed var(--border-light, #F3F4F6) !important;
    }

    .trust-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .cat-card {
        padding: 1rem 0.5rem;
        min-height: 115px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.65rem;
        width: 100%;
    }
    .product-card {
        min-width: 0;
        max-width: 100%;
    }
    .product-thumb {
        height: 130px;
    }
    .product-details {
        padding: 0.65rem;
    }
    .product-title {
        font-size: 0.825rem;
        min-height: 2.6em;
        line-height: 1.3;
    }
    .product-price {
        font-size: 1.05rem;
    }
    .product-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.3rem;
    }
    .btn-quote, .btn-wa-card {
        padding: 0.45rem 0.25rem;
        font-size: 0.725rem;
        white-space: nowrap;
        justify-content: center;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

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

@media (max-width: 640px) {
    /* Form 2-Column Rows Collapse (minmax(0, 1fr), see note above) */
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns: 1.2fr 1fr"],
    [style*="grid-template-columns: 1.5fr 1fr"] {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 0.85rem !important;
    }

    /* RFP Dynamic Material Rows on Mobile */
    [style*="grid-template-columns: 2fr 1fr 1fr 40px"],
    .material-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
        background: #F8FAFC !important;
        padding: 0.85rem !important;
        border-radius: 8px !important;
        border: 1px solid #E2E8F0 !important;
        margin-bottom: 0.75rem !important;
    }
}

@media (max-width: 360px) {
    .brand-logo {
        font-size: 1rem;
    }
    .products-grid {
        grid-template-columns: 1fr;
    }
    .categories-grid {
        grid-template-columns: 1fr;
    }
    .product-actions {
        grid-template-columns: 1fr;
    }
}

/* Desktop Catalog & Filter Layout Defaults */
.catalog-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    align-items: start;
}
.catalog-sidebar {
    background: #FFF;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.mobile-filter-toggle-wrap {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
