/* Variables y Diseño Base */
:root {
    --color-bg: #FFFFFF;
    --color-text: #000000;
    --color-text-light: #666666;
    --color-primary: #008a72; /* Verde corporativo */
    --color-primary-dark: #006b58;
    --color-surface: #FFFFFF;
    --color-border: #EAE6DF;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    color: var(--color-text);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--color-text);
    color: var(--color-text);
}

.btn-outline:hover {
    background-color: var(--color-text);
    color: var(--color-bg);
}

.btn-text {
    padding: 0;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: none;
    letter-spacing: 0;
    border-radius: 0;
    border-bottom: 1px solid transparent;
}

.btn-text:hover {
    border-bottom: 1px solid var(--color-primary);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.2rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.8rem 0;
    background: rgba(255, 255, 255, 1);
    box-shadow: var(--shadow-sm);
}

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

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1100;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-text);
    margin: 5px 0;
    transition: var(--transition);
}

.logo img {
    height: 60px;
    object-fit: contain;
    mix-blend-mode: multiply; /* Elimina el fondo blanco del logo */
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown .dropdown-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--color-surface);
    min-width: 160px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    z-index: 1001;
    transform: translateY(10px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.nav-dropdown:hover .dropdown-content {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content a {
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    color: var(--color-text);
    font-size: 0.85rem;
}

.dropdown-content a::after {
    display: none; /* Quitamos la rayita animada dentro del dropdown */
}

.dropdown-content a:hover {
    background-color: var(--color-bg);
    color: var(--color-primary);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: zoomOut 20s infinite alternate;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(250, 249, 246, 0.3), rgba(250, 249, 246, 0.9));
}

.hero-content {
    text-align: center;
    max-width: 800px;
    padding: 0 2rem;
    z-index: 1;
    margin-top: 4rem;
}

.hero-content h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.hero-content h1 em {
    font-style: italic;
    color: var(--color-primary-dark);
}

.hero-content p {
    font-size: 1.45rem;
    font-weight: 500;
    color: #222222;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Categories Section (Edge-to-edge layout) */
.categories-section {
    width: 100%;
    padding: 4rem 0; /* Un poco de margen arriba y abajo */
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas */
    gap: 10px; /* Separación pequeña estilo panel */
    padding: 0 10px;
}

.category-card {
    position: relative;
    height: 750px; /* Alto del panel */
    overflow: hidden;
    text-align: center;
    background: var(--color-surface);
}

.category-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2); /* Sutil oscurecimiento */
    z-index: 2;
    transition: background 0.4s ease;
}

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

.category-card:hover .category-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.category-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.category-content h3 {
    color: #FFFFFF;
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: var(--font-body);
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

@media (max-width: 900px) {
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 5px;
        padding: 0 5px;
    }
    
    .category-card {
        height: 500px;
    }
    
    .category-content h3 {
        font-size: 2rem;
    }
}

/* Catalog Section (Interior Pages) */
.catalog-section {
    padding: 10rem 2rem 4rem; /* Top padding to account for fixed navbar */
    max-width: 1200px;
    margin: 0 auto;
}
.catalog-header {
    text-align: center;
    margin-bottom: 4rem;
}
.catalog-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.catalog-header p {
    color: var(--color-text-light);
    font-size: 1.1rem;
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3rem;
}
.product-card {
    background: var(--color-surface);
    transition: var(--transition);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}
.product-image-container {
    position: relative;
    width: 100%;
    height: 380px;
    overflow: hidden;
}
.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.img-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

/* Efecto de escala común */
.product-card:hover .img-main,
.product-card:hover .img-hover {
    transform: scale(1.08);
}

/* Solo ocultamos la principal si existe una imagen de hover */
.product-card:hover .img-hover {
    opacity: 1;
}

.product-card:has(.img-hover):hover .img-main {
    opacity: 0;
}
.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.product-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}
.product-desc {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}
.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
}
.product-category {
    font-size: 0.8rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.product-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-primary);
}

/* About Section */
.about-section {
    padding: 10rem 2rem 6rem;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}
