/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #feefdf !important;
    color: #533B4D !important;
}

html,
body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

body>*:not(footer) {
    flex: 1;
}

/* LOGO */
.site-logo {
    width: 200px;
    height: auto;
    transition: transform 0.3s ease;
}

/* NAVBAR */
.navbar {
    background-color: #533B4D;
    max-height: 65px;
    display: flex;
    align-items: center;
}


.navbar-nav .nav-link,
.navbar-nav2 .nav-link {
    color: #FAE3C6 !important;
    padding-bottom: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}


.navbar-nav .nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding-bottom: 2px;
    margin-top: -2px;
}

.navbar-nav .nav-text {
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
}

.navbar-nav .nav-text::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background-color: #FAE3C6;
    transition: width 0.3s ease-in;
}

.navbar-nav .nav-link:hover .nav-text::after,
.navbar-nav .nav-link.active .nav-text::after {
    width: 100%;
}

.navbar .dropdown-toggle {
    margin-top: -2px;
}

.dropdown-menu .dropdown-item {
    color: #533B4D !important;
}

.dropdown-menu .dropdown-item:active,
.dropdown-menu .dropdown-item:focus,
.dropdown-menu .dropdown-item:hover {
    background-color: #E4D0D0 !important;
    color: #533B4D !important;
}

.nav-link.cart-link {
    position: relative;
    display: inline-block;
}

.navbar-nav2 .nav-item:last-child {
    margin-right: 1rem;
}

.icon {
    margin-top: 0px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-overlay {
    font-family: 'Poppins', sans-serif;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 80px;
    background-color: #533B4D;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    pointer-events: all;
}

.search-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-style: italic;
    width: 100%;
    max-width: 800px;
    position: relative;
}

.search-content input {
    background-color: #f9f3ea;
}

#searchOverlay input::placeholder {
    font-size: 1.1rem;
    color: #533B4D;
    font-style: italic;
}

.custom-close {
    color: #FAE3C6 !important;
    opacity: 1 !important;
    font-size: 1.5rem;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #FAE3C6;
    color: #533B4D;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 2px solid #533B4D;
    min-width: 18px;
    min-height: 18px;
    line-height: 1;
    text-align: center;
    z-index: 1;
}

.cart-badge:empty {
    display: none;
}

.cart-badge:not(:empty) {
    display: flex !important;
}

.navbar-toggler {
    border: none;
    color: #FAE3C6;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-nav2 {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.navbar-nav2 .nav-link, 
.navbar-nav2 .icon, 
.navbar-nav2 .nav-item {
    display: flex;
    align-items: center;
    height: 100%;
}

.navbar-nav2 .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    margin: 0;
    height: 100%;
}

/* Fix dropdown overlap in mobile menu */
.offcanvas {
    background-color: #533B4D !important;
    color: #FAE3C6 !important;
}

.offcanvas-header {
    color: #FAE3C6 !important;
    border-bottom: 1px solid rgba(250, 227, 198, 0.1);
}

/* Offcanvas dropdown container */
.offcanvas .dropdown {
    position: relative;
}

/* Offcanvas dropdown menu - override Bootstrap defaults */
.offcanvas .dropdown-menu {
    position: static !important;
    float: none !important;
    width: 100% !important;
    margin: 0.25rem 0 0 0 !important;
    padding: 0 !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    z-index: 1;
    transform: none !important;
    inset: auto !important;
}

/* Offcanvas dropdown items */
.offcanvas .dropdown-item {
    color: #FAE3C6 !important;
    padding: 0.5rem 1rem !important;
    border-bottom: 1px solid rgba(250, 227, 198, 0.1) !important;
    background-color: transparent !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
}

.offcanvas .dropdown-item:last-child {
    border-bottom: none !important;
    margin-bottom: 0.5rem !important;
}

.offcanvas .dropdown-item:hover,
.offcanvas .dropdown-item:focus {
    background-color: rgba(250, 227, 198, 0.1) !important;
    color: #FAE3C6 !important;
}

