* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', sans-serif;
    background: linear-gradient(135deg, #e4f7f6 0%, #b2e6e3 100%);
    background-attachment: fixed;
    color: #333;
    min-height: 100vh;
    scroll-behavior: smooth;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === L O G O === */
.top-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 20px 10px 20px;
    position: relative;
}

.logo-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.logo-text {
    font-family: 'Grand Hotel', cursive;
    font-size: 4rem;
    line-height: 1;
    font-weight: normal;
}
.entre { color: #1a8685; }
.cosas { color: #e06236; }

.logo-subtitle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}
.line {
    width: 30px;
    height: 2px;
    background-color: #7abeb8;
}
.bazar-pill {
    background-color: #89cfcb;
    color: white;
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    letter-spacing: 2px;
}

/* === S E A R C H   S E C T I O N === */
.search-section {
    display: flex;
    justify-content: center;
    margin: 20px 0 30px 0;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 50px;
    padding: 2px;
    box-shadow: 0 4px 15px rgba(26, 134, 133, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(137, 207, 203, 0.3);
}

.search-box:focus-within {
    box-shadow: 0 8px 30px rgba(224, 98, 54, 0.2);
    transform: translateY(-2px);
}

.search-box input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 15px 60px 15px 30px;
    font-size: 1.1rem;
    font-family: 'Quicksand', sans-serif;
    color: #333;
    outline: none;
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #1a8685;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.search-icon:hover {
    color: #e06236;
}

/* === B A N N E R === */
.ribbon-banner {
    margin: 30px auto 40px auto;
    background: linear-gradient(to right, #fcebb6, #efd68c, #fcebb6);
    color: #0b4f4c;
    text-align: center;
    padding: 15px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(223, 102, 61, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.6);
    position: relative;
    max-width: 800px;
}

.ribbon-banner::before, .ribbon-banner::after {
    content: '✨';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}
.ribbon-banner::before { left: 15px; }
.ribbon-banner::after { right: 15px; }

.ribbon-content {
    font-family: 'Nunito', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
}
.ribbon-content strong {
    color: #e06236;
}

/* === B A N N E R S   G R I D === */
.banners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0 40px 0;
}

.banner-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(26, 134, 133, 0.15);
    transition: transform 0.3s ease;
}

.banner-item:hover {
    transform: scale(1.02);
}

.banner-item img {
    width: 100%;
    display: block;
    object-fit: cover;
}


/* === P R O D U C T S === */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    padding-bottom: 80px;
}

.product-card {
    background-color: #ffffff;
    border-radius: 20px;
    position: relative;
    padding: 12px;    
    box-shadow: 0 10px 20px rgba(26, 134, 133, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.6s ease;
    border: 2px solid transparent;
    display: grid;
    grid-template-rows: 200px 1fr; /* Imagen fija, resto flexible */
    height: 100%;
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 25px rgba(224, 98, 54, 0.2);
    border: 2px solid #89cfcb;
}

.product-image-wrap {
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    background: #f4f6f8;
    height: 200px; 
    flex-shrink: 0;
    margin-bottom: 5px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    padding: 10px;
    transition: transform 0.5s ease;
}
.product-card:hover .product-image {
    transform: scale(1.05);
}

div.product-image:empty {
    display: flex;
    align-items: center;
    justify-content: center;
}
div.product-image:empty::after {
    content: '📷';
    font-size: 2rem;
    opacity: 0.2;
}

.product-promo {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #e06236;
    color: white;
    font-family: 'Nunito', sans-serif;
    font-size: 0.8rem;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 12px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(224, 98, 54, 0.5);
}

.product-info {
    text-align: center;
    padding: 10px 0 0 0;
    display: grid;
    grid-template-rows: 2.8rem 2.4rem 50px auto; /* Titulo, Desc, Precio, Boton */
    gap: 8px;
    align-items: center;
}

.product-title {
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    color: #1a8685;
    margin: 0;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
    overflow: hidden;
    height: 2.8rem;
}

.product-desc {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
    overflow: hidden;
    height: 2.4rem;
}

.product-price, .product-price-wrap {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 1.6rem;
    color: #333;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}
.price-old {
    text-decoration: line-through;
    color: #a0aec0;
    font-size: 1.1rem;
    font-weight: 700;
}
.price-new {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 1.7rem;
    color: #e06236;
}
.off-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e53e3e;
    color: white;
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(229, 62, 62, 0.3);
    z-index: 10;
}
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: linear-gradient(to right, #ed7756, #e06236);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 30px;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(224, 98, 54, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:active {
    transform: scale(0.96);
}

/* === C A R T   F L O A T I N G === */
.cart-floating {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #ffffff;
    color: #1a8685;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(26, 134, 133, 0.3);
    cursor: pointer;
    z-index: 900;
    transition: transform 0.3s;
}
.cart-floating:hover {
    transform: scale(1.1);
}
.cart-icon-svg {
    width: 28px;
    height: 28px;
}
#cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #e06236;
    color: white;
    font-family: 'Nunito', sans-serif;
    font-size: 0.85rem;
    font-weight: bold;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(20%, -20%);
}


/* === S I D E B A R   C A R T === */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100dvh; /* Dynamic viewport height for mobile */
    background-color: #fff;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.cart-sidebar.open {
    right: 0;
}
.cart-header {
    background-color: #1a8685;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-header h3 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
}
.btn-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dotted #ccc;
}
.cart-item-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    color: #333;
}
.cart-item-price {
    color: #e06236;
    font-weight: bold;
}
.cart-footer {
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); /* Espacio extra para moviles modernos */
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

