/* ===================================
   VARIABLES Y RESET
   =================================== */

:root {
    --primary: #ff5b97;
    --secondary: #38b6ff;
    --accent: #fff500;
    --dark: #1a1a1a;
    --text: #2d2d2d;
    --light: #f8f9fa;
    --white: #ffffff;
    --gray: #6b7280;
    --border: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
}

body.dark-mode {
    --dark: #ffffff;
    --text: #e0e0e0;
    --white: #1a1a1a;
    --light: #2d2d2d;
    --gray: #9ca3af;
    --border: #374151;
    --shadow: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--light);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===================================
   HEADER
   =================================== */

.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px var(--shadow);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.brand {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 0.85rem;
    color: var(--gray);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.theme-toggle {
    background: none;
    border: 2px solid var(--border);
    font-size: 1.5rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--primary);
}

.contact-info span {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
}

/* ===================================
   HERO SECTION
   =================================== */

.hero {
    background: var(--gradient);
    padding: 4rem 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><circle cx="30" cy="30" r="1.5" fill="white" fill-opacity="0.1"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ===================================
   FILTROS
   =================================== */

.filters-section {
    background: var(--white);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
}

.filters-title {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--text);
}

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

.filter-btn {
    background: var(--light);
    border: 2px solid var(--border);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

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

.filter-btn.active {
    background: var(--gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(255, 91, 151, 0.3);
}

.filter-icon {
    font-size: 1.2rem;
}

/* ===================================
   PRODUCTOS
   =================================== */

.products-section {
    padding: 4rem 0;
    min-height: 500px;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
}

.products-count {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
}

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

.product-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid var(--border);
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow);
}

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

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    color: var(--dark);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    z-index: 2;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.product-category {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.product-description {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-price-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

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

.product-discount {
    background: #10b981;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

.view-details-btn {
    width: 100%;
    background: var(--gradient);
    color: white;
    border: none;
    padding: 0.9rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.view-details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 91, 151, 0.4);
}

/* ===================================
   MODAL
   =================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: 25px;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1001;
    margin: 2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--white);
    border: 2px solid var(--border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: rotate(90deg);
}

.modal-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3rem;
}

/* Galería del Modal */
.modal-gallery {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.modal-main-image {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--gradient);
    margin-bottom: 1rem;
}

.modal-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-navigation {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    transform: translateY(-50%);
}

.nav-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.image-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.modal-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.8rem;
}

.thumbnail {
    width: 100%;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail:hover {
    border-color: var(--primary);
}

.thumbnail.active {
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(255, 91, 151, 0.4);
}

/* Información del Modal */
.modal-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--dark);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    width: fit-content;
}

.modal-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

.modal-price {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.price-current {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary);
}

.price-original {
    font-size: 1.5rem;
    color: var(--gray);
    text-decoration: line-through;
}

.modal-description {
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.7;
}

.modal-features {
    display: grid;
    gap: 1rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 15px;
    transition: all 0.3s;
}

.feature-item:hover {
    background: var(--gradient);
    color: white;
    transform: translateX(5px);
}

.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.feature-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.feature-content p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.modal-specs {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 15px;
}

.modal-specs h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.specs-list {
    display: grid;
    gap: 0.8rem;
}

.spec-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 700;
    color: var(--text);
}

.spec-value {
    color: var(--gray);
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-whatsapp,
.btn-share {
    padding: 1rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
    text-align: center;
}

.btn-whatsapp {
    background: #25d366;
    color: white;
}

.btn-whatsapp:hover {
    background: #128c7e;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
}

.btn-share {
    background: var(--light);
    color: var(--text);
    border: 2px solid var(--border);
}

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

.modal-guarantees {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.guarantee-item {
    text-align: center;
    padding: 0.8rem;
    background: var(--light);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ===================================
   FOOTER
   =================================== */

.footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.footer-section p {
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--gray);
    font-size: 0.9rem;
}

/* ===================================
   WHATSAPP FLOTANTE
   =================================== */

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    text-decoration: none;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.5);
    z-index: 999;
    transition: all 0.3s;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.6);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 5px 20px rgba(37, 211, 102, 0.5);
    }
    50% {
        box-shadow: 0 5px 30px rgba(37, 211, 102, 0.8);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 968px) {
    .hero-title {
        font-size: 2rem;
    }

    .modal-layout {
        grid-template-columns: 1fr;
        padding: 2rem;
    }

    .modal-gallery {
        position: relative;
        top: 0;
    }

    .modal-main-image {
        height: 350px;
    }

    .modal-actions {
        grid-template-columns: 1fr;
    }

    .modal-guarantees {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .header-actions {
        gap: 1rem;
    }

    .contact-info span {
        font-size: 0.8rem;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 3rem 1rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .filter-btn {
        flex-shrink: 0;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .modal-title {
        font-size: 1.8rem;
    }

    .price-current {
        font-size: 2rem;
    }

    .brand {
        font-size: 1.5rem;
    }

    .contact-info {
        display: none;
    }
}