/* ========== VARIABLES CSS ========== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1);
}

/* ========== RESET ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--gray-900); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { border: none; cursor: pointer; font-family: inherit; }

/* ========== HEADER ========== */
.header { position: sticky; top: 0; background: white; box-shadow: var(--shadow-sm); z-index: 1000; transition: all 0.3s; }
.header.scrolled { box-shadow: var(--shadow-md); }
.nav-container { max-width: 1280px; margin: 0 auto; padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 0.5rem; font-size: 1.5rem; font-weight: 700; }
.logo-icon { font-size: 1.75rem; }
.pro { color: var(--primary); }
.nav-menu { display: flex; list-style: none; gap: 2rem; }
.nav-link { color: var(--gray-600); font-weight: 500; transition: color 0.3s; padding: 0.5rem; }
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-link.special { color: var(--secondary); font-weight: 600; }
.cart-button { background: var(--primary); color: white; padding: 0.625rem 1.25rem; border-radius: 0.75rem; display: flex; align-items: center; gap: 0.5rem; transition: all 0.3s; font-weight: 600; }
.cart-button:hover { background: var(--primary-dark); transform: translateY(-2px); }
.snipcart-items-count { background: var(--secondary); color: white; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; }
.mobile-menu-toggle { display: none; flex-direction: column; gap: 4px; background: transparent; padding: 0.5rem; }
.mobile-menu-toggle span { width: 25px; height: 3px; background: var(--gray-900); border-radius: 2px; transition: all 0.3s; }

/* ========== PÁGINAS VIRTUALES ========== */
.page-section { display: none; }
.page-section.active { display: block; }

