/* ================================
        VARIABLES & GLOBAL RESET
================================ */
:root {
    --primary-color: #a45c40;
    --secondary-color: #8b5e3c;
    --text-color: #4e342e;
    --bg-color: #f5f6fa;
    --footer-bg: #d9d2c9;
    --footer-text: #633126;
    --btn-radius: 25px;
    --card-radius: 20px;
    --transition-speed: 0.4s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    padding-top: 20px;
    font-family: 'Segoe UI', sans-serif;
    background: var(--bg-color);
}



/* ================================
        NAVBAR
================================ */
.navbar {
    position: relative;
    z-index: 2000;
}

.custom-navbar {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    border-radius: 60px;
    padding: 12px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.navbar-brand {
    font-weight: 700;
    font-size: 22px;
    display: flex;
    align-items: center;
    color: var(--text-color);
}

.logo-img {
    height: 42px;
    width: 42px;
    border-radius: 50%;
    margin-right: 8px;
    transition: transform var(--transition-speed);
}

.logo-img:hover {
    transform: scale(1.1) rotate(6deg);
}

.nav-link {
    font-weight: 500;
    color: var(--text-color);
    margin: 0 10px;
    position: relative;
    transition: color 0.3s;
}

.nav-link::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    background: var(--primary-color);
    left: 0;
    bottom: -4px;
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* ================================
        SEARCH
================================ */
.search-container {
    position: relative;
    width: 250px;
}

.search-container input {
    width: 100%;
    padding: 8px 35px 8px 10px;
    border-radius: 20px;
    border: 1px solid #ddd;
}

.clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    width: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 999;
}

.search-item {
    padding: 10px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-item:hover {
    background: #f5f5f5;
}

/* ================================
        PRODUCT CARDS
================================ */
.product-card {
    border: none;
    border-radius: var(--card-radius);
    overflow: hidden;
    background: #fff;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    position: relative;
    will-change: transform;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.product-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

.product-card:hover .product-img {
    transform: scale(1.08);
}

.price {
    font-weight: bold;
    color: var(--primary-color);
}

.btn-cart {
    background: var(--secondary-color);
    color: #fff;
    border-radius: var(--btn-radius);
    padding: 6px 16px;
    border: none;
    transition: background 0.3s;
}

.btn-cart:hover {
    background: #6f472d;
}

/* Quick View Button */
.product-card .quick-view-btn {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: bottom 0.3s ease, opacity 0.3s ease;
}

.product-card:hover .quick-view-btn {
    opacity: 1;
    bottom: 20px;
}

/* ================================
        HERO CAROUSEL
================================ */
#heroCarousel {
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.2);
}

.carousel {
    margin-bottom: 50px;
}

.carousel-img {
    height: 85vh;
    object-fit: cover;
}

.carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.3));
}

.carousel-caption {
    bottom: 25%;
    text-align: left;
}

/* ================================
        CATEGORY
================================ */
.category-box {
    position: relative;
    overflow: hidden;
    border-radius: 25px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-speed);
}

.category-box img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.category-box:hover {
    transform: translateY(-10px);
}

.box-content {
    position: absolute;
    bottom: 30px;
    left: 30px;
    color: #fff;
}

.category-btn {
    padding: 8px 18px;
    background: white;
    border-radius: 30px;
    text-decoration: none;
}

