﻿/* ==== GLOBAL RESET AND BASE STYLES ==== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* FONTS */
p {
    opacity: 0.5;
    font-size: 14px;
}

h1 {
    text-align: left;
}

#ofertas h4 {
    font-size: 20px;
}

/** HEART icon*/
.image-container {
    background-color: white;
    position: relative;
    display: block !important;
    width: 100%;
    height: 200px;
    border-radius: 20px;
    align-items: center;
    justify-content: center;
}

.product-image {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 20px;
    background: white;
    /*box-shadow: 0 0 10px rgba(0,0,0,0.1);*/
}

.favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    padding: 10px;
    transition: background-color 0.3s;
    cursor: pointer;
}

    .favorite-btn.favorited i {
        color: red;
    }
 


/* ==== HOME SECTION ==== */
#home {
    margin-bottom: 0;
    scroll-margin-top: 100px; /* Adjust based on your header height */
}

    #home.content-box {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 30px;
    }

    #home .biglabel {
        text-align: center;
    }

    #home .btn-box {
        display: flex;
        gap: 20px;
        margin-top: 20px;
        justify-content: center;
        align-items: center;
    }

    #home .btn, #home .btn-plus {
        position: relative;
        padding: 12px 25px;
        font-size: 12px;
        text-decoration: none;
        border: 2px solid black;
        border-radius: 40px;
        background: white;
        color: black;
        font-family: "Poppins", sans-serif;
    }

    #home .btn-plus-active {
        position: relative;
        padding: 10px 25px;
        font-size: 12px;
        border: 4px solid black;
        border-radius: 40px;
        background: black;
        color: white;
        font-family: "Poppins", sans-serif;
        text-decoration: none;
    }

#home .discounted-price {
    font-size: 1.25rem;
    font-weight: 500;
    color: black;
}

#home .price-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
}

.btn-active {
    padding: 10px 25px;
    font-size: 12px;
    border: 4px solid black;
    border-radius: 40px;
    background: black;
    color: white;
    font-family: "Poppins", sans-serif;
    text-decoration: none;
    box-shadow: 5px 5px 10px gray;
    cursor: default;
}


    #home .btn:hover, #home .btn-plus:hover {
        background: #212121;
        color: white;
    }

    #home .btn-active:hover {
        background: black;
        color: white;
        box-shadow: 5px 5px 10px gray;
    }

    #home .card-body .btn-primary {
        display: block;
        width: 100%;
        border-radius: 20px;
        background-color: transparent;
        color: black;
        border: 1px solid black;
        padding: 10px;
        font-size: 14px;
        text-align: center;
        font-family: "Poppins", sans-serif;
        transition: background-color 0.3s ease;
    }

        #home .card-body .btn-primary:hover {
            background-color: #333;
            color: #fff;
        }

    /* HOME Card Styles */
#home .card-container {
    display: flex;
    flex-direction: row;
    justify-content: start;
    align-items: center;
    width: 100%;
    gap: 10px;
    margin: 24px 0;
}

#home .card {
    min-width: 250px;
    height: auto; /* Reset height to auto for original home cards */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    margin: 6px;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    #home .card:hover {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
        transform: scale(1.02);
    }

    #home .card-img-top {
        max-height: 16.5rem;
        width: 100%;
        height: 200px;
        border-radius: 10px;
        object-fit: cover;
    }

#home .card-body {
    padding: 1.25rem;
}

#home .card-body a {
    text-decoration: none !important;
    color: black;
}

    #home .card-body a:hover {
        text-decoration: none !important;
        color: #d45e49;
    }

#home .card-title {
    font-size: 16px;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.2em;
}

    #home .card-price {
        font-size: 20px;
        font-weight: 500;
    }

#home .card-text {
    margin-bottom: 12px;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.2em;
}

.product-card-link {
    text-decoration: none;
    color: inherit;
}

    .product-card-link:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transition: box-shadow 0.2s ease-in-out;
        color: #d9a22e;
    }

    /* Cart Button */
    #home .cart-button {
        font-size: 12.5px;
        background-color: transparent;
        outline-color: black;
        border-radius: 16px;
        border: thin solid black;
        padding: 10px;
        width: 100%;
    }

        #home .cart-button:hover {
            box-shadow: 0 2px 8px #bebebe;
        }

        #home .cart-button.active {
            background-color: black;
            color: white;
            font-weight: 500;
            border: thin solid #010301;
        }

