/* ESTILOS PARA EL CHECKOUT */

/* Checkout Modal */
.checkout-modal-content {
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
}

.checkout-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.checkout-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    position: relative;
}

.checkout-steps::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: #ddd;
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2;
    background: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    border: 2px solid var(--color-border);
    transition: all var(--transition);
}

.step.active {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

.checkout-step {
    display: none;
}

.checkout-step.active {
    display: block;
}

.step-content {
    padding: 15px 0;
}

/* Botones del checkout */
.checkout-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    gap: 10px;
}

.checkout-back-btn, .checkout-next-btn, .checkout-complete-btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.checkout-back-btn {
    background: #6c757d;
    color: white;
    flex: 1;
}

.checkout-back-btn:hover {
    background: #5a6268;
}

.checkout-next-btn {
    background: #01a1d5;
    color: white;
    flex: 2;
}

.checkout-next-btn:hover {
    background: #0180aa;
}

.checkout-complete-btn {
    background: linear-gradient(135deg, #01a1d5, #0180aa);
    color: white;
    flex: 2;
    font-size: 1.1rem;
    transition: opacity 0.2s;
}

.checkout-complete-btn:hover {
    opacity: 0.9;
}

/* Opciones de envío */
.shipping-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.shipping-option {
    display: block;
}

.shipping-option input[type="radio"] {
    display: none;
}

.shipping-option label {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.shipping-option label:hover {
    border-color: #01a1d5;
    background: #f8f9fa;
}

.shipping-option input[type="radio"]:checked + label {
    border-color: #01a1d5;
    background: #e3f0f8;
}

.shipping-option label i {
    font-size: 1.5rem;
    color: #01a1d5;
    width: 40px;
}

.shipping-option label strong {
    display: block;
    margin-bottom: 4px;
}

.shipping-option label small {
    color: #666;
    font-size: 0.85rem;
}

.shipping-option input[type="radio"]:disabled + label {
    opacity: 0.5;
    cursor: not-allowed;
}

.agencia-selection {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}
.agencia-selection select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    margin-top: 6px;
}
.agencia-selection select:focus {
    outline: none;
    border-color: #01a1d5;
}
#checkout-agencia-otra {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    box-sizing: border-box;
}
#checkout-agencia-otra:focus {
    outline: none;
    border-color: #01a1d5;
}

/* Opciones de pago */
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.payment-option {
    display: block;
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.payment-option label:hover {
    border-color: #01a1d5;
    background: #e3f0f8;
}

.payment-option input[type="radio"]:checked + label {
    border-color: #01a1d5;
    background: #e3f0f8;
    box-shadow: 0 0 0 1px #01a1d5;
}

.payment-option label i {
    font-size: 1.2rem;
    color: #01a1d5;
}


.payment-badge-secure {
    margin-left: auto;
    font-size: 0.65rem;
    color: #01a1d5;
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.payment-badge-manual {
    margin-left: auto;
    font-size: 0.65rem;
    color: #999;
    white-space: nowrap;
}

.shalom-payment-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.yape-qr-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: #e3f0f8;
    border: 1px solid #a8d4e8;
    border-radius: 12px;
    padding: 14px;
    margin: 10px 0 8px;
}

.yape-qr-img {
    width: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.yape-qr-info p {
    margin: 0 0 4px;
    font-size: 0.88rem;
    color: #333;
}

.yape-qr-info p i {
    color: #01a1d5;
    margin-right: 4px;
}

.yape-qr-apps {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
}

.yape-tag {
    background: #742284;
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
}

.plin-tag {
    background: #01a1d5;
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
}

.yape-qr-info {
    text-align: center;
}

.transferencia-info-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 14px;
    margin-top: 10px;
}

.transferencia-info-box p {
    margin: 0 0 8px;
    font-size: 0.85rem;
    color: #555;
}

.upload-transferencia-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #01a1d5;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
}

.upload-transferencia-label:hover {
    background: #018db8;
}

.transferencia-preview {
    margin-top: 8px;
}

.transferencia-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* Resumen de compra en checkout */
.checkout-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.checkout-summary h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

#checkout-items-summary {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-top: 2px solid #ddd;
    font-size: 1.2rem;
    font-weight: 700;
    color: #01a1d5;
}

/* Botón de comprar por la web en el carrito */
.checkout-web-button {
    background: #01a1d5;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 15px;
    width: 100%;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
    transition: background 0.2s;
}

.checkout-web-button:hover {
    background: #0180aa;
}

.cart-footer-area {
    margin-top: 15px;
}

/* ESTILOS PARA EL BOTÓN DE ELIMINAR PRODUCTO */
.delete-product-btn {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s;
    opacity: 0;
}

.card:hover .delete-product-btn {
    opacity: 1;
}

.delete-product-btn:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

/* Mostrar siempre el botón de eliminar en modo admin/helper */
body.admin-mode .delete-product-btn,
body.helper-mode .delete-product-btn {
    opacity: 1;
}

/* Ajustar posición de los botones de editar/eliminar */
.edit-product-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: background 0.2s;
    opacity: 0;
}

.card:hover .edit-product-btn {
    opacity: 1;
}

.edit-product-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

body.admin-mode .edit-product-btn,
body.helper-mode .edit-product-btn {
    opacity: 1;
}

/* Mostrar botones de admin siempre en pantallas grandes */
@media (min-width: 600px) {
    body.admin-mode .edit-product-btn,
    body.admin-mode .delete-product-btn,
    body.helper-mode .edit-product-btn,
    body.helper-mode .delete-product-btn {
        opacity: 0.8;
    }
    
    body.admin-mode .card:hover .edit-product-btn,
    body.admin-mode .card:hover .delete-product-btn,
    body.helper-mode .card:hover .edit-product-btn,
    body.helper-mode .card:hover .delete-product-btn {
        opacity: 1;
    }
}

/* Badge de preview de imágenes */
.preview-badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 600;
}

/* Contador de imágenes */
.image-counter {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.3s;
}

.file-info-text {
    font-size: 0.75rem;
    color: #666;
    margin-top: 5px;
    text-align: center;
}

/* Contador del carrito en el botón */
#cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    opacity: 0;
    transition: 0.3s;
    font-weight: 700;
}

#cart-count.active {
    opacity: 1;
}

/* Resto del CSS anterior se mantiene igual... */

:root {
    /* Colores de marca */
    --color-fondo: #f0f2f5;
    --color-header-footer: #ffffff;
    --color-promo: #FF6A00;
    --color-mayor: #0189b5;
    --color-whatsapp: #25D366;
    --color-accent: #01a1d5;
    --color-text: #1a1a2e;
    --color-text-secondary: #6b7280;
    --color-border: #e5e7eb;
    --color-card-bg: #ffffff;
    --color-sombra: rgba(0, 0, 0, 0.06);

    /* Espaciado (8px grid) */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Sombras */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

    /* Transicion */
    --transition: 0.2s ease;
}

* {
    box-sizing: border-box;
}

body { 
    font-family: 'Poppins', sans-serif; 
    margin: 0; 
    padding: 0; 
    background-color: var(--color-fondo); 
}

/* HEADER */
/* TOP BAR */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: #222;
    padding: 0;
}

.top-bar-link {
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 5px 14px;
    transition: opacity 0.2s;
}

.top-bar-link:hover {
    opacity: 0.85;
}

.top-bar-dechoping {
    background: #01a1d5;
    color: white;
}

.top-bar-tucatalogo {
    background: #28a745;
    color: white;
}

@media (min-width: 600px) {
    .top-bar-link {
        font-size: 0.73rem;
        padding: 5px 18px;
    }
}

@media (min-width: 1024px) {
    .top-bar {
        justify-content: center;
    }
}

/* HEADER */
header {
    background: var(--color-header-footer);
    padding: 0 var(--space-sm);
    height: 48px;
    position: relative;
    z-index: 1000;
    display: flex;
    align-items: center;
}

@media (min-width: 600px) {
    header {
        height: 50px;
        padding: 0 var(--space-md);
    }
}

@media (min-width: 1024px) {
    header {
        position: sticky;
        top: 0;
        height: 54px;
        padding: 0 var(--space-md);
        box-shadow: var(--shadow-sm);
        border-bottom: 1px solid var(--color-border);
    }
}

.menu-toggle-btn {
    position: absolute;
    left: var(--space-sm);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    color: var(--color-text);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    z-index: 10;
    transition: background var(--transition);
}

.menu-toggle-btn:hover {
    background: #f3f4f6;
}

