/**
 * Featured Home Product Styles
 *
 * @author MOD
 * @copyright 2024
 */

.featured-home-product {
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}

.featured-home-product::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 60%;
    left: 0;
    top: 20%;
    background-color: var(--Rosa-claro);
}

/* ============================================================
   Banner mode — full-width yellow band on the site grid.
   Image on cols 1-6, text block on cols 8-12 (top aligned).
   ============================================================ */
.featured-home-product.featured-home-product--banner {
    /* Full-bleed: break out of the home container width */
    width: 100vw;
    margin: 0 0 0 calc(50% - 50vw);
    /* Home band (Figma 4652-15505): 80px top; the 80px gap to the product grid
       is the grid section's top padding (see theme custom.css) */
    padding-block: 80px 0;
    background: var(--lj-color-jara, #FFC758);
    overflow: visible;
    opacity: 1;
    transform: none;
}

.featured-home-product.featured-home-product--banner::before {
    display: none;
}

.fhp-banner__inner {
    align-items: start;
}

.fhp-banner__inner > * {
    min-width: 0;
}

/* --- Image (left) --- */
.fhp-banner__media {
    position: relative;
    height: 515px;
    border-radius: 2px;
    overflow: hidden;
    background: #d4d4d4;
}

.fhp-banner__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* --- Text block (right) --- */
.fhp-banner__content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fhp-banner__eyebrow {
    margin: 0;
    font-family: var(--lj-font-ui, "Supreme", system-ui, sans-serif);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.64px;
    text-transform: uppercase;
    color: var(--lj-color-black, #000);
}

.fhp-banner__title {
    margin: 0;
    font-family: var(--lj-font-display, "F37 Drago", serif);
    font-size: 48px;
    font-weight: 300;
    line-height: 1.15;
    color: var(--lj-color-black, #000);
}

.fhp-banner__text {
    font-family: var(--lj-font-ui, "Supreme", system-ui, sans-serif);
    font-size: 18px;
    font-weight: 300;
    line-height: 1.4;
    color: #333;
}

.fhp-banner__text p {
    margin: 0;
}

.fhp-banner__text p + p {
    margin-top: 1em;
}

.fhp-banner__actions {
    margin-top: 24px;
}

.fhp-banner__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 24px;
    border: 1px solid var(--lj-color-black, #000);
    border-radius: 0;
    background: transparent;
    color: var(--lj-color-black, #000);
    font-family: var(--lj-font-ui, "Supreme", system-ui, sans-serif);
    font-size: 16px;
    line-height: 1.4;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.fhp-banner__btn:hover {
    background: var(--lj-color-black, #000);
    color: var(--lj-color-jara, #FFC758);
}

/* --- Discount stamp (optional, over the image) --- */
.fhp-banner__stamp {
    position: absolute;
    top: 49%;
    right: 68px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 173px;
    height: 173px;
    border-radius: 50%;
    background: #661107; /* rojo-800 */
    color: #fcfcfb;
    text-align: center;
    transform: translateY(-50%) rotate(15deg);
}

.fhp-banner__stamp-label {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -0.18px;
    text-transform: uppercase;
}

.fhp-banner__stamp-value {
    font-family: var(--matiz-font, 'Josefin Sans', system-ui, sans-serif);
    font-size: 64px;
    font-weight: 600;
    line-height: 1.1;
}

/* No mobile design: stack image above text */
@media (max-width: 991.98px) {
    .fhp-banner .fhp-banner__inner {
        --lj-container-padding: 16px;
        row-gap: 24px;
    }

    /* Higher specificity than .lj-col-N / .lj-start-N (theme CSS may load later) */
    .fhp-banner__inner > .fhp-banner__media,
    .fhp-banner__inner > .fhp-banner__content {
        grid-column: 1 / -1;
    }

    .fhp-banner__media {
        height: 360px;
    }

    .fhp-banner__title {
        font-size: 32px;
    }

    .fhp-banner__stamp {
        top: 16px;
        right: 16px;
        width: 96px;
        height: 96px;
        transform: rotate(15deg);
    }

    .fhp-banner__stamp-label {
        font-size: 13px;
    }

    .fhp-banner__stamp-value {
        font-size: 36px;
    }
}

/* ============================================================
   Product mode (Figma 4652-14493) — full-bleed jara band.
   Orange panel from the viewport left edge to grid column 8,
   photo from column 8 to the viewport right edge, product
   cutout overlapping both and overflowing upwards.
   ============================================================ */
.featured-home-product.fhp-product {
    /* Grid geometry of the 1440 container, valid at any viewport width */
    --fhp-container: min(100vw, var(--lj-container-max, 1440px));
    --fhp-outer: calc((100vw - var(--fhp-container)) / 2);
    --fhp-pad: var(--lj-container-padding, 64px);
    --fhp-gutter: var(--lj-grid-gutter, 24px);
    --fhp-col: calc((var(--fhp-container) - 2 * var(--fhp-pad) - 11 * var(--fhp-gutter)) / 12);
    /* x where grid column 8 starts (panel/photo split) */
    --fhp-split: calc(var(--fhp-outer) + var(--fhp-pad) + 7 * (var(--fhp-col) + var(--fhp-gutter)));
    --fhp-band: 41px;

    /* Full-bleed: break out of the home container width */
    width: 100vw;
    margin: 0 0 0 calc(50% - 50vw);
    padding: 160px 0 var(--fhp-band);
    background: var(--lj-color-jara, #FFC758);
    /* Above the previous block so the cutout can overflow into it */
    z-index: 1;
    /* Clip horizontally only: the cutout must still overflow upwards */
    overflow: visible;
    overflow-x: clip;
    opacity: 1;
    transform: none;
}

.featured-home-product.fhp-product::before {
    display: none;
}

/* Bottom strip (tierra dehesa) under the panel and photo */
.featured-home-product.fhp-product::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--fhp-band);
    background: var(--lj-color-beige, #EADCBD);
}

.fhp-product__row {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: var(--fhp-split) minmax(0, 1fr);
    height: 700px;
}

/* --- Orange panel (left) --- */
.fhp-product__panel {
    min-width: 0;
    padding: 64px 0 64px calc(var(--fhp-outer) + var(--fhp-pad));
    background: var(--lj-color-joya, #FFA300);
    box-sizing: border-box;
}

.fhp-product__content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    /* 5 grid columns (532px at 1440) */
    width: calc(5 * var(--fhp-col) + 4 * var(--fhp-gutter));
    max-width: 100%;
}

.fhp-product__heading {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fhp-product__title {
    margin: 0;
    font-family: var(--lj-font-display, "F37 Drago", serif);
    font-size: 64px;
    font-weight: 300;
    line-height: 1.15;
    color: var(--lj-color-black, #000);
}

.fhp-product__subtitle {
    margin: 0;
    font-family: var(--lj-font-display, "F37 Drago", serif);
    font-size: 32px;
    font-weight: 300;
    line-height: 1.3;
    color: var(--lj-color-grey-800, #333);
}

.fhp-product__body {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 421px;
}

.fhp-product__text {
    font-family: var(--lj-font-ui, "Supreme", system-ui, sans-serif);
    font-size: 18px;
    font-weight: 300;
    line-height: 1.4;
    color: var(--lj-color-grey-800, #333);
}

.fhp-product__text p {
    margin: 0;
}

.fhp-product__text p + p {
    margin-top: 1em;
}

.fhp-product__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.fhp-product__form {
    margin: 0;
}

.fhp-product__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 14px 24px;
    border-radius: 0;
    box-sizing: border-box;
    font-family: var(--lj-font-display, "F37 Drago", serif);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.fhp-product__btn--primary {
    border: 0;
    background: var(--lj-color-oliva, #111010);
    color: var(--lj-color-encalado, #FBFBFB);
}

.fhp-product__btn--primary:hover,
.fhp-product__btn--primary:focus-visible {
    background: var(--lj-color-grey-800, #333);
    color: var(--lj-color-encalado, #FBFBFB);
}

.fhp-product__btn--primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.fhp-product__btn--secondary {
    min-width: 141px;
    border: 2px solid var(--lj-color-oliva, #111010);
    background: transparent;
    color: var(--lj-color-oliva, #111010);
}

.fhp-product__btn--secondary:hover,
.fhp-product__btn--secondary:focus-visible {
    border-color: var(--lj-color-grey-800, #333);
    background: var(--lj-color-grey-800, #333);
    color: var(--lj-color-encalado, #FBFBFB);
}

/* --- Photo (right) --- */
.fhp-product__photo {
    min-width: 0;
    overflow: hidden;
    background: #c0c0c0;
}

.fhp-product__photo-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* --- Product cutout (800x1000 at 1440, bottom aligned to the section) --- */
.fhp-product__cutout {
    position: absolute;
    z-index: 2;
    bottom: 0;
    left: calc(50% + min(160px, 100vw * 160 / 1440));
    width: min(800px, 100vw * 800 / 1440);
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: contain;
    object-position: center bottom;
    transform: translateX(-50%);
    pointer-events: none;
}

/* No mobile design: stack panel above photo */
@media (max-width: 991.98px) {
    .featured-home-product.fhp-product {
        padding-top: 40px;
    }

    .fhp-product__row {
        grid-template-columns: minmax(0, 1fr);
        height: auto;
    }

    .fhp-product__panel {
        padding: 40px 16px;
    }

    .fhp-product__content {
        width: 100%;
        gap: 32px;
    }

    .fhp-product__title {
        font-size: 40px;
    }

    .fhp-product__subtitle {
        font-size: 24px;
    }

    .fhp-product__body {
        max-width: none;
    }

    .fhp-product__photo {
        height: 420px;
    }

    .fhp-product__cutout {
        left: 50%;
        width: 360px;
        max-width: 100%;
        height: 450px;
    }
}

/* Animaciones */
.featured-home-product {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.featured-home-product.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.featured-home-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.featured-home-item img {
    width: 80px;
    height: 80px;
}

.featured-home-item h3 {
    color: var(--BLACK, #000);
    font-family: "Hedvig Letters Serif";
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    line-height: 130%;
    margin-bottom: 8px;
}

.featured-home-item p {
    color: var(--Gris-noche, #373935);
    font-family: Montserrat;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 130%;
}

/* Responsive Design */

@media (max-width: 1440px) {
    .fhp-banner__stamp {
        right: 68px;
    }
}

@media (max-width: 767px) {
    /* Tasting note items */
    .featured-home-item {
        gap: 16px;
        margin-bottom: 24px;
    }

    .featured-home-item:last-child {
        margin-bottom: 0;
    }

    .featured-home-item img {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
    }

    .featured-home-item h3 {
        font-size: 20px;
        line-height: 1.3;
        margin-bottom: 8px;
    }

    .featured-home-item p {
        font-size: 16px;
        line-height: 1.3;
    }
}