/* ===== features\catalogue\search.css ===== */
/* ==========================================================
   SEARCH
   One shared visual treatment. Behaviour remains page-aware in JS.
========================================================== */

.catalogue-search {
    position: relative;
    z-index: 1;
    padding: 0;
    background: transparent;
    border: 0;
}

.catalogue-search .container {
    padding-top: 0;
    padding-bottom: 0;
}

.catalogue-search .search-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    max-width: 700px;
    min-height: 58px;
    padding: 5px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 13px;
    box-shadow: 0 16px 38px var(--overlay-black-12);
}

.catalogue-search .search-box {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.catalogue-search .search-input {
    display: block;
    width: 100%;
    min-width: 0;
    height: 48px;
    margin: 0;
    padding: 14px 52px 14px 48px;
    border: 0;
    border-radius: 9px;
    box-shadow: none;
    outline: none;
}

.catalogue-search .search-input:focus {
    box-shadow: none;
}

.catalogue-search .search-input:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.catalogue-search .search-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 2;
    width: 18px;
    height: 18px;
    opacity: .5;
    transform: translateY(-50%);
    pointer-events: none;
}

.catalogue-search .clear-search {
    position: absolute;
    top: 50%;
    right: 10px;
    z-index: 3;
    display: none;
    width: 30px;
    height: 30px;
    padding: 0;
    margin: 0;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.catalogue-search .search-results {
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    width: 100%;
}

.catalogue-search #searchButton {
    flex: 0 0 118px;
    width: 118px;
    min-width: 118px;
    height: 48px;
    padding-inline: 14px;
    border-radius: 9px;
    white-space: nowrap;
}

/* Voice UI is optional and remains hidden from the shared visual control. */
.catalogue-search .voice-language,
.catalogue-search .voice-language[hidden],
.catalogue-search .voice-search {
    display: none !important;
    visibility: hidden !important;
}

/* The homepage uses the same control inside its hero; only placement changes. */
.home-hero-search .catalogue-search .container {
    padding-inline: 0;
}

@media (max-width: 768px) {
    .catalogue-search .search-wrapper {
        min-height: 52px;
    }

    .catalogue-search .search-input {
        height: 42px;
        padding: 11px 38px 11px 40px;
        font-size: .86rem;
    }

    .catalogue-search .search-icon {
        left: 13px;
        width: 17px;
        height: 17px;
    }

    .catalogue-search #searchButton {
        flex: 0 0 48px;
        width: 48px;
        min-width: 48px;
        height: 42px;
        padding: 0;
        border-radius: 0 8px 8px 0;
        font-size: 0;
    }

    .catalogue-search #searchButton::before {
        content: "⌕";
        font-size: 22px;
        line-height: 1;
    }
}

@media (max-width: 420px) {
    .catalogue-search #searchButton {
        flex-basis: 46px;
        width: 46px;
        min-width: 46px;
    }
}


/* ===== features\catalogue\grids.css ===== */
/* ==========================================================
   GRID LAYOUTS
========================================================== */

.entity-grid,
.product-grid,
.products-grid,
.brand-grid,
.brands-grid,
.vehicle-grid,
.vehicles-grid,
.category-grid,
.categories-grid,
#categoryGrid {

    display: grid;

    grid-template-columns: repeat(5, minmax(0, 1fr));

    gap: 18px;

    width: 100%;

    max-width: 1500px;

    margin: 0 auto;

}

.brand-grid {

    position: relative;

    max-height: 720px;

    overflow: hidden;

}

.vehicle-grid {

    display: grid;

    grid-template-columns: repeat(4,1fr);

    gap: 24px;

    position: relative;

    max-height: 720px;

    overflow: hidden;

}

#vehicle-grid {

    display: grid;

    grid-template-columns: repeat(4,minmax(0,1fr));

    gap: 32px;

}




/* Directory grids use their own feature module; no duplicate overrides here. */


/* ==========================================================
   RESPONSIVE CATALOGUE GRIDS
========================================================== */

