/* =========================
   CONFIGURACIÓN GENERAL
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, sans-serif;
    color: #000000;
    background-color: #ffffff;
}


/* =========================
   NAVEGACIÓN
========================= */

header {
    width: 100%;
    border-bottom: 1px solid #645f56;
    background-color: #ffffff;
}

.navbar {
    max-width: 1200px;
    margin: auto;

    padding: 22px 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    position: relative;
}

.logo {
    text-decoration: none;
    color: #E8DCC8;

    font-size: 25px;
    font-weight: 800;

    transition: 0.2s;
}

.logo span {
    color: #000000;
    font-weight: 500;
}

.logo:hover {
    opacity: 0.75;
}

.menu {
    list-style: none;

    display: flex;
    gap: 30px;
}

.menu a {
    text-decoration: none;
    color: #000000;

    font-size: 15px;
    font-weight: 600;

    transition: 0.2s;
}

.menu a:hover {
    color: #E8DCC8;
}


/* =========================
   BOTÓN MENÚ MÓVIL
========================= */

.menu-toggle {
    display: none;

    border: none;
    background: transparent;

    color: #645f56;

    font-size: 28px;
    line-height: 1;

    cursor: pointer;
}


/* =========================
   PORTADA
========================= */

.hero {
    max-width: 1200px;
    min-height: 650px;

    margin: auto;
    padding: 80px 30px;

    display: grid;
    grid-template-columns: 1fr 1fr;

    align-items: center;
    gap: 60px;
}

.hero-text {
    animation: aparecer 0.7s ease;
}

.subtitle {
    color: #E8DCC8;

    font-size: 14px;
    font-weight: 700;

    letter-spacing: 2px;

    margin-bottom: 20px;
}

.hero h1 {
    color: #000000;

    font-size: 64px;
    line-height: 1.05;

    letter-spacing: -2px;

    margin-bottom: 25px;
}

.hero h1 span {
    color: #E8DCC8;
    display: block;
}

.description {
    max-width: 520px;

    font-size: 18px;
    line-height: 1.7;

    color: #657086;

    margin-bottom: 35px;
}


/* =========================
   BOTONES
========================= */

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.button {
    display: inline-block;

    padding: 14px 25px;

    border-radius: 8px;

    text-decoration: none;

    font-weight: 700;

    transition: 0.25s;
}

.primary {
    background-color: #645f56;
    color: white;

    border: 1px solid #645f56;
}

.primary:hover {
    background-color: #E8DCC8;
    border-color: #E8DCC8;

    transform: translateY(-2px);
}

.secondary {
    border: 1px solid #E8DCC8;
    color: #E8DCC8;

    background-color: transparent;
}

.secondary:hover {
    background-color: #E8DCC8;
    color: white;

    transform: translateY(-2px);
}


/* =========================
   IMAGEN DE PORTADA
========================= */

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    width: 720px;
    height: 430px;

    object-fit: cover;

    border-radius: 25px;

    display: block;

    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);

    transition: 0.3s;
}

.hero-image img:hover {
    transform: scale(1.02);
}


/* =========================
   PRODUCTOS
========================= */

.products-section {
    background-color: #E8DCC8;

    padding: 100px 30px;
}

.section-title {
    text-align: center;

    max-width: 700px;

    margin: 0 auto 60px;
}

.section-title p,
.section-subtitle {
    color: #000000;

    font-size: 13px;

    font-weight: 700;

    letter-spacing: 2px;

    margin-bottom: 15px;
}

.section-title h1,
.section-title h2,
.about h2,
.contact h2 {
    color: #645f56;

    font-size: 42px;

    line-height: 1.15;

    letter-spacing: -1px;
}

.section-title span {
    display: block;

    color: #657086;

    font-size: 16px;

    line-height: 1.6;

    margin-top: 18px;
}


/* =========================
   GRID DE PRODUCTOS
========================= */