/* === Q T Y   C O N T R O L S === */
.btn-qty {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background: #fff;
    font-weight: 900;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1a8685;
}
.qty-display {
    min-width: 25px;
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
}
.btn-remove {
    background: none;
    border: none;
    color: #ff4d4d;
    font-size: 1.2rem;
    padding: 5px;
    cursor: pointer;
}
.cart-total {
    font-family: 'Nunito', sans-serif;
    font-size: 1.4rem;
    font-weight: 900;
    text-align: right;
    margin-bottom: 15px;
    color: #1a8685;
}
.btn-checkout {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 15px;
    border: none;
    background-color: #25d366;
    color: white;
    font-family: 'Nunito', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: background-color 0.3s;
}
.btn-checkout:hover {
    background-color: #20bc59;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(26, 134, 133, 0.4);
    backdrop-filter: blur(2px);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}
.overlay.active {
    display: block;
    opacity: 1;
}

/* Loader */
.loading {
    text-align: center;
    grid-column: 1 / -1;
    color: #1a8685;
    font-size: 1.2rem;
    font-weight: bold;
}

/* === P R O M O   S L I D E R (Product Carousel) === */
.promo-slider {
    margin: 20px auto 40px auto;
    max-width: 1100px;
    height: 400px;
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(26, 134, 133, 0.15);
    background: #fff;
    border: 1px solid rgba(137, 207, 203, 0.2);
}
.slider-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.promo-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 60px;
    box-sizing: border-box;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    position: relative;
}
.promo-slide::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: url('https://www.transparenttextures.com/patterns/cubes.png');
    opacity: 0.03;
    pointer-events: none;
}
.promo-slide-img {
    height: 320px;
    width: 45%;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
    transition: transform 0.3s ease;
    z-index: 2;
}
.promo-slide:hover .promo-slide-img {
    transform: scale(1.05) rotate(2deg);
}
.promo-slide-content {
    width: 50%;
    z-index: 2;
}
.promo-slide-content .promo-badge {
    display: inline-block;
    background: #e06236;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.promo-slide-content h2 {
    font-family: 'Nunito', sans-serif;
    color: #1a8685;
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 15px;
}
.promo-slide-content .price-tag {
    font-size: 2.5rem;
    font-weight: 900;
    color: #333;
    margin-bottom: 25px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.promo-slide-content .price-currency { font-size: 1.5rem; color: #e06236; }

@media (max-width: 768px) {
    .promo-slider { height: 500px; }
    .promo-slide { flex-direction: column; padding: 30px; text-align: center; }
    .promo-slide-img { height: 200px; width: 100%; margin-bottom: 20px; }
    .promo-slide-content { width: 100%; }
    .promo-slide-content h2 { font-size: 2rem; }
}
.promo-slider .slider-controls {
    position: absolute;
    bottom: 15px;
    right: 20px;
    display: flex;
    gap: 10px;
}
.slider-controls button {
    background: rgba(26, 134, 133, 0.8);
    color: white;
    border: none;
    width: 40px; height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
}
.slider-controls button:hover {
    background: #1a8685;
}

/* === W H A T S A P P   F L O A T === */
.float-wa {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 900;
    transition: transform 0.3s;
}
.float-wa:hover {
    transform: scale(1.1);
}

/* === C A R T   I T E M   I M G === */
.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
    border: 1px solid #eee;
}
.cart-item-info {
    display: flex;
    align-items: center;
    flex: 1;
}

/* === M O B I L E   R E S P O N S I V E === */
@media (max-width: 768px) {
    .logo-text {
        font-size: 2.8rem;
    }
    .bazar-pill {
        font-size: 0.9rem;
        padding: 2px 15px;
    }
    .ribbon-banner {
        margin: 20px 0;
        padding: 10px 15px;
    }
    .ribbon-content {
        font-size: 1.1rem;
    }
    .ribbon-banner::before, .ribbon-banner::after {
        display: none;
    }

    .promo-slider {
        height: 440px;
    }
    .promo-slide {
        flex-direction: column;
        padding: 20px;
        text-align: center;
    }
    .promo-slide-img {
        height: 180px;
        width: 100%;
        margin-bottom: 15px;
    }
    .promo-slide-content {
        width: 100%;
    }
    .promo-slide-content h2 {
        font-size: 1.5rem;
    }
    .promo-slide-content p {
        font-size: 0.9rem;
        line-clamp: 2;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        display: -webkit-box;
        overflow: hidden;
        height: 2.4rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    .product-card {
        padding: 10px;
        display: grid;
        grid-template-rows: 160px 1fr;
        height: 100%;
    }
    .product-info {
        display: grid;
        grid-template-rows: 2.6rem 2.3rem 40px auto;
        gap: 5px;
        padding: 10px 0 0 0;
        align-items: center;
    }
    .product-image-wrap {
        height: 160px;
        margin-bottom: 0;
    }
    .product-title {
        font-size: 0.95rem;
        height: 2.6rem; 
        margin: 0;
        line-clamp: 2;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    .product-desc {
        font-size: 0.8rem;
        height: 2.3rem; 
        margin: 0;
        line-clamp: 2;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    .product-price, .product-price-wrap {
        font-size: 1.25rem;
        height: 40px; 
        margin: 0;
    }
    .price-new { font-size: 1.4rem; }
    .price-old { font-size: 0.9rem; }

    .btn-primary {
        padding: 10px;
        font-size: 0.85rem;
        margin-top: 5px;
    }

    .cart-sidebar {
        max-width: 100%;
        right: -100%;
    }
    
    .float-wa {
        bottom: 15px;
        right: 15px;
        width: 55px;
        height: 55px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr 1fr;
    }
    .logo-text {
        font-size: 2.2rem;
    }
}
