/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

:root {
    /* Colores principales */
    --primary-color: #00d4ff;
    --primary-dark: #00a8cc;
    --primary-light: #33ddff;
    --secondary-color: #0099cc;
    --secondary-dark: #007799;
    
    /* Colores de acento */
    --accent-green: #10b981;
    --accent-green-dark: #059669;
    --accent-orange: #f59e0b;
    --accent-orange-dark: #d97706;
    --accent-pink: #ec4899;
    --accent-purple: #0099cc;
    --accent-blue: #3b82f6;
    
    /* Colores de estado */
    --success-color: #10b981;
    --success-light: #34d399;
    --danger-color: #ef4444;
    --danger-light: #f87171;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    /* Colores de fondo */
    --bg-color: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-gradient: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    --bg-gradient-primary: linear-gradient(135deg, #00d4ff 0%, #0066cc 100%);
    
    /* Colores de texto */
    --text-color: #1e293b;
    --text-secondary: #475569;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    
    /* Bordes y sombras */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background: linear-gradient(to bottom, #f8fafc 0%, #f1f5f9 100%);
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.header .container {
    position: relative;
    overflow: visible;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .main-nav {
        padding: 10px 0;
    }
    
    .main-nav ul {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .main-nav {
        padding: 10px 0;
    }
    
    .main-nav ul {
        padding: 0 10px;
    }
    
    .nav-select-dropdown {
        background: transparent !important;
        border: none !important;
        border-bottom: 1px solid transparent !important;
        min-width: 90px;
        padding: 5px 20px 5px 4px;
        font-size: 12px;
        font-weight: 500;
        color: var(--text-color);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23475569' d='M5 7L1 3h8z'/%3E%3C/svg%3E") !important;
        background-size: 8px !important;
        background-position: right 3px center !important;
        background-repeat: no-repeat !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
    }
    
    .nav-select-dropdown:hover {
        color: var(--primary-color) !important;
        border-bottom-color: var(--primary-color) !important;
    }
    
    .nav-select-dropdown:focus {
        outline: none !important;
        color: var(--primary-color) !important;
        border-bottom-color: var(--primary-color) !important;
    }
}

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    max-width: 100%;
    overflow: visible !important;
    box-sizing: border-box;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    flex: 1;
    display: flex;
    justify-content: center;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    background: var(--bg-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 24px;
    font-weight: bold;
}

.logo i {
    font-size: 32px;
    background: var(--bg-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-bar {
    flex: 1;
    max-width: 600px;
    min-width: 200px;
}

.search-bar form {
    display: flex;
    width: 100%;
}

.search-bar input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.search-bar button {
    padding: 12px 20px;
    background: var(--bg-gradient-primary);
    color: var(--white);
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 212, 255, 0.3);
}

.search-bar button:hover {
    background: linear-gradient(135deg, #00a8cc 0%, #0066cc 100%);
    box-shadow: 0 4px 8px rgba(0, 212, 255, 0.4);
    transform: translateY(-1px);
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.cart-icon {
    position: relative;
    color: var(--text-color);
    font-size: 24px;
    text-decoration: none;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-orange) 100%);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(236, 72, 153, 0.4);
}

.admin-link {
    color: var(--text-color);
    font-size: 20px;
    text-decoration: none;
}

/* Navigation */
.main-nav {
    border-top: 1px solid var(--border-color);
    padding: 10px 0;
    background: var(--white);
    width: 100%;
    position: relative;
    overflow: visible !important;
    z-index: 10000;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    flex-wrap: nowrap;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-nav ul li {
    display: flex;
    align-items: center;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--primary-color);
}

/* Nav Select (reemplazo de dropdown) */
.nav-select {
    position: relative;
}

.nav-select-dropdown {
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    color: var(--text-color);
    font-weight: 500;
    font-size: inherit;
    font-family: inherit;
    padding: 5px 25px 5px 5px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23475569' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 10px;
    transition: all 0.3s ease;
    min-width: 120px;
    box-shadow: none;
    border-radius: 0;
}

.nav-select-dropdown:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.nav-select-dropdown:focus {
    outline: none;
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.nav-select-dropdown option {
    background: var(--white) !important;
    color: var(--text-color) !important;
    padding: 12px 15px !important;
    border: none !important;
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
}

.nav-select-dropdown option:hover,
.nav-select-dropdown option:focus,
.nav-select-dropdown option:checked {
    background: var(--bg-color) !important;
    color: var(--primary-color) !important;
}

/* Estilos adicionales para mejorar la lista desplegable */
select.nav-select-dropdown {
    background-color: transparent;
}

select.nav-select-dropdown::-ms-expand {
    display: none;
}

/* Para navegadores WebKit (Chrome, Safari) */
.nav-select-dropdown::-webkit-scrollbar {
    width: 8px;
}

.nav-select-dropdown::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 4px;
}

.nav-select-dropdown::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.nav-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Mantener estilos de dropdown antiguos por si acaso */
.dropdown {
    position: relative;
    z-index: 10000;
    overflow: visible !important;
}

.dropdown-toggle {
    cursor: pointer;
    user-select: none;
    display: inline-block;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.dropdown-toggle:hover {
    color: var(--primary-color);
}

.dropdown-toggle i {
    transition: transform 0.3s ease;
}

.dropdown.active .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: fixed !important;
    background: var(--white);
    box-shadow: var(--shadow-hover);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 150px;
    max-width: 200px;
    list-style: none;
    margin-top: 10px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 99999 !important;
    max-height: 400px;
    overflow-y: auto;
}

.dropdown.active .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
}

.dropdown-menu a:hover {
    background: var(--bg-color);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 30px 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Hero Section */
.hero-section {
    background: var(--bg-gradient-primary);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-section h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.hero-section p {
    font-size: 18px;
    margin-bottom: 20px;
}

/* Sections */
.section-title {
    font-size: 32px;
    margin-bottom: 30px;
    color: var(--text-color);
}

/* Categories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.category-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.category-card a {
    text-decoration: none;
    color: var(--text-color);
    display: block;
}

.category-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.category-placeholder {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--white);
    opacity: 0.8;
}

.category-card h3 {
    padding: 15px;
    font-size: 18px;
    margin-bottom: 5px;
}

.category-card p {
    padding: 0 15px 15px;
    color: var(--text-light);
    font-size: 14px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.product-card a {
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.product-image {
    position: relative;
    width: 100%;
    height: 220px;
    min-height: 220px;
    max-height: 220px;
    overflow: hidden;
    background: var(--bg-color);
    flex-shrink: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    transition: transform 0.3s;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    position: relative;
}

.product-card:hover .product-image {
    overflow: hidden;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
    max-width: 100%;
    max-height: 100%;
}

.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: var(--text-light);
}

.product-placeholder.large {
    height: 400px;
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-dark) 100%);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-info {
    padding: 10px;
    padding-bottom: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.product-info h3 {
    font-size: 18px;
    margin-bottom: 4px;
    color: var(--text-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
    flex-shrink: 0;
}

.product-brand {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.product-category {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 4px;
    flex-shrink: 0;
}

.product-info-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.product-info-footer {
    margin-top: auto;
    padding-top: 6px;
    flex-shrink: 0;
    width: 100%;
}

.product-info-footer .product-price {
    margin-bottom: 8px;
}

.product-info-footer .btn {
    width: 100%;
}

.product-price {
    font-size: 22px;
    font-weight: bold;
    background: var(--bg-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-price-large {
    font-size: 36px;
    font-weight: bold;
    background: var(--bg-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 20px 0;
}

.iva-text {
    font-size: 0.7em;
    color: var(--text-secondary);
    font-weight: 500;
    margin-left: 6px;
    vertical-align: middle;
    display: inline-block;
}

.product-price-large .iva-text {
    font-size: 0.6em;
    margin-left: 8px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: var(--bg-gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.3);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00a8cc 0%, #0066cc 100%);
    box-shadow: 0 6px 12px rgba(0, 212, 255, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--text-secondary) 0%, #64748b 100%);
    color: var(--white);
    box-shadow: 0 4px 6px rgba(71, 85, 105, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    box-shadow: 0 6px 12px rgba(71, 85, 105, 0.4);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
}

.btn-sm {
    padding: 10px 16px;
    font-size: 14px;
}

.btn-large {
    padding: 15px 30px;
    font-size: 18px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Product Detail */
.breadcrumb {
    margin-bottom: 20px;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
    background: var(--white);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.product-images {
    position: relative;
}

.main-image-container {
    position: relative;
}

.main-product-image {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    cursor: zoom-in;
    transition: transform 0.3s, opacity 0.3s ease-in-out;
    opacity: 1;
}

.main-product-image:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-hover);
}

.image-gallery-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding: 10px 0;
}

.thumbnail {
    min-width: 80px;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
    opacity: 0.7;
}

.thumbnail:hover {
    opacity: 1;
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: var(--primary-color);
    opacity: 1;
    box-shadow: 0 4px 8px rgba(0, 212, 255, 0.4);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 10px;
}

.gallery-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
    pointer-events: all;
    transition: all 0.3s;
}

.gallery-btn:hover {
    background: var(--white);
    transform: scale(1.1);
    box-shadow: var(--shadow-hover);
}

.gallery-btn.prev {
    left: 10px;
}

.gallery-btn.next {
    right: 10px;
}

.existing-images {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.image-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-item .btn {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 5px 8px;
}

/* Image Modal / Lightbox */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    cursor: zoom-in;
    user-select: none;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-close:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
}

.modal-zoom-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10001;
}

.zoom-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
}

.zoom-btn:hover {
    background: var(--white);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.product-details h1 {
    font-size: 32px;
    margin-bottom: 15px;
}

.product-description {
    margin: 30px 0;
}

.product-description h3 {
    margin-bottom: 10px;
}

.product-stock {
    margin: 20px 0;
}

.stock-available {
    color: var(--accent-green);
    font-weight: 600;
}

.stock-unavailable {
    color: var(--danger-color);
    font-weight: 600;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.quantity-selector label {
    font-weight: 500;
}

.qty-btn {
    width: 35px;
    height: 35px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
}

.qty-btn:hover {
    background: var(--bg-color);
}

.quantity-selector input {
    width: 60px;
    padding: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.product-actions {
    margin-top: 30px;
}

/* Cart */
.cart-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.cart-items {
    width: 100%;
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.cart-table {
    width: 100%;
    max-width: 100%;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    table-layout: auto;
    box-sizing: border-box;
}

.cart-table th,
.cart-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.cart-table th {
    background: var(--bg-color);
    font-weight: 600;
}

.cart-product {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 100%;
    box-sizing: border-box;
}

.cart-product img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    max-width: 100%;
    flex-shrink: 0;
}

.cart-product h3 {
    font-size: 16px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.cart-product a {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    display: block;
}

.cart-product a {
    color: var(--text-color);
    text-decoration: none;
}

.cart-product a:hover {
    color: var(--primary-color);
}

.cart-table input[type="number"] {
    width: 60px;
    padding: 5px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.cart-summary {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.summary-card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    background: linear-gradient(to bottom, var(--white) 0%, var(--bg-secondary) 100%);
}

.summary-card h2 {
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-row.total {
    border-bottom: none;
    border-top: 2px solid var(--border-color);
    margin-top: 10px;
    padding-top: 15px;
    font-size: 20px;
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.empty-cart i {
    font-size: 64px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.empty-cart h2 {
    margin-bottom: 10px;
}

/* Checkout */
.checkout-content {
    max-width: 800px;
    margin: 0 auto;
}

.checkout-form {
    background: var(--white);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.checkout-form h2 {
    margin: 30px 0 20px;
    font-size: 24px;
}

.checkout-form h2:first-child {
    margin-top: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
}

.order-summary {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.order-total {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 2px solid var(--border-color);
    font-size: 20px;
}

/* Success/Error Messages */
.success-message,
.error-message,
.pending-message {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 40px auto;
}

.success-icon,
.error-icon,
.pending-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.success-icon {
    color: var(--accent-green);
    filter: drop-shadow(0 4px 8px rgba(16, 185, 129, 0.3));
}

.error-icon {
    color: var(--danger-color);
    filter: drop-shadow(0 4px 8px rgba(239, 68, 68, 0.3));
}

.pending-icon {
    color: var(--accent-orange);
    filter: drop-shadow(0 4px 8px rgba(245, 158, 11, 0.3));
}

.success-actions,
.error-actions,
.pending-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-current {
    padding: 10px 15px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 4px;
    font-weight: bold;
}

.page-link {
    padding: 10px 15px;
    background: var(--white);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.page-link:hover {
    background: var(--bg-color);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.no-results i {
    font-size: 64px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.page-header {
    margin-bottom: 30px;
}

.results-count {
    color: var(--text-light);
    margin-top: 10px;
}

.related-products {
    margin-top: 50px;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 60px;
    border-top: 3px solid var(--primary-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-section p {
    margin-bottom: 8px;
    color: #ecf0f1;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #ecf0f1;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid var(--danger-light);
    border-left: 4px solid var(--danger-color);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .header-top {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 0;
    }
    
    .logo {
        width: 100%;
        flex-basis: 100%;
        justify-content: center;
    }
    
    .logo a {
        font-size: 20px;
    }
    
    .logo i {
        font-size: 24px;
    }
    
    .main-nav ul {
        justify-content: flex-start;
    }
    
    .main-nav ul li {
        display: flex;
        align-items: center;
    }
    
    .nav-select-dropdown {
        background: transparent !important;
        border: none !important;
        border-bottom: 1px solid transparent !important;
        min-width: 100px;
        padding: 5px 22px 5px 5px;
        font-size: 13px;
        font-weight: 500;
        color: var(--text-color);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23475569' d='M5 7L1 3h8z'/%3E%3C/svg%3E") !important;
        background-size: 9px !important;
        background-position: right 4px center !important;
        background-repeat: no-repeat !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
    }
    
    .nav-select-dropdown:hover {
        color: var(--primary-color) !important;
        border-bottom-color: var(--primary-color) !important;
    }
    
    .nav-select-dropdown:focus {
        outline: none !important;
        color: var(--primary-color) !important;
        border-bottom-color: var(--primary-color) !important;
    }
    
    .search-bar {
        flex: 1;
        min-width: 0;
        max-width: calc(100% - 80px);
    }
    
    .header-actions {
        gap: 10px;
        flex-shrink: 0;
    }
    
    .cart-icon {
        font-size: 20px;
    }
    
    .admin-link {
        font-size: 18px;
    }
    
    .search-bar input {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .search-bar button {
        padding: 10px 15px;
        font-size: 16px;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .cart-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cart-summary {
        position: static;
    }
    
    .cart-items {
        overflow-x: visible;
        width: 100%;
        max-width: 100%;
    }
    
    .cart-content {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .cart-table {
        overflow: visible;
        table-layout: auto;
        border: none;
        box-shadow: none;
        background: transparent;
        width: 100%;
        max-width: 100%;
    }
    
    .cart-table thead {
        display: none;
    }
    
    .cart-table tbody {
        display: block;
    }
    
    .cart-table tr {
        display: block;
        margin-bottom: 15px;
        background: var(--white);
        border-radius: 12px;
        box-shadow: var(--shadow-md);
        border: 1px solid var(--border-color);
        padding: 15px;
        overflow: hidden;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .cart-table td {
        display: block;
        padding: 10px 0;
        text-align: left;
        border-bottom: none;
        position: relative;
        padding-left: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .cart-table td:before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 5px;
        color: var(--text-light);
        font-size: 12px;
        text-transform: uppercase;
    }
    
    .cart-table td:first-child {
        padding-top: 0;
    }
    
    .cart-table td:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }
    
    .cart-product {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cart-product img {
        width: 100%;
        max-width: 120px;
        height: auto;
        aspect-ratio: 1;
        flex-shrink: 0;
    }
    
    .cart-product > div {
        flex: 1;
        min-width: 0;
        max-width: 100%;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .hero-section {
        padding: 25px 0;
        margin-bottom: 20px;
    }
    
    .hero-section h1 {
        font-size: 28px;
        margin-bottom: 8px;
    }
    
    .hero-section p {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .main-nav {
        overflow: visible;
        padding: 8px 0;
    }
    
    .main-nav ul {
        flex-direction: row;
        gap: 12px;
        flex-wrap: wrap;
        overflow: visible;
        padding-bottom: 5px;
    }
    
    .main-nav ul li {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .main-nav a {
        font-size: 14px;
        padding: 5px 8px;
    }
    
    .dropdown {
        position: relative;
    }
    
    .dropdown-menu {
        position: fixed;
        background: var(--white);
        box-shadow: var(--shadow-hover);
        border-radius: 8px;
        padding: 10px 0;
        min-width: 150px;
        max-width: 200px;
        margin-top: 10px;
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        z-index: 10000;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 85%;
    }
    
    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
    
    .modal-zoom-controls {
        bottom: 20px;
    }
    
    .zoom-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-section {
        padding: 15px 0;
        margin-bottom: 15px;
    }
    
    .hero-section h1 {
        font-size: 22px;
        margin-bottom: 5px;
        line-height: 1.3;
    }
    
    .hero-section p {
        font-size: 14px;
        margin-bottom: 5px;
        line-height: 1.4;
    }
    
    .dropdown-menu {
        max-width: 180px;
        min-width: 120px;
        position: fixed;
        background: var(--white);
        box-shadow: var(--shadow-hover);
        border-radius: 8px;
        padding: 10px 0;
        margin-top: 10px;
        z-index: 10000;
    }
    
    .main-nav {
        overflow: visible;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        overflow: visible;
    }
    
    h1 {
        font-size: 24px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    .cart-table {
        font-size: 14px;
        border: none;
        box-shadow: none;
        background: transparent;
    }
    
    .cart-table tr {
        margin-bottom: 20px;
        padding: 12px;
    }
    
    .cart-table td {
        font-size: 14px;
    }
    
    .cart-table td[data-label="Precio"]:before,
    .cart-table td[data-label="Subtotal"]:before {
        color: var(--primary-color);
    }
    
    .cart-table td[data-label="Acciones"]:before {
        display: none;
    }
    
    .cart-table td[data-label="Acciones"] {
        text-align: right;
        padding-top: 15px;
        border-top: 1px solid var(--border-color);
        margin-top: 10px;
    }
    
    .cart-product h3 {
        font-size: 14px;
    }
    
    .cart-table input[type="number"] {
        width: 100%;
        max-width: 100px;
        padding: 8px;
        font-size: 14px;
        box-sizing: border-box;
    }
    
    .cart-table form {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .cart-table .btn-sm {
        width: auto;
        padding: 8px 12px;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .cart-table button {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .summary-card {
        padding: 15px;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .summary-card h2 {
        font-size: 18px;
        word-wrap: break-word;
    }
    
    .btn-block {
        width: 100%;
        margin-bottom: 10px;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .cart-items form[style*="margin-top"] {
        margin-top: 15px !important;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .cart-items .btn-secondary {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .cart-summary {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .search-bar {
        min-width: 0;
        max-width: 100%;
    }
    
    .header-top {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25d366;
    color: var(--white);
    border-radius: 50px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    padding: 12px 20px;
    gap: 10px;
}

.whatsapp-float:hover {
    background: #20ba5a;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6);
}

.whatsapp-float i {
    color: var(--white);
    font-size: 24px;
}

.whatsapp-text {
    color: var(--white);
    white-space: nowrap;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6);
    }
    100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
        padding: 10px 16px;
        font-size: 14px;
        gap: 8px;
    }
    
    .whatsapp-float i {
        font-size: 20px;
    }
    
    .whatsapp-text {
        font-size: 14px;
    }
}
