@media (max-width: 767.98px) {
    .col-12 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}
/* =============================== */
/* 1. Variables & Global Styles    */
/* =============================== */
:root {
    /* Primary Colors */
    --color-primary: #3498db;
    --color-primary-dark: #2980b9;
    --color-primary-purple: #a786db;
    --color-primary-dark-purple: #b59ce0;
    /* Neutral Colors */
    --color-white: #ffffff;
    --color-light-gray: #f8f9fa;
    --color-gray: #6c757d;
    --color-dark-gray: #2c3e50;
    --color-text: #495057;
    --color-border: #e9ecef;
    /* Shadow */
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--color-text);
}
.section-title {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--color-dark-gray);
    font-weight: 600;
}
.btn-custom {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    transition: background 0.3s;
}
.btn-custom:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
}
.btn-compact {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

@media (max-width: 575.98px) {
    .section-title {
        margin-bottom: 1.5rem !important;
        font-size: 1.2rem !important;
    }
}

/* =============================== */
/* 2. Navbar Section               */
/* =============================== */
.navbar {
    box-shadow: var(--shadow);
    padding: 1.0rem 1rem;
    z-index: 1040;
}
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    white-space: nowrap;
    padding: 0.5rem 0;
}
.nav-link {
    font-size: 1.3rem;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    color: var(--color-dark-gray) !important;
}
.nav-link:hover {
    color: var(--color-primary) !important;
}
.icon-container .nav-link {
    font-size: 1.6rem;
    padding: 0.5rem 0.7rem !important;
    flex-wrap: nowrap !important;
}
.navbar-toggler {
    border: none;
    padding: 0.5rem 0.7rem;
    margin-left: 0.5rem;
}
.navbar-toggler:focus,
.nav-link:focus,
.search-toggle:focus {
    outline: none !important;
    box-shadow: none !important;
}
.icon-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.6rem;
    padding: 0.15rem 0.35rem;
}
.nav-item {
    position: relative;
}
.navbar .dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    z-index: 1050;
}
.navbar .dropdown-item {
    padding: 0.5rem 1.5rem;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    color: var(--color-text);
}
.navbar .dropdown-item:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}
@media (min-width: 992px) {
    .navbar-nav {
        margin-left: 1rem;
    }
}
/* Navbar Responsive (Mobile) */
@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: 1.1rem;
        padding: 0.2rem 0;
    }
    .nav-link {
        font-size: 1rem;
        padding: 0.3rem 0.5rem !important;
    }
    .icon-container .nav-link {
        font-size: 1rem;
        padding: 0.3rem 0.4rem !important;
    }
    .navbar .dropdown-menu {
        min-width: 80vw;
        left: -16px !important; /* or adjust to align with screen edge */
        right: 0;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        padding: 0.5rem 0.2rem;
    }
    .navbar .dropdown-item {
        font-size: 0.9rem;
        padding: 0.5rem 1.2rem;
        text-align: left;
    }
}

/* =============================== */
/* 3. Search Bar Section           */
/* =============================== */
.search-container {
    position: relative;
    display: inline-block;
}
.search-input {
    width: 0;
    border: none;
    padding: 0;
    transition: all 0.3s ease;
    opacity: 0;
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--color-light-gray);
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}
/* Desktop/tablet: search bar expands as floating input */
.search-input.expanded {
    width: 180px;
    opacity: 1;
    padding: 0.4rem 1rem;
    pointer-events: auto;
    transition: all 0.3s ease;
    z-index: 1001;
    right: 0;
    left: auto;
}
@media (max-width: 575.98px) {
    .search-input {
        position: absolute !important;
        left: -100px !important;
        right: auto !important;
        top: 130% !important; /* further below the icon */
        width: 90vw !important;
        max-width: 200px !important;
        border-radius: 20px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.12) !important;
        background: var(--color-light-gray) !important;
        opacity: 0;
        pointer-events: none;
        padding: 0;
        margin: 0;
        z-index: 2000 !important;
        transform: none !important;
    }
    .search-input.expanded {
        opacity: 1 !important;
        pointer-events: auto !important;
        padding: 0.5rem 1rem !important;
        margin: 0 !important;
        overflow-x: hidden !important;
        display: block !important;
    }
    .search-input input {
        width: 100% !important;
        font-size: 0.9rem !important;
        background: transparent !important;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
        padding: 0.3rem 0.2rem !important;
    }
    .search-toggle {
        z-index: 2100 !important;
        position: relative !important;
    }
}