/* ========== HERO MODERNO ========== */
.hero-modern { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 4rem 1.5rem; }
.hero-content-wrapper { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero-badge-top { display: inline-block; background: rgba(255,255,255,0.2); padding: 0.5rem 1rem; border-radius: 2rem; font-size: 0.875rem; margin-bottom: 1rem; backdrop-filter: blur(10px); }
.hero-main-title { font-size: 3rem; font-weight: 800; line-height: 1.2; margin-bottom: 1rem; }
.gradient-text { background: linear-gradient(to right, #fbbf24, #f59e0b); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-description { font-size: 1.125rem; margin-bottom: 2rem; opacity: 0.95; }
.hero-buttons { display: flex; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.hero-trust-badges { display: flex; gap: 2rem; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 0.75rem; background: rgba(255,255,255,0.15); padding: 0.75rem 1rem; border-radius: 0.75rem; backdrop-filter: blur(10px); }
.trust-icon { font-size: 2rem; }
.trust-text { display: flex; flex-direction: column; }
.trust-text strong { font-size: 1.125rem; }
.trust-text span { font-size: 0.875rem; opacity: 0.9; }
.hero-visual { position: relative; height: 400px; }
.floating-product { position: absolute; background: white; border-radius: 1rem; padding: 0.5rem; box-shadow: var(--shadow-xl); animation: float 6s ease-in-out infinite; }
.floating-product img { border-radius: 0.75rem; width: 280px; height: 280px; object-fit: cover; }
.floating-product.p1 { top: 0; left: 0; animation-delay: 0s; }
.floating-product.p2 { top: 50%; right: 0; animation-delay: 2s; }
.floating-product.p3 { bottom: 0; left: 20%; animation-delay: 4s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

/* ========== SECCIONES ========== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.section-featured, .section-categories-preview, .section-guarantees { padding: 4rem 0; }
.section-header-centered { text-align: center; margin-bottom: 3rem; }
.section-title-big { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.section-subtitle-big { font-size: 1.125rem; color: var(--gray-600); }

/* ========== PRODUCTOS MODERNOS ========== */
.products-grid-modern { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; }
.product-card-modern { background: white; border-radius: 1.25rem; overflow: hidden; box-shadow: var(--shadow-md); transition: all 0.3s; position: relative; }
.product-card-modern:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); }
.product-badge-modern { position: absolute; top: 1rem; right: 1rem; background: var(--danger); color: white; padding: 0.375rem 0.75rem; border-radius: 0.5rem; font-size: 0.75rem; font-weight: 700; z-index: 10; text-transform: uppercase; }
.product-image-modern { position: relative; padding-top: 100%; overflow: hidden; cursor: pointer; }
.product-image-modern img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.product-card-modern:hover .product-image-modern img { transform: scale(1.05); }
.product-hover-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); opacity: 0; display: flex; align-items: center; justify-content: center; transition: opacity 0.3s; }
.product-card-modern:hover .product-hover-overlay { opacity: 1; }
.view-btn { color: white; background: var(--primary); padding: 0.75rem 1.5rem; border-radius: 0.5rem; font-weight: 600; }
.product-info-modern { padding: 1.5rem; }
.product-category-tag { display: inline-block; font-size: 0.75rem; color: var(--primary); background: rgba(37,99,235,0.1); padding: 0.25rem 0.75rem; border-radius: 1rem; margin-bottom: 0.5rem; }
.product-name-modern { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.5rem; cursor: pointer; }
.product-name-modern:hover { color: var(--primary); }
.product-desc-short { font-size: 0.875rem; color: var(--gray-600); margin-bottom: 0.75rem; }
.product-rating-modern { font-size: 0.875rem; margin-bottom: 1rem; }
.reviews-count { color: var(--gray-600); }
.product-footer-modern { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.price-section-modern { display: flex; flex-direction: column; gap: 0.25rem; }
.price-old-modern { font-size: 0.875rem; color: var(--gray-600); text-decoration: line-through; }
.price-current-modern { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.discount-label { display: inline-block; background: var(--secondary); color: white; padding: 0.125rem 0.5rem; border-radius: 0.25rem; font-size: 0.75rem; font-weight: 700; }
.btn-add-cart-modern { background: var(--success); color: white; padding: 0.625rem 1.25rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 600; transition: all 0.3s; }
.btn-add-cart-modern:hover { background: #059669; transform: translateY(-2px); }

/* ========== CTA VER TODO ========== */
.cta-view-all { text-align: center; margin-top: 3rem; padding: 3rem 2rem; background: var(--gray-50); border-radius: 1.25rem; }
.cta-view-all p { font-size: 1.25rem; color: var(--gray-700); margin-bottom: 1.5rem; }

/* ========== CATEGORÍAS ========== */
.categories-grid-modern { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.category-card-modern { background: white; border-radius: 1rem; padding: 2rem; text-align: center; box-shadow: var(--shadow-md); transition: all 0.3s; cursor: pointer; }
.category-card-modern:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.category-icon-big { font-size: 3rem; margin-bottom: 1rem; }
.category-card-modern h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.category-card-modern p { color: var(--gray-600); }

/* ========== GARANTÍAS ========== */
.guarantees-grid-modern { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.guarantee-card { text-align: center; padding: 2rem; }
.guarantee-icon-modern { font-size: 3rem; margin-bottom: 1rem; }
.guarantee-card h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.5rem; }
.guarantee-card p { color: var(--gray-600); font-size: 0.875rem; }

/* ========== CATÁLOGO ========== */
.catalog-header, .packs-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 3rem 1.5rem; text-align: center; }
.catalog-title, .packs-title { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.catalog-subtitle, .packs-subtitle { font-size: 1.125rem; opacity: 0.95; }
.filters-bar { background: white; padding: 1.5rem 0; border-bottom: 1px solid var(--gray-200); }
.filters-container { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.filter-btn { padding: 0.75rem 1.5rem; border-radius: 2rem; background: var(--gray-100); color: var(--gray-700); font-weight: 600; transition: all 0.3s; }
.filter-btn:hover { background: var(--gray-200); }
.filter-btn.active { background: var(--primary); color: white; }
.catalog-products-section { padding: 3rem 0; }
.products-grid-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; }

/* ========== PACKS ========== */
.packs-grid-section { padding: 3rem 0; }
.packs-grid-modern { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.pack-card-modern { background: white; border-radius: 1.25rem; padding: 2rem; position: relative; box-shadow: var(--shadow-lg); transition: all 0.3s; }
.pack-card-modern:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); }
.pack-card-modern.featured-pack { border: 3px solid var(--secondary); }
.pack-badge-top { position: absolute; top: -12px; right: 1rem; background: var(--secondary); color: white; padding: 0.5rem 1rem; border-radius: 0.75rem; font-weight: 700; font-size: 0.875rem; box-shadow: var(--shadow-md); }
.pack-icon { font-size: 3rem; text-align: center; margin-bottom: 1rem; }
.pack-name { font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; text-align: center; }
.pack-includes { list-style: none; margin-bottom: 1.5rem; }
.pack-includes li { padding: 0.5rem 0; border-bottom: 1px solid var(--gray-200); color: var(--gray-700); }
.pack-pricing { display: flex; align-items: center; gap: 1rem; justify-content: center; margin-bottom: 1.5rem; }
.pack-price-old { font-size: 1.125rem; color: var(--gray-600); text-decoration: line-through; }
.pack-price-now { font-size: 2rem; font-weight: 800; color: var(--primary); }

/* ========== MODAL PRODUCTO ========== */
.product-modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999; }
.product-modal.active { display: block; }
.modal-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); }
.modal-content { position: relative; background: white; max-width: 900px; margin: 2rem auto; border-radius: 1.5rem; overflow: hidden; max-height: 90vh; overflow-y: auto; animation: modalSlide 0.3s ease-out; }
@keyframes modalSlide { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: white; width: 40px; height: 40px; border-radius: 50%; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-md); z-index: 10; }
.modal-close:hover { background: var(--gray-100); }
.modal-body { display: grid; grid-template-columns: 1fr 1fr; }
.modal-image-section { background: var(--gray-100); padding: 2rem; display: flex; align-items: center; justify-content: center; }
.modal-image-section img { max-width: 100%; border-radius: 1rem; }
.modal-info-section { padding: 2rem; }
.modal-category { display: inline-block; font-size: 0.75rem; color: var(--primary); background: rgba(37,99,235,0.1); padding: 0.25rem 0.75rem; border-radius: 1rem; margin-bottom: 1rem; }
.modal-title { font-size: 2rem; font-weight: 800; margin-bottom: 1rem; }
.modal-rating { font-size: 1rem; margin-bottom: 1.5rem; }
.modal-price-section { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.modal-price-old { font-size: 1.25rem; color: var(--gray-600); text-decoration: line-through; }
.modal-price-current { font-size: 2.5rem; font-weight: 800; color: var(--primary); }
.modal-description { font-size: 1rem; color: var(--gray-700); line-height: 1.8; margin-bottom: 1.5rem; }
.modal-features { margin-bottom: 2rem; }
.modal-features ul { list-style: none; }
.modal-features li { padding: 0.5rem 0; color: var(--gray-700); }
.modal-actions { margin-bottom: 1.5rem; }
.modal-guarantees { display: flex; gap: 1rem; flex-wrap: wrap; }
.mini-guarantee { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--gray-700); }
.mini-guarantee span { color: var(--success); }

