/* --- UNIVERSAL RESET & BASE --- */
html,
body {
    font-family: 'Assistant', 'Open Sans', Arial, sans-serif;
    background-color: #f8f9fa;
    color: #282c3f;
    overflow-x: hidden;
    padding-top: 110px; /* Space for top-bar (30px) + navbar (80px) */
}

@media (max-width: 991px) {
    body {
        padding-top: 100px;
        padding-bottom: 70px; /* Space for mobile sticky bottom nav */
    }
}

/* --- NEW MYNTRA-STYLE OFFER BAR --- */
.top-bar {
    height: 30px;
    background-color: #f5f5f6;
    color: #535766;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1050;
    border-bottom: 1px solid #eaeaec;
}

/* Marquee Animation Styles (Original logic kept) */
.marquee-content {
    display: inline-block;
    animation: marquee-slide 25s linear infinite;
    white-space: nowrap;
}

@keyframes marquee-slide {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-100%); }
}

/* --- MAIN NAVBAR --- */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 4px 12px 0 rgba(0,0,0,.05);
    padding: 0;
    height: 80px;
    position: fixed;
    top: 30px; /* Below top-bar */
    z-index: 1040;
    width: 100vw;
}

.navbar-brand {
    font-weight: 900;
    letter-spacing: -1px;
    color: #282c3f !important;
}

.navbar-brand img {
    height: 40px;
}

/* Desktop Menu Links */
.nav-link-custom {
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 700;
    color: #282c3f;
    padding: 28px 15px !important;
    display: inline-block;
    text-decoration: none;
    border-bottom: 4px solid transparent;
    transition: all 0.2s;
}

.nav-link-custom:hover {
    border-bottom: 4px solid #a38216;
}

/* --- SEARCH BAR (Desktop Central) --- */
.desktop-search-container {
    flex-grow: 1;
    max-width: 500px;
    margin: 0 30px;
}

.search-input-wrapper {
    position: relative;
    background: #f5f5f6;
    border-radius: 4px;
    border: 1px solid transparent;
}

.search-input-wrapper:focus-within {
    background: #fff;
    border: 1px solid #d4d5d9;
}

.search-input-wrapper input {
    background: transparent;
    border: none;
    padding: 10px 15px 10px 45px;
    width: 100%;
    font-size: 14px;
    outline: none;
}

.search-input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #696e79;
}

/* --- ACTION ICONS (Desktop Right) --- */
.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 25px;
    text-decoration: none;
    color: #282c3f;
    font-size: 12px;
    font-weight: 700;
}

.action-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

/* --- MOBILE STICKY BOTTOM NAV --- */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1050;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #535766;
    font-size: 10px;
    font-weight: 600;
}

.bottom-nav-item.active {
    color: #a38216;
}

.bottom-nav-item i {
    font-size: 20px;
    margin-bottom: 2px;
}

.badge-myntra {
    background: #a38216;
    color: #fff;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    position: absolute;
    top: -5px;
    right: -8px;
}

/* --- FEATURED PRODUCTS SCROLLING STYLES --- */
.featured-products-container {
    position: relative;
    padding: 0;
    margin: 0;
    width: 100%;
}

.scrolling-product-row {
    display: flex;
    overflow-x: scroll;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    margin: 0;
    scroll-snap-type: x mandatory;
}

.scrolling-product-row::-webkit-scrollbar {
    display: none;
}

.scrolling-product-row .product-item-wrapper {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0.5rem;
    box-sizing: border-box;
    scroll-snap-align: start;
}

@media (min-width: 768px) {
    .scrolling-product-row .product-item-wrapper {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

.indicator-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #ccc;
    border-radius: 50%;
    margin: 0 4px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.indicator-dot.active {
    background-color: #000000;
    transform: scale(1.2);
}

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #000000;
    color: white;
    border: none;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background 0.3s;
    display: none;
}

.scroll-arrow.left { left: 10px; }
.scroll-arrow.right { right: 10px; }

@media (min-width: 992px) {
    .scroll-arrow { display: block; }
}

/* --- DROPDOWN LOGIC --- */
.dropdown:hover>.dropdown-menu {
    display: block;
}

.user-dropdown .dropdown-menu {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px;
}

.dropdown-submenu { position: relative; }
.dropdown-submenu>.dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
}