@media (max-width: 1200px) {
    .entity-grid,
    .category-grid,
    .categories-grid,
    #categoryGrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .brand-grid,
    .brands-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
    .vehicle-grid,
    .vehicles-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .entity-grid,
    .category-grid,
    .categories-grid,
    #categoryGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .brand-grid,
    .brands-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .vehicle-grid,
    .vehicles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .product-grid,
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .entity-grid,
    .category-grid,
    .categories-grid,
    #categoryGrid,
    .vehicle-grid,
    .vehicles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .brand-grid,
    .brands-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

@media (max-width: 359px) {
    .product-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================
   ENTITY PRODUCT GALLERIES
========================================================== */
.entity-product-galleries {
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 100%;
    min-width: 0;
}
.entity-product-gallery { width: 100%; min-width: 0; }
.entity-product-gallery__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}
.entity-product-gallery__header h2 {
    margin: 0;
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.2;
}
.entity-product-gallery__count {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.3;
    color: var(--text-secondary);
}
.entity-product-gallery__view-all {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    text-decoration: none;
}
.entity-product-gallery__viewport {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
    padding: 2px 2px 12px;
}
.entity-product-gallery__viewport:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
    border-radius: 8px;
}
.entity-product-gallery__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 208px;
    gap: 14px;
    width: max-content;
    min-width: 100%;
}
.entity-product-gallery__track .product-card {
    width: 208px;
    min-width: 208px;
    scroll-snap-align: start;
}
@media (max-width: 1024px) {
    .entity-product-gallery__track { grid-auto-columns: 194px; }
    .entity-product-gallery__track .product-card { width: 194px; min-width: 194px; }
}
@media (max-width: 767px) {
    .entity-product-galleries { gap: 22px; }
    .entity-product-gallery__header { align-items: center; gap: 10px; margin-bottom: 10px; }
    .entity-product-gallery__header h2 { font-size: 18px; }
    .entity-product-gallery__view-all { font-size: 12px; }
    .entity-product-gallery__track { grid-auto-columns: 168px; gap: 10px; }
    .entity-product-gallery__track .product-card { width: 168px; min-width: 168px; }
    .entity-product-gallery__viewport { padding-bottom: 10px; }
}
@media (max-width: 380px) {
    .entity-product-gallery__track { grid-auto-columns: 148px; gap: 10px; }
    .entity-product-gallery__track .product-card { width: 148px; min-width: 148px; }
    .entity-product-gallery__header h2 { font-size: 17px; }
    .entity-product-gallery__view-all { font-size: 11px; }
}


/* ===== features\catalogue\directory.css ===== */
/* ==========================================================
   STATES
========================================================== */

.no-results,
.loading-state {

    padding: 80px 20px;

    text-align: center;

}

.no-results[hidden],
.loading-state[hidden] {
    display: none !important;
}


/* ==========================================================
   BRAND DIRECTORY
========================================================== */

.brand-grid-wrapper {

    position: relative;

}

.brand-fade {

    position: absolute;

    left: 0;

    right: 0;

    bottom: 0;

    height: 90px;

    z-index: 1;

    pointer-events: none;

    background: linear-gradient(transparent,var(--bg-card));

}

.brands-expanded .brand-grid {

    max-height: none;

}

.brands-expanded .brand-fade {

    display: none;

    pointer-events: none;

}

.show-more-wrapper {

    position: relative;

    z-index: 2;

    margin-top: 40px;

    text-align: center;

}

.brands-expanded .show-more-wrapper {

    display: none;

}



/* ==========================================================
   DIRECTORY EXPAND/COLLAPSE
========================================================== */

.directory-collapsed {

    position: relative;

    max-height: 1200px;

    overflow: hidden;

}

.directory-expanded {

    max-height: none;

}

.directory-fade {

    position: absolute;

    left: 0;

    right: 0;

    bottom: 0;

    height: 180px;

    pointer-events: none;

    background: linear-gradient(
        var(--overlay-white-00),
        var(--overlay-white-100)
    );

}

