body {
    background-color: #f5f5f5;
}

/* Product Card Container */
.product-card {
    height: 100%;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s;
}

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

/* Product Image */
.product-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
}

.hero-section {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    padding: 80px 0;
    margin-bottom: 60px;
}

.sidebar {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.category-item {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 5px;
}

.category-item:hover,
.category-item.active {
    background-color: #007bff;
    color: white;
}

.search-container {
    margin-bottom: 30px;
}

#product-list {
    min-height: 500px;
}


/* Product Image Container - Remove all padding/gaps */
.product-image-container {
    height: 250px;
    padding: 0 !important;
    /* Remove padding */
    margin: 0 !important;
    /* Remove margin */
    background: white;
    border: none !important;
    /* Remove borders */
    overflow: hidden;
    /* Prevent any overflow */
}

/* Product Image - Force full coverage */
.product-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    /* Fill container, cropping if needed */
    object-position: center;
    /* Focus on center */
    display: block;
    /* Remove inline gaps */
}

.hero-carousel {
    margin-bottom: 0;
}

.hero-carousel .carousel-item {
    height: 320px;
    background-color: #777;
}

.hero-carousel .carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.hero-carousel .carousel-caption {
    background: transparent !important;
    text-shadow:
        1px 1px 3px #000,
        -1px -1px 3px #000;
    bottom: 40% !important;
    transform: translateY(4em);
}



/* ===== FANCY BUTTON STYLE ===== */
.hero-carousel .carousel-caption .btn {
    background: linear-gradient(45deg, #6a11cb 0%, #2575fc 100%) !important;
    border: none;
    color: white !important;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
    text-shadow: none;
}

.hero-carousel .carousel-caption .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 117, 252, 0.4);
}

.hero-carousel .carousel-caption .btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.13);
    transform: rotate(30deg);
    transition: all 0.7s ease;
    z-index: -1;
}

.hero-carousel .carousel-caption .btn:hover::after {
    left: 100%;
}

.hover-pointer {
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.product-card {
    color: inherit;
    text-decoration: none;
}

.card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
}

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

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

.card-body .text-dark {
    color: #212529 !important;
}

.card-body .text-primary {
    color: #0d6efd !important;
}

.product-image-container {
    padding: 20px;
    background: #f8f9fa;
}

.out-of-stock {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #d32f2f;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.search-section {
    margin-bottom: 40px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
}

/* --- Final, Corrected Category Circles Styles --- */
.category-container {
    display: flex;
    align-items: center;
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.category-circles-wrapper {
    flex-grow: 1;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0 10px;
    -ms-overflow-style: none;
    /* For IE and Edge */
    scrollbar-width: none;
    /* For Firefox */
}

.category-circles-wrapper::-webkit-scrollbar {
    display: none;
}

.category-circles {
    display: flex;
    flex-wrap: nowrap;
    gap: 40px;
    padding: 0;
    margin: 0;
    justify-content: flex-start;
}

.scroll-button {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #ccc;
    border-radius: 50%;
    min-width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    color: #555;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.scroll-button:hover {
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.scroll-button.left {
    left: 0;
}

.scroll-button.right {
    right: 0;
}

.scroll-button.hidden {
    opacity: 0;
    pointer-events: none;
}

.category-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 160px;
    flex-shrink: 0;
    cursor: pointer;
    text-align: center;
    transition: transform 0.3s;
}

.category-circle:hover {
    transform: translateY(-5px);
}

.category-circle .circle-image {
    width: 140px !important;
    height: 140px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: none !important;
    padding: 5px;
    margin-bottom: 5px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.category-circle:hover .circle-image {
    border-color: #0056b3;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.category-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-top: 5px;
}





.navbar-light.bg-light.sticky-top {
    background-color: #131921 !important;
    /* Amazon's dark blue */
    padding: 0.5rem 0;
}

/* Logo and brand text */
.navbar-light .navbar-brand {
    font-weight: 700 !important;
    /* Bold like Mercado Libre logo */
    font-size: 16px;
    /* Slightly larger for branding */
    color: white !important;
}

/* Search bar container */
.navbar-search {
    max-width: 800px;
    /* Wider search like Amazon */
}

/* Search Bar Styling */
.navbar-search .input-group input[type="text"] {
    background-color: white !important;
    color: #212529;
    /* dark text for contrast */
    border: 1px solid #ccc;
}

.navbar-search .input-group {
    background-color: rgb(12, 12, 12) !important;
    border-radius: 5px;
    overflow: hidden;
}

/* Search input field */
#product-search {
    border-radius: 4px 0 0 4px !important;
    border-right: none;
    color: #000000;
    /* Pure black */
}

/* Search button */
#search-button {
    background-color: #ece92d !important;
    /* Amazon's orange-yellow */
    border-color: #FEBD69 !important;
    border-radius: 0 4px 4px 0 !important;
    color: #111 !important;
}

