/* =========================================================
   Header
   ========================================================= */

.header-brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.header-brand img {
    height: 68px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
}

.main-nav {
    padding: 12px 0;
}

.main-nav .navbar-collapse {
    align-items: center;
    flex: 1 1 auto;
}

.navbar-nav {
    align-items: center;
    gap: 2px;
}

.navbar-nav .nav-link {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
    padding: 10px 14px;
}

/* Move underline to ::before so Bootstrap caret can own ::after */
.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-red);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
    width: 70%;
}

/* Kill absolute underline rules from style.css on ::after */
.navbar-nav .nav-link::after,
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    content: none;
    position: static;
    width: auto;
    height: auto;
    left: auto;
    bottom: auto;
    transform: none;
    background: none;
    border: 0;
    display: none;
    margin: 0;
}

/* Restore Bootstrap caret beside Categories */
.navbar-nav .nav-link.dropdown-toggle::after {
    content: '';
    display: inline-block;
    margin-left: 0.4em;
    vertical-align: 0.15em;
    border-top: 0.35em solid currentColor;
    border-right: 0.35em solid transparent;
    border-bottom: 0;
    border-left: 0.35em solid transparent;
    position: static;
    width: 0;
    height: 0;
    background: none;
    transform: none;
}

.header-actions {
    flex-shrink: 0;
    margin-left: auto;
}

.header-actions .btn-search-mobile {
    flex-shrink: 0;
}

.support-info {
    flex-shrink: 0;
}

/* Categories dropdown: keep menu compact; never let category photos blow up layout */
.category-nav-menu {
    min-width: 280px;
    max-width: min(360px, calc(100vw - 32px));
    max-height: min(70vh, 480px);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1050;
}

.category-nav-menu .dropdown-item {
    gap: 10px;
    white-space: normal;
    line-height: 1.35;
}

.category-nav-menu .cat-dropdown-icon {
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    display: block;
}

.category-nav-menu .dropdown-submenu > .submenu {
    min-width: 220px;
    max-width: min(320px, calc(100vw - 48px));
    max-height: min(60vh, 400px);
    overflow-y: auto;
    z-index: 1051;
}

@media (max-width: 991.98px) {
    .navbar-nav .nav-link::before {
        display: none;
    }

    .navbar-nav .nav-link.dropdown-toggle::after {
        display: inline-block;
    }

    .header-brand img {
        height: 56px;
    }

    .category-nav-menu {
        max-width: 100%;
        max-height: none;
    }

    .category-nav-menu .dropdown-submenu > .submenu {
        max-width: 100%;
    }
}

/* =========================================================
   Footer
   ========================================================= */

.main-footer {
    background: linear-gradient(180deg, #1a355c 0%, var(--primary-black) 40%, #163050 100%);
    color: #ffffff;
    margin-top: 60px;
    padding: 0 0 28px;
}

.main-footer a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    transition: color 0.2s ease;
}

.main-footer a:hover,
.main-footer a:focus-visible {
    color: #ffffff;
}

.footer-cta {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 48px 0 40px;
}

.footer-cta-kicker {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-lime);
    margin-bottom: 10px;
}

.footer-cta-title {
    color: #ffffff;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 12px;
}

.footer-cta-text {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1rem;
    max-width: 36rem;
}

.footer-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.footer-cta-primary,
.footer-cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    white-space: nowrap;
}

.footer-cta-primary {
    background: var(--accent-lime);
    color: var(--primary-black) !important;
    border-color: var(--accent-lime);
}

.footer-cta-primary:hover,
.footer-cta-primary:focus-visible {
    background: #ffffff;
    border-color: #ffffff;
    color: var(--primary-black) !important;
}

.footer-cta-secondary {
    background: transparent;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.45);
}

.footer-cta-secondary:hover,
.footer-cta-secondary:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    color: #ffffff !important;
}

.footer-main {
    padding: 48px 0 36px;
}

.footer-brand h3 {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 18px;
}

.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-contact-list a,
.footer-contact-list span {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.45;
}

.footer-contact-list i {
    color: var(--accent-lime);
    margin-top: 3px;
    flex-shrink: 0;
}

.footer-heading {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 10px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 3px;
    background: var(--accent-lime);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    display: inline-block;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.78);
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 4px;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer-social a:hover,
.footer-social a:focus-visible {
    background: var(--primary-red);
    border-color: var(--primary-red);
    color: #ffffff;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 22px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-bottom-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}

.footer-bottom-links a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
}

.footer-bottom-links a:hover {
    color: #ffffff;
}