/** Discount Styles */
.discount-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.original-price {
    text-decoration: line-through;
    color: #999;
    padding: 0;
    margin-bottom: 10px;
}

.discounted-price {
    color: black !important;
    opacity: 1 !important;
    font-size: 1.2rem;
    font-weight: 500;
    padding: 0;
    margin: 0;
}

/** SEE MORE BUTTON */
.see-more-btn-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.btn-ver {
    position: relative;
    padding: 8px 50px;
    font-size: 14px;
    border-radius: 40px;
    background: #191919;
    color: white;
    text-decoration: none;
    font-weight: 200;
    font-family: "Poppins", sans-serif;
}

    .btn-ver:hover {
        background: transparent;
        color: black;
        box-shadow: 5px 5px 6px gray;
    }

/* ==== OFERTAS SECTION ==== */
#ofertas {
    margin-top: 0;
    margin-bottom: 0;
    display: flex;
    justify-content: center;
    flex-direction: column;
    scroll-margin-top: 120px; /* Adjust based on your header height */
}

#ofertas h1 {
    margin: 0;
}

    #ofertas .container-ofertas {
        margin-top: 24px;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: row;
    }

    #ofertas .photo-container {
        width: 60%;
        margin-right: 20px;
    }

    #ofertas .img-ofertas {
        width: 100%;
        height: auto;
        border-radius: 10px;
    }

    #ofertas .container-info {
        width: 40%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        margin-left: 20px;
        flex-grow: 1;
    }

    #ofertas .text-column .desc-txt {
        opacity: 1;
    }

    #ofertas .btn-ver-tienda {
        background-color: #000;
        color: #fff;
        padding: 10px 25px;
        border-radius: 20px;
        border: none;
        font-size: 14px;
        text-decoration: none;
        display: inline-block;
        margin: 0;
        text-align: center;
    }

        #ofertas .btn-ver-tienda:hover {
            background: #FFD700;
            color: black;
        }

/* Products Showcase Section */
    #ofertas .products-showcase {
        max-width: 100%;
        margin: 40px 0;
        padding: 0;
        background-color: #f8d4d4;
        box-sizing: border-box;
    }

#ofertas .showcase-header {
    display: flex;
    flex-direction: column;
    text-align: center;
    margin: 40px 0;
}

    #ofertas .showcase-header h3 {
        font-size: 40px;
        font-weight: 600;
        margin: 0 0 10px 0;
        padding: 0;
        color: #e74c3c;
        text-align: center;
    }

#ofertas .showcase-header p {
    font-size: 14px;
    opacity: 0.9;
    padding: 0;
    margin: 0;
}

#ofertas .products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 2px;
    padding: 0 40px;
}

#ofertas .card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 30px;
}

    #ofertas .card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    }

#ofertas .image-container {
    position: relative;
    overflow: hidden;
}

#ofertas .card-img-top {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

#ofertas .card:hover .card-img-top {
    transform: scale(1.1);
}


#ofertas .discount-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

#ofertas .card-body {
    padding: 25px;
}

#ofertas .card-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    text-decoration: none;
}

 #ofertas .card-text {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.4;
}

#ofertas .price-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

#ofertas .discounted-price {
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
}

#ofertas .original-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
    opacity: 0.7;
}

#ofertas a {
    text-decoration: none;
}

/* ==== RECIEN LLEGADOS SECTION ==== */
#recientes {
    margin-top: 0;
    margin-bottom: 4px;
    display: flex;
    justify-content: start;
    flex-direction: column;
    scroll-margin-top: 120px;
}

    #recientes .card-container {
        display: flex;
        flex-direction: row;
        justify-content: start;
        align-items: center;
        width: 100%;
        gap: 10px;
        margin: 0 20px 20px;
    }

    #recientes .card {
        min-width: 250px;
        height: auto;
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
        margin: 6px;
        border-radius: 12px;
        overflow: hidden;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

        #recientes .card:hover {
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
            transform: scale(1.02);
        }

    #recientes .card-img-top {
        max-height: 16.5rem;
        width: 100%;
        height: 200px;
        border-radius: 10px;
        object-fit: cover;
    }

    #recientes p {
        font-size: 14px;
    }

    #recientes .card-body a {
        text-decoration: none !important;
        color: black;
    }

        #recientes .card-body a:hover {
            text-decoration: none !important;
            color: #d45e49;
        }

    #recientes .card-title {
        font-size: 16px;
        font-weight: 500;
    }

    #recientes .card-price {
        font-size: 16px;
        font-weight: 500;
    }

    #recientes .card-text {
        margin-bottom: 12px;
        font-size: 14px;
    }