/* ========== BOTONES ========== */
.btn { display: inline-block; padding: 0.875rem 1.75rem; border-radius: 0.75rem; font-weight: 600; transition: all 0.3s; text-align: center; }
.btn-primary { background: var(--primary); color: white; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-secondary { background: white; color: var(--primary); border: 2px solid var(--primary); }
.btn-secondary:hover { background: var(--gray-50); }
.btn-xl { padding: 1rem 2rem; font-size: 1.125rem; }
.btn-xxl { padding: 1.25rem 2.5rem; font-size: 1.25rem; }
.btn-block { width: 100%; display: block; }

/* ========== FOOTER ========== */
.footer { background: var(--gray-900); color: white; padding: 3rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-brand { font-size: 1.5rem; margin-bottom: 1rem; }
.footer-col p { color: rgba(255,255,255,0.8); margin-bottom: 1rem; }
.social-links { display: flex; gap: 0.75rem; }
.social-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: rgba(255,255,255,0.1); border-radius: 50%; transition: all 0.3s; }
.social-btn:hover { background: var(--primary); transform: translateY(-3px); }
.footer-col h4 { margin-bottom: 1rem; }
.footer-menu { list-style: none; }
.footer-menu li { margin-bottom: 0.5rem; }
.footer-menu a { color: rgba(255,255,255,0.7); transition: color 0.3s; }
.footer-menu a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { color: rgba(255,255,255,0.6); margin: 0; }
.payment-badges { display: flex; gap: 1rem; flex-wrap: wrap; }
.payment-badges span { font-size: 0.875rem; color: rgba(255,255,255,0.6); }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .hero-content-wrapper { grid-template-columns: 1fr; }
    .hero-visual { height: 300px; }
    .hero-main-title { font-size: 2.5rem; }
    .modal-body { grid-template-columns: 1fr; }
    .modal-image-section { padding: 1.5rem; }
}

@media (max-width: 768px) {
    .mobile-menu-toggle { display: flex; }
    .nav-menu { position: fixed; top: 70px; left: -100%; width: 100%; height: calc(100vh - 70px); background: white; flex-direction: column; padding: 2rem; transition: left 0.3s; box-shadow: var(--shadow-xl); align-items: flex-start; }
    .nav-menu.active { left: 0; }
    .hero-main-title { font-size: 2rem; }
    .hero-description { font-size: 1rem; }
    .hero-buttons { flex-direction: column; }
    .section-title-big { font-size: 2rem; }
    .products-grid-modern, .products-grid-catalog { grid-template-columns: 1fr; }
    .packs-grid-modern { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .hero-main-title { font-size: 1.75rem; }
    .cart-button { padding: 0.5rem 1rem; font-size: 0.875rem; }
}

/* Corrección para que el carrito se ponga por encima del menú pegajoso */
.snipcart-modal__container { z-index: 999999 !important; }


/* ========== ANIMACIÓN DE AÑADIR AL CARRITO ========== */
.flying-dot {
    position: fixed;
    width: 20px;
    height: 20px;
    background-color: var(--secondary); /* Color naranja para que destaque */
    border-radius: 50%;
    pointer-events: none; /* Para que no bloquee otros clics mientras vuela */
    z-index: 9999999;
    /* La curva de animación hace que empiece rápido y frene al llegar */
    transition: transform 0.9s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease-in;
    margin-left: -10px;
    margin-top: -10px;
    box-shadow: var(--shadow-md);
}

/* Efecto de saltito en el botón del carrito */
.cart-pop {
    animation: cartPopAnim 0.3s ease-in-out;
}

@keyframes cartPopAnim {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}