:root {
    --primary-color: #FF5A00;
    --secondary-color: #003366;
    --accent-color: #FFCC00;
    --background: #f5f5f5;
    --text-dark: #333333;
    --text-light: #666666;
    --success: #4CAF50;
    --error: #F44336;
    --gradient: linear-gradient(135deg, #FF5A00 0%, #FF8C00 100%);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset mejorado */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
    text-rendering: optimizeSpeed;
}

/* Layout mejorado */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Top Bar mejorada */
.top-bar {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.top-bar .left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.top-contact, .top-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Header mejorado */
.header {
    background: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.logo {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.logo:hover {
    opacity: 0.9;
}

.search-bar {
    flex: 1;
    min-width: 250px;
    max-width: 600px;
    display: flex;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 2rem 0 0 2rem;
    font-size: 1rem;
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 90, 0, 0.1);
}

.search-btn {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 0 2rem 2rem 0;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    opacity: 0.9;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.wishlist-btn, .cart-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 1.25rem;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    padding: 0.5rem;
}

.cart-btn {
    color: var(--primary-color);
}

#cart-count {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navegación mejorada */
.main-nav {
    background: white;
    box-shadow: var(--shadow-sm);
    border-top: 3px solid var(--primary-color);
    position: sticky;
    top: 82px;
    z-index: 999;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    padding: 1rem 0;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.nav-links::-webkit-scrollbar {
    height: 4px;
}

.nav-links::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 2px;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    transition: var(--transition);
    font-weight: 500;
    border-radius: 4px;
    white-space: nowrap;
}

.nav-links a:hover {
    background-color: rgba(255, 90, 0, 0.1);
    color: var(--primary-color);
}

.nav-links a.active {
    background-color: var(--primary-color);
    color: white;
}

/* Banner promocional mejorado */
.promo-banner {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.75rem 0;
    text-align: center;
}

.promo-content {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.promo-tag {
    background-color: var(--accent-color);
    color: var(--secondary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Sección de productos mejorada */
.products-section {
    padding: 3rem 0;
}

.section-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: var(--primary-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stock-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--success);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-info {
    padding: 0.5rem 0;
    margin-top: auto;
}

.product-info h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-info .description {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.price {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0.75rem 0;
}

.add-to-cart {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 4px;
    width: 100%;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-to-cart:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 90, 0, 0.2);
}

.out-of-stock {
    color: var(--error);
    font-weight: 600;
    text-align: center;
    padding: 0.75rem;
    background: #fee2e2;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Carrusel mejorado al 100% */
.carousel-container {
    position: relative;
    width: 100%;
    height: 350px;
    margin: 2rem 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.carousel-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
    width: 100%;
}

.carousel-item {
    min-width: 100%;
    flex-shrink: 0;
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.1);
}

.carousel-dot.active {
    background: #fff;
    transform: scale(1.2);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    opacity: 0;
}

.carousel-container:hover .carousel-nav {
    opacity: 1;
}

.carousel-nav:hover {
    background: rgba(0,0,0,0.5);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

/* Sección de información mejorada */
.info-section {
    padding: 3rem 0;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-col {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.info-col:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.info-col h2 {
    background: var(--secondary-color);
    color: white;
    padding: 1rem 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.info-content {
    padding: 1.5rem;
}

.info-content h3 {
    color: var(--primary-color);
    margin: 1rem 0 0.75rem;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.info-content h3:first-child {
    margin-top: 0;
}

.info-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.info-content p, .info-content ul, .info-content ol {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-light);
    font-size: 0.9rem;
}

.info-content ul, .info-content ol {
    padding-left: 1.25rem;
}

.info-content li {
    margin-bottom: 0.5rem;
}

.faq-item {
    margin-bottom: 1.25rem;
}

.faq-item h4 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Footer mejorado */
.footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 3rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.footer-col p {
    margin-bottom: 1rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
    display: inline-block;
}

.footer-col ul li a:hover {
    color: white;
    transform: translateX(5px);
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: white;
    transition: var(--transition);
    font-size: 1.1rem;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

.payment-methods {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.payment-methods i {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.payment-methods i:hover {
    color: white;
}

/* Modales mejorados */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    padding: 1.5rem;
    overflow-y: auto;
    z-index: 1000;
}

.cart-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.cart-header h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
}

.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
    color: var(--text-light);
    background: none;
    border: none;
}

.close-modal:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.cart-items-container {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #eee;
}

.cart-item-content {
    flex: 1;
}

.cart-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.cart-item p {
    color: var(--primary-color);
    font-weight: 600;
}

.remove-item {
    background: none;
    border: none;
    color: var(--error);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
    align-self: flex-start;
}

.remove-item:hover {
    transform: scale(1.2);
}

.cart-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f1f5f9;
}

.cart-total {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: right;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.cart-total span {
    color: var(--primary-color);
}

.checkout-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#checkout-button {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

#checkout-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 90, 0, 0.2);
}

.checkout-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    backdrop-filter: blur(3px);
}

.checkout-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 95%;
    max-width: 500px;
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: var(--shadow-lg);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.checkout-content h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-align: center;
    font-size: 1.5rem;
}

#checkout-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 90, 0, 0.1);
}

.close-checkout {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    background: none;
    border: none;
    padding: 0.5rem;
}

.close-checkout:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.checkout-btn {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.checkout-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 90, 0, 0.2);
}

/* Notificaciones mejoradas */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 3000;
    animation: slideIn 0.3s ease-out;
    max-width: 350px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Estado cuando no hay productos */
.no-products {
    text-align: center;
    padding: 2rem;
    grid-column: 1 / -1;
}

.no-products i {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.no-products h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

/* Animaciones mejoradas */
@keyframes productSlideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.product-card {
    animation: productSlideIn 0.4s ease-out forwards;
    opacity: 0;
}

/* Efecto de carga mejorado */
.skeleton {
    animation: skeleton-loading 1.5s infinite ease-in-out;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive mejorado */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 992px) {
    .header .container {
        gap: 1rem;
    }
    
    .search-bar {
        order: 1;
        width: 100%;
        max-width: 100%;
    }
    
    .carousel-container {
        height: 300px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .carousel-container {
        height: 250px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .top-bar .left {
        justify-content: center;
        width: 100%;
    }
    
    .header-actions {
        margin-left: auto;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-card img {
        height: 160px;
    }
    
    .carousel-container {
        height: 200px;
    }
    
    .checkout-content {
        padding: 1.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .payment-methods {
        justify-content: center;
    }
}

@media (max-width: 400px) {
    .carousel-container {
        height: 180px;
    }
    
    .carousel-nav {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
        padding: 8px;
    }
}