/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Mejorar scroll en móvil */
html {
    -webkit-overflow-scrolling: touch;
}

/* FALLBACKS PARA COMPATIBILIDAD CON NAVEGADORES ANTIGUOS */
/* Fallback para navegadores sin soporte de CSS Grid */
.product-modal-layout {
    /* Fallback: usar flexbox si grid no está soportado */
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

/* Soporte moderno con Grid (se sobrescribe si está soportado) */
@supports (display: grid) {
    .product-modal-layout {
        display: grid;
        grid-template-columns: 1.2fr 0.8fr;
        gap: 1rem;
        padding: 1rem;
        flex: 1;
        min-height: 0;
        overflow: hidden;
        height: calc(100% - 0px);
        box-sizing: border-box;
        justify-items: stretch;
        align-items: center;
        align-content: center;
    }
}

/* Estilos específicos para navegadores legacy */
.legacy-browser .product-modal-layout {
    display: block !important;
    padding: 1rem;
}

.legacy-browser .product-images-section {
    width: 100%;
    margin-bottom: 1rem;
}

.legacy-browser .product-info-section {
    width: 100%;
}

.legacy-browser .product-card {
    cursor: pointer !important;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.legacy-browser .product-card:hover {
    border-color: var(--ktm-orange);
}

/* Prevenir zoom en inputs en iOS */
@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px;
    }
}

:root {
    /* Colores KTM - Naranja, Negro y Grises */
    --ktm-orange: #FF6600;
    --ktm-orange-dark: #E55A00;
    --ktm-orange-light: #FF944D;
    --ktm-black: #000000;
    --ktm-black-light: #1A1A1A;
    --ktm-gray: #333333;
    --ktm-light-gray: #666666;
    --ktm-bg: #FFFFFF;
    --ktm-surface: #F8F9FA;
    --ktm-border: #E0E0E0;
    --ktm-accent: #FFE8D6;
    --ktm-dark-accent: #2C2C2C;
    
    /* Variables para el fondo de imagen */
    --bg-image: url('../images/intro-bg.jpg');
    --bg-overlay-opacity: 0.75; /* Cambia este valor: 0.0 = transparente, 1.0 = opaco */
    --bg-overlay-color: rgba(255, 255, 255, var(--bg-overlay-opacity));
    
    /* Variables principales */
    --primary-color: var(--ktm-orange);
    --primary-dark: var(--ktm-orange-dark);
    --primary-light: var(--ktm-orange-light);
    --secondary-color: var(--ktm-black);
    --secondary-dark: var(--ktm-gray);
    --background-color: var(--ktm-bg);
    --surface-color: var(--ktm-surface);
    --muted-color: var(--ktm-light-gray);
    --border-color: var(--ktm-border);
    --highlight-color: var(--ktm-accent);
    --success-color: #28a745;
    --info-color: #17a2b8;
    --danger-color: #dc3545;
}

body {
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--secondary-color);
    line-height: 1.6;
    font-weight: 400;
    position: relative;
}

/* Overlay semitransparente para mejorar legibilidad */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg, 
        rgba(255, 255, 255, calc(var(--bg-overlay-opacity) + 0.05)) 0%, 
        rgba(255, 255, 255, calc(var(--bg-overlay-opacity) - 0.15)) 50%, 
        rgba(255, 255, 255, var(--bg-overlay-opacity)) 100%
    );
    z-index: -1;
    pointer-events: none;
}

/* Header estilo KTM - Minimalista y profesional */
.header {
    background: var(--ktm-black);
    border-bottom: 3px solid var(--ktm-orange);
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 80px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}


.logo {
    font-family: 'Oswald', 'Arial Black', sans-serif;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 400;
    color: var(--ktm-orange);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.logo:hover {
    color: var(--ktm-orange-light);
    transform: scale(1.02);
}

.logo-img {
    height: 54px;
    max-width: 160px;
    width: auto;
    display: block;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.25));
}

.search-bar {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 50px 12px 16px;
    border: none;
    border-radius: 0px;
    font-size: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.search-bar input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background: var(--primary-dark);
}

.header-actions {
    display: flex;
    gap: 12px;
}


.print-btn {
    font-family: 'Roboto Condensed', 'Arial Narrow', sans-serif;
    background: var(--ktm-orange);
    color: white;
    border: 3px solid var(--ktm-orange);
    padding: 10px 20px;
    border-radius: 0px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: 44px;
}

.print-btn:hover {
    background: transparent;
    color: var(--ktm-orange);
    border-color: var(--ktm-orange);
}


.admin-btn {
    background: var(--ktm-orange);
    color: white;
    border: 3px solid var(--ktm-orange);
    padding: 10px;
    border-radius: 0px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-btn:hover {
    background: transparent;
    color: var(--ktm-orange);
    border-color: var(--ktm-orange);
}

.menu-btn {
    background: var(--ktm-orange);
    color: white;
    border: 3px solid var(--ktm-orange);
    padding: 10px;
    border-radius: 0px;
    cursor: pointer;
    font-weight: 600;
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.menu-btn:hover {
    background: transparent;
    color: var(--ktm-orange);
    border-color: var(--ktm-orange);
}

.menu-btn i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.menu-btn.active i {
    transform: rotate(90deg);
}

.cart-btn {
    background: var(--ktm-orange);
    color: white;
    border: 3px solid var(--ktm-orange);
    padding: 10px;
    border-radius: 0px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.cart-btn:hover {
    background: transparent;
    color: var(--ktm-orange);
    border-color: var(--ktm-orange);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--ktm-orange);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Estilos del carrito */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    color: var(--ktm-black);
    margin-bottom: 4px;
}

.cart-item-price {
    color: var(--ktm-orange);
    font-weight: 700;
}

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

.quantity-control {
    display: flex;
    align-items: center;
    gap: 4px;
}

.quantity-btn {
    background: var(--ktm-orange);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.quantity-btn:hover {
    background: var(--ktm-orange-dark);
}

.quantity-input {
    width: 40px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px;
}

.remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.remove-btn:hover {
    background: #c82333;
}

.cart-total {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--ktm-orange);
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    color: var(--ktm-black);
}

/* Estilos del modal de checkout */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: var(--ktm-black);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ktm-orange);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Estilos del modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: var(--ktm-orange);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #dee2e6;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--ktm-orange);
    color: white;
}