.products {
    max-width: 2000px;

    margin: auto;

    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 20px;
}


/* =========================
   TARJETAS
========================= */

.product-card {
    background-color: white;

    padding: 10px 15px;

    border-radius: 15px;

    border: 1px solid #ffffff;

    transition: 0.25s;

    display: flex;
    flex-direction: column;

    min-height: 310px;
}

.product-card:hover {
    transform: translateY(-7px);

    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}


/* ICONOS */

.product-icon {
    width: 60px;
    height: 60px;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: #E8DCC8;

    border-radius: 14px;

    font-size: 30px;

    margin-bottom: 25px;
}


/* TÍTULO */

.product-card h3 {
    color: #645f56;

    margin-bottom: 12px;

    font-size: 21px;

    line-height: 1.25;
}


/* TEXTO */

.product-card p {
    color: #657086;

    line-height: 1.6;

    font-size: 15px;

    margin-bottom: 20px;
}


/* ENLACE */

.card-link {
    margin-top: auto;

    color: #645f56;

    font-size: 14px;

    font-weight: 700;

    transition: 0.2s;
}

.card-link:hover {
    color: #E8DCC8;

    transform: translateX(3px);
}


/* BOTÓN CATÁLOGO */

.catalog-button {
    display: flex;

    justify-content: center;

    margin-top: 45px;
}


/* =========================
   SOBRE NOSOTROS
========================= */

.about {
    max-width: 900px;

    margin: auto;

    padding: 120px 30px;

    text-align: center;
}

.about h2 {
    margin-bottom: 25px;
}

.about p:not(.section-subtitle) {
    color: #645f56;

    font-size: 18px;

    line-height: 1.8;

    margin-bottom: 18px;
}


/* =========================
   CONTACTO
========================= */

.contact {
    padding: 100px 30px;

    text-align: center;

    background-color: #E8DCC8;
}

.contact h2 {
    margin-bottom: 20px;
}

.contact p:not(.section-subtitle) {
    color: #645f56;

    font-size: 17px;

    margin-bottom: 30px;
}

.contact-buttons {
    display: flex;

    justify-content: center;

    gap: 15px;

    flex-wrap: wrap;
}


/* =========================
   FOOTER
========================= */

footer {
    background-color: #645f56;

    color: white;

    padding: 30px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    max-width: none;
}

footer p {
    font-size: 14px;
}


/* =========================
   ANIMACIÓN
========================= */

