/* ==========================================================
   techOdec Product Hero
   ========================================================== */

.hero {
    position: relative;
    overflow: hidden;
    padding-block:
        clamp(3.5rem, 7vw, 7rem);
    background: var(--color-background);
}

.hero::before {
    position: absolute;
    top: -260px;
    right: -220px;
    width: 620px;
    height: 620px;
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(181, 138, 96, .13),
            transparent 70%
        );
    content: "";
    pointer-events: none;
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(420px, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: clamp(2.5rem, 5vw, 6rem);
    row-gap: var(--space-xl);
}

.hero-content {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}

.hero-eyebrow {
    display: inline-block;
    margin-bottom: var(--space-md);
    color: var(--color-primary);
    font-size: .78rem;
    font-weight: var(--fw-bold);
    letter-spacing: .18em;
    text-transform: uppercase;
}

/* ----------------------------------------------------------
   Headline

   The markup already contains deliberate <br> line breaks.
   nowrap prevents individual words from breaking again.
---------------------------------------------------------- */

.hero-title {
    width: fit-content;
    max-width: 100%;
    margin: 0 0 var(--space-lg);
    color: var(--color-text);
    font-size:
        clamp(4.1rem, 6.2vw, 6.8rem);
    letter-spacing: -.075em;
    line-height: .88;
    white-space: nowrap;
}

.hero-product {
    margin: 0 0 var(--space-md);
    color: var(--color-text);
    font-size:
        clamp(1.8rem, 3vw, 2.7rem);
    letter-spacing: -.035em;
    line-height: 1.05;
}

.hero-rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem;
    margin-bottom: var(--space-lg);
    color: var(--color-text-light);
    font-size: .92rem;
}

.hero-rating > span:first-child {
    color: var(--color-text);
    letter-spacing: .08em;
}

.hero-rating strong {
    color: var(--color-text);
}

.hero-price {
    margin-bottom: var(--space-lg);
    color: var(--color-text);
    font-family: var(--font-heading);
    font-size:
        clamp(2.3rem, 4vw, 3.6rem);
    font-weight: var(--fw-bold);
    letter-spacing: -.045em;
}

.hero-description {
    max-width: 34rem;
    margin: 0 0 var(--space-lg);
    color: var(--color-text-light);
    font-size: 1.04rem;
    line-height: 1.75;
}

.hero-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

/* ----------------------------------------------------------
   Media stage
---------------------------------------------------------- */

.hero-image {
    position: relative;
    isolation: isolate;
    grid-column: 2;
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 720px;
    aspect-ratio: 4 / 5;
    justify-self: end;
    overflow: hidden;
    padding: clamp(.65rem, 1.5vw, 1rem);
    border: 1px solid rgba(181, 138, 96, .2);
    border-radius:
        clamp(1.4rem, 3vw, 2.4rem);
    background:
        radial-gradient(
            circle at 50% 38%,
            rgba(255, 255, 255, .98),
            rgba(232, 224, 211, .58) 66%,
            rgba(181, 138, 96, .1) 100%
        );
    box-shadow:
        0 35px 70px
        rgba(45, 38, 29, .15);
}

.hero-image__glow {
    position: absolute;
    z-index: -1;
    inset: 18%;
    border-radius: 50%;
    background:
        rgba(210, 166, 73, .16);
    filter: blur(70px);
}

.hero-image__media {
    display: block;
    width: 100%;
    height: 100%;
    border-radius:
        calc(
            clamp(1.4rem, 3vw, 2.4rem)
            - .55rem
        );
    object-fit: cover;
    object-position: center;
    transition:
        opacity .25s ease,
        transform .7s cubic-bezier(.2, .7, .2, 1);
}

.hero-image:hover .hero-image__media {
    transform: scale(1.012);
}

