@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');

/* ============================================
   HERBOSALUD — productos_main.css
   Aplica a TODAS las páginas de listado de productos
   Mobile-first | Breakpoints: 480, 640, 900, 1140
   ============================================ */

:root {
    --primary: #0ead63;
    --primary-dark: #015528;
    --secondary: #474646;
    --accent: #ffffff;
    --bg-section: #f3f4f6;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s ease;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, .08);
    --shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

/* ── RESET GLOBAL ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--secondary);
    line-height: 1.6;
    overflow-x: hidden;
    background: #fff;
    max-width: 100vw;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ────────────────────────────────────────────
   BANNER PORTADA
──────────────────────────────────────────── */
.first_section_portada {
    position: relative;
    width: 100%;
    height: clamp(130px, 22vw, 280px);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 65px;
    /* navbar height base mobile */
}

.first_section_portada_img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

/* ────────────────────────────────────────────
   SECCIÓN EMPRESA (segundo bloque)
──────────────────────────────────────────── */
.second_section {
    width: 100%;
    padding: 2rem 1.2rem;
}

.second_section_grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.second_section_grid_div1 h2 {
    font-size: clamp(1.3rem, 5vw, 2rem);
    font-weight: 700;
    color: var(--primary);
    line-height: 1.25;
}

.second_section_grid_div1>div {
    margin-top: .8rem;
    margin-bottom: 1rem;
    border: 2px solid var(--primary);
    width: 100%;
}

.second_section_grid_div2 p {
    font-size: clamp(.9rem, 2.5vw, 1rem);
    color: var(--secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ────────────────────────────────────────────
   GRID DE PRODUCTOS (tercera sección)
──────────────────────────────────────────── */
.third_section {
    width: 100%;
    padding: 1.5rem 1rem;
    background: var(--bg-section);
}

.third_section_title {
    text-align: center;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: .5px;
    margin-bottom: 1.5rem;
}

/* grid: 2 columnas por defecto en móvil */
.third_section_grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .9rem;
}

/* tarjeta producto */
.third_section_grid_div {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.third_section_grid_div:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

/* wishlist */
.wishlist-button {
    position: absolute;
    top: .6rem;
    right: .6rem;
    z-index: 10;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1f2937;
    transition: color var(--transition);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
    -webkit-tap-highlight-color: transparent;
}

.wishlist-button:hover .icon {
    color: #e63946;
}

.icon {
    font-size: 1rem;
    margin: 0;
    padding: 0;
}

/* imagen producto */
.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform .5s ease;
    display: block;
}

.product-image:hover {
    transform: scale(1.05);
}

/* detalles */
.product-details {
    padding: .8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

.product-title {
    font-size: clamp(.8rem, 2.2vw, 1rem);
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: .4rem;
    line-height: 1.25;
    min-height: 2.5em;
    display: flex;
    align-items: center;
}

.product-price {
    font-size: clamp(.8rem, 2.2vw, .95rem);
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: .7rem;
}

/* botones tarjeta */
.button-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: .4rem;
    margin-top: auto;
}

.view-product-button,
.add-to-cart-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .65rem .5rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Lato', sans-serif;
    font-size: clamp(.75rem, 2vw, .85rem);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    line-height: 1.2;
    -webkit-tap-highlight-color: transparent;
}

.view-product-button:hover,
.add-to-cart-button:hover {
    background: var(--secondary);
    color: var(--primary);
    transform: translateY(-2px);
}

.view-product-button i,
.add-to-cart-button i {
    flex-shrink: 0;
}

.icon2 {
    margin: 0;
    padding: 0;
}

/* video section */
.seventh_section {
    position: relative;
    width: 100%;
    height: clamp(160px, 30vw, 300px);
    overflow: hidden;
}

.background-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 0 1rem;
}

.content h2 {
    color: #fff;
    font-size: clamp(1.1rem, 5vw, 2.2rem);
    font-weight: 400;
    width: 90%;
}

.content img {
    width: 55%;
    height: auto;
}

/* sección 8 */
.eighth_section {
    width: 100%;
}

.eighth_section_grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .8rem;
    padding: 1rem;
}

.eighth_section_grid_div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: .4rem;
}

.eighth_section_grid_div img {
    width: 28px;
    height: auto;
    margin: 0 auto;
}

.eighth_section_grid_div p {
    font-size: clamp(.65rem, 1.8vw, .85rem);
    color: var(--secondary);
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

/* ============================================
   BREAKPOINT: 480px — botones lado a lado
============================================ */
@media (min-width: 480px) {
    .button-container {
        grid-template-columns: 1fr 1fr;
    }

    .third_section_grid {
        gap: 1.1rem;
    }
}

/* ============================================
   BREAKPOINT: 640px — 3 columnas productos
============================================ */
@media (min-width: 640px) {
    .third_section_grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .second_section {
        padding: 2rem 1.5rem;
    }

    .third_section {
        padding: 2rem 1.5rem;
    }

    .second_section_grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        align-items: center;
    }

    .eighth_section_grid {
        grid-template-columns: repeat(4, 1fr);
        padding: 1.5rem 2rem;
    }

    .eighth_section_grid_div img {
        width: 36px;
    }
}

/* ============================================
   BREAKPOINT: 900px — banner más alto
============================================ */
@media (min-width: 900px) {
    .first_section_portada {
        margin-top: 72px;
    }

    .third_section {
        padding: 2.5rem 2rem;
    }

    .second_section {
        width: 90%;
        margin: 0 auto;
        padding: 2rem;
    }

    .third_section {
        width: 90%;
        margin: 0 auto;
    }
}

/* ============================================
   BREAKPOINT: 1140px — 4 columnas productos
============================================ */
@media (min-width: 1140px) {
    .first_section_portada {
        margin-top: 80px;
        height: clamp(220px, 28vw, 340px);
    }

    .second_section {
        width: 90%;
        max-width: 1400px;
        margin: 2rem auto 0;
        padding: 2rem;
    }

    .third_section {
        width: 90%;
        max-width: 1400px;
        margin: 0 auto;
        padding: 2rem;
    }

    .second_section_grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: center;
    }

    .second_section_grid_div1 h2 {
        font-size: 2.2rem;
    }

    .second_section_grid_div2 p {
        font-size: 1.05rem;
    }

    .third_section_grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .product-image {
        aspect-ratio: auto;
        height: 19rem;
    }

    .button-container {
        grid-template-columns: 1fr 1fr;
    }

    .view-product-button,
    .add-to-cart-button {
        font-size: .82rem;
        padding: .75rem;
    }

    .eighth_section_grid_div img {
        width: 42px;
    }

    .eighth_section_grid_div p {
        font-size: .85rem;
    }

    .eighth_section_grid {
        gap: 2rem;
        padding: 1.5rem 3rem;
    }
}

/* ── A11Y ── */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}