* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

:root {
    --bg-principal: #f4f4f6;
    --bg-tarjeta: #ffffff;
    --texto-principal: #333333;
    --texto-secundario: #666666;
    --borde: #dddddd;
}

[data-theme="dark"] {
    --bg-principal: #121212;
    --bg-tarjeta: #1e1e1e;
    --texto-principal: #ffffff;
    --texto-secundario: #aaaaaa;
    --borde: #333333;
}

body {
    background-color: var(--bg-principal);
    color: var(--texto-principal);
    padding-bottom: 100px;
    transition: background 0.3s, color 0.3s;
}

.banner {
    background: linear-gradient(135deg, #9E1200 0%, #ff6b00 100%);
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-placeholder {
    width: 65px;
    height: 65px;
    background-color: #02475e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 11px;
    text-align: center;
    border: 3px solid white;
    overflow: hidden;
}

.logo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-info h1 {
    font-size: 26px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.whatsapp-tag {
    background-color: #25d366;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
    margin-top: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.search-container {
    flex-grow: 1;
    max-width: 400px;
    min-width: 200px;
}

.search-container input {
    width: 100%;
    padding: 12px;
    border-radius: 25px;
    border: 2px solid #fff;
    font-size: 14px;
    outline: none;
    font-weight: bold;
}

.header-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-accion {
    background-color: #ffffff;
    color: #333;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-accion:hover {
    background-color: #e0e0e0;
}

.logout-btn {
    background-color: #d9534f;
    color: white;
    display: none;
}

.theme-toggle-btn {
    font-size: 20px;
    background: none;
    border: none;
    cursor: pointer;
}

.wholesale-notice {
    background-color: #fff;
    color: #ff6b00;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: bold;
    border-bottom: 2px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

[data-theme="dark"] .wholesale-notice {
    background-color: #222;
    border-bottom-color: #333;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-controls select,
.filter-controls input {
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-weight: bold;
}

.price-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.admin-section-wrapper {
    display: none;
    margin: 20px;
    gap: 20px;
}

@media (min-width: 768px) {
    .admin-section-wrapper {
        grid-template-columns: 1fr 2fr;
    }
}

.admin-panel {
    background-color: var(--bg-tarjeta);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #ff6b00;
}

.admin-panel-full {
    grid-column: 1 / -1;
}

.admin-panel h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #ff6b00;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 10px;
}

.checkbox-group input {
    width: auto;
}

.save-btn {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
}

.blue-btn {
    background-color: #3498db;
}

.cancel-btn {
    background-color: #95a5a6;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    width: 100%;
    margin-top: 5px;
    display: none;
}

.categories-container {
    display: flex;
    gap: 15px;
    padding: 15px;
    overflow-x: auto;
    background-color: var(--bg-tarjeta);
    border-bottom: 1px solid var(--borde);
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 85px;
    cursor: pointer;
}

.category-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #ff6b00;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.category-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cat-title-text {
    font-size: 12px;
    font-weight: bold;
    text-align: center;
}

.cat-admin-actions {
    display: none;
    gap: 2px;
    margin-top: 4px;
}

.cat-btn {
    border: none;
    padding: 2px 5px;
    font-size: 9px;
    color: white;
    cursor: pointer;
    border-radius: 2px;
}

.cat-del {
    background-color: #d9534f;
}

.category-section {
    padding: 20px 20px 0 20px;
}

.category-section h2 {
    font-size: 20px;
    background-color: #00a896;
    color: white;
    padding: 8px 15px;
    display: inline-block;
    border-radius: 5px;
}

.featured-section {
    padding: 20px 20px 0 20px;
    display: none;
}

.featured-section h2 {
    font-size: 20px;
    background: linear-gradient(to right, #ff6b00, #ff8c00);
    color: white;
    padding: 8px 15px;
    display: inline-block;
    border-radius: 5px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
    padding: 15px 20px 30px 20px;
}

.product-card {
    background-color: var(--bg-tarjeta);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--borde);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 12;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.fav-btn:hover {
    transform: scale(1.1);
}

.fav-btn.active {
    color: #e74c3c;
    background: #fff;
}

.product-image-container {
    height: 180px;
    background-color: #eaeaea;
    position: relative;
    overflow: hidden;
}

.image-slider {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease-in-out;
}

.image-slider>div {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-slider .emoji-slide {
    font-size: 50px;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arrow-left {
    left: 8px;
}

.arrow-right {
    right: 8px;
}

.slider-dots {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 5px;
    z-index: 5;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: background-color 0.2s;
}

.dot.active {
    background-color: #fff;
}

.admin-actions {
    display: none;
    position: absolute;
    top: 5px;
    left: 5px;
    gap: 5px;
    z-index: 10;
}

.edit-btn-card {
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    color: white;
    font-size: 11px;
    background-color: #3498db;
    cursor: pointer;
    font-weight: bold;
}

.delete-btn {
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    color: white;
    font-size: 11px;
    background-color: #d9534f;
    cursor: pointer;
    font-weight: bold;
}

.product-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.product-stock {
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 3px;
}

.stock-alto {
    color: #2ecc71;
}

.stock-bajo {
    color: #e74c3c;
    animation: parpadeo 1.5s infinite;
}

@keyframes parpadeo {
    50% {
        opacity: 0.5;
    }
}

.product-title {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 4px;
    outline: none;
}

.product-desc {
    font-size: 12px;
    color: var(--texto-secundario);
    margin-bottom: 10px;
    outline: none;
}

.price-box {
    margin-bottom: 10px;
    background-color: rgba(0, 168, 150, 0.06);
    padding: 8px;
    border-radius: 4px;
    border-left: 3px solid #00a896;
}

.price-label {
    font-size: 11px;
    color: var(--texto-secundario);
    font-weight: bold;
    text-transform: uppercase;
}

.active-dynamic-price {
    font-size: 20px;
    font-weight: bold;
    color: #00a896;
    margin-bottom: 2px;
}

.wholesale-info-text {
    font-size: 11px;
    color: #ff6b00;
    font-weight: bold;
    display: block;
    margin-top: 2px;
}

.card-buttons {
    display: flex;
    gap: 5px;
}

.qty-input {
    width: 55px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.add-to-cart-btn {
    background-color: #ff6b00;
    color: white;
    border: none;
    flex-grow: 1;
    padding: 8px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 13px;
}

.add-to-cart-btn:hover {
    background-color: #e05e00;
}

.cart-float-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #ff6b00;
    color: white;
    border: none;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: transform 0.2s ease;
}

.cart-float-btn:hover {
    transform: scale(1.05);
}

.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #d9534f;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 50%;
    border: 2px solid white;
}

.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.cart-modal-content {
    background-color: var(--bg-tarjeta);
    color: var(--texto-principal);
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.cart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--borde);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.cart-modal-header h3 {
    font-size: 18px;
    color: #ff6b00;
}

.close-modal {
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--texto-secundario);
}

.cart-items-list {
    overflow-y: auto;
    flex-grow: 1;
    margin-bottom: 15px;
    padding-right: 5px;
}

.cart-modal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--borde);
    font-size: 14px;
}

.cart-client-form {
    background-color: rgba(0, 0, 0, 0.02);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid var(--borde);
}

.cart-client-form h4 {
    font-size: 13px;
    margin-bottom: 10px;
    color: #00a896;
}

.cart-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.cart-form-grid input {
    padding: 8px;
    font-size: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.full-width-input {
    grid-column: span 2;
}

.cart-modal-footer {
    border-top: 2px solid var(--borde);
    padding-top: 15px;
}

.cart-modal-total {
    font-size: 16px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.send-order-btn {
    background-color: #25d366;
    color: white;
    border: none;
    padding: 12px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.editable-active {
    border: 1px dashed #3498db;
    background-color: rgba(52, 152, 219, 0.1);
}

/* ===== MEJORAS ===== */
.stats-panel {
    display: none;
    grid-column: 1/-1
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px
}

.stat-card {
    background: var(--bg-tarjeta);
    border: 1px solid var(--borde);
    border-radius: 8px;
    padding: 14px;
    text-align: center
}

.stat-card strong {
    display: block;
    font-size: 22px;
    color: #00a896;
    margin-top: 5px
}

.inventory-alert {
    margin-top: 12px;
    padding: 10px;
    border-radius: 6px;
    background: #fff3cd;
    color: #856404;
    font-weight: bold
}

[data-theme="dark"] .inventory-alert {
    background: #3b3217;
    color: #ffd966
}

.product-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 6
}

.product-badge {
    padding: 4px 7px;
    border-radius: 12px;
    background: #e74c3c;
    color: white;
    font-size: 10px;
    font-weight: bold
}

.product-badge.offer {
    background: #f39c12
}

.wishlist-section {
    display: none;
    padding: 20px
}

.wishlist-section h2 {
    font-size: 20px;
    background: #e74c3c;
    color: white;
    padding: 8px 15px;
    display: inline-block;
    border-radius: 5px
}

.wishlist-empty {
    padding: 20px 0;
    color: var(--texto-secundario)
}

.product-detail-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 15px
}

.product-detail-content {
    background: var(--bg-tarjeta);
    color: var(--texto-principal);
    width: 95%;
    max-width: 850px;
    max-height: 90vh;
    overflow: auto;
    border-radius: 12px;
    padding: 20px;
    position: relative
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px
}

.detail-gallery {
    min-height: 320px;
    background: #eee;
    border-radius: 8px;
    overflow: hidden
}

.detail-gallery img {
    width: 100%;
    height: 320px;
    object-fit: contain
}

.detail-emoji {
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px
}

.detail-info h2 {
    margin-bottom: 8px
}

.detail-info p {
    color: var(--texto-secundario);
    margin-bottom: 14px
}

.detail-price {
    font-size: 26px;
    font-weight: bold;
    color: #00a896;
    margin-bottom: 8px
}

.detail-wholesale {
    color: #ff6b00;
    font-weight: bold;
    margin-bottom: 15px
}

.detail-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: none;
    color: var(--texto-secundario);
    font-size: 25px;
    cursor: pointer;
    z-index: 4
}

.payment-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0 15px
}

.payment-option {
    border: 1px solid #ccc;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold
}

.order-history {
    margin-top: 12px;
    max-height: 300px;
    overflow: auto
}

.order-item {
    border: 1px solid var(--borde);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    font-size: 12px
}

.mobile-bottom-bar {
    display: none
}

.security-note {
    font-size: 11px;
    color: #d9534f;
    margin-top: 6px
}

@media(max-width:767px) {
    .banner {
        padding: 12px
    }

    .store-info h1 {
        font-size: 19px
    }

    .logo-placeholder {
        width: 52px;
        height: 52px
    }

    .search-container {
        order: 3;
        width: 100%;
        max-width: none
    }

    .header-controls {
        width: 100%;
        justify-content: space-between
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 10px
    }

    .product-image-container {
        height: 145px
    }

    .product-info {
        padding: 9px
    }

    .product-title {
        font-size: 13px
    }

    .product-desc {
        font-size: 11px
    }

    .active-dynamic-price {
        font-size: 17px
    }

    .qty-input {
        width: 45px
    }

    .add-to-cart-btn {
        font-size: 11px;
        padding: 7px 3px
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .detail-grid {
        grid-template-columns: 1fr
    }

    .detail-gallery,
    .detail-gallery img {
        min-height: 220px;
        height: 220px
    }

    .detail-emoji {
        height: 220px
    }

    .cart-float-btn {
        bottom: 78px;
        right: 15px
    }

    .mobile-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 58px;
        background: var(--bg-tarjeta);
        border-top: 1px solid var(--borde);
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 998
    }

    .mobile-bottom-bar button {
        border: none;
        background: none;
        font-size: 11px;
        color: var(--texto-principal);
        font-weight: bold
    }
}

/* ===== LOGIN ADMINISTRADOR ===== */
.login-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .68);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 18px;
    backdrop-filter: blur(4px)
}