@media (min-width: 600px) {
    .menu-toggle-btn {
        left: var(--space-md);
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

.header-main-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px 0 44px;
}

@media (min-width: 600px) {
    .header-main-content {
        padding: 0 16px 0 50px;
    }
}

@media (min-width: 1024px) {
    .header-main-content {
        justify-content: flex-start;
        flex-wrap: nowrap;
        margin: 0;
        max-width: none;
        padding: 0 10px 0 50px;
        flex: 0 0 auto;
    }

    /* Buscador dentro del header en PC - centrado */
    .header-search-pc {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 450px;
        display: flex;
        align-items: center;
    }

    .header-search-pc .search-container {
        width: 100%;
    }
}

/* BARRA STICKY MOVIL (buscador) */
.mobile-sticky-bar {
    position: sticky;
    top: 0;
    z-index: 999;
    background: var(--color-header-footer);
    padding: 0 8px;
    height: 44px;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (min-width: 600px) {
    .mobile-sticky-bar {
        height: 46px;
    }
}

@media (min-width: 1024px) {
    .mobile-sticky-bar {
        /* Se oculta como elemento separado; el buscador se muestra dentro del header via JS */
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 0;
        overflow: visible;
        margin: 0;
        background: none;
        padding: 0;
        pointer-events: none;
        box-shadow: none;
        border-bottom: none;
        z-index: -1;
        display: none;
    }
}

#logo-image {
    height: 36px;
    max-height: 36px;
    border-radius: 6px;
    display: block;
    object-fit: contain;
}

.auth-controls {
    position: absolute;
    right: var(--space-sm);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

@media (min-width: 600px) {
    .auth-controls {
        right: var(--space-md);
        gap: 10px;
    }
}

.user-greeting {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 600px) {
    .user-greeting {
        font-size: 0.82rem;
        max-width: 150px;
    }
}

#auth-icon-button, #logout-button {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--color-text);
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
}

#auth-icon-button:hover, #logout-button:hover {
    background: #f3f4f6;
}

@media (min-width: 600px) {
    #auth-icon-button, #logout-button {
        font-size: 1.4rem;
        min-width: 40px;
        min-height: 40px;
    }
}

/* BUSCADOR */
.search-container {
    display: flex;
    gap: 6px;
    padding: 0;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .search-container {
        padding: 0;
        max-width: none;
        margin: 0;
    }
}

/* BARRA DE FILTROS - FILA HORIZONTAL DESLIZABLE */
.filter-scroll-bar {
    position: sticky;
    top: 44px;
    z-index: 998;
    display: flex;
    align-items: center;
    background: var(--color-header-footer);
    border-bottom: 1px solid var(--color-border);
    padding: 0;
    height: 42px;
}

.filter-back-btn {
    flex-shrink: 0;
    border: none;
    background: none;
    color: var(--color-text);
    font-size: 0.85rem;
    padding: 6px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.filter-back-btn:hover {
    color: var(--color-accent);
}

.filter-scroll-row {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 10px;
    flex: 1;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-scroll-row::-webkit-scrollbar {
    display: none;
}

.filter-scroll-row .filter-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    background: white;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.filter-scroll-row .filter-chip:hover {
    border-color: var(--color-accent);
    background: #f0f7fc;
}

.filter-scroll-row .filter-chip.active {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

/* LEGACY - se mantiene oculto por si algo lo referencia */
.filter-bar {
    display: none;
}

.old-filter-bar {
    position: sticky;
    top: 44px;
    z-index: 998;
    padding: 0;
    border-bottom: 1px solid var(--color-border);
    background: #ffffff;
}

@media (min-width: 600px) {
    .filter-scroll-bar {
        top: 46px;
        height: 44px;
    }

    .filter-scroll-row .filter-chip {
        font-size: 0.78rem;
        padding: 6px 16px;
    }

    .filter-bar {
        top: 46px;
    }
}

.filter-toggle-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 8px 14px;
    background: #f8f9fa;
    border: none;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-accent);
    cursor: pointer;
    transition: background var(--transition);
}

.filter-toggle-btn:hover {
    background: #f0f1f3;
}

.filter-toggle-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.filter-bar.open .filter-toggle-arrow {
    transform: rotate(180deg);
}

.filter-active-count {
    background: #01a1d5;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.filter-dropdown {
    display: none;
    background: #ffffff;
    border-top: 1px solid var(--color-border);
    padding: var(--space-md);
    max-height: 55vh;
    overflow-y: auto;
}

.filter-bar.open .filter-dropdown {
    display: block;
    animation: filterSlideDown 0.25s ease;
}

@keyframes filterSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.filter-section {
    margin-bottom: 12px;
}

.filter-section:last-of-type {
    margin-bottom: 8px;
}

.filter-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--color-border);
}

.filter-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    background: #ffffff;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--color-text);
    white-space: nowrap;
}

.filter-chip:hover {
    border-color: var(--color-accent);
    background: #f0f7fc;
}

.filter-chip.active {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

.filter-chip.clear-chip {
    background: white;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    font-size: 0.72rem;
    gap: 4px;
}

.filter-chip.clear-chip:hover {
    background: var(--color-accent);
    color: white;
}

.filter-price-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-price-input {
    width: 70px;
    padding: 6px 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    text-align: center;
    outline: none;
    transition: border-color var(--transition);
}

.filter-price-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(1, 161, 213, 0.15);
}

.filter-price-label {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    font-weight: 600;
}

.filter-actions {
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid var(--color-border);
}

/* LAYOUT PRINCIPAL */
.main-layout {
    display: block;
}

.main-content-area {
    width: 100%;
}

@media (min-width: 600px) {
    .filter-toggle-btn {
        font-size: 0.9rem;
        padding: 10px 15px;
    }

    .filter-dropdown {
        padding: 15px 20px;
    }

    .filter-chip {
        font-size: 0.78rem;
        padding: 6px 14px;
    }

    .filter-price-input {
        width: 80px;
        font-size: 0.8rem;
    }

    .filter-section-title {
        font-size: 0.75rem;
    }
}

/* PC: Filtros como fila horizontal arriba del contenido */
@media (min-width: 1024px) {
    .main-layout {
        display: block;
        min-height: calc(100vh - 54px);
    }

    .filter-scroll-bar {
        top: 54px;
        height: 46px;
        padding: 0 16px;
    }

    .filter-scroll-row .filter-chip {
        font-size: 0.8rem;
        padding: 6px 18px;
    }

    .filter-section {
        margin-bottom: 20px;
    }

    .filter-section-title {
        font-size: 0.78rem;
        margin-bottom: 10px;
        padding-bottom: 6px;
    }

    .filter-chip {
        font-size: 0.76rem;
        padding: 6px 12px;
    }

    .filter-price-input {
        width: 75px;
        padding: 7px 8px;
        font-size: 0.8rem;
    }

    .filter-price-label {
        font-size: 0.8rem;
    }

    .filter-actions {
        margin-top: 10px;
    }

    .main-content-area {
        grid-column: 2;
        grid-row: 1 / -1;
    }

    .info-footer {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1280px) {
    .filter-scroll-row .filter-chip {
        font-size: 0.82rem;
        padding: 7px 20px;
    }
}

/* MENU LATERAL DE CATEGORIAS */
.categories-sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    box-shadow: var(--shadow-lg);
    z-index: 2500;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.categories-sidebar.open {
    left: 0;
}

@media (min-width: 600px) {
    .categories-sidebar {
        left: -320px;
        width: 320px;
    }

    .categories-sidebar.open {
        left: 0;
    }
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    background: var(--color-text);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-close-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background 0.3s;
}

.sidebar-close-btn:hover {
    background: rgba(255,255,255,0.2);
}

.sidebar-content {
    padding: var(--space-md) var(--space-sm);
}

.ubicaciones-toggle {
    background: linear-gradient(135deg, #01a1d5 0%, #0180aa 100%);
    color: white;
    border-color: transparent;
    font-weight: 700;
    margin-bottom: 10px;
}

.ubicaciones-toggle:hover {
    background: linear-gradient(135deg, #018db8 0%, #016a85 100%);
    transform: translateX(0);
}

.ubicaciones-toggle .chevron-icon {
    transition: transform 0.3s;
}

.ubicaciones-toggle.open .chevron-icon {
    transform: rotate(180deg);
}

.ubicaciones-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    margin-bottom: 10px;
}

.ubicaciones-list.open {
    max-height: 500px;
}

.chevron-icon {
    transition: transform 0.3s ease;
    margin-left: auto;
}

.chevron-icon.rotated {
    transform: rotate(180deg);
}

.ubicacion-item {
    background: #f9fafb;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 8px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.ubicacion-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.ubicacion-link:hover {
    border-color: #01a1d5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(1, 161, 213, 0.2);
}

.ubicacion-maps-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 12px;
    background: #01a1d5;
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 28px;
    transition: background 0.2s;
}

.ubicacion-link:hover .ubicacion-maps-btn {
    background: #018db8;
}

.ubicacion-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #333;
}

.ubicacion-header i {
    color: #01a1d5;
    font-size: 1.1rem;
}

.ubicacion-header strong {
    font-size: 1rem;
    font-weight: 700;
}

