* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ======== PALETA GLOBAL PRODUCTOS (Azul fuerte / Gris claro) ======== */
:root {
    --prod-blue-dark: #082034;
    --prod-blue: #0d47a1;
    --prod-blue-accent: #1565c0;
    --prod-blue-soft: #1e5fb8;
    --prod-gray: #95a5b3;
    --prod-gray-dark: #7a8a98;
    --prod-bg: #f5f7fa;
    --prod-panel: #ffffff;
    --prod-text: #1b2e40;
    --prod-text-mid: #4a5d70;
    --prod-border: #e0e6ed;
    --prod-gradient-side: linear-gradient(180deg, var(--prod-blue-dark) 0%, #103454 100%);
    --prod-gradient-btn-gray: linear-gradient(135deg, var(--prod-gray) 0%, var(--prod-gray-dark) 100%);
    --prod-gradient-btn-blue: linear-gradient(135deg, var(--prod-blue) 0%, var(--prod-blue-accent) 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--prod-blue-soft);
    background: linear-gradient(135deg, var(--prod-blue-dark) 0%, var(--prod-blue-soft) 80%);
    padding: 20px;
    color: var(--prod-text);
}

.contenedor-principal {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    min-height: 90vh;
}

/* Sidebar Filtros */
.sidebar-filtros {
    background: var(--prod-gradient-side);
    color: white;
    padding: 30px 20px;
    height: 100%;
}

 .logo {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--prod-gray);
}

.logo h1 {
    font-size: 24px;
    color: var(--prod-gray);
    margin-bottom: 5px;
}

.logo p {
    font-size: 14px;
    color: #bdc3c7;
}

.filtros h3 {
    color: var(--prod-gray);
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filtros h3 i {
    font-size: 20px;
}

.lista-categorias {
    list-style: none;
}

.categoria-item {
    margin-bottom: 12px;
}

.categoria-btn {
    width: 100%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 2px solid transparent;
}

.categoria-btn:hover {
    background: rgba(52, 152, 219, 0.3);
    transform: translateX(5px);
}

.categoria-btn.active {
    background: var(--prod-gradient-btn-gray);
    border-color: var(--prod-gray-dark);
    box-shadow: 0 5px 18px rgba(149,165,179,0.45);
}

.categoria-img {
    width: 40px;
    height: 40px;
    display: inline-block;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    flex: 0 0 40px;
}

/* Si quieres usar imágenes distintas por categoría, puedes añadir inline styles
   o clases específicas: <span class="categoria-img" style="background-image:url(...)"></span> */

/* Contenido Principal */
.contenido-principal {
    padding: 30px;
    background: var(--prod-bg);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.titulo-categoria {
    font-size: 28px;
    color: var(--prod-gray-dark);
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.carrito-btn {
    position: fixed; /* Fijo en la pantalla */
    top: 20px; /* Desde el top */
    right: 20px; /* Desde la derecha */
    background: var(--prod-gradient-btn-gray);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 8px 20px rgba(149, 165, 179, 0.35);
    transition: all 0.3s ease;
    z-index: 999;
}

.carrito-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 12px 25px rgba(149, 165, 179, 0.45);
}

.contador-carrito {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
}
/* Buscador Inteligente */
.buscador-container {
    position: relative;
    flex: 1;
    max-width: 500px;
    margin: 0 30px;
}

.buscador {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    padding: 8px 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.buscador:focus-within {
    border-color: #3498db;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.buscador i {
    color: #7f8c8d;
    margin-right: 10px;
    font-size: 16px;
}

#buscador-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
    color: #2c3e50;
}

#buscador-input::placeholder {
    color: #95a5a6;
}

.btn-limpiar-busqueda {
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.btn-limpiar-busqueda.visible {
    opacity: 1;
    visibility: visible;
}

.btn-limpiar-busqueda:hover {
    background: #f8f9fa;
    color: #e74c3c;
}

/* Sugerencias de búsqueda */
.sugerencias-busqueda {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.sugerencias-busqueda.mostrar {
    display: block;
}

.sugerencia-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sugerencia-item:hover {
    background: #f8f9fa;
}

.sugerencia-item:last-child {
    border-bottom: none;
}

.sugerencia-imagen {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 5px;
}

.sugerencia-info {
    flex: 1;
}

.sugerencia-codigo {
    font-weight: bold;
    color: #3498db;
    font-size: 12px;
    margin-bottom: 2px;
}

.sugerencia-nombre {
    font-size: 13px;
    color: #2c3e50;
    margin-bottom: 2px;
}

.sugerencia-descripcion {
    font-size: 11px;
    color: #7f8c8d;
}

.sugerencia-categoria {
    background: #e8f4fd;
    color: #3498db;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
}

/* Contador de resultados */
.contador-resultados {
    text-align: center;
    color: #7f8c8d;
    font-size: 14px;
    margin-top: 10px;
    padding: 10px;
    border-top: 1px solid #f1f1f1;
}

/* Responsive para el buscador */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .buscador-container {
        margin: 0;
        max-width: 100%;
        order: 2;
    }
    
    .titulo-categoria {
        order: 1;
    }
    
    .carrito-btn {
        order: 3;
    }
}

/* Grid de Productos - 4 columnas */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.producto-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    position: relative;
}

.producto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.producto-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.producto-card:hover::before {
    opacity: 1;
}

.producto-card:hover::after {
    content: 'Ver detalles';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(102, 126, 234, 0.95);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
    opacity: 0;
    animation: fadeInScale 0.3s ease forwards;
    pointer-events: none;
    display: none;
}

.producto-imagen {
    height: 180px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.producto-imagen img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.producto-card:hover .producto-imagen img {
    transform: scale(1.1);
}

.producto-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.producto-codigo {
    background: var(--prod-gradient-btn-blue);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 10px;
    text-align: center;
    width: 100%;
}

.producto-nombre {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.4;
    text-align: center;
    flex-grow: 1;
}

.producto-descripcion {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.4;
    text-align: center;
}

.producto-marca {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.marca-logo {
    width: 60px;
    height: 30px;
    object-fit: contain;
}

.marca-texto {
    display: none;
}

.producto-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding: 0;
    position: relative;
    z-index: 3;
    cursor: default !important;
    gap: 10px;
    width: 100%;
}

.btn-detalles {
    background: var(--prod-gradient-btn-blue);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
    flex: 1;
    text-align: center;
    white-space: nowrap;
    min-width: 0;
}

.btn-detalles:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

.btn-agregar {
    background: var(--prod-gradient-btn-gray);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer !important;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(149, 165, 179, 0.35);
    flex: 1;
    text-align: center;
    white-space: nowrap;
    min-width: 0;
    position: relative;
    z-index: 4;
}

.btn-agregar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(149, 165, 179, 0.45);
}

.btn-agregar.agregado {
    background: var(--prod-gradient-btn-gray);
    box-shadow: 0 5px 15px rgba(122, 138, 152, 0.4);
}

/* Paginación */
.paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding: 20px;
}