.login-box {
    width: 100%;
    max-width: 410px;
    background: var(--bg-tarjeta);
    color: var(--texto-principal);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .3);
    position: relative;
    border: 1px solid var(--borde);
    animation: loginIn .2s ease-out
}

@keyframes loginIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.98)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.login-icon {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    background: #ff6b00;
    color: white;
    font-size: 30px;
    box-shadow: 0 8px 22px rgba(255, 107, 0, .25)
}

.login-box h2 {
    text-align: center;
    margin: 0 0 5px;
    font-size: 22px
}

.login-subtitle {
    text-align: center;
    color: var(--texto-secundario);
    font-size: 13px;
    margin-bottom: 22px
}

.login-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    color: var(--texto-secundario);
    font-size: 24px;
    cursor: pointer
}

.login-field {
    margin-bottom: 14px
}

.login-field label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 6px
}

.login-input-wrap {
    position: relative
}

.login-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--borde);
    background: var(--bg-principal);
    color: var(--texto-principal);
    border-radius: 9px;
    padding: 12px 42px 12px 12px;
    outline: none;
    font-size: 14px
}

.login-input:focus {
    border-color: #ff6b00;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, .12)
}

.login-eye {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: none;
    cursor: pointer;
    font-size: 17px;
    color: var(--texto-secundario)
}