.ubicacion-address {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #555;
    padding-left: 28px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px var(--space-md);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
    width: 100%;
    text-align: left;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--color-text);
}

.category-item:hover {
    background: #f3f4f6;
    border-color: var(--color-accent);
}

.category-item.active {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

.category-item i:first-child {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.category-item span {
    flex: 1;
}

.category-item i:last-child {
    font-size: 0.85rem;
    opacity: 0.4;
}

.category-item.all-categories {
    background: var(--color-text);
    color: white;
    border-color: var(--color-text);
    font-weight: 600;
}

.category-item.all-categories:hover {
    background: #000;
    border-color: #000;
}

.category-item.all-categories.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.categories-divider {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    padding: var(--space-md) 10px var(--space-sm) 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.brands-list {
    display: flex;
    flex-direction: column;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* BOTÓN FLOTANTE VOLVER */
.back-to-all-btn {
    position: fixed;
    left: var(--space-sm);
    top: 42px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-text);
    color: white;
    border: none;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    z-index: 1500;
    transition: background var(--transition);
}

.back-to-all-btn:hover {
    transform: scale(1.1);
    background: #333;
}

@media (min-width: 600px) {
    .back-to-all-btn {
        left: 10px;
        top: 48px;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

@media (min-width: 600px) {
    .search-container {
        gap: 8px;
        padding: 0;
    }
}

/* CARRUSEL DE SLIDES */
.slides-carousel {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: var(--space-sm);
    overflow: hidden;
    transition: all 0.3s ease;
}

.slides-carousel.hidden {
    max-height: 0;
    margin: 0;
    padding: 0;
    opacity: 0;
    visibility: hidden;
}

@media (min-width: 600px) {
    .slides-carousel {
        margin: 0 auto;
        padding: 0;
    }

    .slides-carousel.hidden {
        margin: 0;
    }
}

@media (min-width: 1024px) {
    .slides-carousel {
        margin: 0 auto;
        padding: 0;
    }
}

.slides-container {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

@media (min-width: 600px) {
    .slides-container {
        height: 280px;
    }
}

@media (min-width: 1024px) {
    .slides-container {
        height: 400px;
    }
}

.slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
    will-change: opacity;
}

.slide-item.active {
    opacity: 1;
    pointer-events: auto;
}

.slide-item.no-link {
    cursor: default;
}

.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.carousel-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    transform: none;
    background: rgba(0, 0, 0, 0.15);
    color: white;
    border: none;
    width: 28px;
    height: 100%;
    border-radius: 0;
    cursor: pointer;
    font-size: 1rem;
    z-index: 10;
    transition: background 0.3s, opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

@media (min-width: 1024px) {
    .carousel-nav {
        width: 36px;
        opacity: 0;
    }

    .slides-carousel:hover .carousel-nav {
        opacity: 1;
    }
}

.carousel-nav:hover {
    background: rgba(0, 0, 0, 0.4);
}

.carousel-nav.prev {
    left: 0;
}

.carousel-nav.next {
    right: 0;
}

.carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 8px;
    border-radius: 12px;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.35s ease;
    padding: 0;
}

.carousel-dot.active {
    background: white;
    width: 18px;
    height: 6px;
    border-radius: 3px;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
}

.search-bar-wrapper { 
    flex: 1; 
    position: relative; 
}

#search-input {
    width: 100%;
    height: 36px;
    padding: 0 66px 0 12px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: #f3f4f6;
    outline: none;
    box-sizing: border-box;
    font-size: 0.85rem;
    transition: all var(--transition);
}

#search-input:focus {
    background: #fff;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(1, 161, 213, 0.15);
}

@media (min-width: 600px) {
    #search-input {
        height: 38px;
        padding: 0 70px 0 14px;
        font-size: 0.92rem;
    }
}

@media (min-width: 1024px) {
    #search-input {
        height: 36px;
        padding: 0 70px 0 14px;
        font-size: 0.88rem;
    }
}

#search-clear-button {
    position: absolute;
    right: 36px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: #999;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px;
}

.search-go-button {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: var(--color-accent, #01a1d5);
    color: white;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.search-go-button:hover {
    background: #018db8;
}

@media (min-width: 600px) {
    #search-clear-button {
        right: 38px;
    }
    .search-go-button {
        width: 30px;
        height: 30px;
    }
}


.search-toggle-button { 
    background: #333; 
    color: white; 
    border: none; 
    border-radius: 12px; 
    width: 40px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 0.9rem;
}

@media (min-width: 600px) {
    .search-toggle-button { 
        border-radius: 15px; 
        width: 45px; 
        font-size: 1rem;
    }
}

/* MAIN CONTAINER */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4px;
}

@media (min-width: 600px) {
    main {
        padding: 0 var(--space-md);
    }
}

/* GRID PRODUCTOS - RESPONSIVE */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 6px 0 70px 0;
}

/* TABLET: 3 columnas */
@media (min-width: 600px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
        padding: var(--space-md) 0 70px 0;
    }
}

/* PC: 5 columnas */
@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 12px;
        padding: var(--space-md) var(--space-md) 60px var(--space-md);
    }
}

/* DRAG & DROP PRODUCTOS */
body.admin-mode .card,
body.helper-mode .card {
    cursor: grab;
}

body.admin-mode .card:active,
body.helper-mode .card:active {
    cursor: grabbing;
}

.card.dragging {
    opacity: 0.4;
    transform: scale(0.95);
}

.card.drag-over {
    outline: 2px dashed #01a1d5;
    outline-offset: 3px;
}

.touch-drag-clone {
    position: fixed;
    width: 80px;
    height: 80px;
    opacity: 0.7;
    z-index: 9999;
    pointer-events: none;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* CARDS DE PRODUCTOS */
.card {
    background: var(--color-card-bg);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    position: relative;
    content-visibility: auto;
    contain-intrinsic-size: auto 280px;
    contain: layout style paint;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.06);
}

.card-image-wrapper {
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
    will-change: transform;
    background: #e8e8e8;
}

.card-img-incoming {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    object-fit: cover;
}

.card-img-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.35);
    color: white;
    border: none;
    width: 20px;
    height: 100%;
    top: 0;
    transform: none;
    cursor: pointer;
    font-size: 0.6rem;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card:hover .card-img-nav {
    opacity: 1;
}

.card-img-nav:hover {
    background: rgba(0,0,0,0.55);
}

.card-img-prev { left: 0; }
.card-img-next { right: 0; }

@media (min-width: 600px) {
    .card-img-nav {
        width: 24px;
        font-size: 0.7rem;
    }
}

.product-image {
    width: 110%;
    height: 110%;
    object-fit: cover;
    display: block;
    aspect-ratio: 1 / 1;
    margin: -5% 0 0 -5%;
    transition: transform 0.15s ease-out;
    will-change: transform;
}

@media (min-width: 600px) {
    .product-image {
        aspect-ratio: 4 / 3;
    }
}

@media (min-width: 1024px) {
    .product-image {
        aspect-ratio: 4 / 3;
    }
}

