:root {
    --primary-color: #FF8C00;
    --primary-light: rgba(32, 159, 66, 0.1);
    --secondary-color: #ffffff;
    --text-dark: #2b2b2b;
    --text-muted: #777777;
    --border-color: #e5e5e5;
    --font-primary: 'Public Sans', sans-serif;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    background-color: #f9f9f9;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

/* Notification Bar */
.notification-bar {
    background-color: var(--primary-color);
    font-size: 13px;
    position: relative;
    z-index: 1050;
}

@media (max-width: 576px) {
    .notification-bar {
        font-size: 12px;
    }

    .notification-bar .d-flex {
        flex-direction: row;
        gap: 1rem !important;
        align-items: center !important;
    }
}

.close-notification {
    background: transparent;
    border: none;
    color: white;
}

/* Header */
.form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

.searchbtn {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.icon-circle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f1f1;
    color: #333;
    transition: all 0.3s;
}

.icon-circle:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Navbar */
.navbar {
    background: #fff;
    z-index: 1000;
}

.dropdown-toggle::after {
    margin-left: auto;
}

.nav-link {
    font-weight: 500;
    color: #333;
    padding: 1rem 1.2rem !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

/* Mobile Menu Hamburger Icon */
.navbar-toggler {
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(32, 159, 66, 0.25);
    outline: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23FF8C00' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.5rem;
    height: 1.5rem;
}

.navbar-toggler:hover {
    background-color: rgba(32, 159, 66, 0.1);
}

.btn-danger {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-danger:hover {
    background-color: #10702d;
    border-color: #10702d;
}

.text-danger {
    color: var(--primary-color) !important;
}

.btn-outline-danger {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-danger:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

#our-products {
    scroll-margin-top: 120px;
}

/* Common Utilities */
.text-primary-custom {
    color: var(--primary-color);
}

.bg-primary-custom {
    background-color: var(--primary-color);
}

.bg-primary-light {
    background-color: var(--primary-light) !important;
}

.section-title {
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
}

/* Product Card */
.product-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    transition: box-shadow 0.3s;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-card img.card-img-top {
    height: 300px;
    width: 100%;
    object-fit: contain;
    background-color: #f9f9f9;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.product-title {
    font-size: 18px;
    /* Increased font size */
    font-weight: 800;
    /* Bold */
    margin-bottom: 5px;
    /* Reduced margin */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 30px;
    /* Reduced min-height */
}

.product-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 16px;
}

.product-old-price {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 13px;
    margin-left: 5px;
}

.add-to-cart-btn {
    width: 100%;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    padding: 8px;
}

.product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    /* justify-content: space-between; Removed to reduce gap */
}

.product-info>div:last-child {
    margin-top: auto;
    /* Push buttons to bottom */
}

/* Promo Banner Large */
.promo-banner-large {
    height: 400px;
}

/* Hero Carousel Image Fixes */
.hero-section .carousel-item img {
    height: 550px;
    object-fit: cover;
}

/* Hero & General Responsive Text Fixes */
@media (max-width: 991px) {
    .carousel-caption {
        top: 20% !important;
        left: 5% !important;
    }

    .carousel-caption h1.display-4,
    .promo-content h2.display-4 {
        font-size: 2.5rem;
    }

    .promo-banner-large {
        height: 300px !important;
    }
}

@media (max-width: 767px) {

    /* Hero Carousel */
    .hero-section .carousel-caption {
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%);
        left: 0 !important;
        right: 0 !important;
        text-align: center !important;
        background: rgba(255, 255, 255, 0.7);
        padding: 10px;
        margin: 0 1rem;
        border-radius: 8px;
    }

    .carousel-caption h1.display-4 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem !important;
    }

    .carousel-caption h5 {
        font-size: 0.9rem;
    }

    .hero-section .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.9rem;
    }

    .hero-section .carousel-item img {
        height: auto !important;
        min-height: 250px;
    }

    /* Center all section titles on mobile and increase font size */
    section h3 {
        /* text-align: center !important; */
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }

    /* Exception: Keep Best Value title left-aligned using flex-wrap class */
    .d-flex.flex-wrap h3 {
        text-align: left !important;
    }

    /* Center flex containers on mobile except Best Value */
    section .d-flex.justify-content-between:not(.flex-wrap) {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        text-align: center;
    }

    .d-flex.flex-wrap.gap-2 {
        justify-content: center !important;
    }

    /* Category Section */
    .category-img-wrapper {
        width: 100px !important;
        height: 100px !important;
    }

    .category-img-wrapper i {
        font-size: 2rem !important;
    }

    .category-item h6 {
        font-size: 0.85rem;
    }

    /* Best Value Section */
    .d-flex.justify-content-between .btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.85rem;
    }

    /* Large Promo Banner */
    .promo-banner-large {
        height: auto !important;
        min-height: 250px;
        background-position: center !important;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .promo-content {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        margin: 1rem !important;
        background: rgba(0, 0, 0, 0.4);
        padding: 1.5rem;
        border-radius: 10px;
        width: auto;
        max-width: 90%;
    }

    .promo-content h2.display-4 {
        font-size: 1.75rem !important;
        line-height: 1.3;
    }

    .promo-content h5 {
        font-size: 1rem;
    }

    /* Small Promo Cards */
    .card-img-overlay {
        background: rgba(0, 0, 0, 0.4);
    }

    .card-title {
        font-size: 1.25rem;
    }

    .card-text {
        font-size: 0.9rem;
    }

    /* Why Choose Us Section */
    .icon-circle {
        width: 60px !important;
        height: 60px !important;
        font-size: 24px !important;
    }

    /* Product Cards */
    .product-card img.card-img-top {
        height: 180px;
    }

    /* Reduce product card width on mobile */
    .row-cols-1>.col {
        max-width: 100%;
        margin: 0 auto;
        margin-bottom: 1.5rem;
        padding-left: 15px;
        padding-right: 15px;
    }

    .product-card .d-flex.justify-content-between.align-items-center {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch !important;
    }

    .product-card .btn {
        width: 100%;
        margin-bottom: 5px;
    }

    /* Add spacing between title and product grid */
    #newArrivalsContainer,
    section .row.row-cols-1.row-cols-sm-2 {
        margin-top: 1.5rem !important;
    }

    /* Floating Buttons */
    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
    }

    .call-float-btn {
        right: 15px;
    }

    .whatsapp-float-btn {
        left: 15px;
    }
}