.login-submit {
    width: 100%;
    border: 0;
    border-radius: 9px;
    background: #ff6b00;
    color: white;
    padding: 12px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    margin-top: 4px
}

.login-submit:hover {
    filter: brightness(.96)
}

.login-submit:disabled {
    opacity: .7;
    cursor: wait
}

.login-cancel {
    width: 100%;
    border: 0;
    background: none;
    color: var(--texto-secundario);
    padding: 10px;
    margin-top: 5px;
    cursor: pointer;
    font-size: 12px
}

.login-error {
    display: none;
    margin: 0 0 12px;
    padding: 9px;
    border-radius: 8px;
    background: #ffe8e5;
    color: #b42318;
    font-size: 12px;
    text-align: center
}

[data-theme="dark"] .login-error {
    background: #3b2020;
    color: #ffb4ad
}

/* =========================================
   MÁS VENDIDOS DE LA SEMANA
========================================= */

.best-sellers-section {
    background: #fff;
    margin: 25px auto;
    padding: 25px;
    width: calc(100% - 40px);
    max-width: 1450px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

.best-sellers-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.best-sellers-header h2 {
    margin: 0;
    font-size: 25px;
    color: #222;
}

.best-sellers-category {
    color: #777;
    font-size: 14px;
}

.view-all-btn {
    border: none;
    background: transparent;
    color: #3483fa;
    font-size: 15px;
    cursor: pointer;
}

.view-all-btn:hover {
    text-decoration: underline;
}

.best-sellers-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.best-sellers-container {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    scroll-behavior: smooth;
    width: 100%;
    padding: 5px 10px 15px;
    scrollbar-width: none;
}

.best-sellers-container::-webkit-scrollbar {
    display: none;
}

.best-seller-card {
    min-width: 205px;
    max-width: 220px;
    flex: 0 0 205px;
    position: relative;
}

.best-seller-image {
    width: 100%;
    height: 215px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 15px;
}

.best-seller-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.best-seller-card:hover .best-seller-image img {
    transform: scale(1.05);
}

.best-seller-card h3 {
    font-size: 15px;
    line-height: 1.3;
    font-weight: 400;
    color: #333;
    height: 40px;
    overflow: hidden;
    margin: 0 0 10px;
}

.old-price {
    color: #777;
    text-decoration: line-through;
    font-size: 14px;
    margin-bottom: 5px;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

.price-row strong {
    font-size: 25px;
    color: #222;
}

.price-row span {
    background: #00a650;
    color: white;
    font-size: 13px;
    font-weight: bold;
    padding: 4px 6px;
    border-radius: 3px;
}

.installments {
    color: #00a650;
    font-size: 14px;
    line-height: 1.4;
    margin-top: 5px;
}

.free-shipping {
    color: #00a650;
    font-weight: bold;
    font-size: 15px;
    margin-top: 12px;
}

.free-shipping small {
    display: inline;
    color: #777;
    font-weight: normal;
    font-size: 13px;
}

.coupon {
    display: inline-block;
    background: #dbeafe;
    color: #3483fa;
    padding: 4px 7px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    margin-top: 8px;
}

.best-seller-arrow {
    position: absolute;
    z-index: 5;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    font-size: 25px;
    color: #3483fa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.best-seller-arrow:hover {
    background: #f5f5f5;
}

.best-seller-arrow.left {
    left: -25px;
}

.best-seller-arrow.right {
    right: -25px;
}


/* MÓVILES */
@media (max-width: 768px) {

    .best-sellers-section {
        width: calc(100% - 20px);
        padding: 15px;
    }

    .best-sellers-header h2 {
        font-size: 20px;
    }

    .best-seller-card {
        min-width: 180px;
        flex-basis: 180px;
    }

    .best-seller-image {
        height: 180px;
    }

    .best-seller-arrow {
        display: none;
    }

    .best-sellers-container {
        gap: 15px;
    }
}

/* =========================================
   MENÚ LATERAL NUEVO
========================================= */

.menu-float-btn {
    position: fixed;
    top: 90px;
    right: 18px;

    width: 56px;
    height: 56px;

    border: none;
    border-radius: 50%;

    background-color: #ff6b00;
    color: white;

    cursor: pointer;

    z-index: 3000;

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    margin: 0;

    font-size: 0;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

.menu-float-btn::before {
    content: "☰";

    font-size: 30px;
    line-height: 1;

    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;
}

.menu-float-btn:hover {
    transform: scale(1.06);
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .50);
    opacity: 0;
    visibility: hidden;
    transition: .3s ease;
    z-index: 2998;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 310px;
    max-width: 88%;
    height: 100vh;

    background: var(--bg-tarjeta);
    color: var(--texto-principal);

    transform: translateX(-100%);
    transition: transform .3s ease;

    z-index: 2999;

    display: flex;
    flex-direction: column;

    box-shadow: 5px 0 25px rgba(0, 0, 0, .25);
}

.side-menu.active {
    transform: translateX(0);
}

.side-menu-header {
    background: linear-gradient(135deg,
            #9E1200 0%,
            #ff6b00 100%);

    color: white;

    padding: 22px 18px;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.side-menu-header h2 {
    margin: 0;
    font-size: 22px;
}

.side-menu-header span {
    font-size: 12px;
    opacity: .9;
}

.side-menu-close {
    width: 38px;
    height: 38px;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, .18);
    color: white;

    font-size: 17px;
    cursor: pointer;
}

.side-menu-nav {
    padding: 12px;

    display: flex;
    flex-direction: column;

    gap: 4px;

    overflow-y: auto;
}

.side-menu-nav button,
.side-menu-nav a {
    width: 100%;

    border: none;
    background: transparent;

    padding: 13px 15px;

    border-radius: 8px;

    display: flex;
    align-items: center;
    gap: 12px;

    text-align: left;

    color: var(--texto-principal);

    font-size: 14px;
    font-weight: bold;

    text-decoration: none;

    cursor: pointer;

    transition: background .2s ease;
}

.side-menu-nav button:hover,
.side-menu-nav a:hover {
    background: rgba(255, 107, 0, .12);
}

.side-menu-nav button span,
.side-menu-nav a span {
    width: 25px;
    font-size: 18px;
    text-align: center;
}

.side-menu-divider {
    height: 1px;
    background: var(--borde);
    margin: 9px 4px;
}

.side-menu-owner {
    color: #ff6b00 !important;
    background: rgba(255, 107, 0, .08) !important;
}

.side-menu-footer {
    margin-top: auto;

    padding: 16px;

    text-align: center;

    border-top: 1px solid var(--borde);

    color: var(--texto-secundario);

    font-size: 12px;
}

@media(max-width: 767px) {

    .menu-float-btn {
        top: auto;
        bottom: 78px;
        right: 15px;

        width: 52px;
        height: 52px;
    }

    .menu-float-btn::before {
        font-size: 27px;
    }
}

.menu-float-btn.oculto {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(0.8);
}

/* =========================================
   CORRECCIONES DE MODALES
========================================= */

#productModal {
    display: none;
}

#productModal.active {
    display: flex;
}

#cartModal {
    display: none;
}