.product-info {
    padding: 4px 5px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

@media (min-width: 600px) {
    .product-info {
        padding: 10px 14px;
        gap: 4px;
    }
}

.card h3 {
    font-size: 0.65rem;
    margin: 0;
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.card h3 .title-text-wrapper {
    display: inline-block;
}

.card h3.marquee-title .title-text-wrapper {
    animation: marquee-title 8s linear infinite;
    will-change: transform;
}

@keyframes marquee-title { 
    0% { transform: translateX(0); } 
    100% { transform: translateX(var(--marquee-title-dist)); } 
}

@media (min-width: 600px) {
    .card h3 { 
        font-size: 0.9rem; 
        line-height: 1.2;
    }
}

.product-brand {
    font-size: 0.55rem;
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
}

@media (min-width: 600px) {
    .product-brand {
        font-size: 0.78rem;
    }
}

.marquee-brand .brand-text-wrapper {
    display: inline-block;
    animation: marquee 6s linear infinite;
    will-change: transform;
}

@keyframes marquee { 
    0% { transform: translateX(0); } 
    100% { transform: translateX(var(--marquee-dist)); } 
}

/* PRECIOS */
.product-prices {
    margin: 3px 0 1px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

@media (min-width: 600px) {
    .product-prices {
        margin: 6px 0 2px;
        gap: 2px;
    }
}

.price-row-normal {
    color: var(--color-promo);
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.price-row-normal .small-price-label {
    background: var(--color-promo);
    color: #fff;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 0.38rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    vertical-align: middle;
    margin-left: 3px;
}

.price-row-live {
    color: var(--color-mayor);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.6rem;
    opacity: 0.5;
    transition: all 0.35s ease;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.price-row-live .small-price-label {
    background: rgba(1,137,181,0.15);
    color: var(--color-mayor);
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 0.35rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    vertical-align: middle;
    margin-left: 3px;
}

@media (min-width: 600px) {
    .price-row-normal {
        font-size: 1.3rem;
    }
    .price-row-normal .small-price-label {
        font-size: 0.55rem;
        padding: 2px 6px;
        border-radius: 5px;
    }
    .price-row-live {
        font-size: 0.95rem;
    }
    .price-row-live .small-price-label {
        font-size: 0.5rem;
        padding: 2px 6px;
        border-radius: 5px;
    }
}

/* CLASES DE BRILLO */
/* Contenedor de precios: altura fija para que no estire la card */
.product-prices {
    min-height: 28px;
}

@media (min-width: 600px) {
    .product-prices {
        min-height: 48px;
    }
}

.shining-promo {
    text-shadow: 0 0 8px var(--color-promo), 0 0 20px rgba(255,106,0,0.3);
    animation: pulse-promo 1.5s ease-in-out infinite;
}

.shining-promo .small-price-label {
    box-shadow: 0 0 8px rgba(255,106,0,0.4);
}

@keyframes pulse-promo {
    0%, 100% { text-shadow: 0 0 8px var(--color-promo), 0 0 20px rgba(255,106,0,0.3); }
    50% { text-shadow: 0 0 14px var(--color-promo), 0 0 30px rgba(255,106,0,0.5); }
}

.shining-mayor {
    text-shadow: 0 0 12px var(--color-mayor), 0 0 25px rgba(1,137,181,0.4);
    font-weight: 800 !important;
    opacity: 1 !important;
    font-size: 0.78rem !important;
    animation: pulse-mayor 1.5s ease-in-out infinite;
}

.shining-mayor .small-price-label {
    background: var(--color-mayor) !important;
    color: #fff !important;
    box-shadow: 0 0 10px rgba(1,137,181,0.5);
}

@media (min-width: 600px) {
    .shining-mayor {
        font-size: 1.2rem !important;
    }
}

@keyframes pulse-mayor {
    0%, 100% { text-shadow: 0 0 12px var(--color-mayor), 0 0 25px rgba(1,137,181,0.4); }
    50% { text-shadow: 0 0 18px var(--color-mayor), 0 0 40px rgba(1,137,181,0.6); }
}

/* CONTROLES DEL CARRITO */
.cart-controls {
    display: flex;
    gap: 4px;
    margin-top: auto;
    padding-top: 3px;
    align-items: center;
    width: 100%;
}

@media (min-width: 600px) {
    .cart-controls {
        gap: 6px;
        padding-top: 5px;
    }
}

.qty-selector {
    display: flex;
    background: #f0f0f0;
    border-radius: 8px;
    flex: 1;
    height: 22px;
    align-items: center;
    overflow: hidden;
}

@media (min-width: 600px) {
    .qty-selector {
        height: 28px;
    }
}

.minus, .plus {
    border: none;
    background: none;
    width: 20px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.8rem;
    flex-shrink: 0;
    transition: background 0.2s;
    color: #555;
}

.minus:hover, .plus:hover {
    background: #e0e0e0;
}

@media (min-width: 600px) {
    .minus, .plus {
        width: 30px;
        font-size: 1.1rem;
    }
}

.qty-display {
    flex: 1;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
}

@media (min-width: 600px) {
    .qty-display {
        font-size: 0.9rem;
    }
}

.add-to-cart-btn {
    background: var(--color-whatsapp);
    color: white;
    border: none;
    border-radius: 8px;
    flex: 0.8;
    height: 22px;
    font-size: 0.65rem;
    cursor: pointer;
    font-weight: 700;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
}

.add-to-cart-btn:hover {
    background: #1ea952;
    transform: scale(1.04);
}

@media (min-width: 600px) {
    .add-to-cart-btn {
        height: 28px;
        font-size: 0.8rem;
        padding: 0 8px;
        border-radius: 8px;
    }
}

/* MODALES */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    overflow-y: auto;
}

.modal-content {
    background: #ffffff;
    margin: var(--space-lg) auto;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    width: 92%;
    max-width: 450px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
    .modal-content {
        width: 85%;
        max-width: 600px;
        padding: var(--space-xl);
    }
}

.close-button {
    position: absolute;
    right: 12px;
    top: 12px;
    font-size: 28px;
    cursor: pointer;
    z-index: 3000;
    color: var(--color-text);
    background: #f3f4f6;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.close-button:hover {
    background: rgba(255,255,255,1);
}

/* DETALLES DEL PRODUCTO */
.details-container {
    max-width: 700px;
}

#details-price-normal { 
    color: var(--color-promo); 
    font-weight: 700; 
    font-size: 1.2rem; 
}

#details-price-live { 
    color: var(--color-mayor); 
    font-weight: 700; 
    font-size: 1.2rem; 
}

.details-image-wrapper { 
    position: relative; 
    width: 100%; 
    background: #fff; 
    border-radius: 12px; 
    overflow: hidden; 
    border: 1px solid #eee; 
}

#details-image { 
    width: 100%; 
    height: auto; 
    display: block; 
    max-height: 380px; 
    object-fit: contain; 
}

@media (min-width: 768px) {
    #details-image { 
        max-height: 500px; 
    }
}

.nav-button { 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    background: rgba(0,0,0,0.5); 
    color: white; 
    border: none; 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    cursor: pointer; 
    z-index: 10; 
    font-size: 1rem;
    transition: background 0.2s;
}

.nav-button:hover {
    background: rgba(0,0,0,0.7);
}

.nav-button.prev { 
    left: 10px; 
}

.nav-button.next { 
    right: 10px; 
}

.thumbnail-gallery { 
    display: flex; 
    gap: 8px; 
    margin-top: 10px; 
    overflow-x: auto; 
    padding-bottom: 5px; 
}

.thumbnail-gallery img { 
    width: 55px; 
    height: 55px; 
    object-fit: cover; 
    border-radius: 8px; 
    opacity: 0.5; 
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.thumbnail-gallery img:hover {
    opacity: 0.8;
}

.thumbnail-gallery img.active { 
    opacity: 1; 
    border-color: var(--color-mayor); 
}

.details-prices-box { 
    background: #f9f9f9; 
    padding: 15px; 
    border-radius: 15px; 
    margin: 15px 0; 
    display: flex; 
    justify-content: space-around; 
    border: 1px solid #eee; 
}

/* CARRITO */
.checkout-button {
    background-color: var(--color-whatsapp);
    color: white;
    border: none;
    padding: 14px;
    border-radius: var(--radius-md);
    width: 100%;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
    transition: background var(--transition);
}

.checkout-button:hover {
    background-color: #1ea952;
}

/* FOOTER FIJO (WhatsApp y Carrito) */
.fixed-footer {
    background: #ffffff;
    padding: var(--space-sm) var(--space-md);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    box-shadow: 0 -1px 8px rgba(0,0,0,0.08);
    border-top: 1px solid var(--color-border);
    z-index: 1000;
}

.footer-content {
    display: flex;
    gap: var(--space-sm);
    max-width: 500px;
    margin: 0 auto;
}

@media (min-width: 600px) {
    .footer-content {
        gap: 10px;
        max-width: 600px;
    }
}

#whatsapp-button {
    background: var(--color-whatsapp);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    flex: 1;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 8px 12px;
    transition: background var(--transition);
    height: 40px;
}

@media (min-width: 600px) {
    #whatsapp-button {
        font-size: 0.88rem;
        padding: 10px 14px;
        height: 44px;
    }
}

#whatsapp-button:hover {
    background: #1ea952;
}

.cart-toggle-footer,
.footer-button.user-logged {
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    width: 44px;
    height: 40px;
    position: relative;
    cursor: pointer;
    font-size: 1rem;
    transition: background var(--transition);
}

.footer-button.user-logged:hover {
    background: #0180aa;
}

@media (min-width: 600px) {
    .cart-toggle-footer,
    .footer-button.user-logged {
        width: 50px;
        height: 44px;
        font-size: 1.1rem;
    }
}

.cart-toggle-footer:hover {
    background: #0180aa;
}

#open-admin-menu-button {
    background: #f3f4f6;
    color: var(--color-text);
    border: none;
    border-radius: var(--radius-md);
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

@media (min-width: 600px) {
    #open-admin-menu-button {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
}

#open-admin-menu-button:hover {
    background: #ddd;
}

@media (min-width: 1024px) {
    .fixed-footer { padding: 3px; }
    .footer-content { gap: 4px; }
    #whatsapp-button { height: 32px; padding: 4px 8px; font-size: 0.8rem; }
    .cart-toggle-footer, .footer-button.user-logged { height: 32px; width: 42px; font-size: 0.95rem; }
    #open-admin-menu-button { height: 32px; width: 36px; font-size: 0.95rem; }
}

/* FOOTER INFORMATIVO (despues de productos) */
.info-footer {
    background: #f8f9fa;
    padding: 40px 20px 80px 20px;
    border-top: 2px solid var(--color-accent);
    margin: 0;
}