/* slider arrows < and > */
    #recientes .slider-controls {
        display: flex;
        justify-content: flex-end; /* Aligns items to the right */
        width: 100%;
        margin-bottom: 6px; /* Space between arrows and cards */
        padding: 0;
    }

    #recientes .slider-arrow {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: white;
        border: 1px solid #ddd;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        cursor: pointer;
        transition: all 0.3s ease;
        margin-left: 10px; /* Space between the arrows */
    }

        #recientes .slider-arrow:hover {
            background-color: #f8f8f8;
        }

        #recientes .slider-arrow i {
            font-size: 18px;
            color: #333;
        }

        #recientes h1 {
            margin-bottom: 0;
        }

/* ==== FAMOSOS SECTION ==== */
#famosos {
    margin-top: 0;
    margin-bottom: 80px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    overflow-x: hidden;
    scroll-margin-top: 120px; /* Adjust based on your header height */
}

    #famosos .card-container {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        width: 100%;
        gap: 20px;
        margin: 30px 20px;
    }

    #famosos .card {
        max-width: 100%;
        height: 330px;
        border-radius: 12px;
        overflow: hidden;
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    #famosos .card-img-top {
        height: 200px;
        width: 100%;
        object-fit: cover;
        border-radius: 10px;
    }

    #famosos h1 {
        margin-bottom: 30px; 
    }

    #famosos p {
        font-size: 14px;
    }

.card-number {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #d9a22e;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    z-index: 2;
}

/* Specific layout for Famosos section - 2 rows of 5 cards */
#famosos .top-products-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px; /* space between the two rows */
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

#famosos .top-products-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 20px;
}

    #famosos .top-products-row .card {
        flex: 1 1 calc(20% - 20px); /* 5 cards in a row with gap */
        max-width: 250px;
    }

/* CART BUTTON*/
.cart-icon-container {
    bottom: 10px;
    right: 10px;
}

.cart-btn {
    background-color: white;
    border: none;
    border-radius: 50%;
    height: 40px;
    min-width: 40px;
    padding: 0;
    margin: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    overflow: hidden;
    white-space: nowrap;
    cursor: pointer;
}

    .cart-btn i {
        font-size: 20px;
        color: #333;
        margin: 0;
        padding: 0;
    }

.cart-text {
    font-size: 14px;
    color: white;
    opacity: 0; /* initially hidden */
    max-width: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-width 0.3s ease;
}

/* When active */
.cart-btn.active {
    background-color: black;
    border-radius: 20px;
    padding: 0 15px;
    min-width: auto;
}

    .cart-btn.active i {
        color: white;
    }

    .cart-btn.active .cart-text {
        opacity: 1;
        width: auto;
        max-width: 100px;
    }

/* Navigation arrows styling */
.slider-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    padding-bottom: 10px;
}

.slider-arrow {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: 10;
}

    .slider-arrow:hover {
        background-color: #f8f8f8;
    }

    .slider-arrow i {
        font-size: 18px;
        color: #333;
    }

    .slider-arrow.left {
        left: 0;
    }

    .slider-arrow.right {
        right: 0;
    }

.slider-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease;
}

    .slider-wrapper .card-container {
        display: flex;
        flex-wrap: nowrap;
        width: 100%; /* Full width instead of max-content */
        gap: 10px;
        margin: 30px 0;
        transform: translateX(0);
        transition: transform 0.5s ease;
    }

    .slider-wrapper .card {
        min-width: 250px;
        width: 250px;
        flex-shrink: 0;
    }

/* Hide scrollbar */
.slider-container::-webkit-scrollbar {
    display: none;
}

.slider-container {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

/* **************************RESPONSIVE DESIGNS *****************************/

/* DESKTOPS (Large Screens */
@media (max-width: 1200px) {
    #famosos .top-products-row .card {
        flex: 1 1 calc(25% - 20px);
    }

    h1, #home .biglabel {
        font-size: 2.5rem;
    }
}