#cartModal.active {
    display: flex;
}

/* =========================================
   PIE DE PÁGINA
========================================= */

footer {
    width: 100%;
    text-align: center;
    padding: 30px 20px;
    margin-top: 25px;

    color: var(--texto-principal);
}

footer h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
}

footer p {
    margin: 2px 0;
    font-size: 14px;
    color: var(--texto-secundario);
}

/* ===============================
   RESULTADOS DEL BUSCADOR
================================ */

.sin-resultados {
    text-align: center;
    padding: 60px 20px;
    color: var(--texto-secundario);
}

.sin-resultados h3 {
    font-size: 22px;
    margin-bottom: 8px;
    color: #ff6b00;
}

/* ===============================
   CARRITO
================================ */

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item-info img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
}

.cart-item-info small {
    display: block;
    margin-top: 4px;
    color: var(--texto-secundario);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-item-controls button {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.cart-item-controls span {
    min-width: 22px;
    text-align: center;
    font-weight: bold;
}

.cart-delete-btn {
    background: #e74c3c;
    color: white;
}

/* =========================================
   CARRITO - DISEÑO MEJORADO
========================================= */

.cart-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    padding: 20px;
    backdrop-filter: blur(3px);
}

.cart-modal-content {
    width: 100%;
    max-width: 620px;
    max-height: 90vh;

    background: var(--bg-tarjeta);
    color: var(--texto-principal);

    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);

    overflow-y: auto;
    overflow-x: hidden;

    display: flex;
    flex-direction: column;
}

/* ENCABEZADO */

