@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_individuales.css
   Mobile-first | Breakpoints: 480, 640, 800, 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 10px 30px rgba(0, 0, 0, .12);
}

/* ── RESET ── */
*,
*::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;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ── MAIN CONTAINER ── */
.main-container {
    width: 100%;
    overflow-x: hidden;
}

/* ────────────────────────────────────────────
   BREADCRUMB / NAV
──────────────────────────────────────────── */
.section_nav {
    width: 100%;
    padding: 0 1rem;
    margin-top: 70px;
    /* navbar height mobile */
    margin-bottom: .5rem;
}

.nav_link ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem .1rem;
    font-size: clamp(.7rem, 2vw, .88rem);
    color: var(--secondary);
    padding: .6rem .5rem;
}

.nav_link a {
    color: var(--secondary);
    transition: color var(--transition);
    white-space: nowrap;
}

.nav_link a:hover {
    color: var(--primary);
}

.nav_link_ol_link {
    margin-left: .25rem;
}

.nav_link_ol_link_strong {
    font-weight: 600;
}

.nav_link_ol_link_color {
    color: var(--primary-dark);
    font-weight: 600;
}

/* ────────────────────────────────────────────
   SECCIÓN PRINCIPAL (imagen + info)
──────────────────────────────────────────── */
.first_section {
    width: 100%;
    padding: 1rem;
}

.first_section_grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* --- columna imagen --- */
.first_section_grid_img {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
}

/* contenedor de imagen con overflow oculto */
.image-container {
    position: relative;
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
}

.zoomable_image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform var(--transition);
    display: block;
}

.zoomable_image:hover {
    transform: scale(1.06);
    cursor: zoom-in;
}

/* botón zoom */
.zoom_button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition);
    z-index: 5;
    box-shadow: var(--shadow-sm);
    -webkit-tap-highlight-color: transparent;
}

.zoom_button:hover {
    background: var(--primary-dark);
    transform: scale(1.08);
}

/* thumbnails circulares */
.product_circles_img {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.circles_btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    transition: all var(--transition);
    background: none;
    -webkit-tap-highlight-color: transparent;
}

.circles_btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.circles_btn.active,
.circles_btn:focus {
    border-color: var(--primary);
    transform: scale(1.1);
}

.circles_btn:hover:not(.active) {
    border-color: #ccc;
}

/* --- MODAL de imagen ampliada --- */
.modal {
    opacity: 0;
    visibility: hidden;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity .3s ease, visibility .3s ease;
    padding: 1rem;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal_content {
    position: relative;
    width: min(90vw, 480px);
    max-height: 82dvh;
    background: var(--primary);
    padding: 18px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal_content img {
    width: 100%;
    height: auto;
    max-height: 72dvh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.close_modal {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    background: #fff;
    color: var(--primary);
    border-radius: 50%;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    z-index: 100;
    -webkit-tap-highlight-color: transparent;
}

.close_modal:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: scale(1.1);
}

/* --- columna info --- */
.first_section_grid_info {
    display: flex;
    flex-direction: column;
    gap: .8rem;
    width: 100%;
}

.first_section_grid_info_title {
    font-size: clamp(1.5rem, 6vw, 2.6rem);
    color: var(--primary-dark);
    font-weight: 700;
    line-height: 1.15;
}

.first_section_grid_info_price {
    font-size: clamp(1.1rem, 3.5vw, 1.4rem);
    font-weight: 700;
    color: var(--secondary);
}

/* botón de compra (WhatsApp) */
.container_product {
    background: #fff;
    padding: 1rem 0;
    border-radius: var(--radius-sm);
    width: 100%;
}

.grid_container_product {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 14px 24px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: clamp(.95rem, 3vw, 1.05rem);
    transition: all var(--transition);
    width: 100%;
    max-width: 320px;
    -webkit-tap-highlight-color: transparent;
}

.whatsapp-btn i {
    font-size: 1.25rem;
}

.whatsapp-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    color: #fff;
}

/* botones genéricos (view-product) */
.view-product-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: 12px 18px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Lato', sans-serif;
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.view-product-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    color: #fff;
}

/* info adicional */
.first_section_grid_info_text_advice {
    font-size: clamp(.95rem, 3vw, 1.05rem);
    font-weight: 700;
    color: var(--secondary);
}

.additional-info {
    width: 100%;
}

.first_sectiond_second_info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: .5rem;
}

.first_sectiond_second_info_grid {
    display: grid;
    grid-template-columns: 44px 1fr;
    align-items: flex-start;
    gap: .8rem;
}