.directory-expanded .directory-fade {

    display: none;

}
/* Keep the brand directory intentionally compact. This rule comes after the
   shared four-column grid so it remains authoritative on desktop. */
.brand-grid,
.brands-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}


/* Smart-search recovery chips */
.search-suggestions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 720px;
    margin: 20px auto 28px;
}

.search-suggestions-label {
    width: 100%;
    margin-bottom: 2px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.search-suggestion {
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-card);
    padding: 8px 14px;
    font: inherit;
    cursor: pointer;
}

.search-suggestion:hover {
    border-color: currentColor;
}

.search-suggestion:focus-visible {
    border-color: currentColor;
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}


/* ===== site-theme.css ===== */
/* ==========================================================
   SOUVIKS SITE-WIDE THEME
   Shared presentation layer for non-home pages.
   The homepage remains the visual reference; this layer keeps
   typography, containers, heroes, cards and responsive spacing
   consistent without replacing page-specific functionality.
========================================================== */

.site-page {
    background: var(--bg-body);
}

.site-page main {
    overflow-x: clip;
}

.site-page > main,
.index-page > main {
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
}


/* ==========================================================
   SHARED PAGE HERO
========================================================== */

.site-page .page-hero,
.site-page .catalogue-hero,
.site-page .products-hero,
.site-page .brands-hero,
.site-page .categories-hero,
.site-page .vehicles-hero,
.site-page .about-hero,
.site-page .contact-hero,
.site-page .request-quote-hero,
.site-page .privacy-hero,
.site-page .terms-hero,
.site-page .refund-hero {
    position: relative;
    min-height: 340px;
    padding: 64px 0;
    background-color: var(--bg-body);
    background-image: linear-gradient(90deg, var(--overlay-white-98) 0%, var(--overlay-white-90) 36%, var(--overlay-white-35) 68%, var(--overlay-white-00) 100%), var(--hero-image, none);
    background-position: center right;
    background-size: cover;
    color: var(--text-primary);
    text-align: left;
}

.site-page .page-hero::before {
    background: transparent;
}

.site-page .hero-content {
    position: relative;
    z-index: 2;
    width: min(100%, 700px);
    max-width: 700px;
    margin: 0;
    text-align: left;
}

.site-page .page-hero h1,
.site-page .catalogue-hero h1,
.site-page .products-hero h1,
.site-page .brands-hero h1,
.site-page .categories-hero h1,
.site-page .vehicles-hero h1,
.site-page .about-hero h1,
.site-page .contact-hero h1,
.site-page .request-quote-hero h1,
.site-page .privacy-hero h1,
.site-page .terms-hero h1,
.site-page .refund-hero h1 {
    max-width: 700px;
    margin: 0 0 12px;
    color: var(--text-primary);
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.04;
    letter-spacing: -.035em;
}

.site-page .page-hero p,
.site-page .catalogue-hero p,
.site-page .products-hero p,
.site-page .brands-hero p,
.site-page .categories-hero p,
.site-page .vehicles-hero p,
.site-page .about-hero p,
.site-page .contact-hero p,
.site-page .request-quote-hero p,
.site-page .privacy-hero p,
.site-page .terms-hero p,
.site-page .refund-hero p {
    max-width: 660px;
    margin: 0;
    color: var(--text-secondary);
    font-size: .98rem;
    line-height: 1.6;
}

.site-page .hero-stats {
    justify-content: flex-start;
    width: fit-content;
    max-width: 100%;
    margin: 24px 0 0;
    padding: 12px 14px;
    gap: 0;
    background: var(--overlay-white-90);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.site-page .hero-stat {
    min-width: 150px;
    padding: 7px 20px;
    text-align: left;
}

.site-page .hero-stat .stat-number {
    color: var(--text-primary);
    font-weight: 800;
}

.site-page .hero-stat .stat-label {
    color: var(--text-secondary);
}

/* ==========================================================
   SHARED SECTION RHYTHM
========================================================== */

.site-page .section-spacing,
.site-page .catalogue-summary,
.site-page .catalogue-products,
.site-page .section-heading {
    scroll-margin-top: 80px;
}

.site-page .section-spacing {
    padding: 48px 0;
}

.site-page .section-heading {
    text-align: left;
    margin-bottom: 24px;
}

.site-page .section-heading h2 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.2rem);
    line-height: 1.1;
    letter-spacing: -.025em;
}