/* Cart button */
.btn-outline-dark {
    border-color: #666 !important;
    color: white !important;
}

/* Profile/register buttons */
.btn-outline-primary {
    border-color: #666 !important;
    color: white !important;
}

/* Login button */
.btn-primary {
    background-color: #FFD814 !important;
    /* Amazon's yellow */
    border-color: #FFD814 !important;
    color: #111 !important;
}

/* Hover effects */
#search-button:hover {
    background-color: #F3A847 !important;
}

.btn-primary:hover {
    background-color: #F7CA00 !important;
}


/* Price Styles dunno if i delete this */
.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 20px;
    margin-right: 8px;
}

.current-price {
    color: #e63946;
    font-size: 24px;
    font-weight: bold;
}

.discount-badge {
    background-color: #e63946;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 13px;
    margin-left: 8px;
    vertical-align: middle;
}


/*Style for  the new price range slider */
.price-range-slider {
    width: 100%;
    margin-bottom: 1rem;
}

.price-range-slider .ui-slider-range {
    background: #3c00e0ff;
}

.price-range-slider .ui-slider-handle {
    background: #fff;
    border: 2px solid #3c00e0ff;
}

.navbar-toggler-white .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='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Optional: to make the background of the navbar itself dark so the icon is visible */
.navbar-toggler-white {
    border-color: rgba(255, 255, 255, 0.5);
}

/* Optional: to make the background of the navbar itself dark so the icon is visible */
.bg-light {
    background-color: #212529 !important;
    /* Example dark background */
}


/* prices decimals style*/
.product-price span sup {
    font-size: 0.4em;
    /* Makes the decimal font size half of the parent */
    position: super;
    top: -0.90em;
    /* Moves it up to the correct position */
}

/*
.product-card {
    width: 200px;
    height: 270px !important;
    display: flex;
    flex-direction: column;
}
*/
    
    .product-image-container {
        height: 160px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        background-color: #f8f9fa;
    }
    
    .product-img {
        max-height: 100%;
        max-width: 100%;
        object-fit: contain;
    }
    
    .card-body {
        flex-grow: 1;
        padding: 8px;
    }
    
    .card-title {
        font-size: 12px;
        margin-bottom: 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.2;
        min-height: 30px;
    }
    
    .product-price {
        font-size: 10px;
    }
    
    .product-price sup {
        font-size: 8px;
    }
    
    .badge {
        font-size: 8px !important;
        padding: 2px 5px;
    }
    
    .main-price {
        font-size: 16px !important;
        color: #000000;
        font-family: Arial, sans-serif;
        font-weight: normal;
    }
    
    .favorite-icon {
        font-size: 12px !important;
    }
  


    
    
    /* ===== PRESERVE YOUR ORIGINAL CATEGORY CIRCLE DESIGN ===== */
