/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #48bb78;
    --danger: #f56565;
    --warning: #ed8936;
    --gray-50: #f7fafc;
    --gray-100: #edf2f7;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e0;
    --gray-700: #4a5568;
    --gray-900: #1a202c;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.logo a {
    color: white;
    text-decoration: none;
}

.tagline {
    font-size: 0.875rem;
    opacity: 0.9;
}

.cart-button {
    background: rgba(255,255,255,0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.cart-button:hover {
    background: rgba(255,255,255,0.3);
}

.cart-badge {
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Filters Section */
.filters-section {
    background: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 70px;
    z-index: 90;
}

.search-bar {
    margin-bottom: 1rem;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

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

.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-select {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.hero p {
    font-size: 1.125rem;
    color: var(--gray-700);
    max-width: 600px;
    margin: 0 auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.hero-stat-label {
    font-size: 0.875rem;
    color: var(--gray-700);
    margin-top: 0.25rem;
}

/* ============================================
   LOADING & ANIMATIONS - Sistema mejorado
   ============================================ */

/* Loading container mejorado */
.loading {
    text-align: center;
    padding: 4rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

/* Spinner con gradiente cónico */
.spinner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg 270deg,
        var(--primary) 270deg 360deg
    );
    animation: spin 1.2s linear infinite;
    margin: 0 auto 1.5rem;
    position: relative;
}

/* Centro blanco del spinner */
.spinner::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    background: white;
    border-radius: 50%;
}

/* Anillo exterior con gradiente */
.spinner::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: conic-gradient(
        from 0deg,
        #8b5cf6,
        #7c3aed,
        #6d28d9,
        #8b5cf6
    );
    border-radius: 50%;
    z-index: -1;
    filter: blur(8px);
    opacity: 0.5;
    animation: spin 1.2s linear infinite reverse;
}

.loading p {
    color: var(--gray-700);
    font-weight: 600;
    font-size: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   SKELETON SCREENS - Tarjetas de productos
   ============================================ */

/* Skeleton base con shimmer mejorado */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #f8f8f8 20%,
        #f0f0f0 40%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
    border-radius: 8px;
}

/* Skeleton para tarjeta de producto */
.skeleton-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.5s ease, skeletonPulse 2s ease-in-out infinite;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(
        90deg,
        #e0e0e0 0%,
        #f0f0f0 20%,
        #e0e0e0 40%,
        #e0e0e0 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

.skeleton-content {
    padding: 1rem;
}

.skeleton-title {
    height: 20px;
    width: 80%;
    margin-bottom: 0.75rem;
    background: linear-gradient(
        90deg,
        #e8e8e8 0%,
        #f5f5f5 20%,
        #e8e8e8 40%,
        #e8e8e8 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 16px;
    width: 60%;
    margin-bottom: 0.5rem;
    background: linear-gradient(
        90deg,
        #e8e8e8 0%,
        #f5f5f5 20%,
        #e8e8e8 40%,
        #e8e8e8 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-price {
    height: 24px;
    width: 40%;
    margin-top: 1rem;
    background: linear-gradient(
        90deg,
        #d0d0d0 0%,
        #e0e0e0 20%,
        #d0d0d0 40%,
        #d0d0d0 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
    border-radius: 4px;
}

/* ============================================
   KEYFRAMES ANIMATIONS
   ============================================ */

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.03);
    }
}

@keyframes skeletonPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Aplicar animaciones a elementos */
.product-card {
    animation: fadeIn 0.5s ease;
}

.cart-sidebar.active {
    animation: slideInRight 0.3s ease;
}

.hero-stat-number {
    animation: pulse 2s ease-in-out infinite;
}

/* Products Grid */
.main-content {
    padding: 2rem 0;
    min-height: 60vh;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.product-image-container {
    position: relative;
    width: 100%;
    height: 220px;
    background: var(--gray-100);
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    background: white;
    transition: transform 0.3s;
}

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

.compare-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8rem;
}

.product-brand {
    font-size: 0.8rem;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
}

.product-price-section {
    margin-top: auto;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 0.5rem;
}

.product-provider {
    font-size: 0.85rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.provider-badge-small {
    background: var(--gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
    position: relative;
    cursor: help;
    transition: all 0.3s ease;
}

/* ============================================
   TOOLTIPS - Sistema global con CSS puro
   ============================================ */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 300px;
    white-space: normal;
}

[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    border: 6px solid transparent;
    border-top-color: #1f2937;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

[data-tooltip]:hover {
    filter: brightness(1.1);
}

/* Efecto especial para badges con tooltip */
.provider-badge[data-tooltip]:hover,
.provider-badge-small[data-tooltip]:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(107, 70, 193, 0.3);
}

/* Variante para tooltips largos */
[data-tooltip-long]::after {
    content: attr(data-tooltip-long);
    max-width: 250px;
    white-space: normal;
    text-align: center;
}

/* Stock badges mejorados */
.product-stock {
    margin-top: 0.75rem;
}

.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: help;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.stock-badge::before {
    font-size: 1.1em;
    display: inline-block;
    transition: transform 0.3s ease;
}

.stock-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stock-badge:hover::before {
    transform: scale(1.2) rotate(10deg);
}

/* Badge con stock disponible */
.stock-available {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: 2px solid #059669;
}

.stock-available::before {
    content: '✓';
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.stock-available:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Badge sin stock */
.stock-none {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: 2px solid #dc2626;
}

.stock-none::before {
    content: '✕';
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.stock-none:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* Badge stock bajo */
.stock-low {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: 2px solid #d97706;
}

.stock-low::before {
    content: '⚠';
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.stock-low:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

/* Botón agregar al carrito - Mejorado */
.btn-add-cart {
    width: 100%;
    padding: 0.875rem 1.25rem;
    margin-top: 0.75rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo animado */
.btn-add-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn-add-cart:hover:not(:disabled)::before {
    left: 100%;
}

.btn-add-cart:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4),
                0 0 0 3px rgba(16, 185, 129, 0.1);
}

.btn-add-cart:disabled {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 1;
    box-shadow: none;
    position: relative;
}

/* Patrón diagonal para estado disabled */
.btn-add-cart:disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(156, 163, 175, 0.1) 10px,
        rgba(156, 163, 175, 0.1) 20px
    );
    pointer-events: none;
}

.btn-add-cart:active:not(:disabled) {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    transition: all 0.1s ease;
}

/* Botón comparar precios */
.btn-compare-prices {
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.btn-compare-prices:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-compare-prices:active {
    transform: translateY(0);
}

.btn-compare-prices.active {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-compare-prices.active::before {
    content: '✓ ';
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
}

.btn-page {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-page:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-page:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-size: 1rem;
    color: var(--gray-700);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 0;
    font-size: 1.2rem;
    color: var(--gray-700);
}

.btn-primary {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
}

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

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 12px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: right 0.3s;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray-700);
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-empty {
    text-align: center;
    color: var(--gray-700);
    padding: 2rem 0;
}

.cart-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--gray-100);
}

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

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.cart-item-price {
    color: var(--success);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    background: var(--gray-200);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.qty-btn:hover {
    background: var(--gray-300);
}

.cart-item-remove {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 2px solid var(--gray-200);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.total-amount {
    color: var(--success);
}

.btn-checkout {
    width: 100%;
    padding: 1rem;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
}

.btn-checkout:hover {
    background: #38a169;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.overlay.active {
    display: block;
}

/* Product Detail Page */
/* Breadcrumbs modernos */
.breadcrumb {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 1rem 0;
    font-size: 0.875rem;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.breadcrumb .container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
}

.breadcrumb a:hover {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(107, 70, 193, 0.2);
}

.breadcrumb a::before {
    content: '🏠';
    margin-right: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.breadcrumb a:hover::before {
    opacity: 1;
}

.breadcrumb span {
    margin: 0 0.25rem;
    color: var(--gray-400);
    font-weight: 300;
    user-select: none;
}

.breadcrumb span:not(:first-child):not(:last-child) {
    color: var(--gray-600);
    font-weight: 400;
}

.breadcrumb span:last-child {
    color: var(--gray-700);
    font-weight: 600;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-detail {
    padding: 2rem 0;
}

.product-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.main-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: var(--gray-100);
}

.product-info h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.product-price {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: 8px;
}

.price-main {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--success);
}

.price-iva {
    font-size: 0.875rem;
    color: var(--gray-700);
}

.provider-badge {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    position: relative;
    cursor: help;
    transition: all 0.3s ease;
    display: inline-block;
    margin-right: 0.5rem;
}

.provider-count {
    font-size: 0.85rem;
    color: var(--gray-700);
    margin-left: 0.5rem;
}

.product-actions {
    margin: 2rem 0;
}

/* Botón agregar al carrito (página de detalle) - Mejorado */
.btn-add-to-cart {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo animado */
.btn-add-to-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn-add-to-cart:hover:not(:disabled)::before {
    left: 100%;
}

.btn-add-to-cart:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4),
                0 0 0 3px rgba(16, 185, 129, 0.1);
}

.btn-add-to-cart:disabled {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 1;
    box-shadow: none;
    position: relative;
}

/* Patrón diagonal para estado disabled */
.btn-add-to-cart:disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(156, 163, 175, 0.1) 10px,
        rgba(156, 163, 175, 0.1) 20px
    );
    pointer-events: none;
}

.btn-add-to-cart:active:not(:disabled) {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    transition: all 0.1s ease;
}

.product-specs {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--gray-200);
}

.product-specs h3 {
    margin-bottom: 1rem;
}

.spec-item {
    display: flex;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.spec-label {
    font-weight: 600;
    width: 150px;
    color: var(--gray-700);
}

.spec-value {
    flex: 1;
}

.price-comparison,
.product-description {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.price-comparison h2,
.product-description h2 {
    margin-bottom: 1.5rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.comparison-card {
    border: 2px solid var(--gray-200);
    padding: 1.5rem;
    border-radius: 8px;
}

.comparison-card.best {
    border-color: var(--success);
    background: rgba(72, 187, 120, 0.05);
}

.comparison-card h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.comparison-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 1rem;
}

.comparison-details {
    font-size: 0.875rem;
    color: var(--gray-700);
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

.provider-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.provider-badge-footer {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

/* Responsive */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .product-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
}
/* ===========================================
   SISTEMA DE IMÁGENES MEJORADO
   =========================================== */

.product-image-container {
    position: relative;
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.image-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    z-index: 1;
}

/* Spinner para image-loader usa el spinner global definido arriba */
.image-loader .spinner {
    width: 40px;
    height: 40px;
}

/* ============================================
   TOAST NOTIFICATIONS - Sistema de notificaciones
   ============================================ */

/* Contenedor de toasts en esquina superior derecha */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* Toast base */
.toast {
    min-width: 300px;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15),
                0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

/* Animación de entrada */
.toast.show {
    transform: translateX(0);
    opacity: 1;
}

/* Animación de salida */
.toast.hide {
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease-in;
}

/* Barra de progreso de auto-dismiss */
.toast::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    width: 100%;
    transform-origin: left;
    animation: toastProgress 5s linear forwards;
}

/* Icono del toast */
.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* Contenido del toast */
.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
}

.toast-message {
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.4;
}

/* Botón de cerrar */
.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 4px;
    line-height: 1;
    color: inherit;
}

.toast-close:hover {
    opacity: 1;
}

/* ============================================
   TOAST VARIANTS - Tipos de notificaciones
   ============================================ */

/* Toast de éxito (verde) */
.toast-success {
    border-left: 4px solid #10b981;
    color: #065f46;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.toast-success .toast-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.toast-success::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

/* Toast de error (rojo) */
.toast-error {
    border-left: 4px solid #ef4444;
    color: #991b1b;
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

.toast-error .toast-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.toast-error::before {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* Toast de info (azul) */
.toast-info {
    border-left: 4px solid #3b82f6;
    color: #1e40af;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.toast-info .toast-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.toast-info::before {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

/* Toast de advertencia (amarillo/naranja) */
.toast-warning {
    border-left: 4px solid #f59e0b;
    color: #92400e;
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}

.toast-warning .toast-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.toast-warning::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

/* Animación de la barra de progreso */
@keyframes toastProgress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
        max-width: 100%;
    }
}

/* ============================================
   BADGES DE ENTREGA INMEDIATA
   ============================================ */

/* Badge pequeño para tarjetas de producto */
.badge-entrega-inmediata {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.4);
    z-index: 10;
    animation: pulse-badge 2s infinite;
    text-transform: uppercase;
}

/* Badge grande para página de detalle */
.badge-entrega-inmediata-large {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
    animation: pulse-badge 2s infinite;
}

/* Animación de pulso suave */
@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 140, 0, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 4px 16px rgba(255, 140, 0, 0.6);
    }
}

/* Efecto hover para badge grande */
.badge-entrega-inmediata-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.5);
}

/* Responsive: Badge más pequeño en móviles */
@media (max-width: 768px) {
    .badge-entrega-inmediata {
        font-size: 0.65rem;
        padding: 0.3rem 0.6rem;
    }

    .badge-entrega-inmediata-large {
        font-size: 0.85rem;
        padding: 0.6rem 1.2rem;
    }
}

/* ... y el resto del archivo */