.btn-primary:hover {
    background: var(--ktm-orange-dark);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Notificaciones */
.success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    z-index: 1000;
    animation: slideInRight 0.3s ease;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-content i {
    font-size: 18px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Contenedor principal */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

/* Contenedor flotante para título y productos */
.content {
    background: white;
    border-radius: 0px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin: 20px 0;
}

/* Sidebar de categorías */
.sidebar {
    background: var(--ktm-orange);
    border-radius: 0px;
    padding: 24px;
    height: fit-content;
    box-shadow: 0 8px 25px rgba(255,102,0,0.4), 0 6px 15px rgba(0,0,0,0.3);
    border: none;
    position: relative;
    overflow: hidden;
    margin: 20px 0;
}

.sidebar h3 {
    font-family: 'Oswald', 'Arial Black', sans-serif;
    color: white;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    position: relative;
    padding-bottom: 8px;
}

.sidebar h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: white;
    box-shadow: 0 2px 4px rgba(255,255,255,0.4);
}

.categories {
    list-style: none;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 2px solid var(--ktm-black);
    transition: all 0.3s ease;
    color: var(--ktm-black);
    border-radius: 0px;
    margin-bottom: 2px;
    position: relative;
    background: white;
    border: 2px solid var(--ktm-black);
    font-weight: 600;
    font-size: 14px;
}

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

.category-item:hover {
    background: var(--ktm-black);
    color: var(--ktm-orange);
    transform: translateX(6px);
    border-color: var(--ktm-black);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.category-item.active {
    background: var(--ktm-black);
    color: var(--ktm-orange);
    font-weight: 700;
    transform: translateX(6px);
    border-color: var(--ktm-black);
    box-shadow: 0 6px 20px rgba(0,0,0,0.6);
    position: relative;
}

.category-item.active::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--ktm-orange);
    box-shadow: 0 0 8px rgba(255,102,0,0.6);
}

.count {
    background: var(--ktm-black);
    color: white;
    padding: 4px 8px;
    border-radius: 0px;
    font-size: 11px;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
    border: 2px solid var(--ktm-black);
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    font-family: 'Roboto Condensed', 'Arial Narrow', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-item.active .count {
    background: var(--ktm-orange);
    color: var(--ktm-black);
    border-color: var(--ktm-orange);
    box-shadow: 0 2px 8px rgba(255,102,0,0.7);
}

/* Sección de productos */
.products-section {
    background: white;
    border-radius: 0px;
    padding: 32px;
    box-shadow: 0 6px 20px rgba(255,102,0,0.15), 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.products-header {
    margin-bottom: 24px;
    text-align: center;
}

.products-header h2 {
    font-family: 'Oswald', 'Arial Black', sans-serif;
    color: var(--ktm-black);
    font-size: 32px;
    margin-bottom: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    padding-bottom: 8px;
}

.products-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--ktm-orange);
    box-shadow: 0 2px 6px rgba(255,102,0,0.4);
}

.products-header p {
    color: var(--ktm-black);
    font-size: 18px;
    font-weight: 600;
    font-family: 'Roboto Condensed', 'Arial Narrow', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--ktm-orange);
    color: white;
    padding: 8px 16px;
    border-radius: 0px;
    display: inline-block;
    border: 2px solid var(--ktm-orange);
    box-shadow: 0 2px 6px rgba(255,102,0,0.3);
}

/* Grid de productos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding: 24px 0;
    justify-items: stretch;
}

/* Tarjeta de producto */
.product-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 0px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: relative;
    aspect-ratio: 0.75;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-color: var(--ktm-orange);
    border-width: 2px;
}



.product-images {
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 16px;
    text-align: center;
    height: 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 0px;
    flex: 1;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.4s ease;
    border-radius: 0px;
    max-height: 120px;
}

/* Estilo especial para logo como imagen por defecto */
.main-image[src*="logo.png"] {
    background: var(--ktm-surface);
    padding: 20px;
    opacity: 0.8;
    filter: grayscale(20%);
    transition: all 0.3s ease;
}

.main-image[src*="logo.png"]:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
}

.product-card:hover .main-image {
    transform: scale(1.08);
}

/* Placeholder mejorado para imágenes */
.main-image[src*="placeholder"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.main-image[src*="placeholder"]::before {
    content: '📦';
    font-size: 48px;
    opacity: 0.7;
    position: absolute;
    z-index: 1;
}

.main-image[src*="placeholder"]::after {
    content: 'Sin imagen';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Puntos indicadores de imágenes */
.image-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.7);
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .image-dots {
    opacity: 1;
}

.image-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.image-dot:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
}

.image-dot.active {
    background: var(--ktm-orange);
    border-color: var(--ktm-orange);
    box-shadow: 0 0 8px rgba(255, 102, 0, 0.6);
}

/* Indicador de cantidad de imágenes */
.image-count {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 4px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.product-info {
    padding: 16px;
    background: white;
    border-radius: 0px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 160px;
    justify-content: center;
}

.product-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--ktm-black);
    margin-bottom: 4px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 32px;
    font-family: 'Roboto Condensed', 'Arial Narrow', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.stars {
    display: flex;
    gap: 2px;
}

.stars i {
    color: #ffc107;
    font-size: 12px;
}

.rating-count {
    color: #666;
    font-size: 12px;
}