.info-footer-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.footer-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #01a1d5;
}

.footer-shipping-info {
    background: white;
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 25px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.footer-shipping-info p {
    margin: 8px 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
}

.footer-shipping-info p:first-child {
    font-size: 1.1rem;
    color: #01a1d5;
    margin-bottom: 12px;
}

.footer-shipping-info strong {
    color: #01a1d5;
    font-weight: 700;
}

.footer-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #01a1d5;
    text-decoration: none;
    margin-bottom: 20px;
    padding: 12px 20px;
    background: white;
    border-radius: 10px;
    transition: all 0.3s;
}

.footer-phone:hover {
    background: #01a1d5;
    color: white;
    transform: scale(1.05);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
}

.footer-social a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    color: #01a1d5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s;
    border: 2px solid #01a1d5;
}

.footer-social a:hover {
    background: #01a1d5;
    color: white;
    transform: translateY(-5px);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 25px 0;
}

@media (min-width: 600px) {
    .footer-links {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
}

.footer-links a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.3s;
}

.footer-links a:hover {
    background: #01a1d5;
    color: white;
}

.footer-payment {
    font-size: 0.9rem;
    color: #555;
    margin: 25px 0 15px 0;
    line-height: 1.6;
}

.footer-payment strong {
    color: #000;
}

.footer-legal-text {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.6;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    border: 1px solid #ddd;
    text-align: justify;
}

.footer-credits {
    font-size: 0.85rem;
    color: #999;
    margin: 15px 0 0 0;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.footer-credits strong {
    color: #000;
    font-weight: 600;
}

/* TÉRMINOS Y CONDICIONES - PANTALLA COMPLETA */
.tyc-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #f5f5f5;
    z-index: 10000;
    overflow-y: auto;
    animation: lrFadeIn 0.3s ease;
}

.tyc-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 30px 24px 60px;
    font-family: 'Poppins', sans-serif;
}

.tyc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #01a1d5;
    padding-bottom: 14px;
    margin-bottom: 28px;
}

.tyc-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #01a1d5;
    margin: 0;
}

.tyc-header-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.tyc-fecha {
    font-size: 0.85rem;
    color: #555;
}

.tyc-close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #333;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.tyc-close-btn:hover {
    color: #e74c3c;
}

.tyc-bloque {
    background: white;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 16px;
    border: 1px solid #e0e0e0;
}

.tyc-bloque h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #01a1d5;
    margin: 0 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #e8edf2;
}

.tyc-bloque p {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.75;
    margin: 0 0 10px 0;
    text-align: justify;
}

.tyc-bloque p:last-child {
    margin-bottom: 0;
}

.tyc-bloque p strong {
    color: #000;
}

@media (max-width: 600px) {
    .tyc-container { padding: 16px 12px 50px; }
    .tyc-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .tyc-header h1 { font-size: 1.2rem; }
    .tyc-header-right { width: 100%; justify-content: space-between; }
    .tyc-bloque { padding: 16px 14px; }
    .tyc-bloque h3 { font-size: 0.92rem; }
    .tyc-bloque p { font-size: 0.85rem; }
}

/* GESTOR DE CATEGORÍAS */
.categories-manager-content {
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
}

.category-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.category-section:last-child {
    border-bottom: none;
}

.category-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    color: #333;
}

.add-category-btn {
    width: 100%;
    padding: 12px;
    background: #000;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    transition: background 0.3s;
}

.add-category-btn:hover {
    background: #333;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.category-tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: white;
    border: 2px solid #eee;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
}

.category-tag:hover {
    border-color: #000;
    transform: translateY(-2px);
}

.category-tag span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.delete-category-btn {
    background: #dc3545;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: background 0.3s;
}

.delete-category-btn:hover {
    background: #c82333;
}

.categories-empty {
    text-align: center;
    padding: 30px;
    color: #999;
    font-style: italic;
}

/* ADMIN UI - GESTIÓN DE ROLES */
.admin-only, .any-admin { 
    display: none !important; 
}

body.admin-mode .admin-only, 
body.admin-mode .any-admin { 
    display: flex !important; 
}

body.helper-mode .any-admin { 
    display: flex !important; 
}

/* SECCIÓN DE VENTAS */
.ventas-modal-content {
    max-width: 600px;
}

.ventas-stats {
    display: flex;
    gap: 12px;
    margin: 15px 0;
}

.venta-stat-box {
    flex: 1;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.venta-stat-num {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
}

.venta-stat-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
}

.ventas-list-container {
    max-height: 450px;
    overflow-y: auto;
}

.venta-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 5px;
    transition: box-shadow 0.2s;
}

.venta-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.venta-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.venta-card-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
}

.venta-card-productos {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.venta-card-fecha {
    font-size: 0.75rem;
    color: #999;
}

.venta-card-monto {
    font-size: 1rem;
    color: #222;
    white-space: nowrap;
}

.venta-card-details {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #eee;
}

.venta-detail-row {
    font-size: 0.82rem;
    padding: 1px 0;
    color: #555;
}

.venta-detail-row strong {
    color: #333;
}

.venta-estado {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.venta-estado.pendiente {
    background: #fff3cd;
    color: #856404;
}

.venta-estado.pagado {
    background: #e8edf2;
    color: #01596e;
}

.venta-productos-list {
    margin-top: 5px;
    padding-left: 10px;
}

.venta-producto-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    padding: 3px 0;
    color: #666;
    gap: 8px;
}

.venta-producto-item span {
    color: #999;
}

.venta-ver-mas-btn {
    background: none;
    border: none;
    color: #01a1d5;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 1px 0 0;
    margin-top: 1px;
    width: 100%;
    text-align: left;
}

.venta-ver-mas-btn:hover {
    text-decoration: underline;
}

.venta-pendiente {
    border-left: 3px solid #ffc107;
    opacity: 0.7;
}

.venta-detail-separator {
    border-top: 1px dashed #e0e0e0;
    margin: 4px 0;
}

.venta-verificar-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    cursor: pointer;
}

.venta-verificar-check {
    width: 18px;
    height: 18px;
    accent-color: #01a1d5;
    cursor: pointer;
}

.venta-verificar-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

.venta-desc-pago {
    display: block;
    font-size: 0.8rem;
    color: #999;
    font-style: italic;
    margin-top: 2px;
}

.venta-eliminar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    width: 100%;
    justify-content: center;
}

.venta-eliminar-btn:hover {
    background: #e74c3c;
    color: white;
}

/* VENTAS SHALOM - TONO ROJO */
.venta-shalom {
    border-left: 4px solid #e74c3c;
    background: #fff5f5;
}

.venta-badge-shalom {
    background: #e74c3c;
    color: white;
    font-size: 0.6rem;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 700;
    margin-left: 4px;
    vertical-align: middle;
}

.venta-card-cliente {
    font-size: 0.75rem;
    color: #666;
}

.venta-card-cliente i {
    margin-right: 3px;
    color: #999;
}

.venta-card-dni-cel {
    font-size: 0.7rem;
    color: #888;
    margin-top: -1px;
}

.venta-card-right-quick,
.venta-card-right-compact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.venta-pago-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #ddd;
    transition: transform 0.2s;
}

.venta-pago-thumb:hover {
    transform: scale(1.5);
    z-index: 10;
}

.venta-pago-full {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 8px;
    margin-top: 5px;
    cursor: pointer;
    border: 1px solid #eee;
}

