/* ============================================================
   Tienda Cuba - Estilos principales (versión rediseñada)
   Paleta fría: azules (#1a5276, #2980b9, #2e86c1) y verdes (#27ae60)
   ============================================================ */

:root {
    --color-primary: #1a5276;
    --color-primary-light: #2980b9;
    --color-primary-dark: #154360;
    --color-secondary: #27ae60;
    --color-secondary-light: #2ecc71;
    --color-bg: #f0f4f8;
    --color-card: #ffffff;
    --color-text: #2c3e50;
    --color-text-light: #555;
    --color-border: #d5e0e8;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.15);
    --radius: 12px;
    --transition: all 0.25s ease;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset y base */
body.tienda-cuba-page {
    background: var(--color-bg);
    font-family: var(--font-family);
    color: var(--color-text);
    margin: 0;
    padding: 0;
}

/* Contenedor general de la tienda */
.tienda-cuba-wrapper {
    max-width: 100%;          /* ANTES: 1400px - ahora ocupa todo el ancho */
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ============================================================
   CABECERA (estilo moderno)
   ============================================================ */
.tc-store-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: #fff;
    border-radius: var(--radius);
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 10px;
    box-shadow: var(--shadow-sm);
}
.tc-store-logo a {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}
.tc-store-logo a:hover {
    color: var(--color-secondary-light);
}
.tc-store-cart a {
    color: #fff;
    font-size: 1.1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.15);
    padding: 8px 20px;
    border-radius: 40px;
    transition: var(--transition);
    font-weight: 500;
    backdrop-filter: blur(4px);
}
.tc-store-cart a:hover {
    background: var(--color-secondary);
    color: #fff;
    transform: scale(1.02);
}
.tc-cart-badge {
    background: var(--color-secondary);
    color: #fff;
    border-radius: 50%;
    padding: 2px 12px;
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 28px;
    text-align: center;
    transition: var(--transition);
}
.tc-store-cart a:hover .tc-cart-badge {
    background: #fff;
    color: var(--color-primary);
}

/* Responsive cabecera */
@media (max-width: 768px) {
    .tc-store-header {
        flex-direction: row;
        padding: 10px 16px;
    }
    .tc-store-logo a {
        font-size: 1.4rem;
    }
    .tc-store-cart a {
        font-size: 0.95rem;
        padding: 6px 14px;
    }
}

/* ============================================================
   LAYOUT PRINCIPAL (productos + sidebar)
   ============================================================ */
.contenedor-tienda {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;          /* Forzar que ocupe todo el ancho */
    box-sizing: border-box;
}

/* Sidebar (escritorio) */
.sidebar-filtros {
    flex: 0 0 280px;
    background: var(--color-card);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 20px;
}
.sidebar-filtros h3 {
    font-size: 1.1rem;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 8px;
    margin: 20px 0 12px 0;
}
.sidebar-filtros h3:first-of-type {
    margin-top: 0;
}
.categorias-lista {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}
.categorias-lista li {
    margin-bottom: 4px;
}
.categorias-lista li a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--color-text);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}
.categorias-lista li a:hover,
.categorias-lista li.active a {
    background: var(--color-primary-light);
    color: #fff;
}
.categorias-lista li.active a {
    font-weight: 700;
    box-shadow: inset 0 0 0 2px var(--color-primary);
}

.sidebar-filtros form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.sidebar-filtros input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 30px;
    font-size: 0.95rem;
    transition: var(--transition);
}
.sidebar-filtros input[type="text"]:focus {
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(41,128,185,0.2);
    outline: none;
}
.sidebar-filtros button[type="submit"] {
    background: var(--color-primary-light);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.sidebar-filtros button[type="submit"]:hover {
    background: var(--color-primary-dark);
}

.selector-modos {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--color-border);
}
.selector-modos select {
    width: 100%;
    padding: 8px 12px;
    border-radius: 30px;
    border: 1px solid var(--color-border);
    background: #fff;
    font-size: 0.95rem;
}