/* ================================
        CTA BUTTON (SHOP NOW)
================================ */
.cta-btn {
    display: inline-block;
    padding: 10px 28px;
    border-radius: 30px;
    background: linear-gradient(135deg, #b55d2b, #8b5e3c);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 20px rgba(139, 94, 60, 0.3);
}

/* Hover Effect */
.cta-btn:hover {
    transform: translateY(-3px) scale(1.05);
    background: linear-gradient(135deg, #9a4a20, #6f472d);
    box-shadow: 0 12px 25px rgba(139, 94, 60, 0.4);
    color: #fff;
}

/* Click Effect */
.cta-btn:active {
    transform: scale(0.95);
}

/* ================================
        WHY SECTION
================================ */
.why-section {
    background: linear-gradient(to right, #f8f6f2, #f1ede7);
}

.why-box {
    padding: 25px;
    background: #fff;
    border-radius: 18px;
    transition: transform 0.3s;
}

.why-box:hover {
    transform: translateY(-8px);
}

/* ================================
        FOOTER
================================ */
.mittimart-footer {
    background-color: var(--footer-bg);
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
    padding: 60px 0 30px;
    color: var(--footer-text);
    opacity: 1;
    transform: none;
}

.mittimart-footer h5 {
    font-weight: 600;
    margin-bottom: 20px;
}

.mittimart-footer a {
    text-decoration: none;
    color: #5d4037;
    transition: color 0.3s;
}

.mittimart-footer a:hover {
    color: #8d6e63;
}

.footer-divider {
    margin: 40px 0 20px;
}

.footer-bottom {
    font-size: 14px;
    color: #6d4c41;
    text-align: center;
}

/* ================================
        QUICK VIEW MODAL FIX
================================ */
#quickViewModal .modal-dialog {
    max-width: 700px;
    width: 90%;
    margin: 50px auto 0;

    transform: none !important;
    /* vertically center remove */
}

#quickViewModal .modal-content {
    max-height: calc(100vh - 120px);

    overflow-y: auto;

    border-radius: 20px;
}

#quickViewModal img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

/*
/* Fix Offcanvas over Navbar */
.offcanvas {
    z-index: 1055;
    /* default is 1045, higher than navbar */
}

#cartPanel {
    z-index: 1100;
    /* default navbar ~1000, offcanvas ~1050 */
}

.offcanvas-body {
    max-height: calc(100vh - 80px);
    /* 80px navbar ke liye gap */
    overflow-y: auto;
    /* scroll agar content lamba ho */
}

#cartPanel .offcanvas-content {
    border-radius: 20px 0 0 20px;
    /* left side round */
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

/* ================================
        RESPONSIVE
================================ */
@media (max-width: 992px) {
    .carousel-img {
        height: 65vh;
    }
}

@media (max-width: 768px) {
    .mittimart-footer {
        text-align: center;
    }

    #quickViewModal .modal-content {
        height: 400px;
    }

    #quickViewModal img {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .carousel-img {
        height: 50vh;
    }

    .carousel-caption {
        bottom: 15%;
    }
}

/* Offcanvas above navbar */
.offcanvas {
    z-index: 2100 !important;
}

.offcanvas-backdrop {
    z-index: 2090 !important;
}

#searchResults {
    max-height: 250px;
    overflow-y: auto;
    width: 100%;
    z-index: 9999;
}

#searchResults .active {
    background-color: #007bff;
    color: white;
}

/* Search Form Wrapper */
.search-form {
    display: flex;
    align-items: center;
    backdrop-filter: blur(10px);
    /* Glass effect */
    background: rgba(210, 180, 140, 0.25);
    /* Warm cream/chocolate, subtle */
    border-radius: 30px;
    /* Rounded */
    padding: 5px 30px;
    /* Smaller height */
    border: 1px solid rgba(210, 180, 140, 0.4);
    max-width: 500px;
    /* Slightly wider */
    margin: 0 auto;
}

/* Input Styling */
.search-form input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    color: #693315;
    /* Dark brown text */
    padding: 5px 30px;
    /* Compact height */
    font-size: 16px;
    /* Easy to read */
    border-radius: 30px;
}

/* Placeholder Styling */
.search-form input::placeholder {
    color: rgba(90, 52, 32, 0.7);
    /* subtle brown */
}

/* Clear Button Styling */
.clear-btn {
    display: none;
    /* hidden by default */
    cursor: pointer;
    color: #5a3420;
    font-weight: bold;
    margin-left: -28px;
    /* inside input */
    z-index: 2;
    font-size: 18px;
}

/* Submit Button Styling */
.search-form button {
    margin-left: 10px;
    padding: 8px 18px;
    /* Smaller height */
    border-radius: 30px;
    background-color: #b55d2b;
    /* Mittimart warm brown */
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s;
}

.search-form button:hover {
    background-color: #9a4a20;
}
