:root {
    /* Colores base del diseño de tabla */
    --excel-light: #F3F3F3;
    --excel-dark: #E1E1E1;
    --excel-border: #BDBDBD;
    --excel-header: #D0D0D0;
    --excel-highlight: #CCE8FF;
    /* Colores de la app */
    --primary-color: #2c3e50;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --danger-color: #c0392b;
    --secondary-color: #3498db;
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

body {
    background-color: var(--excel-light);
    color: #333;
    padding: 20px;
    line-height: 1.5;
    min-height: 100vh;
}

/* Contenedor Principal de la App */
.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header/Navegación */
header {
    background: var(--primary-color);
    color: white;
    padding: 15px 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.logo i {
    font-size: 28px;
    margin-right: 10px;
    color: var(--accent-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

/* Botones */
.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
    font-size: 14px;
}

.btn-sm {
    padding: 5px 8px;
    font-size: 12px;
    border-radius: 3px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}
.btn-primary:hover {
    background-color: #1a2733;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}
.btn-secondary:hover {
    background-color: #2980b9;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}
.btn-success:hover {
    background-color: #1f8b4a;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}
.btn-danger:hover {
    background-color: #a12c20;
}

/* Layout Principal */
main {
    padding: 20px;
    display: flex;
    gap: 20px;
}

.main-section {
    flex-grow: 1;
}

/* Cards (Contenedores) */
.card {
    background: white;
    border: 1px solid var(--excel-border);
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: relative;
}

.card h4 {
    border-bottom: 2px solid var(--excel-border);
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Menú de Admin */
.admin-menu {
    background-color: #eaf1f7;
    border: 1px solid #c9dff0;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}
.admin-menu h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    border-bottom: 1px dashed #c9dff0;
    padding-bottom: 8px;
}
.admin-actions button {
    margin-right: 10px;
    margin-bottom: 5px;
}

/* Tablas de Estilo Excel */
.products-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.products-table th, .products-table td {
    border: 1px solid var(--excel-border);
    padding: 10px;
    text-align: left;
}

.products-table th {
    background-color: var(--excel-header);
    color: #333;
    font-weight: bold;
    text-transform: uppercase;
}

.products-table tbody tr:nth-child(even) {
    background-color: var(--excel-dark);
}

.products-table tbody tr:hover {
    background-color: var(--excel-highlight);
}

.product-image {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid var(--excel-border);
}

.admin-actions button {
    margin-right: 5px;
}

/* Formulario de Producto */
.product-form .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}
.product-form input, .product-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--excel-border);
    border-radius: 3px;
}
.product-form textarea {
    margin-bottom: 10px;
    min-height: 80px;
}
.product-form button {
    margin-top: 5px;
}

/* Footer */
footer {
    text-align: center;
    padding: 10px;
    border-top: 1px solid var(--excel-border);
    color: #666;
    font-size: 12px;
}

/* Estilos de Autenticación (Login/Registro) */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    background-color: var(--primary-color);
}

.auth-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-card h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 24px;
}

.input-group {
    text-align: left;
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.auth-card input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--excel-border);
    border-radius: 4px;
    font-size: 16px;
}

.auth-card .btn {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
}

.separator {
    height: 1px;
    background: var(--excel-border);
    margin: 20px 0;
}

/* Utilidades */
.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger-color);
    color: white;
    padding: 5px 8px;
    line-height: 1;
    z-index: 10;
}
/* Estilos del Carrito */
.cart-items-container {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--excel-border);
    padding: 10px;
    margin-bottom: 15px;
}
.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px dotted var(--excel-dark);
}
.cart-item-row:last-child {
    border-bottom: none;
}
.cart-summary {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 1.1em;
}
/* Estilos para la lista de pedidos (Acordeón) */

/* Contenedor de cada pedido */
.order-item {
    border: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 5px;
    overflow: hidden; /* Importante para el acordeón */
}

/* Encabezado del pedido */
.order-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f9f9f9;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.summary-info span {
    margin-right: 15px;
    font-size: 0.9em;
    color: #555;
}

.order-status {
    font-weight: bold;
    color: var(--accent-color, #3498db); /* Usa el color que tengas para énfasis */
}

/* Botón de toggle (Ver/Ocultar) */
.btn-details-toggle {
    background-color: var(--primary-color, #2c3e50);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-details-toggle:hover {
    background-color: #34495e;
}

/* Contenido de los detalles (lo que se despliega) */
.order-details-container {
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: white;
}

.order-details-content h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--primary-color, #2c3e50);
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
}

/* Tabla de detalles */
.details-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.details-table th, .details-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 0.9em;
}

