:root {
    --spice-red: #c0392b;
    --spice-orange: #d35400;
    --spice-yellow: #f39c12;
    --earth-dark: #2c3e50;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fcfcfc;
}

.text-spice {
    color: var(--spice-red);
}

.bg-spice {
    background-color: var(--spice-red);
    color: white;
}

.btn-spice {
    background-color: var(--spice-orange);
    color: white;
    border: none;
}

.btn-spice:hover {
    background-color: var(--spice-red);
    color: white;
}

/* Flipkart-style Search Bar */
.search-container {
    background-color: #f0f2f5;
    /* Soft grey background like modern e-commerce */
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.search-container input {
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.search-container input:focus {
    background-color: transparent;
    box-shadow: none;
}

.search-icon-wrapper {
    padding: 0 15px;
    color: #878787;
}

/* Hero Carousel Styling */
.carousel-item {
    height: 80vh;
    /* Adjust height as needed */
    min-height: 400px;
    background-size: cover;
    background-position: center;
}

/* Dark overlay to make text readable */
.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 62, 80, 0.7);
}

.carousel-caption {
    bottom: 30%;
    /* Centers the text vertically better */
    z-index: 2;
}

/* Product Cards */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 10px;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-img {
    height: 200px;
    object-fit: cover;
}

/* Categories */
.category-card {
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.category-card img {
    height: 250px;
    object-fit: cover;
    width: 100%;
    transition: transform 0.5s ease;
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px;
    color: white;
}

.text-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.page-header {
    background: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.8)), url('https://images.unsplash.com/photo-1596040033229-a9821ebd058d?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover;
    padding: 60px 0;
    color: white;
    text-align: center;
}

.page-header .breadcrumb {
    justify-content: center;
    margin-bottom: 0;
}

.page-header .breadcrumb-item a {
    color: var(--spice-yellow);
    text-decoration: none;
    transition: color 0.2s ease;
}

.page-header .breadcrumb-item a:hover {
    color: white;
}

.page-header .breadcrumb-item.active {
    color: #e0e0e0;
}

/* Change Bootstrap's default breadcrumb divider color */
.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: white;
}


/* Cart Specific Styles */
.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.qty-input {
    width: 50px;
    text-align: center;
}


/* Login Card Specific Styles */
.login-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.login-image {
    background: url('https://images.unsplash.com/photo-1596040033229-a9821ebd058d?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80') center/cover;
    min-height: 100%;
}

/* Adjusting for mobile so the image shows up nicely on top if stacked */
@media (max-width: 767.98px) {
    .login-image {
        min-height: 250px;
    }
}


/* Signup Card Specific Styles */
.signup-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Fresh image for the signup page */
.signup-image {
    background: url('https://images.unsplash.com/photo-1596040033229-a9821ebd058d?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80') center/cover;
    min-height: 100%;
}

@media (max-width: 767.98px) {
    .signup-image {
        min-height: 250px;
    }
}

/* Toast Customization */
.toast-container {
    z-index: 1060;
    /* Ensures it stays above the navbar */
}

.text-cursor {
    cursor: pointer;
}


/* Profile Sidebar Navigation */
.profile-nav .list-group-item {
    border: none;
    padding: 15px 20px;
    color: #495057;
    font-weight: 500;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.2s;
}

.profile-nav .list-group-item:hover {
    background-color: #f8f9fa;
    color: var(--spice-red);
}

.profile-nav .list-group-item.active {
    background-color: #fef0f0;
    /* Very light spice red */
    color: var(--spice-red);
    border-left: 4px solid var(--spice-red);
}

/* Mobile Profile Nav Scroll */
@media (max-width: 991.98px) {
    .profile-nav {
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 10px;
    }

    .profile-nav .list-group-item {
        margin-right: 10px;
        margin-bottom: 0;
    }

    .profile-nav .list-group-item.active {
        border-left: none;
        border-bottom: 4px solid var(--spice-red);
    }
}

/* Profile Picture Avatar */
.avatar-upload {
    position: relative;
    max-width: 120px;
}

.avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.avatar-edit {
    position: absolute;
    right: 0;
    bottom: 10px;
}

.avatar-edit input {
    display: none;
}

.avatar-edit label {
    display: inline-block;
    width: 34px;
    height: 34px;
    margin-bottom: 0;
    border-radius: 50%;
    background: var(--spice-orange);
    color: white;
    border: 2px solid white;
    box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    text-align: center;
    line-height: 30px;
    transition: all 0.2s ease-in-out;
}

.avatar-edit label:hover {
    background: var(--spice-red);
}

/* Form Customizations */
.form-control:focus,
.form-select:focus {
    border-color: var(--spice-orange);
    box-shadow: 0 0 0 0.25rem rgba(211, 84, 0, 0.25);
}

/* Order Summary Sticky */
.order-summary-card {
    border-radius: 12px;
    border: none;
    position: sticky;
    top: 100px;
    /* Stays below the navbar */
}

.product-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eaeaea;
}

/* Product Gallery */
.main-img-container {
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #eaeaea;
    background-color: white;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-product-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.thumbnail-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.thumbnail-img.active,
.thumbnail-img:hover {
    border-color: var(--spice-orange);
    opacity: 0.8;
}

/* Quantity Selector */
.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ced4da;
    border-radius: 50rem;
    overflow: hidden;
    width: 140px;
}