.venta-check-quick {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.venta-check-quick input {
    display: none;
}

.venta-card-titulo-shalom {
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.venta-quick-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.venta-action-btn {
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #555;
    transition: background 0.2s, color 0.2s;
}

.venta-action-btn:hover {
    background: #01a1d5;
    color: white;
}

.venta-shalom .venta-action-btn:hover {
    background: #e74c3c;
}

.venta-check-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 0.75rem;
}

.venta-check-inline input { display: none; }

.venta-check-icon {
    font-size: 1.1rem;
    color: #ccc;
}

.venta-check-inline input:checked ~ .venta-check-icon {
    color: #01a1d5;
}

.venta-check-label {
    font-weight: 600;
    color: #999;
    white-space: nowrap;
}

.venta-check-inline input:checked ~ .venta-check-label {
    color: #01a1d5;
}

.venta-prods-expandible,
.venta-pago-expandible {
    margin-top: 4px;
    padding: 5px 8px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #eee;
}

.venta-pago-expandible {
    text-align: center;
}

/* LAZY LOADING IMÁGENES */
.lazy-img {
    background: #f0f0f0;
    min-height: 80px;
}

.lazy-slide {
    background: #e8e8e8;
}

/* VENTAS - RESPONSIVE MÓVIL */
@media (max-width: 600px) {
    .ventas-modal-content {
        max-width: 100%;
        margin: 10px;
        padding: 10px;
    }

    .ventas-stats {
        gap: 6px;
        margin: 8px 0;
    }

    .venta-stat-box { padding: 6px; }
    .venta-stat-num { font-size: 1rem; }

    .venta-card { padding: 5px 7px; margin-bottom: 3px; }

    .venta-card-header {
        flex-direction: column;
        gap: 2px;
    }

    .venta-card-info { gap: 0px; }

    .venta-card-right-quick,
    .venta-card-right-compact {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 0px;
        margin-top: 1px;
    }

    .venta-quick-actions { gap: 3px; margin-top: 0; }
    .venta-action-btn { width: 26px; height: 26px; font-size: 0.7rem; }
    .venta-check-inline { font-size: 0.6rem; }
    .venta-check-label { font-size: 0.55rem; }
    .venta-check-icon { font-size: 0.85rem; }
    .venta-card-productos { font-size: 0.78rem; }
    .venta-card-cliente { font-size: 0.68rem; }
    .venta-card-dni-cel { font-size: 0.62rem; }
    .venta-card-titulo-shalom { font-size: 0.78rem; flex-wrap: wrap; }
    .venta-card-monto { font-size: 0.88rem; }
    .venta-card-fecha { font-size: 0.62rem; }
    .venta-producto-item { font-size: 0.73rem; }
    .venta-pago-full { max-height: 160px; }
    .venta-detail-row { font-size: 0.75rem; padding: 0; }
    .venta-card-details { margin-top: 2px; padding-top: 2px; }
    .ventas-list-container { max-height: 380px; }
    .venta-prods-expandible, .venta-pago-expandible { padding: 4px; margin-top: 3px; }
    .venta-ver-mas-btn { font-size: 0.72rem; padding: 0; margin-top: 1px; }
    .venta-eliminar-btn { font-size: 0.72rem; padding: 4px 8px; }
}

/* BADGE ESTADO COMPRAS (CLIENTE) */
.compra-estado-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.compra-verificado {
    background: #e8edf2;
    color: #01596e;
}

.compra-pendiente {
    background: #fff3cd;
    color: #856404;
}

/* BOTÓN SHALOM FLOTANTE */
.shalom-float-btn {
    position: fixed;
    bottom: 70px;
    left: 6px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.shalom-float-btn:hover {
    transform: scale(1.08);
}

.shalom-float-title {
    background: #c0392b;
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 8px;
    margin-bottom: 3px;
    white-space: nowrap;
    letter-spacing: 0.5px;
    text-align: center;
}

.shalom-float-btn img {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-md);
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(231,76,60,0.3);
    border: 3px solid #e74c3c;
    transition: transform var(--transition), box-shadow var(--transition);
}

.shalom-float-btn:hover img {
    box-shadow: 0 4px 16px rgba(231,76,60,0.5);
}

.shalom-float-label {
    background: #e74c3c;
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 3px;
    white-space: nowrap;
}

.shalom-pulsing img {
    box-shadow: 0 4px 16px rgba(231,76,60,0.5);
}

/* CHECKOUT SHALOM MODAL */
.shalom-modal-content {
    max-width: 500px;
}

.shalom-title-icon {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 6px;
}

.shalom-oficina-dropdown {
    display: none;
    position: absolute;
    z-index: 100;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: calc(100% - 2px);
}

.shalom-oficina-item {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
}

.shalom-oficina-item:hover {
    background: #e3f0f8;
}

.shalom-oficina-tag {
    background: #e74c3c;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 6px;
}

.shalom-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 25px;
    border: 2px dashed #ddd;
    border-radius: 10px;
    cursor: pointer;
    color: #999;
    transition: border-color 0.2s, background 0.2s;
}

.shalom-upload-area:hover {
    border-color: #e74c3c;
    background: #fff5f5;
}

.shalom-upload-area i {
    font-size: 1.5rem;
}

.shalom-pago-preview {
    position: relative;
    display: inline-block;
    margin-top: 8px;
}

.shalom-pago-preview img {
    max-width: 100%;
    max-height: 180px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.shalom-pago-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shalom-resumen {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 12px;
    margin-top: 10px;
}

.shalom-resumen h4 {
    margin: 0 0 8px;
    font-size: 0.9rem;
}

.shalom-finalizar-btn {
    width: 100%;
    margin-top: 12px;
    background: #e74c3c;
    border-color: #e74c3c;
}

.shalom-finalizar-btn:hover {
    background: #c0392b;
}

/* BOTÓN MIS COMPRAS */
#open-mis-compras-button {
    background: #01a1d5;
    color: white;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 34px;
    cursor: pointer;
    font-size: 1rem;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#open-mis-compras-button:hover {
    background: #018db8;
}

#open-user-profile-button {
    background: #01a1d5;
    color: white;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#open-user-profile-button:hover {
    background: #018db8;
}

@media (min-width: 1024px) {
    #open-mis-compras-button { height: 32px; width: 36px; font-size: 0.85rem; }
    #open-user-profile-button { height: 32px; width: 36px; font-size: 0.85rem; }
    .shalom-float-btn { bottom: 46px; }
}

/* Posición relativa para dropdown de oficinas */
.shalom-modal-content .form-group {
    position: relative;
}

/* MENÚ ADMIN */
.admin-menu-content {
    max-width: 400px;
}

.admin-menu-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.admin-menu-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    text-align: left;
}

.admin-menu-btn:hover {
    background: #e8e8e8;
    border-color: #999;
    transform: translateY(-2px);
}

.admin-menu-btn i {
    font-size: 1.5rem;
    color: #333;
}

/* GESTOR DE USUARIOS */
.users-manager-content {
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
}

.users-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 15px 0;
}

@media (max-width: 600px) {
    .users-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: linear-gradient(135deg, #01a1d5 0%, #0180aa 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(1, 161, 213, 0.3);
}

.stat-card i {
    font-size: 2rem;
}

.stat-card strong {
    display: block;
    font-size: 1.8rem;
    line-height: 1;
}

.stat-card span {
    display: block;
    font-size: 0.85rem;
    opacity: 0.9;
}

.users-search {
    margin: 15px 0;
}

.users-search input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
}

.users-search input:focus {
    border-color: #01a1d5;
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 2px solid #eee;
    transition: all 0.3s;
}

.user-item:hover {
    border-color: #01a1d5;
}

.user-item.banned {
    background: #ffe6e6;
    border-color: #ffcccc;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #01a1d5 0%, #0180aa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.user-item.banned .user-avatar {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-email {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.user-meta {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.user-badge {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.user-badge.role-admin {
    background: #01a1d5;
    color: white;
}

.user-badge.role-helper {
    background: #0180aa;
    color: white;
}

.user-badge.role-user {
    background: #e8edf2;
    color: #01596e;
}

.user-badge.status-active {
    background: #e8edf2;
    color: #01596e;
}

.user-badge.status-banned {
    background: #f8d7da;
    color: #721c24;
}

.user-date {
    font-size: 0.75rem;
    color: #999;
}

.user-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.user-ban-btn,
.user-unban-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.user-ban-btn {
    background: #dc3545;
    color: white;
}

.user-ban-btn:hover {
    background: #c82333;
}

.user-unban-btn {
    background: #01a1d5;
    color: white;
}

.user-unban-btn:hover {
    background: #0180aa;
}

.users-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.users-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

/* GESTOR DE SLIDES */
.slides-manager-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.add-slide-btn {
    width: 100%;
    padding: 14px;
    background: var(--color-whatsapp);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.3s;
}

.add-slide-btn:hover {
    background: #1ea952;
}

.slides-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.slide-item-manager {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 2px solid #eee;
}