.cart-modal-header {
    padding: 18px 22px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: linear-gradient(135deg,
            #9E1200 0%,
            #ff6b00 100%);

    color: white;

    border-bottom: none;
    margin: 0;
}

.cart-modal-header h3 {
    margin: 0;
    color: white;
    font-size: 21px;
}

.close-modal {
    width: 38px;
    height: 38px;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.18);
    color: white;

    font-size: 22px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* LISTA DE PRODUCTOS */

.cart-items-list {
    padding: 14px 18px;
    overflow-y: auto;
    flex-grow: 1;

    background: var(--bg-principal);
}

.cart-modal-item {
    background: var(--bg-tarjeta);

    border: 1px solid var(--borde);
    border-radius: 12px;

    padding: 12px;

    margin-bottom: 10px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 12px;

    min-width: 0;
}

.cart-item-info img {
    width: 62px;
    height: 62px;

    border-radius: 10px;

    object-fit: cover;

    background: #f1f1f1;

    flex-shrink: 0;
}

.cart-item-info strong {
    display: block;

    font-size: 14px;

    margin-bottom: 4px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    max-width: 220px;
}

.cart-item-info small {
    display: block;

    font-size: 13px;

    color: #00a896;

    font-weight: bold;
}

/* CONTROLES DE CANTIDAD */

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-item-controls button {
    width: 32px;
    height: 32px;

    border: none;
    border-radius: 8px;

    background: #eeeeee;
    color: #333;

    cursor: pointer;

    font-size: 16px;
    font-weight: bold;

    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-controls button:hover {
    background: #dddddd;
}

.cart-item-controls span {
    min-width: 28px;

    text-align: center;

    font-size: 14px;
    font-weight: bold;
}

.cart-item-controls .cart-delete-btn {
    background: #ffe4e1;
    color: #c0392b;
}

.cart-item-controls .cart-delete-btn:hover {
    background: #ffd0ca;
}

/* FORMULARIO DEL CLIENTE */

.cart-client-form {
    margin: 0 18px 14px;

    padding: 14px;

    border-radius: 12px;

    background: rgba(255, 107, 0, 0.05);

    border: 1px solid rgba(255, 107, 0, 0.2);
}

.cart-client-form h4 {
    margin-bottom: 12px;

    font-size: 14px;

    color: #ff6b00;
}

.cart-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.cart-form-grid input,
.cart-form-grid select {
    width: 100%;

    padding: 10px 11px;

    border: 1px solid var(--borde);

    border-radius: 8px;

    background: var(--bg-tarjeta);
    color: var(--texto-principal);

    outline: none;

    font-size: 13px;
}

.cart-form-grid input:focus,
.cart-form-grid select:focus {
    border-color: #ff6b00;

    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.full-width-input {
    grid-column: span 2;
}

/* PIE DEL CARRITO */

.cart-modal-footer {
    padding: 16px 20px 20px;

    border-top: 1px solid var(--borde);

    background: var(--bg-tarjeta);
}

.cart-modal-total {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 14px;

    font-size: 16px;
    font-weight: bold;
}

.cart-modal-total strong,
#cartTotal {
    color: #00a896;

    font-size: 22px;
}

/* BOTÓN WHATSAPP */

.send-order-btn {
    width: 100%;

    border: none;

    border-radius: 10px;

    padding: 13px;

    background: #25d366;
    color: white;

    font-size: 15px;
    font-weight: bold;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    transition: transform 0.2s ease,
        filter 0.2s ease;
}

.send-order-btn:hover {
    transform: translateY(-1px);
    filter: brightness(0.96);
}

/* CARRITO VACÍO */

.cart-empty {
    text-align: center;

    padding: 45px 20px;

    color: var(--texto-secundario);
}

.cart-empty-icon {
    font-size: 45px;

    margin-bottom: 10px;
}

.cart-empty h4 {
    margin-bottom: 5px;

    color: var(--texto-principal);
}

/* CELULAR */

@media(max-width: 600px) {

    .cart-modal {
        padding: 8px;
        align-items: flex-end;
    }

    .cart-modal-content {
        max-height: 92vh;

        border-radius: 18px 18px 0 0;
    }

    .cart-modal-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .cart-item-controls {
        width: 100%;
        justify-content: flex-end;
    }

    .cart-item-info strong {
        max-width: 210px;
    }

    .cart-form-grid {
        grid-template-columns: 1fr;
    }

    .full-width-input {
        grid-column: span 1;
    }
}

.mayorista-activo,
.precio-mayorista-activo {
    color: #00a650;
    font-weight: bold;
}

.precio-mayorista-activo {
    display: block;
    margin-top: 4px;
    font-size: 11px;
}

.cart-subtotal {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    color: var(--texto-secundario);
}

.logo-placeholder {
    width: 65px;
    height: 65px;

    border-radius: 50%;

    overflow: hidden;

    border: 3px solid white;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #02475e;
}

.logo-placeholder img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* ===== DATOS DE DESPACHO MEJORADOS ===== */
.checkout-card {
    margin: 16px 18px;
    padding: 18px;
    background: var(--bg-tarjeta);
    border: 1px solid var(--borde);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}

.checkout-section-title,
.checkout-payment-title {
    margin-bottom: 14px;
}

.checkout-section-title h3,
.checkout-payment-title h3 {
    margin: 0 0 4px;
    font-size: 18px;
    color: var(--texto-principal);
}

.checkout-section-title p,
.checkout-payment-title p {
    margin: 0;
    color: var(--texto-secundario);
    font-size: 12px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.checkout-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkout-field-full {
    grid-column: 1/-1;
}

.checkout-field label {
    font-size: 12px;
    font-weight: 700;
    color: var(--texto-principal);
}

.checkout-field input,
.checkout-field select {
    width: 100%;
    min-height: 44px;
    padding: 11px 12px;
    border: 1px solid var(--borde);
    border-radius: 9px;
    background: var(--bg-principal);
    color: var(--texto-principal);
    font-size: 13px;
    outline: none;
    transition: .2s ease;
}

.checkout-field input:focus,
.checkout-field select:focus {
    border-color: #ff6b00;
    background: var(--bg-tarjeta);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, .12);
}

.checkout-payment {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--borde);
}

.whatsapp-order-btn {
    width: calc(100% - 36px);
    margin: 0 18px 20px;
    min-height: 48px;
    border: none;
    border-radius: 11px;
    background: #25d366;
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(37, 211, 102, .20);
}

@media(max-width:600px) {
    .checkout-card {
        margin: 12px;
        padding: 14px;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .checkout-field-full {
        grid-column: auto;
    }

    .whatsapp-order-btn {
        width: calc(100% - 24px);
        margin: 0 12px 16px;
    }
}
/* ===== SCROLL COMPLETO DEL CARRITO ===== */

.cart-modal-content {
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}

.cart-modal-header {
    position: sticky;
    top: 0;
    z-index: 20;
    flex-shrink: 0;
}

.cart-items {
    flex-shrink: 0;
}

.checkout-card {
    flex-shrink: 0;
}

.whatsapp-order-btn {
    flex-shrink: 0;
}
/* =========================================
   X DEL CARRITO IGUAL A LA DEL MENÚ LATERAL
========================================= */

#cerrarCarritoBtn {
    width: 38px;
    height: 38px;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.18);
    color: white;

    font-size: 17px;
    font-weight: bold;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    transition: background 0.2s ease,
                transform 0.2s ease;
}