.details-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.shipping-info {
    border-top: 1px dashed #ddd;
    padding-top: 10px;
}
.shipping-info p {
    margin: 5px 0 0 0;
    color: #666;
    font-style: italic;
}
/* Estilos para miniaturas en la vista de TIENDA */
.product-thumbnail {
    width: 100px; /* Tamaño que prefieras */
    height: auto;
    object-fit: contain; /* Asegura que la imagen se vea completa */
    margin-right: 15px;
    border-radius: 4px;
    float: left; /* Para que el texto fluya a la derecha */
}

/* Estilos para miniaturas en el PANEL DE ADMINISTRACIÓN */
.admin-product-thumb {
    width: 50px; /* Tamaño más pequeño para la tabla */
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    vertical-align: middle;
}

/* Ajuste para el texto en la tabla de admin */
#products-table-body-admin td:nth-child(2) {
    /* Si tienes la imagen en el td 1 y el nombre en el td 2, puedes quitar el float del thumbnail 
       y solo centrar la imagen en el td 1 */
    display: flex;
    align-items: center;
    gap: 10px; /* Espacio entre imagen y texto si lo quieres en la misma celda, sino ignora esto. */
}
/* dist/styles.css - Código Corregido */

.store-product-thumb {
    width: 40px; /* AJUSTADO: El ancho controla el tamaño */
    height: 40px; /* AJUSTADO: La altura debe ser igual para un cuadrado */
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: block;
    margin: 0 auto;
}
/* dist/styles.css - ESTILOS RESPONSIVE PARA MÓVILES */

.menu-toggle {
    display: none; /* Oculta el checkbox */
}

.menu-icon {
    display: none; /* Oculta el ícono por defecto (solo visible en móvil) */
    font-size: 1.5em;
    cursor: pointer;
    z-index: 1000;
}

@media (max-width: 768px) {
    /* Muestra el ícono de hamburguesa */
    .menu-icon {
        display: block;
    }

    /* Oculta la navegación en el header por defecto */
    .header-nav {
        display: none;
        flex-direction: column; /* Apila los enlaces verticalmente */
        position: absolute;
        top: 60px; /* Ajusta según la altura de tu header */
        right: 0;
        width: 100%;
        background-color: var(--primary-color);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        padding: 10px 20px;
        z-index: 999;
    }
    
    .header-nav a {
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .header-nav a:last-child {
        border-bottom: none;
    }

    /* Lógica de activación: Muestra el menú cuando el checkbox está marcado */
    .menu-toggle:checked ~ .header-nav {
        display: flex;
    }
    
    /* Mantiene el header responsive */
    header {
        padding: 10px 15px;
    }
}
/* Estilos para el modal de detalles de pedido */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 25px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    margin-top: -10px;
}

.close-btn:hover {
    color: #000;
}

.order-product-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.order-product-info {
    flex-grow: 1;
}

.order-product-name {
    font-weight: bold;
    color: #2c3e50;
}

.order-product-details {
    font-size: 14px;
    color: #7f8c8d;
}

.order-product-total {
    font-weight: bold;
    color: #2c3e50;
}

/*CSS de menu nuevo*/
/* =================================== */
/* HEADER PROFESIONAL - ESTILOS NUEVOS */
/* =================================== */

.main-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #e74c3c;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    max-width: 1400px;
    margin: 0 auto;
    height: 70px;
}