.btn-gestion {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: var(--color-secondary);
    color: #fff;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}
.btn-gestion:hover {
    background: var(--color-secondary-light);
    transform: translateY(-2px);
}

/* Lista de productos (grid) */
.lista-productos {
    flex: 1;
    min-width: 0; /* Evita desbordamiento */
    width: 100%;  /* Asegurar que ocupe todo el espacio */
}

.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

/* Tarjeta de producto */
.producto-item {
    background: var(--color-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0; /* Evita desbordamiento en grids pequeños */
}
.producto-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.producto-item a {
    text-decoration: none;
    color: var(--color-text);
    display: block;
    padding: 16px 16px 8px;
}
.producto-item img,
.producto-item .placeholder-imagen {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    background: var(--color-border);
}
.producto-item h2 {
    font-size: 1rem;
    margin: 12px 0 6px;
    font-weight: 600;
    line-height: 1.3;
}
.producto-item .precio {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary-light);
    margin-bottom: 8px;
    display: block;
}
.producto-item .agregar-carrito {
    margin: auto 16px 16px;
    background: var(--color-secondary);
    color: #fff;
    border: none;
    padding: 10px 0;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}
.producto-item .agregar-carrito:hover {
    background: var(--color-secondary-light);
    transform: scale(1.02);
}

/* Skeleton (placeholder de carga) */
.skeleton {
    background: linear-gradient(90deg, var(--color-border) 25%, #e8edf2 50%, var(--color-border) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 6px;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Centinela para scroll infinito */
#tc-scroll-sentinel {
    height: 20px;
    margin: 30px 0;
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ============================================================
   DETALLE DE PRODUCTO
   ============================================================ */
.producto-detalle {
    display: flex;
    gap: 40px;
    background: var(--color-card);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.detalle-imagen {
    flex: 0 0 40%;
}
.detalle-imagen img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}
.detalle-info h1 {
    margin-top: 0;
    font-size: 2.2rem;
    color: var(--color-primary);
}
.detalle-categoria {
    color: var(--color-text-light);
}
.detalle-precio {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin: 15px 0;
}
.detalle-descripcion {
    line-height: 1.8;
}
.detalle-info .agregar-carrito {
    background: var(--color-secondary);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.detalle-info .agregar-carrito:hover {
    background: var(--color-secondary-light);
}
.detalle-info .volver {
    display: inline-block;
    margin-top: 20px;
    color: var(--color-primary-light);
    text-decoration: none;
}
.detalle-info .volver:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .producto-detalle {
        flex-direction: column;
        padding: 20px;
    }
    .detalle-imagen {
        flex: 1;
    }
}

/* ============================================================
   CARRITO Y CHECKOUT
   ============================================================ */
.carrito-tabla,
.historial-tabla,
#tabla-pedidos {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.carrito-tabla th,
.historial-tabla th,
#tabla-pedidos th {
    background: var(--color-primary);
    color: #fff;
    padding: 12px 16px;
    text-align: left;
}
.carrito-tabla td,
.historial-tabla td,
#tabla-pedidos td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
}
.carrito-tabla .cantidad-carrito {
    width: 60px;
    padding: 6px;
    border-radius: 30px;
    border: 1px solid var(--color-border);
    text-align: center;
}
.btn-finalizar {
    display: inline-block;
    background: var(--color-secondary);
    color: #fff;
    padding: 12px 30px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}
.btn-finalizar:hover {
    background: var(--color-secondary-light);
    transform: translateY(-2px);
}
#tc-restaurar-cache {
    color: var(--color-primary-light);
    text-decoration: underline;
    cursor: pointer;
}

/* Formulario checkout */
.contenedor-checkout {
    max-width: 700px;
    margin: 0 auto;
}
#form-checkout .campo {
    margin-bottom: 20px;
}
#form-checkout label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}
#form-checkout input[type="text"],
#form-checkout input[type="email"],
#form-checkout textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 30px;
    font-size: 1rem;
    transition: var(--transition);
}
#form-checkout input:focus,
#form-checkout textarea:focus {
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(41,128,185,0.2);
    outline: none;
}
.btn-realizar-pedido {
    background: var(--color-secondary);
    color: #fff;
    padding: 14px 40px;
    border: none;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}
.btn-realizar-pedido:hover {
    background: var(--color-secondary-light);
}

/* ============================================================
   BARRA DE SINCRONIZACIÓN FLOTANTE
   ============================================================ */
#tc-sync-float {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}
#tc-sync-float .sync-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-card);
    box-shadow: var(--shadow-lg);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: var(--transition);
    position: relative;
    border: 2px solid transparent;
}
#tc-sync-float .sync-button .status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #fff;
}
#tc-sync-float .sync-button.idle .status-dot { background: #27ae60; }
#tc-sync-float .sync-button.saving .status-dot { background: #f1c40f; animation: pulse 1s infinite; }
#tc-sync-float .sync-button.error .status-dot { background: #e74c3c; }
#tc-sync-float .sync-button.offline .status-dot { background: #95a5a6; }

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