.btn-paginacion {
    background: var(--prod-gradient-btn-blue);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-paginacion:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-paginacion:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.btn-paginacion.active {
    background: var(--prod-gradient-btn-gray);
}

.info-paginacion {
    color: #2c3e50;
    font-weight: 600;
    margin: 0 15px;
}

/* Carrito Flotante */
.carrito-flotante {
    position: fixed;
    top: 120px; /* Posición fija */
    right: -400px;
    width: 380px;
    background: white;
    border-radius: 15px 0 0 15px;
    box-shadow: -5px 0 30px rgba(0,0,0,0.2);
    transition: right 0.4s ease;
    z-index: 1000;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.carrito-flotante.abierto {
    right: 0;
}


.carrito-header {
    background: var(--prod-gradient-btn-blue);
    color: white;
    padding: 20px;
    border-radius: 15px 0 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.carrito-header h3 {
    margin: 0;
    font-size: 18px;
}

.btn-cerrar-carrito {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.carrito-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    max-height: 400px;
}

.carrito-vacio {
    text-align: center;
    color: #7f8c8d;
    padding: 40px 20px;
}

.carrito-vacio i {
    font-size: 50px;
    margin-bottom: 15px;
    color: #bdc3c7;
}

.carrito-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
}

.carrito-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-right: 15px;
    background: white;
    padding: 5px;
    border-radius: 8px;
}

.carrito-item-info {
    flex: 1;
}

.carrito-item-nombre {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 5px;
}

.carrito-item-codigo {
    color: #7f8c8d;
    font-size: 12px;
}

.carrito-item-cantidad {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.btn-cantidad {
    background: var(--prod-gradient-btn-blue);
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.input-cantidad {
    width: 40px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 2px;
}

.carrito-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    background: white;
    border-radius: 0 0 0 15px;
}

.total-carrito {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 18px;
}

.btn-comprar {
    width: 100%;
    background: var(--prod-gradient-btn-gray);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-comprar:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(149, 165, 179, 0.45);
}

/* Acciones en el footer del carrito: icono de vaciar + botón WhatsApp */

.carrito-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    
}
.btn-vaciar {
    background: none;
    border: none;
    color: #404446;
    font-size: 18px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.btn-vaciar:hover {
    background: rgba(231, 76, 60, 0.08);
    transform: translateY(-2px);
}

/* En pantallas pequeñas, el botón de WhatsApp ocupa el 100% y el icono queda a la izquierda */
@media (max-width: 768px) {
    .carrito-actions {
        width: 100%;
        gap: 12px;
    }

    .btn-comprar {
        flex: 1 1 auto;
        width: auto;
    }

    .btn-vaciar {
        width: 44px;
        height: 44px;
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .productos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .contenedor-principal {
        grid-template-columns: 250px 1fr;
    }
    
    .productos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .contenedor-principal {
        grid-template-columns: 1fr;
    }
    
    .sidebar-filtros {
        display: none;
    }
    
    .carrito-flotante {
        width: 100%;
        right: -100%;
        border-radius: 0;
        top: 80px;
    }
    
    .productos-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Ajustes responsive para los botones */


@media (max-width: 480px) {
    .producto-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-detalles,
    .btn-agregar {
        width: 100%;
    }
}

/* Ajustes responsivos para el tamaño de la miniatura de categoría */
@media (max-width: 1024px) {
    .categoria-img {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .categoria-img {
        width: 32px;
        height: 32px;
        flex: 0 0 32px;
        border-radius: 6px;
    }
}

/* Toast con deshacer */
.toast-undo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-undo .btn-undo {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.18);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
}

@media (max-width: 480px) {
    .toast-undo {
        left: 10px;
        right: 10px;
        bottom: 16px;
        width: auto;
    }
}

/* Hacer que el botón de WhatsApp dentro del footer ocupe el espacio disponible
   para empujar el icono de basura hacia la derecha */
.carrito-actions .btn-comprar {
    flex: 1 1 auto;
    width: auto;
}

/* ===============================================
   MODAL DE DETALLES DEL PRODUCTO
   =============================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal-overlay.show {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.modal-producto {
    background: white;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideIn 0.4s ease-out;
}

.modal-header {
    background: var(--prod-gradient-btn-blue);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 600;
}

.btn-cerrar-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.3s;
}

.btn-cerrar-modal:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-contenido {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 30px;
    padding: 30px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

.modal-imagen {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    height: fit-content;
}

.modal-imagen img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 10px;
}

.modal-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-codigo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #e3f2fd;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.modal-codigo .label {
    font-weight: 600;
    color: #1565c0;
}

.modal-codigo #modal-codigo-valor {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #0d47a1;
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
}

#modal-nombre {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
    margin: 0;
}

.modal-descripcion,
.modal-especificaciones,
.modal-aplicaciones {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #f8f9fa;
}

.modal-descripcion h4,
.modal-especificaciones h4,
.modal-aplicaciones h4 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-descripcion h4:before {
    content: "📝";
    font-size: 16px;
}

.modal-especificaciones h4:before {
    content: "⚙️";
    font-size: 16px;
}

.modal-aplicaciones h4:before {
    content: "🔧";
    font-size: 16px;
}

#modal-descripcion-texto,
#modal-aplicaciones-texto {
    color: #5a6c7d;
    line-height: 1.6;
    font-size: 15px;
}

#modal-especificaciones-lista {
    list-style: none;
    padding: 0;
}

#modal-especificaciones-lista li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    color: #5a6c7d;
}

#modal-especificaciones-lista li:last-child {
    border-bottom: none;
}

#modal-especificaciones-lista li strong {
    color: #2c3e50;
    font-weight: 600;
}

.modal-marca {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #fff3e0;
    border-radius: 12px;
    border-left: 4px solid #ff9800;
}

.modal-marca .label {
    font-weight: 600;
    color: #e65100;
}

.marca-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

#modal-marca-logo {
    height: 30px;
    width: auto;
    object-fit: contain;
}

#modal-marca-texto {
    font-weight: 700;
    color: #bf360c;
    font-size: 16px;
}

.modal-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.btn-agregar-modal {
    background: var(--prod-gradient-btn-gray);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(149, 165, 179, 0.35);
    width: 100%;
}

.btn-agregar-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(149, 165, 179, 0.45);
    background: var(--prod-gradient-btn-gray);
}

.btn-agregar-modal:active {
    transform: translateY(0);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive para el modal */
@media (max-width: 768px) {
    .modal-contenido {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .modal-imagen {
        order: 1;
        height: 250px;
    }
    
    .modal-info {
        order: 2;
    }
    
    #modal-nombre {
        font-size: 22px;
    }
    
    .modal-producto {
        margin: 10px;
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .modal-overlay {
        padding: 10px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .modal-contenido {
        padding: 15px;
    }
}

/* Tabla de Referencia Serie 6000 - FUERA de la media query */
.modal-tabla-referencia {
    grid-column: 1 / -1; /* Ocupa todas las columnas */
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0 0 0;
}

.modal-tabla-referencia h4 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-tabla-referencia h4:before {
    content: "📋";
    font-size: 16px;
}

.tabla-contenedor {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 280px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

#tabla-referencia {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 14px;
}

#tabla-referencia th {
    background: var(--prod-gradient-btn-blue);
    color: white;
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

#tabla-referencia td {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;

    .marca-tabla-logo {
        height: 25px;
        width: auto;
        vertical-align: middle;
    }
    color: #2c3e50;
}

#tabla-referencia tr:nth-child(even) {
    background: #f8f9fa;
}

#tabla-referencia tr:hover {
    background: #ffeaea;
}

.btn-agregar-tabla {
    background: var(--prod-gradient-btn-gray);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-agregar-tabla:hover {
    background: var(--prod-gray-dark);
    transform: translateY(-1px);
}

/* Responsive para tabla */
@media (max-width: 768px) {
    .modal-tabla-referencia {
        padding: 15px;
    }
    
    #tabla-referencia th,
    #tabla-referencia td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    .btn-agregar-tabla {
        padding: 4px 8px;
        font-size: 11px;
    }
}