#cerrarCarritoBtn:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: scale(1.05);
}
/* =========================================
   BOTÓN DE FAVORITOS - PRODUCTOS
========================================= */

.product-image-container {
    position: relative;
}

.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;

    width: 34px;
    height: 34px;

    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(6px);

    color: #555;
    font-size: 23px;
    font-weight: 400;
    line-height: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    cursor: pointer;
    z-index: 5;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.10);

    transition:
        transform 0.18s ease,
        background 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}


/* Al pasar el mouse */

.favorite-btn:hover {
    transform: translateY(-2px);

    background: #ffffff;

    box-shadow:
        0 5px 14px rgba(0, 0, 0, 0.16);
}


/* Cuando está guardado */

.favorite-btn.active {
    color: #e63946;
    background: #ffffff;

    border-color:
        rgba(230, 57, 70, 0.18);

    box-shadow:
        0 3px 12px rgba(230, 57, 70, 0.18);

    animation:
        favoritoPop 0.25s ease;
}


/* Animación al marcar */

@keyframes favoritoPop {

    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.25);
    }

    100% {
        transform: scale(1);
    }

}
/* Favoritos funciona como una vista independiente */
#wishlistSection {
    display: none;
}
/* =========================================
   🌙 MODO OSCURO
========================================= */

body.dark-mode {
    background: #101318;
    color: #f5f5f5;
}


/* =========================================
   PARTE SUPERIOR
   Mantiene el naranja original
========================================= */

body.dark-mode .banner {
    /* No cambiamos el fondo */
    color: #ffffff;
}


/* Buscador */

body.dark-mode #searchBar {
    background: #252a32;
    color: #ffffff;
    border: 1px solid #444b57;
}

body.dark-mode #searchBar::placeholder {
    color: #b8bec8;
}


/* =========================================
   CATEGORÍAS
========================================= */

/* Quitar la zona blanca */
body.dark-mode #zonaCategorias,
body.dark-mode .categories-section {
    background: #101318;
    color: #ffffff;
}


/* Contenedor que ENVUELVE únicamente
   las categorías */

body.dark-mode #burbujasCategorias {
    background: #171b21;

    border: 1px solid #ff8a33;
    border-radius: 12px;

    padding: 15px;

    margin: 10px 20px 20px 20px;
}


/* Texto de las categorías */

body.dark-mode .category-item,
body.dark-mode .category-item span {
    color: #ffffff;
}


/* =========================================
   DESTACADOS
========================================= */

body.dark-mode #seccionDestacados {
    background: #101318;
}


/* La línea NO envuelve toda la sección.
   Solo el lugar donde están los productos */

body.dark-mode #gridDestacados {
    background: #15191f;

    border: 1px solid #ff8a33;
    border-radius: 12px;

    padding: 18px;

    margin-top: 12px;
}


/* =========================================
   PRODUCTOS POR CATEGORÍA
========================================= */

/* Fondo general */

body.dark-mode .category-section {
    background: #101318;
}


/* Línea únicamente alrededor de los productos */

body.dark-mode .products-grid {
    background: #15191f;

    border: 1px solid #ff8a33;
    border-radius: 12px;

    padding: 18px;

    margin-top: 12px;
    margin-bottom: 25px;
}


/* =========================================
   TARJETAS
========================================= */

body.dark-mode .product-card {
    background: #1d222a;
    color: #ffffff;

    border: 1px solid #343a44;

    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.28);
}


body.dark-mode .product-title {
    color: #ffffff;
}


body.dark-mode .product-desc,
body.dark-mode .product-stock {
    color: #c1c5cc;
}


/* Cantidad */

body.dark-mode .qty-input {
    background: #292f38;
    color: #ffffff;
    border-color: #424956;
}


/* =========================================
   FAVORITOS
========================================= */

body.dark-mode #wishlistSection {
    background: #101318;
}


body.dark-mode #gridFavoritos {
    background: #15191f;

    border: 1px solid #ff8a33;
    border-radius: 12px;

    padding: 18px;
}


body.dark-mode .favorite-btn {
    background: #252a32;
    color: #ffffff;
    border-color: #3d444f;
}


body.dark-mode .favorite-btn.active {
    background: #252a32;
    color: #ff4d5d;
}


/* =========================================
   MENÚ LATERAL
========================================= */

body.dark-mode .side-menu {
    background: #181c22;
    color: #ffffff;
}


body.dark-mode .menu-item {
    color: #eeeeee;
}


body.dark-mode .menu-item:hover {
    background: #292e36;
}