@media (max-width: 991.98px) {
    .footer-cta-actions {
        justify-content: flex-start;
    }

    .footer-cta {
        padding: 36px 0 28px;
    }

    .footer-main {
        padding: 36px 0 28px;
    }
}

@media (max-width: 575.98px) {
    .footer-cta-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .footer-cta-primary,
    .footer-cta-secondary {
        width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================================================
   Front layout fixes (categories / swipers / cards)
   ========================================================= */

.main-content {
    overflow-x: clip;
}

.categories-carousel-section .container,
.all-categories-section .container,
.testimonials-section .container,
.featured-products-section .container {
    width: 100%;
    max-width: 1200px;
}

.categories-header,
.section-header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.categories-title,
.testimonials-title {
    max-width: 100%;
}

/* Category cards must fill their grid/swiper cell — not fixed 320px */
.category-card {
    flex: none;
    width: 100%;
    max-width: 100%;
    display: block;
    height: 100%;
}

.categories-swiper,
.featured-products-swiper,
.testimonials-swiper {
    width: 100%;
    overflow: hidden;
    padding-bottom: 40px;
}

.categories-swiper .swiper-slide,
.featured-products-swiper .swiper-slide,
.testimonials-swiper .swiper-slide {
    height: auto;
    box-sizing: border-box;
}

.categories-swiper .category-card .category-image {
    height: 240px;
}

.all-categories-section .category-card .category-image {
    height: 180px;
}

.all-categories-section .category-name {
    font-size: 1rem;
    padding: 16px 12px;
}

.btn-shop-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    padding: 12px 28px;
    background: var(--primary-red);
    color: #fff !important;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-shop-now:hover {
    background: var(--primary-black);
    color: #fff !important;
    transform: translateY(-1px);
}

.categories-carousel-section .text-center,
.all-categories-section .text-center {
    margin-top: 28px;
}

/* Product cards in featured swiper */
.featured-products-section {
    padding: 72px 0 80px;
    background: #fff;
}

.featured-products-swiper {
    margin-bottom: 8px;
}

.featured-products-swiper .swiper-slide {
    height: auto;
    display: flex;
}

.featured-products-swiper .product-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(31, 63, 109, 0.06);
}

.featured-products-swiper .product-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
}

.featured-products-swiper .product-image {
    padding-top: 72%;
    background: #f5f7fb;
}

.featured-products-swiper .product-image img {
    object-fit: contain;
    padding: 12px;
}

.featured-products-swiper .product-info {
    padding: 16px 18px 18px;
    gap: 4px;
}

.featured-products-swiper .product-name {
    font-size: 1rem;
    line-height: 1.35;
    min-height: 2.7em;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    margin-bottom: 4px;
}

.featured-products-swiper .product-category {
    margin-bottom: 12px;
    min-height: 1.2em;
}

.featured-products-swiper .product-actions {
    margin-top: auto;
}

.featured-products-swiper .product-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-weight: 600;
}

.featured-products-section .btn-shop-now {
    margin-top: 20px;
    margin-bottom: 8px;
}

/* Global product card title: show 2 lines instead of cutting too early */
.product-name {
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    min-height: 2.6em;
}

@media (max-width: 767.98px) {
    .categories-carousel-section {
        padding: 48px 0;
    }

    .categories-title {
        font-size: 1.75rem;
    }

    .categories-swiper .category-card .category-image {
        height: 200px;
    }

    .featured-products-section {
        padding: 48px 0 56px;
    }
}

/* =========================================================
   About / network section — keep image from dominating
   ========================================================= */

.about-network-section {
    overflow: hidden;
}