.about-header {
    text-align: center;
}
.about-header h1 {
    font-size: 3.5rem;
    color: var(--color-primary);
}
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-light);
    line-height: 1.8;
}
.about-image img {
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    width: 100%;
}
@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
    }
}

/* Contact Form */
.contact-section {
    padding: 10rem 2rem 6rem;
    max-width: 800px;
    margin: 0 auto;
}
.contact-header {
    text-align: center;
    margin-bottom: 3rem;
}
.contact-header h1 {
    font-size: 3.5rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}
.contact-header p {
    font-size: 1.1rem;
    color: var(--color-text-light);
}
.contact-container {
    background: var(--color-surface);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.form-group label {
    font-weight: 500;
    color: var(--color-text);
}
.form-group input, 
.form-group select, 
.form-group textarea {
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}
.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(0, 138, 114, 0.2);
}

/* Footer */
.footer {
    background-color: #222;
    color: #fff;
    padding: 5rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    height: 60px;
    background-color: white;
    padding: 8px 15px;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    object-fit: contain;
}

.footer p {
    color: #aaa;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-col a {
    display: block;
    color: #aaa;
    margin-bottom: 0.8rem;
}

.footer-col a:hover {
    color: var(--color-primary);
}

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

/* Antigravity Filters */
.antigravity-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 138, 114, 0.3);
}

/* Antigravity Product Effect */
.product-card {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s ease;
}

.product-card.antigravity-hide {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.product-card.antigravity-show {
    opacity: 1;
    transform: scale(1) translateY(0);
    visibility: visible;
}

/* Loader */
.loader {
    text-align: center;
    grid-column: 1 / -1;
    padding: 3rem;
    font-size: 1.2rem;
    color: var(--color-text-light);
    font-style: italic;
    animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.5; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* Modal / Ficha de artículo (Glassmorphism) */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.4); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    background-color: var(--color-surface);
    margin: auto;
    padding: 0;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
}

.modal.show .modal-content {
    transform: translateY(0) scale(1);
}

.close-modal {
    color: #333;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 35px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--color-primary);
}

.modal-body {
    display: flex;
    flex-direction: row;
}

.modal-gallery {
    flex: 1;
    background: #f8f8f8;
    position: relative;
    min-height: 400px;
}

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

.modal-thumbnails {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(255,255,255,0.8);
    padding: 10px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
}

.modal-thumbnails img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.modal-thumbnails img:hover, .modal-thumbnails img.active {
    border-color: var(--color-primary);
    transform: scale(1.1);
}

.modal-details {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-category {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--color-primary);
    margin-bottom: 10px;
    font-weight: 600;
}

.modal-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    line-height: 1.2;
}

.modal-price {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #333;
}

.modal-desc {
    color: var(--color-text-light);
    margin-bottom: 30px;
    line-height: 1.7;
    font-size: 1.05rem;
}

.modal-meta {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid var(--color-border);
}

.modal-meta p {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.modal-meta p strong {
    color: var(--color-text);
}

.btn-buy {
    width: 100%;
    text-align: center;
    padding: 1rem;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    box-shadow: 0 10px 20px rgba(0, 138, 114, 0.2);
}

.btn-buy:hover {
    box-shadow: 0 15px 25px rgba(0, 138, 114, 0.4);
}

@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
    }
    .modal-details {
        padding: 2rem;
    }
    .modal-title {
        font-size: 2rem;
    }
    .modal-gallery {
        min-height: 300px;
    }
}

/* Animations */
@keyframes zoomOut {
    from { transform: scale(1.1); }
    to { transform: scale(1); }
}

/* Responsive */
/* Media Queries para Móvil */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: 0.4s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        padding: 2rem;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-dropdown .dropdown-content {
        position: static;
        box-shadow: none;
        padding-left: 1.5rem;
        display: none;
    }

    .nav-dropdown.active .dropdown-content {
        display: flex;
        flex-direction: column;
    }

    .nav-actions {
        display: none;
    }

    /* Hamburguesa animada */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