/* Compact Footer: global spacing for all screens */
.compact-footer {
    margin-top: 2rem;
    margin-left: 2rem;
    margin-right: 2rem;
}
.footer-brand {
    font-weight: 700;
    color: #3498db;
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    display: inline-block;
    text-decoration: none;
}
.footer-heading {
    font-weight: 600;
    margin-bottom: 0.8rem;
    position: relative;
    padding-bottom: 0.4rem;
    font-size: 1.0rem;
}
.footer-heading::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #3498db;
}
.footer-link {
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 0;
    font-size: 0.9rem;
}
.footer-link:hover {
    color: #3498db;
    padding-left: 0.3rem;
}
.footer-text {
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f8f9fa;
    color: #495057;
    margin-right: 0.4rem;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.9rem;
}
.social-icon:hover {
    background-color: #3498db;
    color: white;
    transform: translateY(-2px);
}
.footer-bottom {
    border-top: 1px solid #e9ecef;
    padding-top: 0.6rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.8rem;
}
.newsletter-form {
    display: flex;
    margin-top: 0.8rem;
}
.newsletter-input {
    flex-grow: 1;
    border: 1px solid #e9ecef;
    padding: 0.4rem 0.8rem;
    border-radius: 4px 0 0 4px;
    outline: none;
    font-size: 0.85rem;
    max-width: 150px;
}
.newsletter-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}
.newsletter-btn:hover {
    background-color: #2980b9;
}

/* Footer Collapsible Sections */
.mobile-collapse-toggle {
    cursor: pointer;
    position: relative;
}

.mobile-toggle-icon {
    transition: transform 0.3s ease;
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.5em;
}