.site-page .section-heading p {
    max-width: 760px;
    margin: 8px 0 0;
    line-height: 1.6;
}

.site-page .section-heading::after {
    content: "";
    display: block;
    width: 36px;
    height: 3px;
    margin: 12px 0 0;
    border-radius: 999px;
    background: var(--color-primary);
}

/* ==========================================================
   SHARED CARD LANGUAGE
========================================================== */

.site-page .card,
.site-page .product-card,
.site-page .brand-card,
.site-page .vehicle-card,
.site-page .category-card,
.site-page .why-card,
.site-page .metrics-card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}


.site-page .catalogue-search + section,
.site-page .catalogue-summary + section {
    border-top: 1px solid var(--border-color);
}

/* ==========================================================
   ENTITY DETAIL PAGES
========================================================== */

.site-page .entity-hero {
    padding: 28px 0 16px;
    background: var(--bg-body);
}

.site-page .brand-detail,
.site-page .category-detail,
.site-page .vehicle-detail {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================
   MOBILE NAVIGATION
========================================================== */

@media (max-width: 992px) {
    .top-bar .container {
        display: flex;
        align-items: center;
        min-width: 0;
    }

    .top-bar-brand {
        min-width: 0;
    }

    .top-bar-tools {
        flex: 0 1 auto;
        min-width: 0;
        margin-left: auto;
    }

    .top-bar-tools .top-whatsapp,
    .top-bar-tools .language-switcher,
    .top-bar .mobile-menu-button {
        flex: 0 0 44px;
        width: 44px;
        max-width: 44px;
    }

    .top-bar .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        min-width: 44px;
        min-height: 44px;
        margin-left: 0;
    }

    .mobile-navigation-open .main-navigation {
        z-index: 5000;
    }

    .main-navigation {
        top: 0;
        height: 100dvh;
        max-height: none;
        padding: max(12px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
        border: 0;
        border-left: 1px solid var(--overlay-white-12);
        box-shadow: 0 18px 40px var(--overlay-black-28);
    }

    .main-navigation .mobile-navigation-header {
        min-height: 64px;
        padding: 8px 0;
        padding-top: max(8px, env(safe-area-inset-top));
    }

    .main-navigation .navigation-menu {
        width: 100%;
        max-width: 100%;
        padding-top: 8px;
    }

    .main-navigation .navigation-menu .nav-link {
        min-height: 52px;
        padding: 12px 10px;
        overflow-wrap: anywhere;
    }

    .main-navigation .mobile-nav-auth {
        width: 100%;
        padding-bottom: max(18px, env(safe-area-inset-bottom));
    }

    .main-navigation .mobile-nav-auth-link {
        min-height: 50px;
    }
}

/* ==========================================================
   RESPONSIVE PAGE SYSTEM
========================================================== */

@media (max-width: 768px) {
    .site-page .page-hero,
    .site-page .catalogue-hero,
    .site-page .products-hero,
    .site-page .brands-hero,
    .site-page .categories-hero,
    .site-page .vehicles-hero,
    .site-page .about-hero,
    .site-page .contact-hero,
    .site-page .request-quote-hero,
    .site-page .privacy-hero,
    .site-page .terms-hero,
    .site-page .refund-hero {
        min-height: 0;
        padding: 42px 0 32px;
        background-position: 72% center;
    }

    .site-page .hero-content {
        width: 100%;
        max-width: 700px;
        text-align: left;
    }

    .site-page .page-hero h1,
    .site-page .catalogue-hero h1,
    .site-page .products-hero h1,
    .site-page .brands-hero h1,
    .site-page .categories-hero h1,
    .site-page .vehicles-hero h1,
    .site-page .about-hero h1,
    .site-page .contact-hero h1,
    .site-page .request-quote-hero h1,
    .site-page .privacy-hero h1,
    .site-page .terms-hero h1,
    .site-page .refund-hero h1 {
        font-size: clamp(1.85rem, 8vw, 2.6rem);
    }

    .site-page .page-hero p,
    .site-page .catalogue-hero p,
    .site-page .products-hero p,
    .site-page .brands-hero p,
    .site-page .categories-hero p,
    .site-page .vehicles-hero p,
    .site-page .about-hero p,
    .site-page .contact-hero p,
    .site-page .request-quote-hero p,
    .site-page .privacy-hero p,
    .site-page .terms-hero p,
    .site-page .refund-hero p {
        font-size: .9rem;
    }

    .site-page .hero-stats {
        width: 100%;
        overflow-x: auto;
        padding: 8px;
        scrollbar-width: none;
    }

    .site-page .hero-stats::-webkit-scrollbar {
        display: none;
    }

    .site-page .hero-stat {
        flex: 0 0 140px;
        min-width: 140px;
        padding: 7px 12px;
    }

    .site-page .section-spacing {
        padding: 38px 0;
    }

    .site-page .section-heading {
        margin-bottom: 18px;
    }

    .site-page .section-heading h2 {
        font-size: 1.5rem;
    }

    .site-page .section-heading::after {
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .site-page .page-hero,
    .site-page .catalogue-hero,
    .site-page .products-hero,
    .site-page .brands-hero,
    .site-page .categories-hero,
    .site-page .vehicles-hero,
    .site-page .about-hero,
    .site-page .contact-hero,
    .site-page .request-quote-hero,
    .site-page .privacy-hero,
    .site-page .terms-hero,
    .site-page .refund-hero {
        padding-top: 34px;
        padding-bottom: 26px;
    }

    .site-page .hero-stats {
        border-radius: var(--radius-md);
    }

    .site-page .hero-stat {
        flex-basis: 128px;
        min-width: 128px;
    }

    .site-page .section-spacing {
        padding: 32px 0;
    }
}


/* ==========================================================
   ACCESSIBILITY / REDUCED MOTION
========================================================== */

@media (prefers-reduced-motion: reduce) {
    .main-navigation {
        transition: none !important;
    }
}

/* ==========================================================
   MOBILE TOP-BAR CONTROL SPACING
========================================================== */

@media (max-width: 420px) {
    .top-bar-tools {
        flex: 0 0 auto;
        gap: 6px;
        margin-left: auto;
    }

    .top-bar-tools .top-whatsapp,
    .top-bar .mobile-menu-button,
    .language-button {
        width: 44px;
        min-width: 44px;
        max-width: 44px;
        height: 44px;
    }

    .top-bar-tools .top-whatsapp {
        padding: 0;
    }

    .language-button {
        gap: 0;
        padding: 0;
        justify-content: center;
    }

    .language-button .language-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.05rem;
        line-height: 1;
    }

    .language-button .language-arrow {
        display: none;
    }
}


/* ==========================================================
   MOBILE BRAND DIRECTORY — FINAL OVERRIDE
   Prevent the desktop six-column rule from collapsing cards
   into an unusable clustered mobile layout.
========================================================== */
@media (max-width: 1100px) {
    .brand-grid,
    .brands-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 14px !important;
    }
}
@media (max-width: 768px) {
    .brand-grid,
    .brands-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }
}
@media (max-width: 420px) {
    .brand-grid,
    .brands-grid {
        gap: 10px !important;
    }
    .brand-image {
        height: 108px;
        padding: 10px;
    }
    .brand-image img {
        max-width: 82%;
        max-height: 78px;
    }
    .brand-content,
    .brand-content h3 {
        min-width: 0;
        overflow-wrap: anywhere;
    }
}