/* Dropdown toggle arrow */
.offcanvas .dropdown-toggle::after {
    display: inline-block !important;
    margin-left: 0.255em !important;
    vertical-align: 0.255em !important;
    content: "" !important;
    border-top: 0.3em solid #FAE3C6 !important;
    border-right: 0.3em solid transparent !important;
    border-bottom: 0 !important;
    border-left: 0.3em solid transparent !important;
    transition: transform 0.2s ease !important;
}

.offcanvas .dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg) !important;
}

.btn-close {
    filter: invert(91%) sepia(9%) saturate(626%) hue-rotate(320deg) brightness(96%) contrast(92%);
    opacity: 1;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23FAE3C6'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
}

@media (min-width: 992px) {
    .icon {
        margin-top: -1.2rem !important;
    }

    .navbar-nav2 .nav-item {
        width: 25px;
        height: 30px;
    }

    /* Product titles and prices - Large devices */
    .product-title {
        font-size: 1rem !important;
    }

    .product-price {
        font-size: 1.1rem !important;
    }

    .product-mrp {
        font-size: 0.9rem !important;
    }

    /* Trusted factors - Large devices */
    .trust-factors i {
        font-size: 2.5rem !important;
    }

    .trust-factors p {
        font-size: 1.1rem !important;
    }

    /* Footer - Large devices */
    footer h5 {
        font-size: 1.1rem !important;
    }

    footer p {
        font-size: 1rem !important;
    }

    footer .site-logo {
        max-width: 160px !important;
    }

    .navbar-nav2 .nav-link {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 100% !important;
        padding: 0.5rem !important;
        margin: 0 !important;
    }

    .navbar-nav2 .nav-link i {
        margin: 0 !important;
        padding: 0 !important;
        vertical-align: middle !important;
        align-self: center !important;
        line-height: 1 !important;
        display: flex !important;
    }
}

/* ======================== */
/* TABLET (426px – 991px)  */
/* ======================== */
@media (min-width: 426px) and (max-width: 991px) {
    .site-logo {
        max-width: 140px;
    }

    .navbar-nav2 .nav-item {
        height: 36px;
        width: 28px;
    }

    .navbar .nav-link {
        font-size: 0.85rem;
    }

    .navbar-toggler {
        padding: 0.25rem 0.4rem;
        font-size: 0.9rem !important;
    }

    .mobile-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-60%);
        z-index: 10;
    }

    /* Product titles and prices - Tablet */
    .product-title {
        font-size: 0.9rem !important;
    }

    .product-price {
        font-size: 0.95rem !important;
    }

    .product-mrp {
        font-size: 0.8rem !important;
    }

    /* Trusted factors - Tablet */
    .trust-factors i {
        font-size: 2rem !important;
    }

    .trust-factors p {
        font-size: 0.9rem !important;
    }

    /* Footer - Tablet */
    footer h5 {
        font-size: 1rem !important;
    }

    footer p {
        font-size: 0.85rem !important;
    }

    footer .site-logo {
        max-width: 120px !important;
    }

    .offcanvas .dropdown-menu {
        position: static !important;
        float: none !important;
        width: 100% !important;
        margin: 0.25rem 0 0 0 !important;
        padding: 0 !important;
        background-color: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        z-index: 1;
        transform: none !important;
        inset: auto !important;
    }

    .offcanvas .dropdown-item {
        color: #FAE3C6 !important;
        padding: 0.5rem 1rem !important;
        border-bottom: 1px solid rgba(250, 227, 198, 0.1) !important;
        background-color: transparent !important;
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        text-decoration: none !important;
    }

    .offcanvas .dropdown-item:last-child {
        border-bottom: none !important;
        margin-bottom: 0.5rem !important;
    }

    .offcanvas .dropdown-item:hover,
    .offcanvas .dropdown-item:focus {
        background-color: rgba(250, 227, 198, 0.1) !important;
        color: #FAE3C6 !important;
    }

    .offcanvas .dropdown-toggle::after {
        display: inline-block !important;
        margin-left: 0.255em !important;
        vertical-align: 0.255em !important;
        content: "" !important;
        border-top: 0.3em solid #FAE3C6 !important;
        border-right: 0.3em solid transparent !important;
        border-bottom: 0 !important;
        border-left: 0.3em solid transparent !important;
        transition: transform 0.2s ease !important;
    }

    .offcanvas .dropdown-toggle[aria-expanded="true"]::after {
        transform: rotate(180deg) !important;
    }
}