.category-container {
    display: flex;
    align-items: center;
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.category-circles-wrapper {
    flex-grow: 1;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0 10px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.category-circles-wrapper::-webkit-scrollbar {
    display: none;
}

.category-circles {
    display: flex;
    flex-wrap: nowrap;
    gap: 40px;
    padding: 20px 0;
    margin: 0;
    justify-content: flex-start;
    align-items: center;
}

/* Keep your original scroll button styles */
.scroll-button {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #ccc;
    border-radius: 50%;
    min-width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    color: #555;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.scroll-button:hover {
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.scroll-button.left {
    left: 0;
}

.scroll-button.right {
    right: 0;
}

.scroll-button.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Preserve your original circle design */
.category-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 160px;
    flex-shrink: 0;
    cursor: pointer;
    text-align: center;
    transition: transform 0.3s;
}

.category-circle:hover {
    transform: translateY(-5px);
}

.category-circle .circle-image {
    width: 140px !important;
    height: 140px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: none !important;
    padding: 5px;
    margin-bottom: 5px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.category-circle:hover .circle-image {
    border-color: #0056b3;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.category-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-top: 5px;
}



/* Ensure category names are always visible */
.category-name {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #333 !important;
}

.add-to-cart-icon {
    transition: transform 0.2s ease;
}

.add-to-cart-icon:hover {
    transform: scale(1.1);
}

.add-to-cart-icon.pulse {
    animation: pulse 0.6s;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}



/* Tiny White Circle Cart Icon */
.cart-icon-circle {
    background-color: rgba(255, 255, 255, 0.9);
    width: 32px;             /* Reduced from 42px */
    height: 32px;            /* Reduced from 42px */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); /* Softer shadow */
    transition: all 0.2s ease; /* Slightly faster */
    color: #333 !important;
    font-size: 0.6rem !important;         /* Smaller icon */
}

.cart-icon-circle:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(1.15);  /* Slightly less scale */
    color: #0478f4 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.cart-icon-circle:active {
    transform: scale(0.9);
}


/* BIG, BOLD DISCOUNT BADGE */
.discount-badge {
    font-size: 12px !important;       /* Bigger text */
    font-weight: 700 !important;      /* Extra bold */
    padding: 4px 10px !important;     /* More padding = bigger badge */
    border-radius: 8px !important;    /* Softer, modern corners */
    text-transform: uppercase;        /* ALL CAPS for impact */
    letter-spacing: 0.5px;            /* Slightly spaced for readability */
    animation: pulseBadge 2s infinite; /* Optional: gentle pulse */
}

/* Optional: Pulse Animation */
@keyframes pulseBadge {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Even BIGGER on hover */
.discount-badge:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
}





@media (max-width: 768px) {
    .hero-carousel .carousel-item {
        height: 300px;
    }

    .hero-carousel .carousel-caption {
        bottom: 20%;
    }

    .hero-carousel .carousel-caption h1,
    .hero-carousel .carousel-caption h2 {
        font-size: 1.5rem;
    }

    .hero-carousel .carousel-caption p {
        font-size: 1rem;
        margin-bottom: 1rem !important;
    }

    .hero-carousel .carousel-caption a {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

/* Media Query to adjust for smaller screens */
@media (max-width: 768px) {
    .category-circles {
        gap: 15px;
    }

    .category-circle {
        width: 65px;
    }

    .circle-image {
        width: 55px !important;
        height: 55px !important;
    }

    .category-name {
        font-size: 11px;
    }

    .scroll-button {
        min-width: 30px;
        height: 30px;
        font-size: 1rem;
    }
}





  
   /* ===== INDEX.PHP - 5 CARDS PER ROW ===== */
@media (min-width: 1200px) {
    .col-index-5 {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

/* ===== SEARCH.PHP - 4 CARDS PER ROW ===== */
@media (min-width: 1200px) {
    .col-search-4 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* ===== SHARED RESPONSIVE BEHAVIOR ===== */
/* Tablet (3 per row) */
@media (min-width: 992px) and (max-width: 1199px) {
    .col-index-5,
    .col-search-4 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
}

/* Small Tablet (3 per row) */
@media (min-width: 768px) and (max-width: 991px) {
    .col-index-5,
    .col-search-4 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
}

/* Mobile (2 per row) */
@media (max-width: 767px) {
    .col-index-5,
    .col-search-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Extra Small Mobile (1 per row) */
@media (max-width: 576px) {
    .col-index-5,
    .col-search-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

    /* Mobile and Tablet Font Sizes */
    @media (max-width: 991px) {
        .card-title {
            font-size: 16px !important;
            line-height: 1.3;
            min-height: 42px;
        }
        
        .product-price {
            font-size: 14px !important;
        }
        
        .product-price sup {
            font-size: 12px !important;
        }
        
        .main-price {
            font-size: 20px !important;
        }
        
        .badge {
            font-size: 12px !important;
            padding: 4px 8px;
        }
        
        .favorite-icon {
            font-size: 16px !important;
        }
        
        .product-image-container {
            height: 120px; /* Taller on mobile/tablet */
        }
    }
    
    /* Extra small devices (phones) */
    @media (max-width: 576px) {
        .card-title {
            font-size: 17px !important;
        }
        
        .main-price {
            font-size: 22px !important;
        }
        
        .product-image-container {
            height: 140px; /* Even taller on phones */
        }
    }

/* MOBILE FIX - Preserve your design but make it work on small screens */
@media (max-width: 767px) {
    .category-circles {
        gap: 25px;
        padding: 15px 0;
    }
    
    .category-circle {
        width: 110px; /* Slightly smaller but still large enough */
    }
    
    .category-circle .circle-image {
        width: 90px !important; /* Slightly smaller but still visible */
        height: 90px !important;
        margin-bottom: 8px;
    }
    
    .category-name {
        font-size: 14px; /* Keep it readable */
        margin-top: 3px;
        white-space: normal;
        line-height: 1.3;
        min-height: 24px;
    }
    
    .scroll-button {
        min-width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .category-circles {
        gap: 20px;
        padding: 12px 0;
    }
    
    .category-circle {
        width: 95px;
    }
    
    .category-circle .circle-image {
        width: 75px !important;
        height: 75px !important;
        margin-bottom: 6px;
    }
    
    .category-name {
        font-size: 13px;
        min-height: 22px;
    }
    
    .scroll-button {
        min-width: 30px;
        height: 30px;
        font-size: 1rem;
    }
}