/* Footer */
footer {
    background-color: #f8f8f8;
    padding-top: 50px;
    border-top: 1px solid #eee;
}

.footer-logo {
    max-width: 150px;
    margin-bottom: 20px;
}

.footer-link {
    color: #555;
    margin-bottom: 10px;
    display: block;
    font-size: 14px;
}

.footer-link:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #555;
    border: 1px solid #ddd;
    margin-right: 10px;
    transition: all 0.3s;
}

.social-icon:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.bottom-footer {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 0;
    margin-top: 40px;
}

/* Floating Action Buttons */
.floating-btn {
    position: fixed;
    bottom: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1050;
    transition: all 0.3s ease;
    text-decoration: none;
}

.floating-btn:hover {
    transform: translateY(-5px);
    color: white;
}

.call-float-btn {
    right: 20px;
    background-color: #ff4500;
    /* Bootstrap Primary Blue or custom */
    border: 2px solid white;
}

.call-float-btn:hover {
    background-color: #0b5ed7;
}

.whatsapp-float-btn {
    left: 20px;
    background-color: #25d366;
    /* WhatsApp Green */
    border: 2px solid white;
}

.whatsapp-float-btn:hover {
    background-color: #20bd5a;
}

/* Accordion Overrides */
.accordion-button:not(.collapsed) {
    color: var(--primary-color);
    background-color: rgba(32, 159, 66, 0.1);
    /* Light green tint */
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .125);
}

.accordion-button:focus {
    border-color: rgba(32, 159, 66, 0.5);
    box-shadow: 0 0 0 0.25rem rgba(32, 159, 66, 0.25);
}

.accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23FF8C00'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Category Hover Animation */
.category-item .category-img-wrapper {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-item:hover .category-img-wrapper {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(32, 159, 66, 0.2) !important;
}

.category-item:hover h6 {
    color: var(--primary-color);
}

/* WhatsApp Button in Product Cards */
.whatsapp-btn {
    min-width: 38px;
    padding: 0.375rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 1.5rem;
    /* Increased size */
}

/* Ensure Shop Now and WhatsApp buttons have same height */
.shop-now-btn,
.whatsapp-btn {
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Responsive adjustments for smaller tablets */
@media (max-width: 991px) and (min-width: 768px) {
    .category-img-wrapper {
        width: 140px !important;
        height: 140px !important;
    }

    .category-img-wrapper i {
        font-size: 3rem !important;
    }
}

/* Extra small devices */
@media (max-width: 576px) {

    /* Section titles */
    h3.fw-bold {
        font-size: 1.25rem;
    }

    /* Best Value cards */
    .col-10 {
        min-width: 85%;
    }

    /* Premium promo cards */
    .position-absolute.top-50 h2 {
        font-size: 1.25rem !important;
    }

    .position-absolute.top-50 p {
        font-size: 0.85rem;
    }

    /* Footer adjustments */
    footer h5 {
        font-size: 1rem;
        margin-top: 1.5rem;
    }

    footer h5:first-child {
        margin-top: 0;
    }

    .footer-link {
        font-size: 0.875rem;
    }

    .social-icon {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
}

/* Modal Customizations */
#contactModal .modal-header {
    position: relative;
}

#contactModal .btn-close {
    position: absolute;
    top: 15px;
    right: 15px;
    opacity: 1;
    z-index: 10;
}