/* ======================== */
/* MOBILE (320px – 425px)  */
/* ======================== */
@media (min-width: 320px) and (max-width: 426px) {
    .site-logo {
        max-width: 120px;
    }

    .navbar-toggler {
        padding: 0.25rem 0.4rem;
        font-size: 0.8rem !important;
    }

    .navbar .nav-link {
        font-size: 0.7rem;
    }

    .mobile-logo {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-65%, -50%);
        z-index: 10;
    }

    .navbar-nav2 .nav-item {
        height: 36px;
        width: 22px;
    }

    .cart-badge {
        font-size: 0.65rem;
        width: 16px;
        height: 16px;
    }

    /* Product titles and prices - Mobile */
    .product-title {
        font-size: 0.8rem !important;
    }

    .product-price {
        font-size: 0.85rem !important;
    }

    .product-mrp {
        font-size: 0.75rem !important;
    }

    /* Trusted factors - Mobile */
    .trust-factors i {
        font-size: 1.8rem !important;
    }

    .trust-factors p {
        font-size: 0.8rem !important;
    }

    /* Footer - Mobile */
    footer h5 {
        font-size: 0.9rem !important;
    }

    footer p {
        font-size: 0.75rem !important;
    }

    footer .site-logo {
        max-width: 100px !important;
    }
}

/* CAROUSEL */
/* Ensure carousel images are responsive */
.carousel-item img {
    width: 100%;
    min-height: auto !important;
    object-fit: cover;
}

.carousel-item {
    position: relative;
}

@media (min-width: 300px) and (max-width: 600px) {
    .carousel-inner {
        min-height: 120px !important;
        /* Force min-height */
        max-height: 300px !important;
        /* Cap the height */
    }

    .carousel-overlay {
        padding: 1rem !important;
        /* Reduce padding further */
        justify-content: center !important;
        align-items: center !important;
    }

    .explore-btn {
        padding: 6px 15px !important;
        font-size: 1rem !important;
    }

    #shop-by-categories h2 {
        margin-top: 20px !important;
        /* Override categories.php margin */
        margin-bottom: 20px !important;
        font-size: 1.5rem !important;
    }

    .category-card {
        margin-bottom: 15px !important;
    }

    .container-fluid,
    .container {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
}

/* Extra refinement for 300–400px */
@media (min-width: 300px) and (max-width: 400px) {
    .carousel-inner {
        min-height: 100px !important;
        max-height: 200px !important;
    }

    #shop-by-categories h2 {
        margin-top: 15px !important;
        margin-bottom: 15px !important;
        font-size: 1.3rem !important;
    }

    .category-card {
        margin-bottom: 10px !important;
    }
}

/* PRODUCT CARD */
.product-card {
    border: none;
    background: transparent;
    text-align: center;
}

.product-img-container {
    position: relative;
    width: 100%;
    padding-bottom: 150%;
    overflow: hidden;
    margin-bottom: 12px;
}

.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease;
}

.product-img.secondary {
    opacity: 0;
}

.product-img-container:hover .product-img.primary {
    opacity: 0;
}

