/* =========================================
   1. VARIABLES Y BASE
   ========================================= */
:root {
    --primary-color: #30C7B5;
    /* Turquesa */
    --primary-dark: #00AC97;
    --text-dark: #14261C;
    --text-grey: #4F5655;
    --bg-light: #F3F6F3;
    --white: #ffffff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--text-grey);
    line-height: 1.6;

    /* Fondo Degradado Animado */
    background: linear-gradient(-45deg, #e0f2f1, #ffffff, #ccfbf1, #f0fdfc);
    background-size: 400% 400%;

    /* Scroll por defecto para compatibilidad móvil */
    background-attachment: scroll;

    animation: gradientBG 15s ease infinite;
}

/* Solo activar efecto fijo en PC */
@media (min-width: 769px) {
    body {
        background-attachment: fixed;
    }
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

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

/* =========================================
   2. HEADER
   ========================================= */
header {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
    backdrop-filter: blur(5px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
}

.img-logo {
    max-height: 55px;
    width: auto;
}

/* Menú Estilo Botón */
.nav-menu {
    display: flex;
    gap: 5px;
}

.nav-menu a {
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 10px 20px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(48, 199, 181, 0.3);
    transform: translateY(-2px);
}

.header-icons {
    display: flex;
    gap: 15px;
    color: var(--primary-color);
    font-size: 1.3rem;
    align-items: center;
}

/* =========================================
   3. HERO SECTION (VIDEO)
   ========================================= */
.hero {
    position: relative;
    width: 100%;
    height: 85vh;
    min-height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
    background-color: #000;
}

.video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    background-color: rgba(0, 0, 0, 0.65);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(48, 199, 181, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    width: 90%;
    margin: 0 auto;
    backdrop-filter: blur(4px);
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 0px #000000;
    margin-bottom: 15px;
    text-transform: uppercase;
    line-height: 1.1;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 45px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(48, 199, 181, 0.4);
}

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

/* =========================================
   4. SECCIONES Y CATEGORÍAS (GRILLA FIJA)
   ========================================= */
.categories,
.products-section,
.contact-section {
    padding: 80px 0;
    background: transparent;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    color: var(--text-dark);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 10px auto 0;
}

/* --- GRILLA DE CATEGORÍAS (3 EN LINEA) --- */
.cat-grid {
    display: grid;
    /* Forzamos 3 columnas iguales */
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
}

/* --- GRILLA DE PRODUCTOS (4 EN LINEA) --- */
.product-grid {
    display: grid;
    /* Forzamos 4 columnas iguales */
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: stretch;
}

/* Tarjetas Base */
.cat-card,
.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cat-card:hover,
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* --- ESTILOS CATEGORÍA --- */
.cat-card {
    height: 250px;
    position: relative;
    display: block;
}

.cat-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.cat-card:hover img {
    transform: scale(1.1);
}

.cat-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.cat-overlay h3 {
    color: #ffffff !important;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.9);
    margin: 0;
    font-size: 1.5rem;
    text-transform: uppercase;
    font-weight: 800;
}

/* --- ESTILOS PRODUCTO --- */
.product-image {
    height: 220px;
    /* Altura fija para que todos sean iguales */
    width: 100%;
    background: #eee;
    position: relative;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Recorta la imagen para que encaje perfecto */
    object-position: center;
}

.onsale {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    font-size: 0.8rem;
    border-radius: 20px;
    font-weight: 700;
    z-index: 10;
}

.product-info {
    padding: 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.price {
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: block;
}

.btn-add {
    width: 100%;
    display: block;
    text-align: center;
    background: var(--text-dark);
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: auto;
}

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

/* INFO ICONS */
.info-section {
    padding: 60px 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    text-align: center;
}

.info-box i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.info-box h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    color: var(--text-dark);
}

/* CONTACTO */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
}

.contact-form button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-weight: 800;
    width: 100%;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.3s;
}

.contact-form button:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

/* FOOTER */
footer {
    background: #1a1a1a;
    color: #aaa;
    padding: 60px 0;
    font-size: 0.9rem;
}

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

.footer-col h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-contact li {
    margin-bottom: 12px;
    display: flex;
    gap: 10px;
}

.copyright {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.float-wa {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 32px;
    box-shadow: 2px 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.float-wa:hover {
    transform: scale(1.1);
    background-color: #128c7e;
}

/* =========================================
   5. RESPONSIVE (MÓVIL / IPHONE)
   ========================================= */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .img-logo {
        max-height: 40px;
    }

    /* Ajuste Hero Móvil */
    .hero {
        height: auto;
        min-height: 85vh;
        padding: 100px 0;
    }

    .hero-content {
        padding: 30px 20px;
        width: 95%;
        max-width: 100%;
    }

    .hero h1 {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }

    .hero p {
        font-size: 1rem;
        line-height: 1.4;
    }

    /* IMPORTANTE: En móvil volvemos a 1 sola columna para que no se vea minúsculo */
    .cat-grid,
    .product-grid,
    .contact-container,
    .info-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        text-align: center;
    }

    .footer-contact li {
        justify-content: center;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .categories,
    .products-section,
    .contact-section {
        padding: 40px 0;
    }
}