#tc-sync-float .sync-panel {
    display: none;
    background: var(--color-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 16px 20px;
    min-width: 220px;
    max-width: 300px;
    border: 1px solid var(--color-border);
    margin-top: 4px;
}
#tc-sync-float .sync-panel.open {
    display: block;
}
#tc-sync-float .sync-panel p {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: var(--color-text);
}
#tc-sync-float .sync-panel .actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
#tc-sync-float .sync-panel .actions a {
    color: var(--color-primary-light);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.85rem;
}

/* ============================================================
   SIDEBAR MÓVIL (panel lateral)
   ============================================================ */
#tc-mobile-sidebar-toggle {
    display: none; /* Oculto por defecto en escritorio */
    background: var(--color-primary-light);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 16px;
    transition: var(--transition);
}
#tc-mobile-sidebar-toggle:hover {
    background: var(--color-primary-dark);
}

/* Asegurar que el botón de filtros solo aparezca en móvil */
@media (max-width: 768px) {
    #tc-mobile-sidebar-toggle {
        display: inline-block;
    }
}

#tc-mobile-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100%;
    background: var(--color-card);
    box-shadow: var(--shadow-lg);
    padding: 24px 20px;
    overflow-y: auto;
    transition: left 0.3s ease;
    z-index: 10000;
}
#tc-mobile-sidebar.open {
    left: 0;
}
#tc-mobile-sidebar .close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    float: right;
    color: var(--color-text-light);
}
#tc-mobile-sidebar .close-btn:hover {
    color: var(--color-primary);
}
#tc-mobile-sidebar .sidebar-content {
    margin-top: 20px;
}
#tc-mobile-sidebar .sidebar-content h3 {
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 8px;
}

/* Overlay */
#tc-mobile-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 9999;
}
#tc-mobile-sidebar-overlay.active {
    display: block;
}

/* ============================================================
   RESPONSIVE GLOBAL
   ============================================================ */
/* Para pantallas entre 1025px y 1400px, el grid se adapta automáticamente
   gracias a auto-fill, así que no necesitamos un breakpoint fijo aquí.
   Sin embargo, podemos limitar el número máximo de columnas a 4 en
   pantallas muy grandes para evitar que se vean demasiado pequeñas. */
@media (min-width: 1400px) {
    .grid-productos {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Para tablet (768px - 1024px) el grid ya se ajusta con auto-fill,
   pero podemos forzar 3 columnas si queremos un control más fino. */
@media (max-width: 1024px) and (min-width: 769px) {
    .grid-productos {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-productos {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .contenedor-tienda {
        flex-direction: column;
    }
    .sidebar-filtros {
        display: none; /* se usa el panel lateral */
    }
    #tc-sync-float {
        top: 10px;
        right: 10px;
    }
    #tc-sync-float .sync-button {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
    .tc-store-cart a {
        font-size: 0.9rem;
        padding: 4px 12px;
    }
}

@media (max-width: 480px) {
    .grid-productos {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .producto-item h2 {
        font-size: 0.9rem;
    }
}

/* ============================================================
   GALERÍA EN DETALLE DE PRODUCTO
   ============================================================ */
.detalle-imagen {
    flex: 0 0 40%;
}
.detalle-imagen-principal {
    margin-bottom: 12px;
}
.detalle-imagen-principal img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}
.detalle-imagen-miniaturas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.detalle-imagen-miniaturas img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    cursor: pointer;
}
.detalle-imagen-miniaturas img:hover {
    border-color: #2980b9;
}

/* ============================================================
   NUEVOS ESTILOS PARA FILTROS (toggle, tiendas, categorías)
   ============================================================ */

/* Toggle (switch) */
.tc-toggle-tiendas {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
}
.tc-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}
.tc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.tc-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}
.tc-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
.tc-switch input:checked + .tc-slider {
    background-color: var(--color-primary-light);
}
.tc-switch input:checked + .tc-slider:before {
    transform: translateX(22px);
}
.tc-toggle-label {
    font-weight: 500;
    color: var(--color-text);
}