.slide-preview-thumb {
    width: 80px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.slide-info {
    flex: 1;
    min-width: 0;
}

.slide-info small {
    display: block;
    color: #666;
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slide-order-controls {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.slide-order-btn {
    background: #ddd;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.slide-order-btn:hover {
    background: #ccc;
}

.slide-order-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.slide-actions {
    display: flex;
    gap: 6px;
}

.slide-edit-btn,
.slide-delete-btn {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.slide-edit-btn {
    background: #01a1d5;
    color: white;
}

.slide-edit-btn:hover {
    background: #0180aa;
}

.slide-delete-btn {
    background: #dc3545;
    color: white;
}

.slide-delete-btn:hover {
    background: #c82333;
}

/* FORMULARIO DE SLIDE */
.slide-form-content {
    max-width: 550px;
}

.slide-dimensions-info {
    background: linear-gradient(135deg, #01a1d5 0%, #0180aa 100%);
    color: white;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    box-shadow: 0 4px 15px rgba(1, 161, 213, 0.3);
}

.slide-dimensions-info i {
    font-size: 1.8rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.slide-dimensions-info strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.slide-dimensions-info p {
    margin: 5px 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.slide-dimensions-info ul {
    margin: 10px 0;
    padding-left: 20px;
}

.slide-dimensions-info li {
    margin: 5px 0;
    font-size: 0.9rem;
}

.slide-dimensions-info .warning-text {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 10px;
    font-weight: 600;
    font-size: 0.85rem;
}

.slide-image-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 8px;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    width: auto;
    cursor: pointer;
}

#slide-image-url:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.slide-preview-container {
    margin-top: 15px;
    display: none;
}

.slide-preview-container.active {
    display: block;
}

.slide-preview-container img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 10px;
    border: 2px solid #eee;
}

.form-group small {
    display: block;
    color: #666;
    font-size: 0.8rem;
    margin-top: 5px;
}

.card.add-new {
    height: 120px;
    background: #e3f0f8;
    border: 2px dashed #01a1d5;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 2rem;
    color: #01a1d5;
    transition: all 0.2s;
}

.card.add-new:hover {
    background: #e8edf2;
    border-color: #0180aa;
}

@media (min-width: 600px) {
    .card.add-new { 
        height: 200px; 
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    .card.add-new { 
        height: 280px; 
    }
}

/* NOTIFICACIONES */
.toast-notification { 
    position: fixed; 
    bottom: 85px; 
    left: 50%; 
    transform: translateX(-50%); 
    background: #01a1d5; 
    color: white; 
    padding: 12px 25px; 
    border-radius: 25px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); 
    z-index: 3000; 
    font-weight: 600; 
    font-size: 0.85rem; 
}

/* FORMULARIOS */
.form-row { 
    display: flex; 
    gap: 10px; 
}

.form-group { 
    margin-bottom: 12px; 
}

.form-group.flex-1 {
    flex: 1;
}

.form-group label { 
    display: block; 
    font-size: 0.8rem; 
    font-weight: 700; 
    color: #555; 
    margin-bottom: 4px; 
}

.form-group input, 
.form-group select, 
.form-group textarea { 
    width: 100%; 
    padding: 10px; 
    border-radius: 10px; 
    border: 1px solid #ddd; 
    font-family: 'Poppins', sans-serif; 
    box-sizing: border-box; 
}

.select-wrapper {
    display: flex;
    gap: 5px;
}

.select-wrapper select {
    flex: 1;
}

.save-product-btn {
    background: #01a1d5;
    color: white; 
    padding: 14px; 
    border: none; 
    border-radius: 12px; 
    width: 100%; 
    cursor: pointer; 
    font-weight: 700; 
    margin-top: 10px;
    transition: background 0.2s;
}

.save-product-btn:hover {
    background: #0180aa;
}

.add-new-option-button { 
    background: #333; 
    color: white; 
    border: none; 
    border-radius: 8px; 
    width: 35px; 
    cursor: pointer;
    transition: background 0.2s;
}

.add-new-option-button:hover {
    background: #000;
}

.file-input-wrapper {
    position: relative;
}

.file-input {
    display: none;
}

.file-custom-btn {
    background: #eee;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    border: 2px dashed #ccc;
    transition: all 0.2s;
}

.file-custom-btn:hover {
    background: #e0e0e0;
    border-color: #999;
}

.image-preview-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 5px; 
    margin-top: 10px; 
}

.preview-item { 
    position: relative; 
    aspect-ratio: 1/1; 
    border: 1px solid #eee; 
    border-radius: 5px; 
    overflow: hidden; 
}

.preview-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.remove-preview-btn { 
    position: absolute; 
    top: 2px; 
    right: 2px; 
    background: red; 
    color: white; 
    border: none; 
    border-radius: 50%; 
    width: 18px; 
    height: 18px; 
    font-size: 10px; 
    cursor: pointer;
    transition: background 0.2s;
}

.remove-preview-btn:hover {
    background: darkred;
}

/* CARRITO - ESTILOS ADICIONALES */
.cart-items-container {
    max-height: 400px;
    overflow-y: auto;
    margin: 15px 0;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.cart-item-img {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: #f0f0f0;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price-tag {
    font-size: 0.75rem;
    color: #888;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.cart-qty-btn {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: #f0f0f0;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: background 0.2s;
}

.cart-qty-btn:hover {
    background: #ddd;
}

.cart-qty-val {
    font-weight: 600;
    font-size: 0.95rem;
    min-width: 20px;
    text-align: center;
}

.cart-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.cart-item-subtotal {
    font-size: 0.95rem;
    color: #222;
}

.cart-remove-btn {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px;
    transition: color 0.2s;
}

.cart-remove-btn:hover {
    color: #e74c3c;
}

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #bbb;
}

.cart-empty i {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.cart-empty p {
    font-size: 1rem;
}

.cart-header {
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.cart-total-box {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
    font-size: 1.1rem;
}

/* AUTH MODAL */
.auth-modal-content {
    max-width: 400px;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: #999;
    transition: all 0.3s;
}

.auth-tab.active {
    color: #333;
    border-bottom-color: #01a1d5;
}

.auth-tab:hover {
    color: #01a1d5;
}

.auth-error {
    color: red;
    font-size: 0.85rem;
    margin-top: 10px;
}

/* Botón ver/ocultar contraseña */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    flex: 1;
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: #999;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 4px;
}

.toggle-password:hover {
    color: #333;
}

/* Estilo para cuando se arrastra un archivo sobre la zona */
.file-custom-btn.drag-over {
    background: #e0e0e0;
    border: 2px dashed #000;
    transform: scale(1.02);
    color: #000;
}

/* =============================================
   LIBRO DE RECLAMACIONES
   ============================================= */
.lr-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #f5f5f5;
    z-index: 10000;
    overflow-y: auto;
    animation: lrFadeIn 0.3s ease;
}
@keyframes lrFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.lr-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 30px 24px 60px;
    font-family: 'Poppins', sans-serif;
}
.lr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #333;
    padding-bottom: 14px;
    margin-bottom: 28px;
}
.lr-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222;
    margin: 0;
}
.lr-header-right {
    display: flex;
    align-items: center;
    gap: 18px;
}
.lr-fecha {
    font-size: 0.85rem;
    color: #555;
}
.lr-close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #555;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
}
.lr-close-btn:hover { color: #c0392b; }

/* Paso 0: Selección de canal */
.lr-step-canal {
    text-align: center;
    padding: 40px 0 20px;
}
.lr-canal-titulo h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #222;
    margin: 0 0 6px;

    
}
.lr-canal-titulo p {
    font-size: 0.88rem;
    color: #777;
    margin: 0 0 32px;
}
.lr-canal-opciones {
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
}
.lr-canal-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 14px;
    padding: 28px 22px 22px;
    width: 220px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}
.lr-canal-card:hover {
    border-color: #01a1d5;
    box-shadow: 0 4px 18px rgba(1,161,213,0.13);
    transform: translateY(-3px);
}
.lr-canal-icono {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #e3f0f8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}
.lr-canal-icono i {
    font-size: 1.4rem;
    color: #01a1d5;
}
.lr-canal-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 4px;
}
.lr-canal-card p {
    font-size: 0.75rem;
    color: #888;
    margin: 0;
    line-height: 1.3;
}