/* --- SEARCH MODAL --- */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

#searchModal input {
    border-radius: 50px;
    padding: 10px 20px;
    border-color: #ddd;
    width: 100%;
    outline: none;
}

.search-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    text-align: left;
}

.search-item img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 1rem;
}

.search-item .details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.search-item .product-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 0.25rem;
}

.search-item .product-price {
    font-weight: bold;
    color: #a38216;;
    font-size: 1.1rem;
}
/* --- OFFCANVAS --- */
.offcanvas-header {
    background-color: black;
    color: white;
    position: sticky;
    top: 0;
}

/* --- PRODUCT CARDS --- */
.product-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    transition: box-shadow 0.3s ease;
    position: relative;
    background: white;
}

.product-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-card .product-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
    min-height: 72px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    text-align: left;
}

.product-card .product-price {
    font-weight: bold;
    color: #000000;
    font-size: 1.25rem;
    text-align: left;
}

/* --- BUTTONS & ANIMATIONS --- */
.btn-success {
    background-color: black !important;
    border-color: black !important;
}

.view-more-btn {
    background-color: transparent;
    color: #000000;
    border: 1px solid #000000;
    font-weight: bold;
    padding: 10px 30px;
    border-radius: 50px;
    transition: 0.3s;
}

.view-more-btn:hover {
    background-color: black;
    color: white;
}

.success-message {
    font-size: 0.9rem;
    color: #000000;
    font-weight: bold;
    text-align: center;
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: black;
    padding: 10px 20px;
    border-radius: 8px;
}

.success-message.visible { opacity: 1; }