/* Listado de tiendas */
.tc-tiendas-grid {
    max-height: 200px;
    overflow-y: auto;
    margin: 8px 0;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 6px;
}
.tc-tienda-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid #f0f0f0;
}
.tc-tienda-item:last-child {
    border-bottom: none;
}
.tc-tienda-nombre {
    font-size: 0.9rem;
}
.tc-tienda-toggle {
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 2px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}
.tc-tienda-toggle.selected {
    background: var(--color-secondary);
    color: #fff;
    border-color: var(--color-secondary);
}
.tc-tienda-toggle:hover {
    background: var(--color-primary-light);
    color: #fff;
}
.tc-tiendas-seleccionadas {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* Filtro de categorías con buscador */
.tc-filtro-categorias {
    margin-top: 20px;
}
.tc-buscar-categoria {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 30px;
    font-size: 0.9rem;
    margin-bottom: 8px;
    box-sizing: border-box;
}
.tc-buscar-categoria:focus {
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(41,128,185,0.2);
    outline: none;
}
#tc-categorias-lista-filtros,
#tc-mobile-categorias-lista-filtros {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 6px;
    background: #fff;
}
.tc-categoria-check {
    display: block;
    padding: 4px 0;
    font-size: 0.9rem;
    cursor: pointer;
}
.tc-categoria-check:hover {
    background: #f4f7fa;
}
.tc-categoria-check input[type="checkbox"] {
    margin-right: 8px;
}

/* ============================================================
   MODO MÓVIL - Ajustes globales (modal, etc.)
   ============================================================ */
body.modo-movil #tc-modal-pedido {
    align-items: center !important;
    justify-content: center !important;
    padding: 8px !important;
}

/* ============================================================
   MARCA DE AGUA "AGOTADO" (v5.0)
   ============================================================ */