/* Canal elegido - barra superior */
.lr-canal-elegido {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #e3f0f8;
    border: 1px solid #a8d4e8;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 22px;
    font-size: 0.85rem;
    color: #333;
}
.lr-canal-elegido span { font-weight: 600; }
.lr-canal-cambiar {
    background: none;
    border: none;
    color: #01a1d5;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}
.lr-canal-cambiar:hover { color: #016a85; }

/* Bloques */
.lr-bloque {
    background: #fff;
    border-radius: 10px;
    padding: 24px 22px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.lr-bloque-titulo {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 18px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
.lr-subtitulo {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    margin: 20px 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filas y campos */
.lr-row {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}
.lr-row-3 { gap: 14px; }
.lr-row-3 .lr-field { flex: 1; min-width: 0; }
.lr-field {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.lr-field.lr-full { flex: 1 1 100%; }
.lr-field label {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 4px;
    font-weight: 500;
}

/* Inputs estilo línea inferior */
.lr-field input[type="text"],
.lr-field input[type="email"],
.lr-field input[type="tel"],
.lr-field input[type="number"],
.lr-field select {
    border: none;
    border-bottom: 1.5px solid #ccc;
    background: transparent;
    padding: 8px 2px;
    font-size: 0.88rem;
    color: #333;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: border-color 0.2s;
    border-radius: 0;
    -webkit-appearance: none;
}
.lr-field input:focus,
.lr-field select:focus {
    border-bottom-color: #01a1d5;
}
.lr-field select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    padding-right: 20px;
}
.lr-field textarea {
    border: 1.5px solid #ddd;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 0.88rem;
    color: #333;
    font-family: 'Poppins', sans-serif;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s;
}
.lr-field textarea:focus { border-color: #01a1d5; }

/* Radio y checkbox */
.lr-radio-group {
    display: flex;
    gap: 24px;
    padding: 8px 0;
}
.lr-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: #444;
    cursor: pointer;
}
.lr-radio input[type="radio"] {
    accent-color: #01a1d5;
    width: 16px; height: 16px;
    cursor: pointer;
}
.lr-checkbox-field {
    display: flex;
    align-items: flex-end;
    padding-bottom: 8px;
}
.lr-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: #444;
    cursor: pointer;
}
.lr-check-label input[type="checkbox"] {
    accent-color: #01a1d5;
    width: 16px; height: 16px;
    cursor: pointer;
}

/* Captcha placeholder */
.lr-bloque-final {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.lr-captcha-placeholder {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 18px;
}
.lr-captcha-check span {
    font-size: 0.85rem;
    color: #444;
}
.lr-captcha-icon {
    font-size: 0.7rem;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}
.lr-captcha-icon i { font-size: 1rem; color: #01a1d5; }

/* Botón enviar */
.lr-submit-btn {
    background: #01a1d5;
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}
.lr-submit-btn:hover:not(:disabled) { background: #0180aa; }
.lr-submit-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Sección tutor menor de edad */
.lr-tutor-section {
    margin-top: 10px;
    padding: 18px 18px 8px;
    background: #e8f2f9;
    border: 1px dashed #b0bec5;
    border-radius: 8px;
    animation: lrFadeIn 0.3s ease;
}

/* Footer link del libro */
#libro-reclamaciones-link {
    color: #000;
    font-weight: 500;
}
#libro-reclamaciones-link i { margin-right: 4px; }

/* Responsive */
@media (max-width: 600px) {
    .lr-container { padding: 16px 12px 50px; }
    .lr-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .lr-header h1 { font-size: 1.2rem; }
    .lr-header-right { width: 100%; justify-content: space-between; }
    .lr-row, .lr-row-3 { flex-direction: column; gap: 12px; }
    .lr-bloque { padding: 16px 14px; }
    .lr-bloque-final { flex-direction: column; align-items: stretch; }
    .lr-submit-btn { width: 100%; text-align: center; }
    .lr-canal-opciones { flex-direction: column; align-items: center; }
    .lr-canal-card { width: 100%; max-width: 300px; }
    .lr-canal-titulo h2 { font-size: 1.1rem; }
    .lr-canal-elegido { flex-direction: column; gap: 8px; text-align: center; }
}

/* ============================================ */
/* MEJORAS GLOBALES - MODERNIZACION             */
/* ============================================ */

html {
    scroll-behavior: smooth;
}

/* Reducir animaciones para usuarios que lo prefieren */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Seleccion de texto con color de marca */
::selection {
    background: rgba(1, 161, 213, 0.2);
    color: inherit;
}

/* ============================================ */
/* PERFIL DE USUARIO - MODAL                    */
/* ============================================ */

.profile-section {
    margin-bottom: 18px;
}
.profile-section h4 {
    font-size: 0.85rem;
    color: #01a1d5;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.profile-section input,
.profile-section select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 8px;
    box-sizing: border-box;
    background: #fafafa;
    transition: border-color 0.2s;
}
.profile-section input:focus,
.profile-section select:focus {
    outline: none;
    border-color: #01a1d5;
    background: #fff;
}
.profile-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
#btn-save-profile {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #01a1d5, #0189b5);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: opacity 0.2s;
}
#btn-save-profile:hover { opacity: 0.9; }
#btn-save-profile:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================ */
/* MIS COMPRAS - ESTADOS Y DETALLE              */
/* ============================================ */

.compra-card {
    position: relative;
}
.compra-estado-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
.estado-pendiente {
    background: #fff3cd;
    color: #856404;
}
.estado-pagado {
    background: #d4edda;
    color: #155724;
}
.estado-datos {
    background: #cce5ff;
    color: #004085;
}
.estado-enviado {
    background: #d1ecf1;
    color: #0c5460;
}
.editado-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.68rem;
    background: #ffeeba;
    color: #856404;
    font-weight: 500;
}
.compra-detail-section {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.compra-detail-section:last-of-type {
    border-bottom: none;
}
.compra-detail-section h4 {
    font-size: 0.82rem;
    color: #555;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.compra-envio-section {
    background: #f0fdf4;
    border-radius: 10px;
    padding: 12px;
    margin-top: 8px;
}
.compra-envio-section h4 {
    color: #27ae60;
}
.btn-editar-pedido {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    font-size: 0.82rem;
    color: #495057;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s;
}
.btn-editar-pedido:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}
.venta-card-right-quick {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

/* ============================================ */
/* VENTAS - GRID DE CIRCULOS DE USUARIOS        */
/* ============================================ */

.ventas-usuarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 16px;
    padding: 16px 0;
}
.ventas-usuario-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 8px;
    border-radius: 12px;
}
.ventas-usuario-circle:hover {
    transform: translateY(-3px);
    background: #f8f9fa;
}
.usuario-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    position: relative;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}
.avatar-ok {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}
.avatar-pendiente {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    animation: avatarPulse 2s infinite;
}
@keyframes avatarPulse {
    0%, 100% { box-shadow: 0 3px 10px rgba(230,126,34,0.3); }
    50% { box-shadow: 0 3px 20px rgba(230,126,34,0.6); }
}
.avatar-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}
.usuario-nombre {
    font-size: 0.78rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.usuario-total {
    font-size: 0.65rem;
    color: #999;
    text-align: center;
}

/* ============================================ */
/* VENTAS USUARIO - DETALLE ADMIN               */
/* ============================================ */

.ventas-usuario-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.ventas-usuario-header h2 {
    margin: 0;
    font-size: 1.1rem;
}
.back-btn-inline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #555;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.back-btn-inline:hover {
    background: #e0e0e0;
}
.venta-card-details-admin {
    padding: 12px 0;
    border-top: 1px solid #f0f0f0;
    margin-top: 8px;
}
.admin-acciones {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 2px dashed #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.admin-accion-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.admin-accion-row > label:first-child {
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    min-width: 100px;
}
.admin-estado-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.82rem;
    background: #fafafa;
    flex: 1;
    max-width: 200px;
}
.upload-foto-envio-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: #01a1d5;
    color: #fff;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: opacity 0.2s;
}
.upload-foto-envio-label:hover { opacity: 0.85; }
.admin-foto-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid #ddd;
}
.admin-comentario-envio {
    display: flex;
    gap: 6px;
    flex: 1;
}
.admin-comentario-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.82rem;
}
.btn-guardar-comentario {
    padding: 6px 12px;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: opacity 0.2s;
}
.btn-guardar-comentario:hover { opacity: 0.85; }

/* Historial de ediciones */
.historial-ediciones {
    margin-top: 12px;
    padding: 10px;
    background: #fff8e1;
    border-radius: 10px;
    border: 1px solid #ffe082;
}
.historial-ediciones h4 {
    font-size: 0.8rem;
    color: #f57f17;
    margin-bottom: 6px;
}
.historial-item {
    font-size: 0.75rem;
    color: #666;
    padding: 3px 0;
    border-bottom: 1px solid #fff3c4;
}
.historial-item:last-child { border-bottom: none; }
.historial-fecha {
    color: #999;
    font-size: 0.7rem;
}

/* ============================================ */
/* NOTIFICACIONES                               */
/* ============================================ */

.notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #111;
    box-sizing: border-box;
}
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: background 0.2s;
}
.notif-nueva {
    background: #e3f2fd;
    border-left: 3px solid #01a1d5;
}
.notif-leida {
    background: #f8f9fa;
    border-left: 3px solid #ddd;
}
.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #01a1d5;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.notif-leida .notif-icon {
    background: #bbb;
}
.notif-content {
    flex: 1;
    min-width: 0;
}
.notif-mensaje {
    font-size: 0.85rem;
    color: #333;
    margin: 0 0 4px 0;
    line-height: 1.3;
}
.notif-fecha {
    font-size: 0.7rem;
    color: #999;
}
.btn-marcar-todas-leidas {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    background: #f0f0f0;
    border: none;
    border-radius: 10px;
    font-size: 0.82rem;
    color: #555;
    cursor: pointer;
    margin-top: 12px;
    transition: background 0.2s;
}
.btn-marcar-todas-leidas:hover {
    background: #e0e0e0;
}

/* ============================================ */
/* RESPONSIVE - NUEVOS COMPONENTES              */
/* ============================================ */

@media (max-width: 600px) {
    .ventas-usuarios-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 10px;
    }
    .usuario-avatar {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    .admin-accion-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .admin-estado-select {
        max-width: 100%;
        width: 100%;
    }
    .admin-comentario-envio {
        width: 100%;
    }
    .profile-row {
        grid-template-columns: 1fr;
    }
    .ventas-usuario-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .compra-estado-badge {
        font-size: 0.65rem;
    }
}