/* --- PRODUCT PAGE SPECIFIC --- */
.product-image-container { position: sticky; top: 20px; }
.product-main-image { border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.product-thumbnails img { border: 2px solid transparent; border-radius: 8px; cursor: pointer; }
.product-thumbnails img.active { border-color: #000000; }

.product-details {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.product-price-large {
    font-size: 2rem;
    font-weight: bold;
    color: #000000;
}

.quantity-selector {
    border: 1px solid #ddd;
    border-radius: 50px;
    display: inline-flex;
}

.pagination-style-black .pagination .page-item.active .page-link {
    background-color: #000000 !important;
    border-color: #000000 !important;
    color: white !important;
}

/* SECTION TITLES */
.section-title-line {
    font-weight: bold;
    color: #333;
    position: relative;
    display: inline-block;
    width: 100%;
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title-line::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -8px;
    width: 100px;
    height: 3px;
    background-color: #000000;
}

/* Category Section Styling */
.category-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 15px 10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.category-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.category-circle-item {
    flex: 0 0 auto;
    text-align: center;
    text-decoration: none !important;
    /* On mobile: (100% / 4.5) ensures the 5th one is halved */
    width: calc(22% - 10px); 
}

@media (min-width: 992px) {
    .category-scroll-container {
        justify-content: space-around; /* Spread evenly on desktop */
        overflow-x: hidden; /* No scroll needed on desktop if all fit */
    }
    .category-circle-item {
        /* On desktop: 12 items across */
        width: calc(8.33% - 10px); 
    }
}

.category-circle-wrapper {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 5px;
    border: 1px solid #f0f0f0;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

@media (min-width: 992px) {
    .category-circle-wrapper {
        width: 80px;
        height: 80px;
    }
}

.category-circle-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-circle-label {
    font-size: 10px;
    font-weight: 700;
    color: #282c3f;
    text-transform: uppercase;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Styling for the new "Featured Products" section */

.product-filter-dropdown .dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);

    /* FIX 1: Tighter spacing (Set margin to a very low value to reduce gap) */
    margin-top: 2px !important;

    /* FIX 2: Guarantees full opacity and stacking order over products */
    background-color: white;
    z-index: 1050;
}

/* FIX 4: Ensures individual list items are fully opaque white */
.dropdown-item {
    background-color: white;
}

.product-filter-dropdown .dropdown-item.active,
.product-filter-dropdown .dropdown-item:active {
    background-color: #000000;
    color: white;
}

.product-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    transition: box-shadow 0.3s ease;
    position: relative;
}

.product-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-card img {
    width: 100%;
    height: auto;
}

.product-card .card-body {
    padding: 1rem;
}

.product-card .product-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
    min-height: 72px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    white-space: normal;
    text-align: left;
}

.product-card .product-price {
    font-weight: bold;
    color: #000000;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    text-align: left;
}

.product-buttons {
    display: flex;
    margin-top: 1rem;
    position: relative;

}

.product-buttons .btn-sm {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
}

.btn-success {
    /* Sets the default background color to the Oraimo Green */
    background-color: black !important;
    border-color: black !important;
    color: white !important; /* Ensure text remains white */
}

.btn-success:hover,
.btn-success:focus {
    /* Sets the color when the user hovers or focuses on the button */
    background-color: #000000 !important; /* A slightly darker shade of green */
    border-color: #000000 !important;
    color: white !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Optional: add a slight shadow */
}

.product-buttons .btn {
    border-radius: 50px;
    font-weight: bold;
}

/* --- VIEW MORE BUTTON (based on .btn-outline-success) --- */

.btn-outline-success {
    /* Default state: Green border, Green text */
    color: #000000 !important;
    border-color: #000000 !important;
}

.btn-outline-success:hover,
.btn-outline-success:focus {
    /* HOVER STATE: Fills with Green background, White text */
    background-color: #000000 !important;
    border-color: #000000 !important;
    color: white !important;
}

.view-more-btn {
    /* Override: Ensure default is green outline/text */
    background-color: transparent;
    color: #000000;
    border: 1px solid #000000;
    font-weight: bold;
    padding: 10px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.view-more-btn:hover {
    /* HOVER STATE: Solid Black background, White text */
    background-color: black;
    color: white;
    border-color: black;
}

/* Styles for the success message and animations */
.success-message {
    font-size: 0.9rem;
    color: #000000;
    font-weight: bold;
    text-align: center;
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease-out;
    pointer-events: none;
    white-space: nowrap;
    background-color: black;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.success-message.visible {
    opacity: 1;
}

/* Update the existing stylesheet with the new rule */
.d-grid .btn-light {
    /* FIX: Force text onto a single line */
    white-space: nowrap;
    overflow: hidden;
}

.product-buttons.animate-particles::before,
.product-buttons.animate-particles::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background-color: #000000;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    transform: translate(-50%, -50%);
}

.product-buttons.animate-particles::before {
    animation: particles-1 0.8s ease-out forwards;
}

@keyframes particles-1 {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }

    100% {
        transform: translate(-100px, -100px) scale(0);
        opacity: 0;
    }
}

@keyframes particles-2 {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }

    100% {
        transform: translate(100px, 100px) scale(0);
        opacity: 0;
    }
}

@media (max-width: 767.98px) {
    .product-buttons {
        flex-direction: column;
    }

    .product-buttons .btn {
        margin-bottom: 0.5rem;
    }
}

/* --- PRODUCT PAGE SPECIFIC STYLES --- */
.product-image-container {
    position: sticky;
    top: 20px;
}

.product-main-image {
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.product-thumbnails img {
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.product-thumbnails img:hover,
.product-thumbnails img.active {
    border-color: #000000;
}

.product-details {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.product-title {
    font-weight: bold;
    color: #333;
}

.product-price {
    font-size: 2rem;
    font-weight: bold;
    color: #000000;
}

.quantity-selector {
    border: 1px solid #ddd;
    border-radius: 50px;
    overflow: hidden;
}

.quantity-selector button {
    background-color: transparent;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    color: #333;
    transition: background-color 0.2s;
    border-radius: 50px;
}

.quantity-selector button:hover {
    background-color: #f0f0f0;
}

.quantity-selector input {
    border: none;
    width: 50px;
    text-align: center;
    font-weight: bold;
    color: #333;
    box-shadow: none;
}

.action-buttons .btn {
    border-radius: 50px;
    font-weight: bold;
    padding: 10px 30px;
}

/* Example CSS for your external file */
.pagination-style-black .pagination .page-item.active .page-link {
    background-color: #000000 !important;
    border-color: #000000 !important;
    color: white !important;
}