@media (min-width: 768px) {
    .mobile-collapse-toggle {
        cursor: default;
    }
    .mobile-toggle-icon {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    .footer-col {
        margin-bottom: 1.2rem;
    }
    .compact-footer {
        padding: 1.2rem 0 0.6rem;
    }
    .footer-col .collapse:not(.show) {
        display: none;
    }
    .footer-col .collapse.show {
        display: block;
    }
    .footer-heading::after {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .footer-brand {
        font-size: 1.1rem;
    }
    .footer-heading {
        font-size: 0.95rem;
    }
    .footer-link, .footer-text {
        font-size: 0.75rem;
    }
    .newsletter-input, .newsletter-btn {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
}

/* =============================== */
/* 5. Carousel Section             */
/* =============================== */
.compact-carousel {
    margin-top: 0rem;
    margin-bottom: 0rem;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    z-index: 1;
}
.carousel-inner {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-radius: 12px;
}
.carousel-item {
    height: 400px;
    position: relative;
    transition: transform 0.3s ease;
}
.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: var(--color-light-gray);
    color: var(--color-gray);
}
.carousel-caption {
    background: rgba(0, 0, 0, 0.6);
    padding: 1rem;
    border-radius: 8px;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    max-width: 550px;
}
.carousel-caption h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}
.carousel-caption p {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}
.carousel-control-prev, 
.carousel-control-next {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
    transition: all 0.3s ease;
}
.carousel-control-prev {
    left: 10px;
}
.carousel-control-next {
    right: 10px;
}
.carousel-control-prev:hover, 
.carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
}
.carousel-indicators {
    margin-bottom: 0.5rem;
}
.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 4px;
    background-color: var(--color-white);
    opacity: 0.5;
    transition: all 0.3s ease;
}
.carousel-indicators button.active {
    opacity: 1;
    transform: scale(1.2);
}
@media (max-width: 992px) {
    .carousel-item {
        height: 300px;
    }
    .carousel-caption h3 {
        font-size: 1.2rem;
    }
}
@media (max-width: 768px) {
    .carousel-item {
        height: 250px;
    }
    .carousel-caption {
        padding: 0.8rem;
        width: 70%;
        bottom: 1rem;
    }
    .carousel-caption h3 {
        font-size: 1.1rem;
    }
    .carousel-caption p {
        font-size: 0.85rem;
        margin-bottom: 0.6rem;
    }
}
@media (max-width: 576px) {
    .carousel-item {
        height: 220px;
    }
    .carousel-caption {
        padding: 0.6rem;
        bottom: 0.8rem;
    }
    .carousel-caption h3 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }
    .carousel-caption p {
        display: none;
    }
    .carousel-control-prev, 
    .carousel-control-next {
        width: 35px;
        height: 35px;
    }
    .btn-compact {
        padding: 0.3rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* =============================== */
/* 6. Product Card Section         */
/* Add-to-cart icon button styles */
.add-to-cart {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: none;
    border: none;
    box-shadow: none;
    min-width: 0;
    padding: 0;
    font-size: 1.1rem;
    color: var(--color-primary);
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}
.add-to-cart:focus {
    outline: 2px solid var(--color-primary-dark);
    outline-offset: 2px;
}
.add-to-cart:hover .bi-cart3,
.add-to-cart:focus .bi-cart3 {
    color: #1761a0;
}
.add-to-cart .bi-cart3 {
    font-size: 2.0rem;
    color: inherit;
    transition: color 0.2s;
}
@media (max-width: 575.98px) {
    .add-to-cart {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.85rem;
    }
    .add-to-cart .bi-cart3 {
        font-size: 1.1rem;
    }
}
/* =============================== */
.products-preview {
    background-color: var(--color-light-gray);
    padding: 2rem 0;
    border-radius: 20px;
}
.products-preview .container {
    padding-left: 32px;
    padding-right: 32px;
}
.product-preview-card {
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(52, 152, 219, 0.10), 0 1.5px 4px rgba(44, 62, 80, 0.06);
    border: 1px solid #e9ecef;
    background: #fff;
    transition: transform 0.18s, box-shadow 0.18s;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}
.product-preview-card:hover {
    transform: translateY(-6px) scale(1.025);
    box-shadow: 0 8px 32px rgba(52, 152, 219, 0.16), 0 2px 8px rgba(44, 62, 80, 0.10);
    border-color: #b3d7f3;
}
.product-preview-image {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7eb 100%);
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e9ecef;
    padding: 1.2rem 0.5rem 0.7rem 0.5rem;
}
.product-preview-image img {
    max-height: 120px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.07);
}
.product-preview-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.2rem;
    margin-top: 0.4rem;
    line-height: 1.2;
    letter-spacing: 0.01em;
    text-align: left;
}
.product-preview-name .product-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}
.product-preview-name .product-link:hover,
.product-preview-name .product-link:focus {
    color: var(--color-primary);
    text-decoration: underline;
}
.product-preview-price {
    color: #3498db;
    font-weight: 700;
    font-size: 0.98rem;
    margin-bottom: 0.15rem;
    text-align: left;
}
.product-preview-card .card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 0.7rem 1rem 1rem 1rem;
}
.product-preview-card p {
    color: #6c757d;
    font-size: 0.92rem;
    margin-bottom: 0.7rem;
    margin-top: 0.1rem;
    text-align: left;
}
.product-actions {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: auto; /* Pushes actions to the bottom of the card */
}
.product-actions .btn {
    font-size: 0.85rem;
    padding: 0.22rem 0.7rem;
    border-radius: 18px;
    min-width: 70px;
}
.product-actions .add-to-cart {
    padding: 0.18rem 0.5rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    min-width: 0;
    width: 2rem;
    height: 2rem;
}
.product-actions .add-to-cart .bi-cart-plus {
    font-size: 1.1rem;
    color: var(--color-primary);
    transition: color 0.2s;
}
.product-actions .add-to-cart:hover .bi-cart-plus,
.product-actions .add-to-cart:focus .bi-cart-plus {
    color: #1761a0;
}
@media (max-width: 767.98px) {
    .product-actions .btn {
        font-size: 0.8rem;
        padding: 0.18rem 0.6rem;
        min-width: 60px;
    }
}
@media (max-width: 575.98px) {
    .product-preview-card {
        border-radius: 10px;
        padding: 0.5rem 0.3rem;
    }
    .product-preview-image {
        min-height: 90px;
        padding: 0.5rem 0.2rem 0.3rem 0.2rem;
    }
    .product-preview-image img {
        max-height: 60px;
    }
    .product-preview-name {
        font-size: 0.7rem;
        margin-bottom: 0.1rem;
        margin-top: 0.15rem;
    }
    .product-preview-price {
        font-size: 0.7rem;
    }
    .product-preview-card .card-body {
        padding: 0.4rem 0.5rem 0.7rem 0.5rem;
    }
    .product-preview-card p {
        font-size: 0.7rem;
        margin-bottom: 0.3rem;
    }
    .product-actions .btn {
        font-size: 0.8rem;
        padding: 0.12rem 0.4rem;
        min-width: 40px;
    }
    .product-actions .add-to-cart {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.85rem;
        padding: 0.08rem 0.2rem;
    }
    .product-actions .add-to-cart .bi-cart-plus {
        font-size: 0.85rem;
    }
}