/* =========================================
   CARRITO
========================================= */

body.dark-mode .cart-modal-content {
    background: #181c22;
    color: #ffffff;
}


body.dark-mode .cart-item {
    background: #22272f;
    border-color: #373e49;
}


/* =========================================
   MODAL PRODUCTO
========================================= */

body.dark-mode .product-modal-content {
    background: #181c22;
    color: #ffffff;
}


/* Inputs */

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #252a32;
    color: #ffffff;
    border-color: #414854;
}


/* =========================================
   FOOTER
========================================= */

body.dark-mode .store-footer {
    background: #181c22;
    color: #dddddd;
}
/* =====================================================
   🛒 NUEVO DISEÑO DEL CARRITO - SURTI JAR
===================================================== */

/* Ventana completa */
.cart-modal {
    padding: 20px;
    backdrop-filter: blur(5px);
}

/* Caja principal */
.cart-modal-content {
    width: 100%;
    max-width: 720px;

    max-height: 90vh;
    overflow-y: auto;

    padding: 0;

    background: #f6f6f7;
    border-radius: 18px;

    border: 1px solid rgba(255, 107, 0, .25);

    box-shadow:
        0 20px 60px rgba(0, 0, 0, .25);
}


/* =====================================================
   CABECERA
===================================================== */

.cart-modal-header {
    position: sticky;
    top: 0;
    z-index: 10;

    padding: 20px 24px;

    background: linear-gradient(
        135deg,
        #9E1200,
        #ff6b00
    );

    color: white;

    border: none;
    margin: 0;

    border-radius: 18px 18px 0 0;
}

.cart-modal-header h2 {
    margin: 0;
    font-size: 21px;
    color: white;
}


/* X cerrar */

.cart-modal-header .modal-close {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background: rgba(255,255,255,.18);
    color: white;

    cursor: pointer;
    font-size: 17px;
}

.cart-modal-header .modal-close:hover {
    background: rgba(255,255,255,.28);
}


/* =====================================================
   PRODUCTOS DEL CARRITO
===================================================== */

.cart-items {
    padding: 18px 24px 5px;
}


/* =====================================================
   TOTAL
===================================================== */

.cart-summary {
    margin: 12px 24px 18px;
    padding: 16px 18px;

    background: white;

    border-radius: 12px;

    border-left: 4px solid #00a896;

    box-shadow:
        0 3px 12px rgba(0,0,0,.06);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: 16px;
    font-weight: bold;
}

#cartTotal {
    color: #00a896;
    font-size: 23px;
}


/* =====================================================
   DATOS DEL PEDIDO
===================================================== */

.checkout-data {
    margin: 0 24px 18px;
}


/* Tarjeta */

.checkout-card {
    padding: 20px;

    background: white;

    border-radius: 14px;

    border: 1px solid #ececec;

    box-shadow:
        0 3px 12px rgba(0,0,0,.06);
}


/* Título */

.checkout-section-title {
    padding-bottom: 14px;
    margin-bottom: 18px;

    border-bottom: 1px solid #eeeeee;
}

.checkout-section-title h3,
.checkout-payment-title h3 {
    margin: 0 0 4px;

    font-size: 18px;

    color: #ff6b00;
}

.checkout-section-title p,
.checkout-payment-title p {
    margin: 0;

    font-size: 12px;
    color: #777;
}


/* =====================================================
   CAMPOS
===================================================== */

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.checkout-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkout-field-full {
    grid-column: 1 / -1;
}

.checkout-field label {
    font-size: 12px;
    font-weight: 700;

    color: #444;
}


/* Inputs */

.checkout-field input,
.checkout-field select {

    width: 100%;

    padding: 13px 14px;

    border-radius: 9px;

    border: 1px solid #dedede;

    background: #f7f7f8;

    color: #222;

    font-size: 13px;

    outline: none;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}


.checkout-field input:focus,
.checkout-field select:focus {

    background: white;

    border-color: #ff6b00;

    box-shadow:
        0 0 0 3px
        rgba(255,107,0,.10);
}


.checkout-field input::placeholder {
    color: #9a9a9a;
}


/* =====================================================
   FORMA DE PAGO
===================================================== */

.checkout-payment {

    margin-top: 20px;
    padding-top: 18px;

    border-top: 1px solid #eeeeee;
}

.checkout-payment-title {
    margin-bottom: 13px;
}


/* =====================================================
   WHATSAPP
===================================================== */

.whatsapp-order-btn {

    margin: 0 24px 24px;

    width: calc(100% - 48px);

    border: none;

    padding: 15px 20px;

    border-radius: 11px;

    background: #25d366;

    color: white;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 5px 16px rgba(37,211,102,.22);

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}


.whatsapp-order-btn:hover {

    background: #20bd5a;

    transform: translateY(-1px);

    box-shadow:
        0 7px 20px rgba(37,211,102,.28);
}


/* =====================================================
   📱 CELULARES
===================================================== */

@media (max-width: 600px) {

    .cart-modal {
        padding: 8px;
    }

    .cart-modal-content {
        max-height: 94vh;
        border-radius: 14px;
    }

    .cart-modal-header {
        padding: 16px;
        border-radius: 14px 14px 0 0;
    }

    .cart-modal-header h2 {
        font-size: 18px;
    }

    .cart-items {
        padding:
            14px
            14px
            5px;
    }

    .cart-summary {
        margin:
            10px
            14px
            15px;
    }

    .checkout-data {
        margin:
            0
            14px
            15px;
    }

    .checkout-card {
        padding: 16px;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .checkout-field-full {
        grid-column: auto;
    }

    .whatsapp-order-btn {
        margin:
            0
            14px
            18px;

        width:
            calc(100% - 28px);
    }

}
/* =====================================================
   🖼️ TAMAÑO UNIFORME DE IMÁGENES - SURTI JAR
===================================================== */


/* =====================================================
   CATEGORÍAS
===================================================== */

.category-circle {
    width: 60px;
    height: 60px;

    min-width: 60px;
    min-height: 60px;

    border-radius: 50%;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;
}


/* Cualquier imagen de categoría */

.category-circle img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    display: block;
}