@keyframes aparecer {

    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================
   TABLET
========================= */

@media (max-width: 950px) {

    .hero {
        gap: 40px;
    }

    .hero h1 {
        font-size: 52px;
    }

    .hero-image img {
        width: 360px;
        height: 360px;
    }

    .products {
        grid-template-columns: repeat(2, 1fr);
    }

}


/* =========================
   MÓVIL
========================= */

@media (max-width: 700px) {

    .navbar {
        padding: 18px 20px;
    }


    /* BOTÓN HAMBURGUESA */

    .menu-toggle {
        display: block;
    }


    /* MENÚ */

    .menu {
        display: none;

        position: absolute;

        top: 100%;
        left: 0;
        right: 0;

        background-color: #ffffff;

        flex-direction: column;

        gap: 0;

        padding: 10px 20px 20px;

        border-bottom: 1px solid #645f56;

        z-index: 1000;
    }


    .menu.menu-open {
        display: flex;
    }


    .menu li {
        width: 100%;
    }


    .menu a {
        display: block;

        width: 100%;

        padding: 15px 5px;

        border-bottom: 1px solid #E8DCC8;
    }


    .menu li:last-child a {
        border-bottom: none;
    }


    /* PORTADA */

    .hero {
        grid-template-columns: 1fr;

        text-align: center;

        padding: 60px 20px 80px;

        gap: 50px;
    }

    .hero-text {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .hero h1 {
        font-size: 46px;

        letter-spacing: -1px;
    }

    .description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image img {
        width: 320px;
        height: 320px;
    }


    /* PRODUCTOS */

    .products-section {
        padding: 80px 20px;
    }

    .section-title {
        margin-bottom: 45px;
    }

    .section-title h1,
    .section-title h2,
    .about h2,
    .contact h2 {
        font-size: 36px;
    }

    .products {
        grid-template-columns: repeat(2, 1fr);

        gap: 15px;
    }

    .product-card {
        padding: 25px 20px;

        min-height: 280px;
    }

}


/* =========================
   MÓVIL PEQUEÑO
========================= */

@media (max-width: 500px) {

    .hero {
        padding-left: 15px;
        padding-right: 15px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .hero-image img {
        width: 280px;
        height: 280px;
    }

    .products {
        grid-template-columns: 1fr;
    }

    .product-card {
        min-height: auto;
    }

    .section-title h1,
    .section-title h2,
    .about h2,
    .contact h2 {
        font-size: 32px;
    }

    footer {
        flex-direction: column;

        gap: 10px;

        text-align: center;
    }

}


/* =========================
   CARDS DEL ÍNDICE
========================= */

#productos .product-card {
    padding: 35px 28px;
    min-height: 300px;

    border-radius: 20px;

    border: 1px solid #E8DCC8;

    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


/* Iconos */

#productos .product-icon {
    width: 65px;
    height: 65px;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: #E8DCC8;

    border-radius: 16px;

    font-size: 30px;

    margin-bottom: 25px;

    transition: transform 0.3s ease;
}


/* Títulos */

#productos .product-card h3 {
    margin: 0 0 12px;

    font-size: 22px;

    color: #645f56;
}


/* Texto */

#productos .product-card p {
    margin: 0 0 25px;

    color: #657086;

    line-height: 1.6;
}


/* Enlace */

#productos .card-link {
    text-decoration: none;

    color: #645f56;

    font-weight: 700;

    transition: color 0.2s ease;
}


/* Efecto al pasar el ratón */

#productos .product-card:hover {
    transform: translateY(-8px);

    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

#productos .product-card:hover .product-icon {
    transform: scale(1.08) rotate(-3deg);
}

#productos .product-card:hover .card-link {
    color: #E8DCC8;
}


/* =========================
   FILTROS DEL CATÁLOGO
========================= */

.category-filters {
    max-width: 1200px;
    margin: 0 auto 50px;

    display: flex;
    justify-content: center;
    flex-wrap: wrap;

    gap: 12px;
}

.filter-button {
    padding: 11px 20px;

    border: 1px solid #645f56;
    border-radius: 25px;

    background-color: #ffffff;

    color: #645f56;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition: 0.2s;
}

.filter-button:hover {
    background-color: #645f56;
    color: #ffffff;
}

.filter-button.active {
    background-color: #645f56;
    color: #ffffff;
}

/* =========================
   AJUSTE CARDS CATÁLOGO
========================= */

#catalogo .products {
    width: 100%;
    max-width: 1200px;
}

#catalogo .product-card {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

#catalogo .product-card img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}


/* =========================
   MÓVIL
========================= */

@media (max-width: 700px) {

    #catalogo {
        padding-left: 15px;
        padding-right: 15px;
    }

    #catalogo .products {
        width: 100%;
        max-width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    #catalogo .product-card {
        padding: 10px;
    }

}


/* =========================
   MÓVIL PEQUEÑO
========================= */

@media (max-width: 500px) {

    #catalogo .products {
        grid-template-columns: 1fr;
    }

    #catalogo .product-card {
        width: 100%;
        padding: 10px;
    }

}

/* =========================
   AJUSTE DE IMÁGENES
========================= */

/* Logo pequeño de la navegación */
.logo img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    vertical-align: middle;
}


/* Imagen principal */
.hero-image img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}


/* Imágenes del catálogo */
.product-card img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}