/* Custom styles for the new design */
body {
    font-family: 'Inter', sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    padding-top: 0 !important;
    overflow-x: hidden;
}

/* Header translúcido con blur */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    padding: 0.75rem 0;
    overflow: visible;
}

[data-theme="dark"] .main-header {
    background: rgba(45, 45, 45, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .main-header {
        background: rgba(45, 45, 45, 0.9) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
}

.main-header .navbar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.main-header .navbar-brand:hover {
    color: var(--secondary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow: visible;
}

.header-btn {
    background: none;
    border: 2px solid transparent;
    color: var(--text-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.header-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.theme-toggle-btn {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.cart-btn {
    background: none;
    color: var(--text-color);
}

.cart-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: #333;
    border-radius: 6px;
    min-width: 18px;
    height: 18px;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.4);
    z-index: 10;
}

[data-theme="dark"] .cart-badge {
    background: var(--secondary-color);
    color: #333;
    box-shadow: 0 2px 8px rgba(80, 227, 194, 0.4);
}

/* Hero Carousel */
.hero-section {
    margin-top: 0;
    height: 100vh;
    min-height: 700px;
    position: relative;
    overflow: hidden;
}

.hero-carousel {
    height: 100%;
}

.hero-carousel .carousel-inner {
    height: 100%;
}

.hero-carousel .carousel-item {
    height: 100%;
}

.hero-slide {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255,255,255,0.08) 0%, transparent 50%);
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-bottom: 2rem;
    opacity: 0.95;
    font-weight: 300;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-cta {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.hero-cta:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.hero-slide:nth-child(2) {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.hero-slide:nth-child(3) {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

/* Barra de progreso del hero */
.hero-progress-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 20;
}

.hero-progress-bar {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.hero-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, white, rgba(255, 255, 255, 0.8));
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.hero-progress-dots {
    display: flex;
    gap: 10px;
}

.progress-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.6);
}

.progress-dot.active {
    background: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.progress-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

/* SVG icons in CTAs */
.hero-cta svg {
    transition: transform 0.3s ease;
}

.hero-cta:hover svg {
    transform: translateX(5px);
}

/* Product catalog section */
.catalog-section {
    padding: 4rem 0 2rem;
    background: var(--background-color);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Filtros modernos */
.filter-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

[data-theme="dark"] .filter-container {
    background: rgba(45, 45, 45, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .filter-container {
        background: rgba(45, 45, 45, 0.9) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
}

.search-box {
    position: relative;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Asegurar que el ícono de búsqueda siempre sea visible */
.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    z-index: 10;
    display: block !important;
    opacity: 1 !important;
    font-size: 1.1rem;
}

.search-input:focus + .search-icon,
.search-input:focus ~ .search-icon {
    display: block !important;
    opacity: 1 !important;
}


.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.category-btn {
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 0.6rem 1.2rem;
    border-radius: calc(20px + 1.5rem); /* 20px (contenedor) + 24px (padding 1.5rem) = 44px */
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-btn:hover {
    background: #f8f9fa;
    border-color: #333;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.category-btn.active {
    background: #333;
    border-color: #333;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

[data-theme="dark"] .category-btn {
    background: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .category-btn:hover {
    background: var(--dropdown-link-hover-bg);
    border-color: white;
    color: white;
}

[data-theme="dark"] .category-btn.active {
    background: white;
    border-color: white;
    color: #333;
}

/* Grid de productos mejorado */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

.products-grid-search {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Paginación */
.pagination-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
    gap: 1rem;
}

.pagination-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 1rem;
}

.pagination-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-numbers {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    flex-wrap: wrap;
}

.pagination-btn {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(.disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

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

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

.pagination-btn svg {
    width: 14px;
    height: 14px;
}

@media (max-width: 768px) {
    .pagination-container {
        margin-top: 2rem;
        gap: 0.75rem;
    }
    
    .pagination-info {
        text-align: center;
        margin: 0;
    }

    .pagination-nav {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .pagination-numbers {
        gap: 0.2rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .pagination-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        min-width: 36px;
    }

    .pagination-nav {
        flex-wrap: wrap;
        gap: 0.3rem;
        justify-content: center;
    }

    .pagination-numbers {
        gap: 0.15rem;
    }
}

/* Reemplazar estilos de .product-card existentes */
.product-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid transparent;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.product-card .badge-container {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: flex;
    gap: 8px;
}

.product-badge {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.badge-sale { background: linear-gradient(135deg, #ff6b6b, #ff4757); color: white; }
.badge-new { background: linear-gradient(135deg, #4CAF50, #45a049); color: white; }
.badge-low-stock { background: linear-gradient(135deg, #FFA726, #FB8C00); color: white; }

.product-image-wrapper {
    position: relative;
    padding-top: 75%; /* Aspect ratio 4:3 */
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

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

.product-header {
    margin-bottom: 0.75rem;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap; /* Permitir wrap para estrellas y descuento */
    gap: 0.5rem;
}

.product-price-group {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap; /* Permitir wrap del precio + descuento */
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.product-price-original {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap; /* Wrap de estrellas si no caben */
}

.star {
    color: #ffd700;
    font-size: 0.85rem;
}

.product-actions {
    margin-top: auto;
    display: flex;
    gap: 0.5rem;
}

.quick-add-btn {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.quick-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.quick-add-btn.disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

.quick-view-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.quick-view-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .product-card {
        border-radius: 12px;
    }
    
    .product-content {
        padding: 1rem;
    }
    
    .product-name {
        font-size: 0.9rem;
    }
    
    .product-price {
        font-size: 1.25rem;
    }
    
    .quick-add-btn {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
}

/* Loading and empty states */
.loading-state,
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.empty-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        height: 100vh;
        min-height: 500px;
    }

    .header-actions {
        gap: 0.5rem;
    }

    .header-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .hero-progress-container {
        bottom: 20px;
    }

    .hero-progress-bar {
        width: 150px;
        height: 2px;
    }

    .progress-dot {
        width: 6px;
        height: 6px;
    }

    .hero-subtitle {
        font-size: clamp(0.9rem, 2vw, 1rem);
        padding: 0 1rem;
    }

    .hero-cta {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Offcanvas z-index fix */
.offcanvas {
    z-index: 1060 !important;
}

.offcanvas-backdrop {
    z-index: 1055 !important;
}

/* Optimizaciones para móviles */
@media (max-width: 768px) {
    .filter-container {
        background: rgba(255, 255, 255, 0.9) !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        padding: 0.5rem !important;
        margin-bottom: 1rem !important;
        border-radius: 15px !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
    }

    [data-theme="dark"] .filter-container {
        background: rgba(45, 45, 45, 0.95) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
    }

    .search-box {
        margin-bottom: 0.75rem !important;
    }

    .search-input {
        padding: 0.6rem 1rem 0.6rem 2.5rem !important;
        font-size: 0.85rem !important;
        border-radius: 12px !important;
    }

    .search-icon {
        font-size: 0.9rem !important;
        left: 0.75rem !important;
    }

    .category-filters {
        gap: 0.3rem !important;
    }

    .category-btn {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.75rem !important;
        border-radius: calc(15px + 0.5rem) !important; /* 15px (contenedor) + 8px (padding 0.5rem) = 23px */
    }

    /* Optimización de badges para móviles */
    .product-badge {
        padding: 2px 6px !important;
        font-size: 0.65rem !important;
        line-height: 1.2 !important;
        border-radius: 12px !important;
        font-weight: 500 !important;
    }

    .badge-sale {
        min-height: 18px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .filter-container {
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        padding: 0.4rem !important;
        margin-bottom: 0.75rem !important;
        border-radius: 12px !important;
        border: 1px solid rgba(255, 255, 255, 0.4) !important;
    }

    [data-theme="dark"] .filter-container {
        background: rgba(45, 45, 45, 0.98) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
    }

    .search-box {
        margin-bottom: 0.5rem !important;
    }

    .search-wrapper {
        padding: 0.2rem !important;
        margin-bottom: 0.4rem !important;
    }

    .search-input-group {
        padding: 0.3rem 0.6rem !important;
    }

    .search-input {
        padding: 0.5rem 0.7rem 0.5rem 2rem !important;
        font-size: 0.8rem !important;
        border-radius: 10px !important;
    }

    .search-icon {
        font-size: 0.8rem !important;
        left: 0.6rem !important;
    }

    .category-filters {
        gap: 0.25rem !important;
        flex-wrap: wrap !important;
    }

    .category-btn {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.7rem !important;
        border-radius: calc(12px + 0.4rem) !important; /* 12px (contenedor) + 6.4px (padding 0.4rem) = 18px */
        min-height: 28px !important;
    }
}

/* Para pantallas muy pequeñas (menos de 360px) */
@media (max-width: 360px) {
    .filter-container {
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        padding: 0.3rem !important;
        margin-bottom: 0.5rem !important;
        border-radius: 10px !important;
    }

    [data-theme="dark"] .filter-container {
        background: rgba(45, 45, 45, 0.99) !important;
    }

    .search-box {
        margin-bottom: 0.4rem !important;
    }

    .search-input {
        padding: 0.4rem 0.6rem 0.4rem 1.8rem !important;
        font-size: 0.75rem !important;
        border-radius: 8px !important;
    }

    .search-icon {
        font-size: 0.75rem !important;
        left: 0.5rem !important;
    }

    .category-filters {
        gap: 0.2rem !important;
    }

    .category-btn {
        padding: 0.2rem 0.4rem !important;
        font-size: 0.65rem !important;
        border-radius: calc(10px + 0.3rem) !important; /* 10px (contenedor) + 4.8px (padding 0.3rem) = 15px */
        min-height: 24px !important;
    }
}

/* Ocultar botón flotante de tema */
.theme-toggle {
    display: none !important;
}

/* Estilos del Modal de Producto - Versión simplificada */
/* Modal más simple y limpio, similar al ejemplo proporcionado */
.product-modal-dialog {
    width: 90%;
    max-width: 900px;
    height: auto;
    margin: 2rem auto;
}

.product-modal-content {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-modal-header {
    background: var(--card-bg);
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: between;
    align-items: center;
}

.product-modal-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.product-modal-btn-close.header-close {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.product-modal-btn-close.header-close:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Botón cerrar flotante fijo */
.product-modal-btn-close.fixed-close {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1060;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    border-radius: 50px;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    min-width: 120px;
}

.product-modal-btn-close.fixed-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .product-modal-btn-close.fixed-close {
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

[data-theme="dark"] .product-modal-btn-close.fixed-close:hover {
    background: rgba(45, 45, 45, 0.9);
}

.product-modal-body {
    padding: 1.5rem;
    background: var(--card-bg);
    flex: 1;
    padding-bottom: 8rem; /* Aumentado considerablemente para mayor espacio para el botón flotante */
}

.product-image-container {
    margin-bottom: 1rem;
}

.product-carousel {
    border-radius: 10px;
    overflow: hidden;
    background: var(--background-color);
}

.product-modal-image {
    height: 300px;
    width: 100%;
    object-fit: cover;
    border-radius: 0;
}

.product-carousel-control {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    width: 35px;
    height: 35px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
}

.product-carousel-control:hover {
    opacity: 1;
}

.product-carousel-indicators {
    margin-bottom: 0.5rem;
}

.product-carousel-indicators button {
    background: var(--border-color);
    border-radius: 50%;
    width: 8px;
    height: 8px;
    margin: 0 3px;
}

.product-carousel-indicators button.active {
    background: var(--primary-color);
}

.product-info-container {
    padding: 0;
}

.product-modal-name {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.product-modal-badges {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.product-price-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    display: inline-block;
}

.product-stock-badge {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Sección de precios con descuento - similar al carrito */
.product-price-section {
    background: var(--background-color);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.product-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.product-price-row:last-child {
    margin-bottom: 0;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    font-weight: 600;
}

.product-price-label {
    font-size: 0.9rem;
    color: var(--text-color);
}

.product-price-value {
    font-size: 0.9rem;
    color: var(--text-color);
}

.product-discount-row .product-price-label,
.product-discount-row .product-price-value {
    color: var(--success-color, #28a745);
}

.product-original-price {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.product-discount-badge {
    background: var(--success-color, #28a745);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.product-description-wrapper {
    background: var(--background-color);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.description-title {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.product-modal-description {
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    font-size: 0.9rem;
}

.product-modal-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.product-modal-btn-close,
.product-modal-btn-add {
    border-radius: 6px;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border: 1px solid;
}

.product-modal-btn-close {
    background: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

.product-modal-btn-close:hover {
    background: var(--background-color);
    border-color: var(--text-muted);
}

.product-modal-btn-add {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.product-modal-btn-add:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-1px);
}

/* Mostrar solo botón cerrar del header en desktop */
@media (min-width: 992px) {
    .product-modal-header .header-close { 
        display: none !important; 
    }
    .product-modal-footer { 
        display: none !important; 
    }
    .product-modal-btn-close.fixed-close {
        display: inline-flex !important;
    }
}

/* Responsive para tablets */
@media (max-width: 991.98px) {
    .product-modal-header .header-close { 
        display: none !important; 
    }
    .product-modal-footer { 
        display: none !important; 
    }
    .product-modal-btn-close.fixed-close {
        display: inline-flex !important;
    }
}

/* Contenedor de descripción desplazable para textos largos */
.product-description-wrapper {
    background: var(--background-color);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    max-height: 40vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.description-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.product-modal-description {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

.product-modal-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.product-modal-btn-close,
.product-modal-btn-add {
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.product-modal-btn-close:hover {
    background: var(--text-muted);
    color: white;
    transform: translateY(-2px);
}

.product-modal-btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .product-modal-dialog {
        width: 95%;
        margin: 1rem auto;
        max-height: calc(100vh - 2rem); /* Asegurar altura máxima que permita scroll */
    }

    .product-modal-content {
        max-height: calc(100vh - 2rem);
        overflow-y: auto; /* Permitir scroll vertical */
    }

    .product-modal-header {
        padding: 1rem;
    }

    .product-modal-title {
        font-size: 1.1rem;
    }

    .product-modal-body {
        padding: 1rem;
        padding-bottom: 9rem; /* Aumentado considerablemente para mayor espacio para el botón flotante en tablet */
    }

    .product-modal-image {
        height: 250px;
    }

    .product-modal-name {
        font-size: 1.3rem;
    }

    .product-modal-badges {
        flex-direction: column;
        gap: 0.5rem;
    }

    .product-price-badge,
    .product-stock-badge {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
        text-align: center;
    }

    .product-description-wrapper {
        padding: 0.8rem;
    }

    .product-modal-footer {
        display: none !important; /* Ocultar footer completamente */
    }

    .product-modal-btn-close.fixed-close {
        bottom: 15px;
        padding: 0.7rem 1.3rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .product-modal-dialog {
        width: 98%;
        margin: 0.5rem auto;
        max-height: calc(100vh - 1rem); /* Altura máxima optimizada para móvil */
    }

    .product-modal-content {
        max-height: calc(100vh - 1rem);
        overflow-y: auto; /* Scroll vertical para móvil */
    }

    .product-modal-header {
        padding: 0.8rem;
    }

    .product-modal-title {
        font-size: 1rem;
    }

    .product-modal-body {
        padding: 0.8rem;
        padding-bottom: 10rem; /* Aumentado considerablemente para mayor espacio para botón flotante en móvil */
    }

    .product-modal-image {
        height: 200px;
    }

    .product-modal-name {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }

    .product-description-wrapper {
        padding: 0.6rem;
    }

    .description-title {
        font-size: 0.9rem;
    }

    .product-modal-description {
        font-size: 0.85rem;
    }

    .product-description-wrapper {
        margin-bottom: 2rem; /* Margen adicional para el contenedor de descripción */
    }

    .product-modal-btn-close.fixed-close {
        bottom: 10px;
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
        min-width: 100px;
    }
}

/* Dark theme specific adjustments */
[data-theme="dark"] .hero-slide {
    background: linear-gradient(135deg, #2d3436, #34495e);
}

[data-theme="dark"] .hero-slide:nth-child(2) {
    background: linear-gradient(135deg, #4a69bd, #5f27cd);
}

[data-theme="dark"] .hero-slide:nth-child(3) {
    background: linear-gradient(135deg, #8e44ad, #c0392b);
}

/* Dark theme modal adjustments */
[data-theme="dark"] .product-modal-content {
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
}

[data-theme="dark"] .product-modal-close {
    background: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .product-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Footer Styles */
.site-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.5;
}

.footer-content {
    padding: 4rem 0 3rem;
    background: var(--background-color);
}

.footer-brand {
    margin-bottom: 2rem;
}

.footer-logo {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-description {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--background-color);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

.footer-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li {
    margin-bottom: 0.75rem;
}

.footer-list a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.footer-list a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-list a::before {
    content: '⚓';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.footer-list a:hover::before {
    opacity: 0.5;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.contact-item i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

/* Newsletter Section */
.footer-newsletter {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.newsletter-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.newsletter-text {
    color: var(--text-muted);
    margin-bottom: 0;
    font-size: 0.95rem;
}

.newsletter-form {
    max-width: 500px;
    margin-left: auto;
}

.newsletter-input {
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border-radius: 50px 0 0 50px;
    transition: all 0.3s ease;
}

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

/* Estilos para el placeholder del newsletter input */
.newsletter-input::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.8 !important;
}

.newsletter-input::-webkit-input-placeholder {
    color: var(--text-muted) !important;
    opacity: 0.8 !important;
}

.newsletter-input::-moz-placeholder {
    color: var(--text-muted) !important;
    opacity: 0.8 !important;
}

.newsletter-input:-ms-input-placeholder {
    color: var(--text-muted) !important;
    opacity: 0.8 !important;
}

.newsletter-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 0 50px 50px 0;
    transition: all 0.3s ease;
}

.newsletter-btn:hover {
    transform: translateX(2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
    color: white;
}

/* Footer Bottom */
.footer-bottom {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

.copyright-text {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.9rem;
}

.payment-methods {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.payment-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.payment-methods i {
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.payment-methods i:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px) rotate(360deg);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.4);
}

/* Dark Theme Adjustments */
[data-theme="dark"] .footer-content {
    background: #1a1a1a;
}

[data-theme="dark"] .footer-bottom {
    background: #0d0d0d;
}

[data-theme="dark"] .social-link {
    background: #2d2d2d;
    border-color: #3d3d3d;
}

[data-theme="dark"] .footer-newsletter {
    background: #2d2d2d;
    border-color: #3d3d3d;
}

[data-theme="dark"] .newsletter-input {
    background: #1a1a1a;
    border-color: #3d3d3d;
}

/* Estilos para placeholder en tema oscuro */
[data-theme="dark"] .newsletter-input::placeholder {
    color: #a1a1aa !important;
    opacity: 0.9 !important;
}

[data-theme="dark"] .newsletter-input::-webkit-input-placeholder {
    color: #a1a1aa !important;
    opacity: 0.9 !important;
}

[data-theme="dark"] .newsletter-input::-moz-placeholder {
    color: #a1a1aa !important;
    opacity: 0.9 !important;
}

[data-theme="dark"] .newsletter-input:-ms-input-placeholder {
    color: #a1a1aa !important;
    opacity: 0.9 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .footer-content {
        padding: 3rem 0 2rem;
    }

    .footer-logo {
        font-size: 1.5rem;
    }

    .footer-newsletter {
        padding: 1.5rem;
    }

    .newsletter-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .newsletter-form {
        margin-top: 1rem;
    }

    .payment-methods {
        justify-content: center;
        margin-top: 1rem;
    }

    .copyright-text {
        text-align: center;
    }

    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .footer-brand,
    .footer-links,
    .footer-contact {
        margin-bottom: 2rem;
    }

    .footer-title {
        font-size: 1rem;
    }

    .footer-list a,
    .contact-item,
    .footer-description {
        font-size: 0.85rem;
    }

    .newsletter-input,
    .newsletter-btn {
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
    }

    .payment-methods i {
        font-size: 1.2rem;
    }
}