/* Logo Section */
.logo-section {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo i {
    font-size: 2rem;
    color: #e74c3c;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.logo:hover i {
    background: #e74c3c;
    color: white;
    transform: rotate(-10deg);
}

.logo-text {
    background: linear-gradient(45deg, #3498db, #e74c3c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    font-size: 1.4rem;
}

/* Menú Hamburguesa (Mobile) */
.mobile-menu-toggle {
    display: none;
}

.mobile-menu-icon {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.mobile-menu-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Navegación Principal */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-link.active {
    background: #e74c3c;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.link-text {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Badge del Carrito */
.cart-badge {
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    position: absolute;
    top: 8px;
    right: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Sección de Usuario */
.user-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    font-size: 2.2rem;
    color: #3498db;
    transition: transform 0.3s ease;
}

.user-welcome:hover .user-avatar {
    transform: scale(1.1);
}

.user-greeting {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.greeting-text {
    font-size: 0.8rem;
    color: #bdc3c7;
    line-height: 1.2;
}

.user-name {
    font-size: 0.9rem;
    color: white;
    font-weight: 700;
    line-height: 1.2;
}

/* Botón de Logout */
.logout-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(231, 76, 60, 0.3);
}

.logout-button:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(192, 57, 43, 0.4);
}

.logout-text {
    font-size: 0.85rem;
}

/* =========================== */
/* RESPONSIVE DESIGN - MÓVILES */
/* =========================== */

@media (max-width: 1024px) {
    .header-container {
        padding: 0 20px;
    }
    
    .nav-link {
        padding: 10px 15px;
    }
    
    .link-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    /* ================================================= */
    /* 1. CONFIGURACIÓN GENERAL DEL MENÚ MÓVIL (HAMBURGUESA) */
    /* Válido para catalogo.html (checkbox hack) y index.html */
    /* ================================================= */

    /* Esconder el checkbox que solo usamos para el estado */
    .mobile-menu-toggle {
        display: none;
    }

    /* Mostrar el ícono de la hamburguesa y posicionarlo */
    .mobile-menu-icon {
        display: block;
        cursor: pointer;
        font-size: 24px;
        color: white; 
        z-index: 1001; 
    }

    /* Ocultar la navegación principal por defecto */
    .main-navigation {
        display: none !important; /* Forzamos la ocultación */
        position: absolute;
        top: 60px; /* Posición debajo del header */
        left: 0;
        width: 100%;
        min-height: 100vh;
        background-color: var(--primary-color);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
        z-index: 999; 
        overflow-y: auto;
    }

    /* Mostrar la navegación cuando el checkbox está :checked (FIX MENU) */
    /* Este selector funciona si el input y el nav son hermanos directos */
    #mobile-menu-toggle:checked ~ .main-navigation {
        display: block !important; 
    }

    /* Estilos para los enlaces dentro del menú */
    .main-navigation .nav-links {
        display: flex;
        flex-direction: column; /* Apilamos los enlaces */
        padding: 10px 0;
        list-style: none;
        margin: 0;
    }

    .main-navigation .nav-links a {
        color: white;
        padding: 15px 20px;
        text-align: left;
        display: block; 
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-decoration: none;
    }
    
    /* ================================================= */
    /* 2. TABLA A TARJETAS (GENERAL) - Para .products-table */
    /* ================================================= */

    /* Transformación de tabla completa a bloques */
    .products-table,
    .products-table thead,
    .products-table tbody,
    .products-table th,
    .products-table td,
    .products-table tr {
        display: block;
    }

    /* Ocultar el encabezado de la tabla (th) */
    .products-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    /* Estilizar la fila (tr) como la tarjeta principal */
    .products-table tbody tr {
        border: 1px solid var(--excel-border);
        margin-bottom: 15px; 
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        padding: 0; /* Padding se maneja internamente */
        background: #fff;
    }

    /* Estilizar cada celda (td) como una línea de información */
    .products-table td {
        border: none !important;
        border-bottom: 1px solid #eee !important;
        position: relative;
        padding: 10px 10px 10px 45% !important; /* Espacio para la etiqueta */
        text-align: right;
        min-height: 35px;
        font-size: 14px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Crear la etiqueta usando el data-label */
    .products-table td::before {
        position: absolute;
        left: 10px;
        width: 40%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: var(--primary-color);
        content: attr(data-label); 
    }
    
    /* Remover borde de la última celda en cada tarjeta */
    .products-table tr td:last-child {
        border-bottom: none !important;
    }

    /* ================================================= */
    /* 3. AJUSTES ESPECÍFICOS POR COLUMNA */
    /* ================================================= */

    /* AJUSTE para la columna de Imagen */
    .products-table td[data-label="Imagen"] {
        display: flex !important;
        justify-content: center;
        align-items: center;
        padding: 10px !important;
        border-bottom: none !important; 
        background-color: #f9f9f9; 
        border-radius: 8px 8px 0 0; 
    }

    .products-table td[data-label="Imagen"]::before {
        display: none; /* Ocultar etiqueta "Imagen" */
    }

    .products-table td[data-label="Imagen"] img {
        max-width: 120px; 
        height: auto;
        border: 1px solid #ddd;
        border-radius: 5px; 
        padding: 3px;
        background-color: #fff;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
    
    /* AJUSTE para la columna de Producto (Texto largo) */
    .products-table td[data-label="Producto"] {
        display: block !important; 
        padding-left: 10px !important; 
        border-bottom: 1px solid #eee !important; /* Mantener borde superior para separación */
    }

    .products-table td[data-label="Producto"]::before {
        position: static !important;
        width: 100%;
        margin-bottom: 5px; 
        text-align: left;
        display: block;
        font-size: 15px; 
        color: var(--primary-color);
    }

    /* AJUSTE para la columna de Carrito (index.html) */
    .products-table td[data-label="Carrito"] {
        text-align: center;
        justify-content: center;
        flex-direction: column;
        gap: 8px;
        padding-left: 10px !important;
        border-top: 1px solid var(--excel-border) !important;
        margin-top: 10px;
    }

    .products-table td[data-label="Carrito"]::before {
        display: none; /* Ocultar etiqueta "Carrito" */
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 10px;
        height: 60px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .logo i {
        font-size: 1.6rem;
        padding: 8px;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .main-navigation {
        top: 60px;
        padding: 15px;
    }
}

/* ============= */
/* ANIMACIONES */
/* ============= */

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-header {
    animation: slideInDown 0.5s ease-out;
}

.nav-link {
    animation: slideInDown 0.5s ease-out;
    animation-fill-mode: both;
}

.nav-link:nth-child(1) { animation-delay: 0.1s; }
.nav-link:nth-child(2) { animation-delay: 0.2s; }
.nav-link:nth-child(3) { animation-delay: 0.3s; }
.nav-link:nth-child(4) { animation-delay: 0.4s; }

/* ============= */
/* UTILIDADES */
/* ============= */

.admin-only {
    display: none;
}

.user-admin .admin-only {
    display: flex !important;
}

/*nuevo css para agregar nuevas columnas rubro oem etc*/
/* Mejoras para la tabla de productos */
.store-product-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* Estados de stock mejorados */
.stock-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

.stock-high {
    background: #d5f4e6;
    color: #27ae60;
}

.stock-low {
    background: #fdebd0;
    color: #f39c12;
}

.stock-out {
    background: #fadbd8;
    color: #e74c3c;
}

/* Mejoras en la información del producto */
.product-info-compact {
    font-size: 12px;
    line-height: 1.3;
}

.product-code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #2c3e50;
}

.price-breakdown {
    font-size: 11px;
    color: #666;
    line-height: 1.2;
}

/* Botones mejorados */
.add-to-cart-btn {
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.add-to-cart-btn:disabled {
    background: #bdc3c7 !important;
    cursor: not-allowed;
    opacity: 0.6;
}

/*estilos de tarjeta de producto*/
/* Estilos para el Modal de Detalles de Producto */
.product-detail-modal {
    animation: modalFadeIn 0.3s ease-in-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.product-detail-container {
    max-height: 90vh;
}

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

.stock-badge {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: bold;
}

.stock-badge.in-stock {
    background: #d5f4e6;
    color: #27ae60;
}

.stock-badge.low-stock {
    background: #fdebd0;
    color: #f39c12;
}

.stock-badge.out-of-stock {
    background: #fadbd8;
    color: #e74c3c;
}

.ref-badge {
    background: #3498db;
    color: white;
}

.meta-item {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item {
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item strong {
    color: #7f8c8d;
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
}

/* Scroll personalizado para la descripción */
.description-section::-webkit-scrollbar {
    width: 6px;
}

.description-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.description-section::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 3px;
}

.description-section::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

/* Responsive */
@media (max-width: 768px) {
    .product-detail-content {
        flex-direction: column;
    }
    
    .product-image-section {
        flex: none;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
    }
}
/*estilo para porcetaje de utilidad*/
/* Estilos para el control de utilidad */
.utility-control {
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.utility-control:focus-within {
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.2);
    border-color: #3498db;
}

.utility-control input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

/* Estilos para la columna de precio con utilidad */
.price-with-utility {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
}

.utility-percentage-badge {
    background: #34495e;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    margin-left: 5px;
}
/*css para mostrar stock*/
/* Estilos para las etiquetas de stock */
.stock-available {
    background-color: #d4edda;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.stock-consult {
    background-color: #fff3cd;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.stock-unavailable {
    background-color: #f8d7da;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}
/*estilos exportacion*/
/* Estilos para botones de exportación */
.export-menu {
    position: relative;
}

.export-option {
    transition: all 0.3s ease;
    border-radius: 3px;
}

.export-option:hover {
    background: #f8f9fa;
}

#export-budget-btn {
    transition: all 0.3s ease;
    font-weight: bold;
}

#export-budget-btn:hover {
    background: #219653 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

/* Indicador de exportación */
.exporting {
    position: relative;
}

.exporting::after {
    content: ' ⏳';
    font-weight: normal;
}
/* --- NUEVOS ESTILOS PARA LA COLUMNA DE DESCUENTOS DOBLES --- */

/* Estilo general para los badges de descuento */
.discount-badge {
    display: block; /* Para que cada descuento ocupe una línea vertical */
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

/* Estilo para el descuento del artículo (Prioritario/Cascada) */
.discount-article {
    background-color: #27ae60; /* Verde */
    color: white;
}

/* Estilo para cuando no hay descuento en el artículo/cliente (N/A) */
.discount-article-na {
    background-color: #ecf0f1; /* Gris claro para "N/A" */
    color: #7f8c8d;
    font-weight: normal;
}

/* Estilo para el descuento base del cliente */
.discount-client {
    background-color: #3498db; /* Azul */
    color: white;
}

/* Ajuste de padding opcional para la celda de descuento */
#products-table tbody td:nth-child(6) { 
    /* Si la columna de descuento es la sexta, usa este selector. */
    padding: 5px;
    vertical-align: top;
}