.info_img {
    width: 40px;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.first_section_grid_info_text {
    font-size: clamp(.85rem, 2.5vw, .95rem);
    color: var(--secondary);
    line-height: 1.55;
    margin: 0;
}

/* ────────────────────────────────────────────
   SECCIÓN 2 — Políticas
──────────────────────────────────────────── */
.second_section {
    width: 100%;
    padding: 1.5rem 1rem;
}

.policy-item {
    margin-bottom: 2rem;
}

.policy-item:last-child {
    margin-bottom: 0;
}

.second_section_title {
    display: flex;
    align-items: center;
    gap: .8rem;
    font-size: clamp(1rem, 3.5vw, 1.3rem);
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: .8rem;
}

.second_section_title img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.second_section_text p {
    font-size: clamp(.88rem, 2.5vw, .98rem);
    color: var(--secondary);
    line-height: 1.6;
    margin-bottom: .5rem;
}

.second_section_text a {
    color: var(--primary-dark);
    font-weight: 700;
}

.second_section_text a:hover {
    color: var(--primary);
}

/* ────────────────────────────────────────────
   SECCIÓN 3 — Productos relacionados
──────────────────────────────────────────── */
.third_section {
    width: 100%;
    padding: 1.5rem 1rem 2rem;
    background: var(--bg-section);
}

.third_section_title {
    text-align: center;
    font-size: clamp(1.1rem, 4vw, 1.6rem);
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: .5px;
    margin-bottom: 1.5rem;
}

/* grid relacionados: 2 col en móvil */
.third_section_grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .9rem;
}

.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: var(--secondary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
    transition: color var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.wishlist-button:hover {
    color: #e63946;
}

.icon {
    font-size: 1rem;
    margin: 0;
    padding: 0;
}

.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform .5s ease;
}

.product-image:hover {
    transform: scale(1.04);
}

.product-details {
    padding: .8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

.product-title {
    font-size: clamp(.82rem, 2.3vw, 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(.82rem, 2.3vw, .92rem);
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: .7rem;
}

.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: .6rem;
    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;
    -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 {
    flex-shrink: 0;
}

.icon2 {
    margin: 0;
    padding: 0;
}

/* botón individual tercera sección */
.third_section_grid_div_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .65rem 1rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Lato', sans-serif;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.third_section_grid_div_button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.third_section_grid_div_button i {
    flex-shrink: 0;
}

/* ============================================
   BREAKPOINT: 480px
============================================ */
@media (min-width: 480px) {
    .button-container {
        grid-template-columns: 1fr 1fr;
    }

    .whatsapp-btn {
        font-size: 1rem;
    }

    .zoom_button {
        width: 42px;
        height: 42px;
    }
}

/* ============================================
   BREAKPOINT: 640px
============================================ */
@media (min-width: 640px) {
    .section_nav {
        padding: 0 1.5rem;
    }

    .first_section {
        padding: 1.5rem;
    }

    .second_section {
        padding: 2rem 1.5rem;
    }

    .third_section {
        padding: 2rem 1.5rem;
    }

    .third_section_grid {
        gap: 1.1rem;
    }

    .circles_btn {
        width: 60px;
        height: 60px;
    }
}

/* ============================================
   BREAKPOINT: 800px — layout 2 columnas
============================================ */
@media (min-width: 800px) {
    .section_nav {
        width: 90%;
        margin: 0 auto;
        margin-top: 72px;
        padding: 0;
    }

    .first_section {
        width: 90%;
        margin: 0 auto;
        padding: 2rem;
    }

    .second_section {
        width: 90%;
        margin: 0 auto;
        padding: 2rem;
        padding-top: 0;
    }

    .third_section {
        width: 90%;
        margin: 0 auto;
        padding: 2rem;
    }

    .first_section_grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        align-items: flex-start;
    }

    .first_section_grid_img {
        position: sticky;
        top: 90px;
    }

    .zoomable_image {
        aspect-ratio: auto;
        height: 55vh;
        min-height: 360px;
    }

    .third_section_grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .product-image {
        aspect-ratio: auto;
        height: 15rem;
    }
}

/* ============================================
   BREAKPOINT: 1140px
============================================ */
@media (min-width: 1140px) {
    .section_nav {
        max-width: 1400px;
        margin: 0 auto;
        margin-top: 80px;
    }

    .first_section {
        max-width: 1400px;
        margin: 0 auto;
        padding: 2rem;
    }

    .second_section {
        max-width: 1400px;
        margin: 0 auto;
    }

    .third_section {
        max-width: 1400px;
        margin: 0 auto;
    }

    .first_section_grid_info_title {
        font-size: 2.4rem;
    }

    .zoomable_image {
        height: 65vh;
        max-height: 560px;
    }

    .circles_btn {
        width: 56px;
        height: 56px;
    }

    .product-image {
        height: 19rem;
        aspect-ratio: auto;
    }

    .button-container {
        grid-template-columns: 1fr 1fr;
    }

    .view-product-button,
    .add-to-cart-button {
        font-size: .82rem;
        padding: .8rem;
    }

    .third_section_grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ── 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;
}