/* =====================================================
   PRODUCTOS
===================================================== */

.product-image-container {
    width: 100%;
    height: 180px;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f5f5f5;
}


/* Slider de imágenes */

.product-image-container .image-slider {
    width: 100%;
    height: 100%;
}


/* Cada espacio del slider */

.product-image-container .image-slider > div {
    width: 100%;
    min-width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}


/* Cualquier imagen del producto */

.product-image-container img {
    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: center;

    display: block;
}


/* =====================================================
   📱 PRODUCTOS EN CELULAR
===================================================== */

@media (max-width: 767px) {

    .product-image-container {
        height: 145px;
    }

}
/* =====================================================
   📦 ESTADOS DE STOCK
===================================================== */

.stock-disponible {
    color: #198754;
    font-weight: 700;
}

.stock-bajo {
    color: #ff6b00;
    font-weight: 700;
}

.stock-agotado {
    color: #dc3545;
    font-weight: 700;
}

.add-to-cart-btn.btn-agotado,
.add-to-cart-btn:disabled {
    background: #8b8b8b !important;
    cursor: not-allowed;
    opacity: .7;
}

.qty-input:disabled {
    background: #e9ecef;
    cursor: not-allowed;
    opacity: .7;
}
/* =====================================================
   🛒 PRODUCTOS DEL CARRITO - DISEÑO CORREGIDO
===================================================== */

.cart-item {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    align-items: center;
    gap: 14px;

    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 14px;

    padding: 14px;
    margin-bottom: 12px;

    box-shadow: 0 3px 10px rgba(0, 0, 0, .05);
}


/* IMAGEN */

.cart-item-image,
.cart-item img {
    width: 70px;
    height: 70px;

    object-fit: contain;

    border-radius: 10px;
    background: #f5f5f5;
}


/* INFORMACIÓN */

.cart-item-info {
    min-width: 0;
}

.cart-item-info h4,
.cart-item-info h3 {
    margin: 0 0 5px;
    font-size: 15px;
}

.cart-item-info p {
    margin: 2px 0;
}


/* CONTROLES DE CANTIDAD */

.cart-item-actions,
.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item-actions button,
.cart-item-controls button {
    width: 36px;
    height: 36px;

    border: none;
    border-radius: 9px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    font-weight: bold;
}


/* CELULAR */

@media (max-width: 600px) {

    .cart-item {
        grid-template-columns: 55px 1fr;
    }

    .cart-item-image,
    .cart-item img {
        width: 55px;
        height: 55px;
    }

    .cart-item-actions,
    .cart-item-controls {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}
/* =====================================================
   🛒 CORRECCIÓN PRODUCTOS DENTRO DEL CARRITO
===================================================== */

.cart-items .cart-modal-item {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;

    gap: 15px !important;

    padding: 14px 16px !important;
    margin-bottom: 10px !important;

    background: #ffffff !important;

    border: 1px solid #eeeeee !important;
    border-radius: 12px !important;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.05);
}


/* ==============================
   INFORMACIÓN DEL PRODUCTO
============================== */

.cart-items .cart-item-info {
    min-width: 0 !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;

    gap: 3px !important;
}


/* Nombre */

.cart-items .cart-item-info strong {
    display: block;

    width: 100%;

    font-size: 14px;
    font-weight: 700;

    color: #222;

    white-space: normal;
    overflow-wrap: break-word;
}


/* Precio */

.cart-items .cart-item-info > span {
    font-size: 14px;
    font-weight: 700;

    color: #00a896;
}


/* Precio mayorista */

.cart-items .precio-mayorista-activo,
.cart-items .mayorista-activo {
    margin-top: 2px;

    font-size: 11px;

    color: #00a650;
}


/* Subtotal */

.cart-items .cart-subtotal {
    margin-top: 2px;

    font-size: 11px;

    color: #666;
}


/* ==============================
   BOTONES - CANTIDAD
============================== */

.cart-items .cart-item-controls {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;

    gap: 7px !important;

    flex-shrink: 0;
}


/* Botones - y + */

.cart-items .cart-item-controls button {
    width: 36px !important;
    height: 36px !important;

    padding: 0 !important;

    border: none !important;
    border-radius: 9px !important;

    background: #eeeeee;

    color: #222;

    font-size: 17px;
    font-weight: 700;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
}


/* Número de unidades */

.cart-items .cart-item-controls span {
    min-width: 28px !important;

    text-align: center;

    font-size: 14px;
    font-weight: 700;
}


/* Botón eliminar */

.cart-items .cart-item-controls .cart-delete-btn {
    background: #ffe4e1 !important;

    color: #c0392b !important;
}


/* Hover */

.cart-items .cart-item-controls button:hover {
    background: #dddddd;
}

.cart-items .cart-item-controls .cart-delete-btn:hover {
    background: #ffd0ca !important;
}


/* =====================================================
   📱 CELULAR
===================================================== */

@media (max-width: 600px) {

    .cart-items .cart-modal-item {
        grid-template-columns: 1fr !important;

        gap: 10px !important;

        padding: 13px !important;
    }

    .cart-items .cart-item-controls {
        width: 100% !important;

        justify-content: flex-end !important;
    }

}