.product-img-container:hover .product-img.secondary {
    opacity: 1;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #533B4D;
    color: #FAE3C6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

.product-title,
.product-price,
.product-mrp {
    color: #533B4D;
    text-align: center;
}

.product-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.product-price {
    font-weight: 600;
    font-size: 1.1rem;
}

.product-mrp {
    text-decoration: line-through;
    font-size: 0.9rem;
    margin-right: 8px;
}

.color-container {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.color-square {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #ddd;
    display: inline-block;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.color-square:hover,
.color-square.active {
    transform: scale(1.1);
    border: 2px solid #533B4D;
}

.btn-purple {
    background-color: #533B4D !important;
    border-color: #533B4D !important;
    color: #fff !important;
}

.btn-purple:hover {
    background-color: #7A5C7A !important;
    border-color: #7A5C7A !important;
    color: #fff !important;
}

.offcanvas-body .nav-link {
    color: #FAE3C6;
    /* Bootstrap's default body text color */
    border-bottom: 1px solid #ddd;
    padding-left: 1rem;
    padding-right: 1rem;
    transition: background-color 0.2s ease;
}

.offcanvas-body .nav-link:last-child {
    border-bottom: none;
    /* no border after last item */
}

.offcanvas-body .nav-link:hover,
.offcanvas-body .nav-link:focus {
    background-color: #7b556b;
    /* light gray background on hover */
    color: #FAE3C6;
    /* black text on hover */
    text-decoration: none;
    /* remove underline on hover */
}

.card {
    border-radius: 20px !important;
    border: none;
}

.card .form-check-label {
    color: #333;
}

.card .form-check-input:checked {
    background-color: #533B4D;
    border-color: #533B4D;
}

.btn-outline-purple {
    color: #533B4D !important;
    border-color: #533B4D !important;
}

.btn-outline-purple:hover {
    background-color: #533B4D !important;
    border-color: #533B4D !important;
    color: #fff !important;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(83, 59, 77, 0.25);
    border-color: #533B4D;
}

input[type="radio"] {
    accent-color: #533B4D;
    border: 1.5px solid #533B4D;
    background-color: #fff;
}

.form-check-label strong {
    color: #533B4D;
}

.order-summary {
    background-color: #fff;
    border-radius: 20px;
    padding: 20px;
}

.text-muted {
    font-size: 14px;
}

.fw-bold {
    font-weight: 600 !important;
}

.fs-5 {
    font-size: 1.25rem;
}

.border-top {
    border-top: 2px solid #eee !important;
}

.border-bottom {
    border-bottom: 1px solid #ddd !important;
}

.form-control:focus {
    border-color: #533B4D !important;
    box-shadow: none !important;
    outline: none;
}

.text-purple {
    color: #533B4D !important;
}

.bg-purple {
    background-color: #533B4D !important;
}

.border-purple {
    border-color: #533B4D !important;
}

.btn-outline-purple {
    color: #533B4D;
    border-color: #533B4D;
}

.btn-outline-purple:hover {
    color: #fff;
    background-color: #533B4D;
    border-color: #533B4D;
}

.card-header.bg-purple {
    background: linear-gradient(135deg, #533B4D, #7A5C7A) !important;
}

.form-control-lg {
    font-size: 1rem;
    padding: 0.75rem 1rem;
    font-family: 'Poppins', sans-serif;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.fa-3x {
    font-size: 2.5em;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.card {
    border: none;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    border-bottom: none;
    font-family: 'Poppins', sans-serif;
}

.alert {
    border-radius: 8px;
    border: none;
    font-family: 'Poppins', sans-serif;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.form-text {
    color: #6c757d;
    font-size: 0.875rem;
    font-family: 'Poppins', sans-serif;
}

.form-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.btn {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.form-control {
    font-family: 'Poppins', sans-serif;
}


/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    color: #533B4D;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

/* Fix vertical alignment for all navbar icons */
.navbar-nav2 .nav-link i,
.navbar-nav2 .nav-link svg {
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle !important;
    align-self: center !important;
    line-height: 1 !important;
    display: flex !important;
}

.navbar-nav2 .nav-item.icon {
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
    display: flex !important;
    height: 100%;
}