.product-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--ktm-orange);
    margin-bottom: 2px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    font-family: 'Oswald', 'Arial Black', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-reference {
    font-size: 11px;
    font-weight: 600;
    color: var(--ktm-gray);
    margin-bottom: 2px;
    font-family: 'Roboto', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.sale-price {
    color: var(--primary-color);
    font-weight: 700;
}

.product-shipping {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #00a650;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 4px;
}

.product-colors {
    color: #666;
    font-size: 12px;
}

.product-ref {
    color: #666;
    font-size: 10px;
    font-weight: 500;
    margin-top: 2px;
}

.product-quantity {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--success-color);
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 4px;
}

.product-quantity i {
    color: var(--success-color);
    font-size: 14px;
}

.quantity-available {
    color: var(--success-color);
}

/* Footer */
.footer {
    background: var(--secondary-dark);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

.footer-content p {
    margin-bottom: 4px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    /* Mostrar botón de menú en tablet */
    .menu-btn {
        display: flex;
    }
    
    /* Sidebar oculto por defecto en tablet */
    .sidebar {
        position: fixed;
        top: 80px;
        left: -280px;
        width: 250px;
        height: calc(100vh - 80px);
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    /* Overlay para cerrar sidebar */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .main-container {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        gap: 12px;
        padding: 16px;
    }
    
    /* Mostrar botón del menú en móvil */
    .menu-btn {
        display: flex !important;
        width: 90px;
        height: 48px;
        padding: 8px 12px;
        font-size: 11px;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }
    
    .menu-btn i {
        font-size: 16px;
    }
    
    .menu-text {
        font-size: 10px;
        font-weight: 600;
        line-height: 1;
    }
    
    /* Mejorar touch targets para botones del header */
    .header-actions {
        gap: 8px;
    }
    
    /* Todos los botones con la misma altura y alineación */
    .menu-btn, .print-btn, .cart-btn, .admin-btn {
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .cart-btn, .admin-btn {
        width: 40px;
        font-size: 16px;
    }
    
    .search-bar {
        order: 3;
        width: 100%;
        margin-top: 12px;
    }
    
    .print-btn {
        width: 48px;
        padding: 0;
        font-size: 18px;
    }
    
    .print-text {
        display: none;
    }
    
    .search-bar {
        max-width: none;
    }
    
    .search-bar input {
        padding: 16px 60px 16px 20px;
        font-size: 18px;
    }
    
    .search-btn {
        right: 12px;
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .product-images {
        height: 200px;
    }
    
    .product-name {
        font-size: 14px;
        min-height: 38px;
    }
    
    .product-price {
        font-size: 20px;
    }
    
    /* Mejorar touch para categorías */
    .category-item {
        padding: 16px 18px;
        font-size: 16px;
        min-height: 48px;
    }
    
    .sidebar {
        order: 2;
    }
    
    .products-section {
        order: 1;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .header-container {
        padding: 12px;
        flex-direction: column;
        gap: 8px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .products-header h2 {
        font-size: 24px;
    }
    
    .search-bar {
        order: 2;
        margin-top: 0;
    }
    
    .header-actions {
        order: 1;
        justify-content: center;
        width: 100%;
    }
}

/* Estilos optimizados para impresión PDF */
@media print {
    /* Configuración de página */
    @page {
        margin: 0.3in;
        size: A4;
        orientation: portrait;
    }
    
    /* Ocultar elementos no necesarios */
    .search-bar,
    .header-actions,
    .sidebar,
    .admin-panel,
    .modal,
    .footer,
    .cart-btn,
    .cart-count,
    .admin-btn,
    .print-btn,
    .search-btn,
    .add-to-cart,
    .add-to-cart-modal {
        display: none !important;
    }
    
    /* Mantener imágenes pero optimizadas */
    .product-images {
        display: block !important;
    }
    
    .main-image {
        width: 40px !important;
        height: 40px !important;
        object-fit: cover !important;
        border-radius: 4px !important;
    }
    
    /* Tarjetas más compactas y eficientes */
    .product-card {
        transform: none !important;
        width: 100% !important;
        height: auto !important;
        margin-bottom: 8px !important;
        page-break-inside: avoid !important;
        border: 1px solid #ddd !important;
        padding: 6px !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    
    /* Grid optimizado para máximo aprovechamiento */
    .products-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 4px !important;
        padding: 4px !important;
    }
    
    /* Texto legible y compacto */
    .product-name {
        font-size: 11px !important;
        line-height: 1.3 !important;
        font-weight: 600 !important;
        flex: 1 !important;
        margin: 0 !important;
    }
    
    .product-price {
        font-size: 12px !important;
        font-weight: 700 !important;
        color: #e67e22 !important;
        white-space: nowrap !important;
    }
    
    .product-quantity {
        font-size: 9px !important;
        color: #666 !important;
        white-space: nowrap !important;
    }
    
    .product-ref {
        font-size: 8px !important;
        color: #888 !important;
        white-space: nowrap !important;
    }
    
    /* Header optimizado */
    .header {
        margin-bottom: 10px !important;
        padding: 8px 0 !important;
        border-bottom: 2px solid #e67e22 !important;
    }
    
    .logo {
        font-size: 16px !important;
    }
    
    /* Contenido principal */
    .content {
        padding: 0 !important;
    }
    
    .products-header h2 {
        font-size: 18px !important;
        margin-bottom: 5px !important;
    }
    
    .products-count {
        font-size: 12px !important;
        margin-bottom: 10px !important;
    }
}

/* Estilos adicionales para el modo de impresión */
body.printing .brand-separator {
    display: block !important;
}

body.printing .page-footer {
    display: block !important;
}


/* Panel de Administración */
.admin-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Roboto', system-ui, sans-serif;
}

.admin-container {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 95vw;
    width: 95vw;
    max-height: 55vh;
    height: 95vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    background: var(--secondary-dark);
    color: white;
    border-radius: 12px 12px 0 0;
}

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

.admin-header h2 {
    font-family: 'Oswald', 'Arial Black', sans-serif;
    margin: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ktm-black);
}

.logout-btn {
    background: #ff6b35;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #e55a2b;
    transform: scale(1.05);
}

.close-admin {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.close-admin:hover {
    background: rgba(255, 255, 255, 0.2);
}

.admin-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.tab-btn {
    flex: 1;
    padding: 16px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    background: rgba(255,102,0,0.15);
    color: var(--primary-color);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.tab-content {
    display: none;
    padding: 24px;
}

.tab-content.active {
    display: block;
}

/* Estilos para editor de tabla */
.table-editor-section h3 {
    color: var(--primary-color);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e0e0e0;
}

.editor-actions {
    display: flex;
    gap: 12px;
}

.add-row-btn, .save-all-btn {
    font-family: 'Roboto Condensed', 'Arial Narrow', sans-serif;
    padding: 12px 20px;
    border: 3px solid transparent;
    border-radius: 0px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.add-row-btn {
    background: var(--success-color);
    color: white;
}

.add-row-btn:hover {
    background: #218838;
}

.save-all-btn {
    background: var(--primary-color);
    color: white;
}

.save-all-btn:hover {
    background: var(--primary-dark);
}

.table-container {
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
}

.products-table th {
    background: var(--secondary-dark);
    color: white;
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 15px;
    border-right: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
}

.products-table th:last-child {
    border-right: none;
}

.products-table td {
    padding: 8px 12px; /* Reducido padding vertical */
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #f0f0f0;
    vertical-align: middle;
    min-width: 120px;
    text-align: left; /* Asegurar alineación a la izquierda */
}

.products-table td:last-child {
    border-right: none;
}

.products-table tr:hover {
    background: rgba(255,102,0,0.08);
}

.editable-cell {
    position: relative;
    cursor: pointer;
    min-height: 32px;
    display: flex;
    align-items: center;
}

.editable-cell input, .editable-cell textarea, .editable-cell select {
    width: 100%;
    border: none;
    background: transparent;
    padding: 4px 8px;
    font-size: 13px; /* Reducido tamaño de fuente */
    outline: none;
    resize: none;
}

.editable-cell input:focus, .editable-cell textarea:focus, .editable-cell select:focus {
    background: rgba(255,102,0,0.12);
    border-radius: 4px;
}

.editable-cell textarea {
    height: 35px; /* Altura fija para textarea */
    min-height: 35px; /* Altura mínima */
    font-family: inherit;
    line-height: 1.4;
}

.image-upload-cell {
    text-align: left; /* Cambiar alineación para el nuevo layout */
}

.image-upload-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 45px; /* Asegurar altura mínima consistente */
}

.image-preview-list {
    display: flex; /* Cambiado a flex para layout horizontal */
    flex-direction: row;
    gap: 8px;
    margin-top: 0;
}

.image-slot {
    position: relative; /* Para posicionar la etiqueta y el botón de eliminar */
    flex-shrink: 0;
}

.image-remove-btn {
    position: absolute;
    top: -7px;
    right: -7px;
    background: var(--danger-color);
    color: white;
    border: 1px solid white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.image-remove-btn:hover {
    transform: scale(1.1);
    background: #c82333;
}

.image-upload-btn {
    background: transparent;
    border: 2px dashed var(--muted-color);
    color: var(--muted-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.image-upload-btn:hover {
    background: var(--highlight-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.image-preview-small {
    width: 45px;
    height: 45px;
    object-fit: contain;
    object-position: center;
    border-radius: 4px;
    border: 2px solid #e0e0e0;
    display: block;
    background: #f8f9fa;
}

.image-slot.primary .image-preview-small {
    border-color: var(--primary-color);
}

.delete-row-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.delete-row-btn:hover {
    background: #c82333;
}

.table-info {
    margin-top: 20px;
    padding: 16px;
    background: var(--highlight-color);
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.table-info p {
    margin: 0 0 8px 0;
    font-weight: 500;
    color: var(--primary-color);
}

.table-info ul {
    margin: 0;
    padding-left: 20px;
}

.table-info li {
    margin: 4px 0;
    font-size: 14px;
    color: #333;
}

/* Estilos para importación */
.import-section h3 {
    color: var(--primary-color);
    margin-bottom: 16px;
}

.file-upload {
    margin: 20px 0;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255,102,0,0.05);
}

.file-label:hover {
    background: rgba(255,102,0,0.12);
    border-color: var(--primary-dark);
}

.file-label i {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.file-label span {
    color: var(--primary-color);
    font-weight: 500;
}

#fileInput {
    display: none;
}

.import-preview {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.preview-table {
    overflow-x: auto;
    margin: 16px 0;
}

.preview-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 4px;
    overflow: hidden;
}

.preview-table th,
.preview-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.preview-table th {
    background: var(--secondary-dark);
    color: white;
    font-weight: 600;
}

.preview-table tr:hover {
    background: #f8f9fa;
}

.preview-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.import-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.import-btn:hover {
    background: #218838;
}

.import-template {
    margin-top: 20px;
    padding: 16px;
    background: var(--highlight-color);
    border: 1px solid #ffe0b2;
    border-radius: 6px;
}

.download-template {
    background: var(--primary-light);
    color: var(--secondary-dark);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.download-template:hover {
    background: var(--primary-color);
    color: white;
}

.template-info {
    margin: 12px 0;
    padding: 12px;
    background: rgba(255,102,0,0.08);
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.template-info p {
    margin: 4px 0;
    font-size: 14px;
    color: var(--secondary-color);
}

.template-info code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: var(--primary-dark);
}

/* Estilos para formulario */
.product-form {
    max-width: 600px;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.image-upload {
    margin: 12px 0;
}

.image-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1px dashed var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255,102,0,0.05);
}

.image-label:hover {
    background: rgba(255,102,0,0.12);
}

#productImages {
    display: none;
}

.image-preview {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.image-preview img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    object-position: center;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
    background: #f8f9fa;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.cancel-btn:hover {
    background: #5a6268;
}

.save-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.save-btn:hover {
    background: var(--primary-dark);
}

/* Estilos para gestión de productos */
.products-manager {
    max-height: 400px;
    overflow-y: auto;
}

.product-manager-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 12px;
    background: white;
}

.product-manager-info {
    flex: 1;
}

.product-manager-info h4 {
    margin: 0 0 4px 0;
    color: #333;
}

.product-manager-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.product-manager-actions {
    display: flex;
    gap: 8px;
}

.edit-btn, .delete-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.edit-btn {
    background: #ffc107;
    color: #333;
}

.edit-btn:hover {
    background: #e0a800;
}

.delete-btn {
    background: var(--danger-color);
    color: white;
}

.delete-btn:hover {
    background: #c82333;
}

/* Responsive para panel de administración */
@media (max-width: 768px) {
    .header {
        min-height: 68px;
    }
    
    .header-container {
        padding: 12px 16px;
        gap: 16px;
    }
    
    .logo-img {
        height: 42px;
        max-width: 140px;
    }
    
    .admin-container {
        margin: 10px;
        max-height: 85vh;
        width: 95vw;
        max-width: 95vw;
        box-shadow: 0 12px 26px rgba(0,0,0,0.35);
        background: rgba(255,255,255,0.98);
    }
    
    .admin-tabs {
        background: rgba(0,0,0,0.55);
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 120px;
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    /* Mejorar tabla admin en móvil */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .products-table {
        min-width: 800px;
    }
    
    .products-table th,
    .products-table td {
        padding: 12px 8px;
        font-size: 14px;
        min-height: 44px;
    }
    
    /* Mejorar botones admin en móvil */
    .admin-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .admin-btn-primary,
    .admin-btn-success,
    .admin-btn-warning,
    .admin-btn-danger {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Notificación de éxito */
.success-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translate(-50%, -100%);
    background: var(--success-color);
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 5000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.success-notification.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.notification-content i {
    font-size: 20px;
    color: white;
}

.notification-content span {
    font-size: 14px;
}

/* Modal de Detalles de Producto */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.product-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.product-modal .modal-content {
    position: relative;
    z-index: 3001;
    background: white;
    border-radius: 12px;
    max-width: 1000px;
    max-height: 85vh;
    width: 95%;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.product-modal .close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    z-index: 3002;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.product-modal .close-modal:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.product-modal .modal-body {
    padding: 20px;
    height: 100%;
    overflow-y: auto;
}

.product-modal .modal-content-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
    align-items: start;
    height: calc(85vh - 40px);
}

.product-modal .modal-images-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-modal .modal-main-image {
    width: 100%;
    height: 320px;
    object-fit: contain;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    position: relative;
}

.product-modal .modal-main-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%236c757d' viewBox='0 0 24 24'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    opacity: 0.3;
    z-index: 1;
}

.product-modal .modal-main-image[src*="placeholder"]::after {
    content: 'Sin imagen';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    z-index: 2;
}

.product-modal .modal-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.product-modal .modal-thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.product-modal .modal-thumbnails img[src*="placeholder"] {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-modal .modal-thumbnails img[src*="placeholder"]::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%236c757d' viewBox='0 0 24 24'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    opacity: 0.4;
}

.product-modal .modal-thumbnails img:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

.product-modal .modal-thumbnails img.active {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.product-modal .modal-info-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 15px;
    height: 100%;
    overflow-y: auto;
    justify-content: center;
}

/* Responsive para pantallas pequeñas */
@media (max-width: 768px) {
    .product-modal .modal-content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-modal .modal-content {
        max-width: 95%;
        margin: 10px;
    }
    
    .product-modal .modal-main-image {
        height: 250px;
    }
}

.product-modal .modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.product-modal .modal-reference {
    font-size: 13px;
    color: #666;
    margin: 0 0 10px 0;
}

.product-modal .modal-description {
    font-size: 13px;
    color: #555;
    line-height: 1.3;
    margin: 0 0 10px 0;
}

.product-modal .modal-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin: 10px 0;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.product-modal .detail-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #e9ecef;
}

.product-modal .detail-item:last-child {
    border-bottom: none;
}

.product-modal .detail-label {
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.product-modal .detail-value {
    font-size: 13px;
    color: #2c3e50;
    font-weight: 600;
}

.product-modal .modal-price {
    font-size: 18px;
    font-weight: 700;
    color: #e74c3c;
    text-align: center;
    margin: 10px 0;
    padding: 8px 12px;
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border-radius: 8px;
    border: 1px solid #feb2b2;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.1);
}

/* Responsive para modal */
@media (max-width: 768px) {
    .product-modal .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .product-modal .modal-body {
        padding: 20px;
    }
    
    .product-modal .modal-details {
        grid-template-columns: 1fr;
    }
    
    .product-modal .modal-title {
        font-size: 20px;
    }
    
    .product-modal .modal-price {
        font-size: 24px;
    }
}

/* Panel de Gestión de Categorías */
.categories-manager {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.categories-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.categories-manager .categories-header {
    background: var(--secondary-dark);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.categories-manager .categories-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}


.categories-content {
    position: relative;
    z-index: 2001;
    background: white;
    border-radius: 12px;
    padding: 0;
    min-width: 400px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.add-category-section {
    margin-bottom: 30px;
    padding: 20px;
}

.add-category-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.category-input-group {
    display: flex;
    gap: 10px;
}

.category-input-group input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.category-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.add-category-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.add-category-btn:hover {
    background: #218838;
}

.existing-categories-section {
    padding: 0 20px 20px 20px;
}

.existing-categories-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-tag {
    background: rgba(255,255,255,0.15);
    color: #333;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid transparent;
    transition: all 0.2s;
    margin: 4px;
}

.category-tag:hover {
    background: rgba(255,102,0,0.2);
    border-color: var(--primary-color);
    color: #000;
    transform: translateY(-1px);
}

.category-tag .delete-category {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background-color 0.2s;
}

.category-tag .delete-category:hover {
    background: var(--danger-color);
    color: white;
}

/* Botón de categorías en el editor */
.categories-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Roboto Condensed', 'Arial Narrow', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
}

.categories-btn:hover {
    background: var(--secondary-dark);
}

/* Botón de limpiar todo */
.clear-all-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Roboto Condensed', 'Arial Narrow', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
}

.clear-all-btn:hover {
    background: #c82333;
}


/* Botón de ver productos */
.view-products-btn {
    background: var(--info-color);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Roboto Condensed', 'Arial Narrow', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
}

.view-products-btn:hover {
    background: #117a8b;
}

/* ===== ESTILOS PARA IMPORTACIÓN DE EXCEL ===== */

/* Sección de importación de Excel */
.excel-import-section {
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.excel-header {
    margin-bottom: 20px;
    text-align: center;
}

.excel-header h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 18px;
}

.excel-header p {
    color: #666;
    font-size: 14px;
}

/* Zona de carga de archivos */
.excel-upload-area {
    margin-bottom: 20px;
}

.upload-zone {
    border: 2px dashed var(--primary-color);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: rgba(255,102,0,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover {
    border-color: var(--primary-dark);
    background: rgba(255,102,0,0.12);
}

.upload-zone.dragover {
    border-color: var(--primary-dark);
    background: rgba(255,102,0,0.18);
    transform: scale(1.02);
}

.upload-zone i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.upload-zone h4 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 16px;
}

.upload-zone p {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.select-file-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.select-file-btn:hover {
    background: var(--primary-dark);
}

/* Vista previa de Excel */
.excel-preview {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.excel-preview h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 16px;
}

.preview-table-container {
    max-height: 300px;
    overflow: auto;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.preview-table th,
.preview-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    font-size: 13px;
}

.preview-table th {
    background: var(--secondary-dark);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.preview-table tr:hover {
    background: #f8f9fa;
}

.preview-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.import-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.import-btn:hover {
    background: #218838;
}

.cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.cancel-btn:hover {
    background: #5a6268;
}

/* Instrucciones de Excel */
.excel-instructions {
    background: var(--highlight-color);
    border: 1px solid #ffdab5;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.excel-instructions h4 {
    color: #a04a00;
    margin-bottom: 15px;
    font-size: 16px;
}

.excel-instructions ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.excel-instructions li {
    color: #a04a00;
    margin-bottom: 8px;
    font-size: 14px;
}

.excel-instructions strong {
    color: #6b2f00;
}

.excel-template {
    text-align: center;
}

.download-template-btn {
    background: var(--primary-light);
    color: var(--secondary-dark);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.download-template-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Select de categorías en la tabla */
.category-select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s;
}

.category-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255,102,0,0.2);
}

.category-select:hover {
    border-color: var(--primary-dark);
}

/* Mejorar apariencia de las miniaturas */

/* Estilos del pie de página */
.footer {
    background: var(--ktm-black);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    border-top: 3px solid var(--ktm-orange);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: var(--ktm-orange);
    font-family: 'Oswald', 'Arial Black', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.footer-section h4 {
    color: var(--ktm-orange);
    font-family: 'Oswald', 'Arial Black', sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.footer-section p {
    color: #CCCCCC;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.contact-info p,
.schedule-info p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    color: #CCCCCC;
    text-align: center;
}

.contact-info i,
.schedule-info i {
    color: var(--ktm-orange);
    width: 16px;
    text-align: center;
}

.contact-info,
.schedule-info {
    text-align: center;
}

.footer-bottom {
    border-top: 1px solid #333;
    margin-top: 2rem;
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom p {
    color: #999;
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive del footer */
@media (max-width: 768px) {
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .footer-section h3 {
        font-size: 1.3rem;
    }
    
    .footer-section h4 {
        font-size: 1.1rem;
    }
}

/* Estilos para el dashboard admin */
.admin-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 2rem 0;
    padding: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
    color: #333;
    margin: 0;
    font-family: 'Oswald', 'Arial Black', sans-serif;
}

.section-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.table-container {
    overflow-x: auto;
    overflow-y: visible;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.85rem;
    table-layout: fixed;
}

.admin-table th,
.admin-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

/* Anchos específicos para cada columna */
.admin-table th:nth-child(1),
.admin-table td:nth-child(1) {
    width: 15%; /* Referencia */
}

.admin-table th:nth-child(2),
.admin-table td:nth-child(2) {
    width: 30%; /* Nombre */
    white-space: normal;
    word-wrap: break-word;
}

.admin-table th:nth-child(3),
.admin-table td:nth-child(3) {
    width: 12%; /* Categoría */
}

.admin-table th:nth-child(4),
.admin-table td:nth-child(4) {
    width: 8%; /* Cantidad */
    text-align: center;
}

.admin-table th:nth-child(5),
.admin-table td:nth-child(5) {
    width: 10%; /* Precio */
    text-align: right;
}

.admin-table th:nth-child(6),
.admin-table td:nth-child(6) {
    width: 10%; /* Imágenes */
    text-align: center;
}

.admin-table th:nth-child(7),
.admin-table td:nth-child(7) {
    width: 15%; /* Acciones */
    text-align: center;
}

.admin-table tr:hover {
    background: #f8f9fa;
}

.admin-table input,
.admin-table select {
    width: 100%;
    padding: 0.4rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.8rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.category-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e0e0e0;
}

.category-card h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.category-card p {
    margin: 0.25rem 0;
    color: #666;
    font-size: 0.9rem;
}

.category-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.import-export-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.import-section,
.export-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

.file-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin: 1rem 0;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.file-upload-area i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.file-upload-area p {
    margin: 0.5rem 0;
    color: #666;
}

.preview-section {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.preview-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.export-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Responsive para dashboard */
@media (max-width: 768px) {
    .admin-section {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-actions {
        flex-wrap: wrap;
    }
    
    .import-export-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-table {
        font-size: 0.75rem;
        min-width: 600px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.4rem;
    }
    
    /* Ajustes para móviles */
    .admin-table th:nth-child(2),
    .admin-table td:nth-child(2) {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ===== MODAL DE PRODUCTO AMPLIADO ===== */
.product-modal-content {
    max-width: 1000px;
    width: 95%;
    height: auto;
    max-height: 90vh;
    overflow: visible;
    border-radius: 0;
    border: 3px solid var(--ktm-black);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    padding: 0;
    position: relative;
}

/* Modal de pantalla completa en móviles */
@media (max-width: 768px) {
    .product-modal-content {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        margin: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }
    
    /* Mejorar scroll en modales */
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-body {
        padding: 16px;
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.product-modal-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    flex: 1;
    min-height: 0;
    overflow: visible;
    height: auto;
    box-sizing: border-box;
    justify-items: stretch;
    align-items: flex-start;
    align-content: flex-start;
}

/* Layout inteligente que detecta espacio disponible */
@media (max-width: 1024px) {
    .product-modal-layout {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.5rem;
        height: calc(100% - 0px);
    }
    
    .product-images-section {
        order: 1;
        max-height: 35vh;
        overflow: hidden;
    }
    
    .main-image-container {
        min-height: 150px;
        max-height: 200px;
    }
    
    .product-info-section {
        order: 2;
        max-height: 60vh;
        overflow: hidden;
    }
}

.product-images-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
    flex: 1;
    overflow: visible;
}

.main-image-container {
    position: relative;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 0;
    overflow: hidden;
    flex: 1;
    min-height: 200px;
    max-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navegación flotante sobre la imagen */
.image-nav-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.main-image-container:hover .image-nav-overlay {
    opacity: 1;
    pointer-events: auto;
}

.image-nav-overlay .nav-btn {
    background: #66666640;
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.image-nav-overlay .nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.image-nav-overlay .nav-btn:active {
    transform: scale(0.95);
}

/* Contador de posición flotante */
.image-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: #66666640;
    color: white;
    padding: 3px 5px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Imagen adaptativa según el espacio disponible */
@media (max-width: 1024px) {
    .main-image-container {
        max-height: 1024px;
        min-height: 150px;
    }
}

@media (max-width: 768px) {
    .main-image-container {
        aspect-ratio: 4/3;
        max-height: 768px;
        min-height: 100px;
    }
}

@media (max-width: 480px) {
    .main-image-container {
        aspect-ratio: 16/9;
        max-height: 480px;
        min-height: 100px;
    }
}

.main-product-image {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    /* Fallback para navegadores sin object-fit */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    /* Soporte moderno */
    object-fit: contain;
    object-position: center;
    transition: all 0.3s ease;
    cursor: default;
}

.main-product-image:hover {
    transform: none;
}

/* Modal de Zoom de Imagen */
.image-zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    cursor: zoom-out;
}

.image-zoom-modal.show {
    display: flex;
}

.zoom-modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoomed-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    cursor: zoom-out;
    transition: transform 0.3s ease;
}

.close-zoom {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 4001;
}

.close-zoom:hover {
    background: rgba(255, 0, 0, 0.8);
    transform: scale(1.1);
}

.zoom-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 4001;
}

.zoom-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.zoom-btn:hover {
    background: rgba(255, 102, 0, 0.8);
    transform: scale(1.1);
}

.image-zoom-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
}

.main-image-container:hover .image-zoom-overlay {
    opacity: 1;
}

.image-zoom-overlay:hover {
    background: var(--ktm-orange);
    transform: scale(1.1);
}

/* Estilos antiguos de navegación eliminados - ahora es flotante */

/* Contador antiguo - ahora es flotante */
.image-counter-old {
    background: var(--ktm-black);
    color: white;
    padding: 8px 16px;
    border-radius: 0;
    font-weight: 600;
    font-family: 'Roboto Condensed', 'Arial Narrow', sans-serif;
    letter-spacing: 1px;
}



.product-info-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
    overflow: visible;
    flex: 1;
    min-height: 0;
    position: relative;
    box-sizing: border-box;
}

.product-header {
    border-bottom: 2px solid var(--ktm-border);
    padding-bottom: 0.5rem;
    flex-shrink: 0;
    position: relative;
}

.product-header .close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.product-header .close-modal:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

/* Mejorar touch targets en móvil */
@media (max-width: 768px) {
    .product-header .close-modal {
        width: 40px;
        height: 40px;
        font-size: 16px;
        top: 5px;
        right: 5px;
    }
}

.product-title {
    font-family: 'Oswald', 'Arial Black', sans-serif;
    font-size: 1.4rem;
    color: var(--ktm-black);
    margin: 0 0 0.3rem 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
}

.product-ref {
    font-size: 0.9rem;
    color: var(--ktm-light-gray);
    font-weight: 500;
}

.product-details {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
    min-height: 0;
    overflow: visible;
    margin-bottom: 0.2rem;
}

/* Layout compacto para detalles en pantallas pequeñas */
@media (max-width: 1024px) {
    .product-details {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.3rem;
        align-content: center;
    }
    
    .detail-row {
        font-size: 0.75rem;
        padding: 0.2rem;
        min-height: 28px;
    }
}

@media (max-width: 768px) {
    .product-details {
        grid-template-columns: 1fr;
        gap: 0.0rem;
    }
    
    .detail-row {
        font-size: 0.7rem;
        padding: 0.15rem;
        min-height: 24px;
    }
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem;
    background: var(--ktm-surface);
    border: 1px solid var(--ktm-border);
    border-radius: 0;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.detail-label {
    font-weight: 600;
    color: var(--ktm-black);
    min-width: 100px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
}

.detail-label i {
    color: var(--ktm-orange);
    width: 12px;
    font-size: 0.7rem;
}

.detail-value {
    color: var(--ktm-gray);
    font-weight: 500;
}

.price-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ktm-orange);
    font-family: 'Oswald', 'Arial Black', sans-serif;
}

.product-description {
    background: var(--ktm-surface);
    border: 2px solid var(--ktm-border);
    border-radius: 0;
    padding: 0.3rem;
    flex-shrink: 0;
    max-height: none;
    overflow: visible;
    margin-top: 0.1rem;
}

/* Descripción más compacta en pantallas pequeñas */
@media (max-width: 1024px) {
    .product-description {
        max-height: none;
        padding: 0.3rem;
    }
    
    .product-description h4 {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }
    
    .product-description p {
        font-size: 0.7rem;
        line-height: 1.2;
    }
}

@media (max-width: 768px) {
    .product-description {
        max-height: none;
        padding: 0.2rem;
    }
    
    .product-description h4 {
        font-size: 0.75rem;
        margin-bottom: 0.1rem;
    }
    
    .product-description p {
        font-size: 0.65rem;
        line-height: 1.1;
    }
}

.product-description h4 {
    font-family: 'Roboto Condensed', 'Arial Narrow', sans-serif;
    color: var(--ktm-black);
    margin: 0 0 0.3rem 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.product-description h4 i {
    color: var(--ktm-orange);
}

.product-description p {
    margin: 0;
    color: var(--ktm-gray);
    line-height: 1.3;
    font-size: 0.8rem;
    overflow: visible;
}

.product-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
    padding-top: 0.2rem;
}

.add-to-cart-modal {
    background: var(--ktm-orange);
    color: white;
    border: 2px solid var(--ktm-orange);
    padding: 8px 16px;
    border-radius: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    flex: 1;
    font-size: 0.8rem;
}

.add-to-cart-modal:hover {
    background: var(--ktm-orange-dark);
    border-color: var(--ktm-orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

/* ===== MODAL DE ZOOM DE IMAGEN ===== */
.zoom-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.9);
}

.zoomed-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.3s ease;
    border-radius: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.close-zoom {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
}

.close-zoom:hover {
    background: var(--ktm-orange);
    border-color: var(--ktm-orange);
    transform: scale(1.1);
}

.zoom-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(0,0,0,0.7);
    padding: 10px;
    border-radius: 25px;
}

.zoom-btn {
    background: var(--ktm-orange);
    color: white;
    border: 2px solid var(--ktm-orange);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.zoom-btn:hover {
    background: var(--ktm-orange-dark);
    border-color: var(--ktm-orange-dark);
    transform: scale(1.1);
}

/* Responsive para modal de producto - MEJORADO */
@media (max-width: 768px) {
    .product-modal-content {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        margin: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }
    
    .product-modal-layout {
        grid-template-columns: 1fr;
        gap: 0.3rem;
        padding: 0.3rem;
        height: 100vh;
    }
    
    .product-images-section {
        order: 1;
        max-height: 35vh;
        min-height: 200px;
    }
    
    .product-info-section {
        order: 2;
        max-height: 60vh;
        overflow-y: auto;
        padding: 0.5rem;
    }
    
    .main-image-container {
        aspect-ratio: 4/3;
        max-height: 160px;
        min-height: 100px;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 0.3rem;
        margin-top: 0.3rem;
    }
    
    .add-to-cart-modal {
        font-size: 0.7rem;
        padding: 0.6rem 1rem;
    }
    
    /* Navegación flotante en móvil - mejorar touch */
    .image-nav-overlay {
        padding: 15px;
        opacity: 1;
        pointer-events: auto;
    }
    
    .image-nav-overlay .nav-btn {
        width: 48px;
        height: 48px;
        font-size: 18px;
        background: rgba(0, 0, 0, 0.8);
    }
    
    .image-counter {
        bottom: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 11px;
    }
    
    
    .detail-row {
        font-size: 0.7rem;
        padding: 0.2rem;
        min-height: 20px;
    }
    
    .product-title {
        font-size: 1.1rem;
        line-height: 1.2;
    }
}

/* Responsive mejorado para móviles pequeños */
@media (max-width: 480px) {
    .product-modal-content {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
        border: none;
    }
    
    .product-modal-layout {
        grid-template-columns: 1fr;
        gap: 0.3rem;
        padding: 0.3rem;
        height: 100vh;
    }
    
    .product-images-section {
        max-height: 30vh;
        min-height: 150px;
    }
    
    .main-image-container {
        aspect-ratio: 16/9;
        max-height: 480px;
        min-height: 100px;
    }
    
    .product-info-section {
        padding: 0.4rem;
        gap: 0.3rem;
        max-height: 65vh;
        overflow-y: auto;
    }
    
    .product-title {
        font-size: 1rem;
        line-height: 1.2;
    }
    
    .product-price {
        font-size: 1.2rem;
    }
    
    .detail-row {
        font-size: 0.65rem;
        padding: 0.15rem;
        min-height: 18px;
    }
    
    .product-actions {
        gap: 0.3rem;
        margin-top: 0.3rem;
    }
    
    .add-to-cart-modal {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }
    
    .close-modal {
        font-size: 1rem;
        padding: 0.3rem;
        width: 25px;
        height: 25px;
    }
    
}

/* Responsive para tablets - OPTIMIZADO */
@media (min-width: 769px) and (max-width: 1024px) {
    .product-modal-content {
        width: 90%;
        max-width: 900px;
        max-height: 90vh;
    }
    
    .product-modal-layout {
        gap: 1rem;
        padding: 0.8rem;
    }
    
    .main-image-container {
        aspect-ratio: 3/2;
        max-height: 250px;
    }
    
    .product-info-section {
        padding: 1rem;
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .product-details {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
    }
    
    .detail-row {
        font-size: 0.8rem;
        padding: 0.3rem;
        min-height: 26px;
    }
}