/* TABLETS (Medium screens) */
@media (max-width: 1024px) {
    #famosos .top-products-container {
        grid-template-columns: repeat(3, 1fr);
    }

    h1, #home .biglabel {
        font-size: 2.2rem;
    }
}

/* Small screens */
@media (max-width: 768px) {
    #home .card-container,
    #recientes .card-container,
    #famosos .card-container {
        flex-direction: column;
    }

    #home .card,
    #recientes .card,
    #famosos .card {
        width: 90%;
    }

    /* Layout adjustments */
    #home .content-box {
        flex-direction: column;
        gap: 10px;
    }

    #home .btn,
    #home .btn-plus,
    #home .btn-active,
    #home .btn-plus-active {
        padding: 10px 20px;
        font-size: 14px;
    }

    #home .btn-box {
        flex-wrap: wrap;
    }

    h1 {
        font-size: 30px;
    }

    h3 {
        font-size: 16px;
    }

    #ofertas .container-ofertas {
        flex-direction: column;
    }

    #ofertas .photo-container,
    #ofertas .container-info {
        width: 100%;
        margin: 0;
    }

    #ofertas .container-info {
        margin-top: 20px;
    }

    /* Product Ofertas showcase*/
    #ofertas .container-ofertas {
        flex-direction: column;
        text-align: center;
    }

    #ofertas h1 {
        font-size: 2.5rem;
    }

    #ofertas .text-column h2 {
        font-size: 2rem;
    }

        #ofertas .text-column h2:last-of-type {
            font-size: 3rem;
        }

    #ofertas .products-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns */
    }

    /* Sliders */
    .slider-controls {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 20px;
        margin: 10px 0;
    }

    .slider-arrow {
        width: 32px;
        height: 32px;
    }

        .slider-arrow i {
            font-size: 16px;
        }

    .slider-wrapper .card-container {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0 10px;
        gap: 20px;
    }

    .slider-wrapper .card {
        flex: 1 1 100%;
        max-width: 100%;
        margin-bottom: 20px;
    }

    .slider-arrow.left,
    .slider-arrow.right {
        position: static;
    }

    #home .card-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 20px;
    }

    #home .card {
        min-width: 100%;
        height: auto;
    }

    #recientes .recientes-controls {
        display: none;
    }


    #recientes .card-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 20px;
    }

    #recientes .card {
        min-width: 100%;
        height: auto;
    }

    #recientes .slider-arrow {
        width: 32px;
        height: 32px;
    }

        #recientes .slider-arrow i {
            font-size: 16px;
        }

    #famosos .top-products-container {
        grid-template-columns: repeat(2, 1fr);
        align-items: center;
    }

    #famosos .top-products-row {
        flex-direction: column;
        align-items: center;
    }

        #famosos .top-products-row .card {
            width: 90%; /* or 100% if you prefer full width */
            max-width: 300px; /* optional to limit max size */
        }

    .slider-wrapper .card-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        padding: 0 10px;
    }

    .slider-wrapper .card {
        flex: 1 1 100%;
        max-width: 100%;
        margin-bottom: 20px;
    }

    .slider-arrow.right,
    .slider-arrow.left {
        display: none;
    }
}

@media (max-width: 480px) {
    #home .card-container,
    #recientes .card-container,
    #famosos .card-container {
        flex-direction: column;
    }

    #home .card,
    #recientes .card,
    #famosos .card {
        width: 100%;
    }

    #famosos .top-products-container {
        grid-template-columns: 1fr;
    }

    #home .btn-box {
        display: flex;
        gap: 10px;
    }

    

    #home .card {
        height: auto;
        display: flex;
        flex-direction: column;
        justify-content: space-between; /* Ensures button stays at bottom if needed */
    }

    #home .card-body {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

        #home .card-body > *:last-child {
            margin-bottom: 0 !important;
        }

    #ofertas .products-grid {
        grid-template-columns: 1fr; /* 1 column */
    }

    .slider-controls {
        gap: 10px;
    }

    .slider-arrow {
        width: 28px;
        height: 28px;
    }

        .slider-arrow i {
            font-size: 14px;
        }
}

@media (max-width: 600px) {
    #famosos .top-products-row .card {
        flex: 1 1 100%;
    }

    .recientes-header {
        flex-direction: row;
        align-items: flex-start;
    }

    .recientes-controls {
        margin-top: 10px;
    }
}