.about-network-section > .container-fluid {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.about-network-section .row {
    align-items: stretch;
}

.network-content {
    padding: 56px clamp(24px, 4vw, 56px) !important;
    min-height: 0 !important;
    max-width: 100%;
}

.network-title {
    font-size: clamp(1.6rem, 2.4vw, 2.25rem) !important;
    overflow-wrap: anywhere;
}

.network-description {
    max-width: 100% !important;
}

.network-image {
    height: 100%;
    min-height: 0 !important;
    max-height: 480px;
    overflow: hidden;
    border-radius: 0;
}

.network-image img {
    width: 100%;
    height: 100%;
    max-height: 480px;
    object-fit: cover;
    object-position: center;
    display: block;
}

@media (min-width: 992px) {
    .about-network-section .row > [class*="col-"] {
        display: flex;
    }

    .network-content,
    .network-image {
        width: 100%;
        min-height: 420px;
        max-height: 480px;
    }
}

@media (max-width: 991.98px) {
    .network-image {
        max-height: 320px;
        min-height: 260px !important;
    }

    .network-image img {
        max-height: 320px;
    }

    .network-content {
        padding: 36px 20px !important;
    }
}

/* =========================================================
   Quote List page
   ========================================================= */

.quote-list-page .quote-page-header {
    padding: 28px 0 !important;
}

.quote-list-page .quote-page-header h1 {
    font-size: clamp(1.6rem, 2.5vw, 2.1rem) !important;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
}

.quote-list-page .quote-page-header h1 i {
    font-size: 1.15em;
    line-height: 1;
}

.quote-list-page .quote-page-header .breadcrumb {
    font-size: 0.95rem;
}

.quote-list-page .quote-list-section {
    padding: 48px 0 72px;
    background: var(--light-gray);
    min-height: 50vh;
}

.quote-list-page .empty-quote {
    text-align: center;
    padding: 48px 32px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(31, 63, 109, 0.08);
    border: 1px solid var(--border-color);
}

.quote-list-page .empty-quote-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #eef3fa;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.quote-list-page .empty-quote-icon i {
    font-size: 2rem !important;
    color: var(--primary-red) !important;
    margin: 0 !important;
    line-height: 1;
}

.quote-list-page .empty-quote h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 10px;
}

.quote-list-page .empty-quote p {
    color: var(--text-secondary);
    margin: 0 auto 24px;
    max-width: 28rem;
    line-height: 1.6;
}

.quote-list-page .empty-quote-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-red);
    border-color: var(--primary-red);
    color: #fff !important;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.quote-list-page .empty-quote-cta i {
    font-size: 1rem !important;
    color: #fff !important;
    margin: 0 !important;
    line-height: 1;
}

.quote-list-page .empty-quote-cta:hover {
    background: var(--primary-black);
    border-color: var(--primary-black);
    color: #fff !important;
}

/* =========================================================
   Category page (/category)
   ========================================================= */

.category-page .category-hero-section {
    padding: 36px 0 28px !important;
}

.category-page .category-hero-kicker {
    margin-bottom: 8px !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.12em !important;
}

.category-page .category-hero-title {
    font-size: clamp(1.75rem, 3vw, 2.4rem) !important;
    margin-bottom: 10px !important;
    line-height: 1.2;
}

.category-page .category-hero-description {
    font-size: 1rem !important;
    line-height: 1.55 !important;
    max-width: 640px !important;
    margin: 0 auto !important;
    margin-bottom: 0 !important;
}

.category-page .category-hero-metrics {
    margin-top: 18px;
    gap: 10px !important;
}

.category-page .hero-metric-item {
    min-width: 140px !important;
    padding: 10px 14px !important;
}

.category-page .all-categories-section {
    padding-top: 28px !important;
    padding-bottom: 56px !important;
    background: #fff;
}

.category-page .all-categories-section .category-card {
    height: 100%;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(31, 63, 109, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-page .all-categories-section .category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(31, 63, 109, 0.12);
}

.category-page .all-categories-section .category-image {
    height: 200px;
}

.category-page .all-categories-section .category-name {
    font-size: 1.1rem;
    padding: 16px 16px 8px;
}

.category-page .category-view-link {
    display: block;
    padding: 0 16px 18px;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-red);
}

.category-page .products-grid-section {
    padding-top: 28px;
}

@media (max-width: 767.98px) {
    .category-page .category-hero-section {
        padding: 28px 0 20px !important;
    }

    .category-page .all-categories-section .category-image {
        height: 150px;
    }

    .category-page .all-categories-section .category-name {
        font-size: 0.95rem;
        padding: 12px 10px 6px;
    }
}

/* =========================================================
   Homepage carousel nav buttons
   ========================================================= */

.carousel-nav-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.carousel-nav-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1.5px solid var(--border-color);
    border-radius: 50%;
    background: #ffffff;
    color: var(--primary-black);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(31, 63, 109, 0.08);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}

.carousel-nav-btn i {
    font-size: 1rem;
    line-height: 1;
    color: inherit;
}

.carousel-nav-btn:hover,
.carousel-nav-btn:focus-visible {
    background: var(--primary-red);
    border-color: var(--primary-red);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(45, 84, 142, 0.25);
}

.carousel-nav-btn:active {
    transform: translateY(0);
}

.carousel-nav-btn:disabled,
.carousel-nav-btn.swiper-button-disabled {
    opacity: 0.4;
    cursor: default;
    transform: none;
    box-shadow: none;
}