.hero-image__caption {
    position: absolute;
    right: 1.4rem;
    bottom: 1.4rem;
    padding: .45rem .7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .8);
    color: var(--color-text-light);
    font-size: .66rem;
    font-weight: var(--fw-bold);
    letter-spacing: .08em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hero-image__loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border: 3px solid rgba(0, 0, 0, .1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

/* ----------------------------------------------------------
   Badges
---------------------------------------------------------- */

.hero-badges {
    grid-column: 1;
    grid-row: 2;
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: .75rem;
    max-width: 620px;
}

.hero-badge {
    display: flex;
    align-items: center;
    gap: .7rem;
    min-height: 54px;
    padding: .8rem 1rem;
    border: 1px solid rgba(255, 255, 255, .76);
    border-radius: 999px;
    background: rgba(255, 255, 255, .7);
    box-shadow: var(--shadow-sm);
    color: var(--color-text);
    font-size: .86rem;
    font-weight: var(--fw-semibold);
    line-height: 1.35;
}

/* ----------------------------------------------------------
   Compact desktop

   Keeps the complete headline intact just above the tablet
   breakpoint, where the two-column grid is at its tightest.
---------------------------------------------------------- */

@media (min-width: 981px) and (max-width: 1240px) {
    .hero-grid {
        grid-template-columns:
            minmax(0, 1.05fr)
            minmax(390px, .95fr);
        column-gap: clamp(2rem, 3.5vw, 3.5rem);
    }

    .hero-title {
        font-size:
            clamp(3.8rem, 5.8vw, 4.8rem);
    }

    .hero-image {
        max-width: 620px;
    }
}

/* ----------------------------------------------------------
   Tablet
---------------------------------------------------------- */

@media (max-width: 980px) {
    .hero {
        padding-block: 3.5rem 4.5rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 2.25rem;
    }

    .hero-content {
        grid-column: 1;
        grid-row: auto;
    }

    .hero-title {
        width: fit-content;
        max-width: 100%;
        font-size:
            clamp(3.8rem, 9.4vw, 6rem);
        white-space: nowrap;
    }

    .hero-image {
        grid-column: 1;
        grid-row: auto;
        width: min(88%, 680px);
        max-height: 640px;
        justify-self: center;
    }

    .hero-badges {
        grid-column: 1;
        grid-row: auto;
        width: min(100%, 680px);
        max-width: none;
        margin-inline: auto;
    }
}

/* ----------------------------------------------------------
   Mobile
---------------------------------------------------------- */

@media (max-width: 620px) {
    .hero {
        padding-block: 2.5rem 3.5rem;
    }

    .hero-title {
        font-size:
            clamp(2.65rem, 13.2vw, 4.55rem);
        letter-spacing: -.065em;
        line-height: .91;
        white-space: nowrap;
    }

    .hero-product {
        font-size: 1.75rem;
    }

    .hero-description {
        font-size: .96rem;
    }

    .hero-buttons {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hero-image {
        width: 100%;
        max-height: 500px;
        aspect-ratio: 4 / 5;
        padding: .45rem;
        border-radius: 1.5rem;
    }

    .hero-image__media {
        border-radius: 1.15rem;
    }

    .hero-image__caption {
        right: 1rem;
        bottom: 1rem;
    }

    .hero-badges {
        grid-template-columns: 1fr;
    }
}

/* ----------------------------------------------------------
   Very narrow phones
---------------------------------------------------------- */

@media (max-width: 370px) {
    .hero-title {
        font-size:
            clamp(2.45rem, 12.8vw, 3rem);
        letter-spacing: -.06em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-image__media {
        transition: none;
    }
}

/* ==========================================================
   Desktop hero product image framing
   ========================================================== */

@media (min-width: 1081px) {
    /*
     * The WooCommerce product image is portrait-oriented.
     * `cover` crops the lower frame inside the fixed hero stage.
     * `contain` keeps the complete product visible and anchors it
     * to the top so it cannot appear pushed downward.
     */
    img.hero-image__media {
        display: block;

        width: 100% !important;
        height: 100% !important;

        object-fit: contain !important;
        object-position: center top !important;
    }
}