.producto-item.agotado {
    position: relative;
    overflow: hidden;
}
.producto-item.agotado::after {
    content: "AGOTADO";
    position: absolute;
    top: 20%;
    left: -20%;
    width: 140%;
    transform: rotate(-30deg);
    background: rgba(220, 20, 20, 0.85);
    color: #fff;
    font-weight: 900;
    font-size: 2.5rem;
    text-align: center;
    padding: 12px 0;
    pointer-events: none;
    z-index: 10;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 4px;
    border: 3px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
/* En detalle */
.producto-detalle.agotado .detalle-imagen {
    position: relative;
    overflow: hidden;
}
.producto-detalle.agotado .detalle-imagen::after {
    content: "AGOTADO";
    position: absolute;
    top: 20%;
    left: -20%;
    width: 140%;
    transform: rotate(-30deg);
    background: rgba(220, 20, 20, 0.85);
    color: #fff;
    font-weight: 900;
    font-size: 4rem;
    text-align: center;
    padding: 20px 0;
    pointer-events: none;
    z-index: 10;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 6px;
    border: 3px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
/* Ocultar botón de agregar si está agotado */
.producto-item.agotado .agregar-carrito,
.producto-detalle.agotado .agregar-carrito {
    display: none !important;
}
/* Mensaje de no disponible en detalle */
.producto-detalle.agotado .detalle-info .no-disponible-msg {
    display: block !important;
    background: #fdeaea;
    color: #c0392b;
    padding: 12px 20px;
    border-radius: 40px;
    font-weight: 600;
    border: 2px solid #e74c3c;
    margin: 15px 0;
}
.no-disponible-msg {
    display: none;
}

/* Notificación flotante */
#tc-notificacion {
    font-family: var(--font-family);
    z-index: 10001;
}
/* Mensaje de error en carrito */
.tc-error-message {
    background: #fdeaea;
    border: 2px solid #e74c3c;
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    color: #c0392b;
    font-weight: 500;
}

/* ============================================================
   ESTILOS PARA VÍDEOS PROMOCIONALES EN EL GRID
   ============================================================ */
.producto-item.video-promocional {
    background: #f8fcff;
    border: 1px solid #d0e2f0;
}
.producto-item.video-promocional .video-container {
    padding: 12px;
}
.producto-item.video-promocional .video-container video {
    width: 100%;
    height: auto;
    border-radius: 6px;
    background: #000;
}
.producto-item.video-promocional h2 {
    margin: 10px 0 4px;
    font-size: 1rem;
}
.producto-item.video-promocional .video-badge {
    display: inline-block;
    background: #2980b9;
    color: #fff;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    margin-top: 4px;
}
.producto-item.video-promocional .tienda-nombre {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

/* ============================================================
   MINIATURAS DE VÍDEO EN DETALLE DE PRODUCTO
   ============================================================ */
.detalle-imagen-miniaturas .tc-miniatura-video {
    cursor: pointer;
    border: 2px solid transparent;
    max-width: 60px;
    max-height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #222;
    color: #fff;
    border-radius: 4px;
    font-size: 0.7rem;
    padding: 4px;
    transition: border-color 0.2s, transform 0.2s;
}
.detalle-imagen-miniaturas .tc-miniatura-video:hover {
    border-color: #e74c3c;
    transform: scale(1.05);
}
.video-player-container {
    width: 100%;
    position: relative;
}
.video-player-container video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: #000;
}

/* ============================================================
   ESTILOS PARA HISTORIAL DE PEDIDOS (cliente)
   ============================================================ */
.tc-tabla-mis-pedidos {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.tc-tabla-mis-pedidos th {
    background: var(--color-primary);
    color: #fff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
}
.tc-tabla-mis-pedidos td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}
.tc-tabla-mis-pedidos tr:last-child td {
    border-bottom: none;
}
.tc-estado-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}
.tc-estado-pendiente { background: #f1c40f; color: #333; }
.tc-estado-en-contacto { background: #3498db; color: #fff; }
.tc-estado-confirmado { background: #2ecc71; color: #fff; }
.tc-estado-entregado { background: #95a5a6; color: #fff; }
.tc-boton-ver-detalle {
    background: var(--color-primary-light);
    color: #fff;
    border: none;
    padding: 4px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.2s;
}
.tc-boton-ver-detalle:hover {
    background: var(--color-primary-dark);
}
.tc-loading {
    text-align: center;
    padding: 40px;
    color: #555;
}
.tc-paginacion button {
    padding: 6px 14px;
    border: 1px solid var(--color-border);
    border-radius: 30px;
    background: #fff;
    cursor: pointer;
    transition: 0.2s;
}
.tc-paginacion button:hover {
    background: var(--color-primary-light);
    color: #fff;
}
.tc-paginacion button.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
/* Modal detalle cliente */
#tc-modal-mis-pedidos .tc-modal-section {
    margin: 18px 0;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 10px;
    border-left: 4px solid #2980b9;
}
#tc-modal-mis-pedidos .tc-modal-section h4 {
    margin: 0 0 8px 0;
    color: #1a5276;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
#tc-modal-mis-pedidos .tc-modal-section .info-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.95rem;
    border-bottom: 1px solid #eef2f6;
}
#tc-modal-mis-pedidos .tc-modal-section .info-item:last-child {
    border-bottom: none;
}
#tc-modal-mis-pedidos .tc-modal-section .info-item strong {
    color: #2c3e50;
}
#tc-modal-mis-pedidos .tc-estado-actual {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.85rem;
}
#tc-modal-mis-pedidos .tc-productos-lista {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}
#tc-modal-mis-pedidos .tc-productos-lista li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #eef2f6;
    font-size: 0.95rem;
}
#tc-modal-mis-pedidos .tc-productos-lista li:last-child {
    border-bottom: none;
}
#tc-modal-mis-pedidos .tc-observaciones {
    background: #fef9e7;
    border-left-color: #f39c12;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 8px;
    font-style: italic;
}
#tc-modal-mis-pedidos .tc-total-final {
    font-size: 1.2rem;
    font-weight: 700;
    color: #27ae60;
    text-align: right;
    margin-top: 12px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.tc-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #1a5276;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}
/* Responsive móvil para tabla de mis pedidos */
@media (max-width: 768px) {
    .tc-tabla-mis-pedidos thead {
        display: none;
    }
    .tc-tabla-mis-pedidos tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid var(--color-border);
        border-radius: var(--radius);
        padding: 12px;
        background: #fff;
    }
    .tc-tabla-mis-pedidos td {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid var(--color-border);
        border-left: none;
        background: transparent;
        text-align: left;
        align-items: center;
    }
    .tc-tabla-mis-pedidos td:last-child {
        border-bottom: none;
    }
    .tc-tabla-mis-pedidos td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--color-primary);
        flex: 0 0 40%;
        margin-right: 12px;
    }
    .tc-tabla-mis-pedidos td[data-label="Acciones"] {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-start;
    }
    .tc-tabla-mis-pedidos td[data-label="Acciones"] button {
        flex: 1 1 calc(50% - 8px);
        min-height: 40px;
        justify-content: center;
        text-align: center;
    }
}