.qty-btn {
    background: none;
    border: none;
    padding: 10px 15px;
    font-weight: bold;
    color: #495057;
}

.qty-btn:hover {
    background-color: #f8f9fa;
}

.qty-input {
    border: none;
    text-align: center;
    width: 50px;
    font-weight: 600;
    pointer-events: none;
    /* User uses buttons to change */
}

.qty-input:focus {
    outline: none;
}

/* Custom Tabs */

.nav-tabs .nav-link {
    color: #495057;
    font-weight: 600;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 15px 20px;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: var(--spice-orange);
}

.nav-tabs .nav-link.active {
    color: var(--spice-red);
    background: transparent;
    border-color: transparent transparent var(--spice-red) transparent;
}

/* Product Card Styles */
.product-card {
    border-radius: 15px;
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.product-img-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
    background-color: #fff;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

.wishlist-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    color: #ccc;
    transition: all 0.2s;
    z-index: 2;
}

.wishlist-btn:hover,
.wishlist-btn.active {
    color: var(--spice-red);
}

/* Filter Sidebar Customization */
.filter-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--earth-dark);
}

.form-check-input:checked {
    background-color: var(--spice-orange);
    border-color: var(--spice-orange);
}

/* Pagination */
.page-link {
    color: var(--earth-dark);
    border-radius: 8px;
    margin: 0 3px;
    border: none;
}

.page-item.active .page-link {
    background-color: var(--spice-red);
    color: white;
}

.detail-card {
    border-radius: 12px;
    border: 1px solid #eaeaea;
    background-color: #fff;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}


/* Order Progress Tracker */
.tracking-progress {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 2rem;
    margin-top: 1rem;
}

.tracking-progress::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #e9ecef;
    z-index: 1;
    transform: translateY(-50%);
}

.tracking-progress-bar {
    position: absolute;
    top: 50%;
    left: 0;
    height: 3px;
    background-color: var(--spice-orange);
    z-index: 1;
    transform: translateY(-50%);
    /* Adjust this to show progress */
}


.tracking-step {
    position: relative;
    z-index: 2;
    background-color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #e9ecef;
    color: #adb5bd;
    font-size: 0.8rem;
}

.tracking-step.completed {
    border-color: var(--spice-orange);
    background-color: var(--spice-orange);
    color: white;
}

.tracking-step.active {
    border-color: var(--spice-orange);
    color: var(--spice-orange);
    font-weight: bold;
}

.tracking-label {
    position: absolute;
    top: 35px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    white-space: nowrap;
}

.tracking-step.completed .tracking-label,
.tracking-step.active .tracking-label {
    color: var(--earth-dark);
}

.coupon-badge {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    border: 1px dashed #2e7d32;
}

/* Auth Card Layout */
.auth-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
    position: relative;
}

.auth-header {
    background-color: var(--spice-red);
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    color: white;
    border-bottom-left-radius: 30%;
    border-bottom-right-radius: 30%;
    margin-bottom: 2rem;
}

.icon-circle {
    width: 70px;
    height: 70px;
    background-color: white;
    color: var(--spice-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Text CAPTCHA Styling */
.captcha-box {
    /* Simulated image background noise */
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.12"/></svg>'), #eef2f5;
    border: 1px solid #ced4da;
    border-radius: 8px;
    height: 55px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 6px;
    color: var(--earth-dark);
    user-select: none;
    /* Prevents copy-pasting the text */
    position: relative;
    overflow: hidden;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Distorting lines over the text */
.captcha-box::before {
    content: '';
    position: absolute;
    width: 120%;
    height: 2px;
    background: var(--spice-red);
    transform: rotate(-6deg);
    top: 40%;
    left: -10%;
    opacity: 0.6;
}

.captcha-box::after {
    content: '';
    position: absolute;
    width: 120%;
    height: 2px;
    background: var(--spice-yellow);
    transform: rotate(8deg);
    top: 60%;
    left: -10%;
    opacity: 0.6;
}

.captcha-char {
    display: inline-block;
    transform: skewX(-15deg);
    /* Slight italic skew to the letters */
}

.refresh-btn {
    height: 55px;
    border-radius: 8px;
    border: 1px solid #ced4da;
    background-color: #fff;
    color: #6c757d;
    transition: all 0.2s;
}

.refresh-btn:hover {
    background-color: #f8f9fa;
    color: var(--spice-orange);
}

/* Coupon Card Styles */
.coupon-card {
    border: 2px dashed #d35400;
    /* Earthy spice color dashed border */
    background-color: #fff6f0;
    /* Very soft warm background */
    border-radius: 1rem;
    transition: transform 0.2s ease;
}

.coupon-card:hover {
    transform: translateY(-3px);
}

.coupon-code-box {
    background-color: white;
    border: 1px dashed #ccc;
    border-radius: 0.5rem;
    font-family: monospace;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.coupon-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Optional: Set a fixed line-height to ensure consistent card heights */
    line-height: 1.5;
    height: 3em;
    /* 1.5 line-height * 2 lines = 3em */
}