/* =============================== */
/* 7. Featured Products Swiper     */
/* =============================== */
.featured-products-swiper {
    padding: 20px 10px 50px;
}
.featured-products-swiper .swiper-wrapper {
    display: flex;
    align-items: stretch;
}
.featured-products-swiper .swiper-slide {
    width: 240px !important; /* Fixed width for product cards */
    min-width: 240px !important;
    max-width: 240px !important;
    flex-shrink: 0;
    display: flex;
    height: auto;
    position: relative; /* optional, for layout stability */
}
.featured-products-swiper .swiper-pagination {
    bottom: 20px;
}
.featured-products-swiper .swiper-button-next,
.featured-products-swiper .swiper-button-prev {
    color: var(--color-primary);
    background-color: var(--color-white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}
.featured-products-swiper .swiper-button-next:hover,
.featured-products-swiper .swiper-button-prev:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}
.featured-products-swiper .swiper-button-next::after,
.featured-products-swiper .swiper-button-prev::after {
    font-size: 1rem;
    font-weight: bold;
}

/* Responsive adjustments for product swiper */
@media (max-width: 1199.98px) {
    .featured-products-swiper .swiper-slide {
        width: 220px !important;
        min-width: 220px !important;
        max-width: 220px !important;
    }
}

@media (max-width: 992px) {
    .featured-products-swiper .swiper-slide {
        width: 200px !important;
        min-width: 200px !important;
        max-width: 200px !important;
    }
}

@media (max-width: 768px) {
    .featured-products-swiper .swiper-slide {
        width: 180px !important;
        min-width: 180px !important;
        max-width: 180px !important;
    }
}

@media (max-width: 576px) {
    .featured-products-swiper .swiper-slide {
        width: 160px !important;
        min-width: 160px !important;
        max-width: 160px !important;
    }
}

@media (max-width: 400px) {
    .featured-products-swiper .swiper-slide {
        width: 140px !important;
        min-width: 140px !important;
        max-width: 140px !important;
    }
}

/* =============================== */
/* 8. Utility Classes              */
/* Custom col-lg-2-4 for 5 per row on large screens */
/* 5 per row on large (>=1200px), 4 per row on md (<=1199.98px), 3 per row on sm (<=992px), 2 per row on xs (<=768px) */
.col-lg-2-4 {
    flex: 0 0 20% !important;
    max-width: 20% !important;
}
.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
}
.col-sm-4 {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
}
.col-6 {
    flex: 0 0 50%;
    max-width: 50%;
}
@media (max-width: 1199.98px) {
    .col-lg-2-4 {
        flex-basis: 25% !important;
        max-width: 25% !important;
    }
}
@media (max-width: 992px) {
    .col-md-3 {
        flex-basis: 33.3333% !important;
        max-width: 33.3333% !important;
    }
    .col-sm-4 {
        flex-basis: 33.3333% !important;
        max-width: 33.3333% !important;
    }
}
@media (max-width: 768px) {
    .col-sm-4 {
        flex-basis: 50% !important;
        max-width: 50% !important;
    }
}
/* =============================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}
.col {
    flex: 1;
    padding: 0 15px;
}
.text-center {
    text-align: center;
}
.col-12 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}
.mb-4 {
    margin-bottom: 1.5rem;
}
