/*
 * Per-design stylesheet for the Featured hero — the in-hero card only.
 *
 * The "Featured" pinned row that appears above the main grid for non-Featured
 * designs lives in stylesv2-custom.css instead, because that file is loaded
 * for every design while THIS file is only loaded when the row's design is
 * RegistryDesign.Featured. Mixing the pinned row's selectors here would leave
 * the row unstyled on Classic / Cover / Profile / Elegant.
 *
 * All rules are scoped under `.featured-cover` / `.featured-gift-hero` /
 * `.featured-gift-progress` so they never leak onto other designs. No `!important`.
 *
 * Loaded from Web/Views/Registry/Gifts2.cshtml inside @section Styles BEFORE
 * the inline <style> block (font-settings, CoverColor, Registry.CustomCSS),
 * so per-registry overrides win on cascade order.
 */
.featured-cover {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background-color: #1f2937;
    min-height: 480px;
}

.featured-cover__bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 0;
}

.featured-cover__overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.featured-cover__container {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
    padding: 64px 24px 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 32px;
}

.featured-cover__title-block {
    max-width: 720px;
}

.featured-cover__title {
    margin: 0;
    color: #ffffff;
    font-weight: 800;
    /* Px not rem: the registry pages declare `html { font-size: 10px }` (a
       1rem=10px reset), so the original clamp(2.25rem, 5vw, 4.5rem) evaluated
       to clamp(22.5px, 5vw, 45px) instead of the intended clamp(36px, 5vw,
       72px). Locking the bounds to px makes the responsive ramp match the
       design intent across viewports. */
    font-size: clamp(36px, 5vw, 72px);
    line-height: 1.1;
    word-wrap: break-word;
}

.featured-cover__date {
    margin: 12px 0 0;
    color: #f3f4f6;
    font-size: 18px;
}

/* The hero card carries class="property-list-item" so scriptv2.js:458's
   click handler opens the buy modal — the bespoke hero styling sits on the
   `.featured-gift-hero` class instead so the framework's grid-card rules
   keyed on `.property-list` > `.property-list-item` (defined in stylesv2.css)
   never apply. */
.featured-gift-hero {
    width: 100%;
    max-width: 760px;
    background-color: #ffffff;
    color: #111827;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    text-align: left;
    cursor: pointer;
}

.featured-gift-hero.property-list-item {
    /* Reset framework defaults the grid card sets (margin, padding, border). */
    margin: 0;
    padding: 0;
    border: 0;
}

.featured-gift-hero__image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: #e5e7eb;
    overflow: hidden;
}

.featured-gift-hero__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-gift-hero__body {
    padding: 24px 28px 28px;
}

.featured-gift-hero__name {
    margin: 0 0 8px;
    color: #111827;
    font-weight: 700;
    font-size: 28px;
    line-height: 1.2;
}

.featured-gift-hero__description {
    margin: 0 0 16px;
    color: #4b5563;
    font-size: 16px;
    line-height: 1.5;
    white-space: pre-line;
}

.featured-gift-hero__price {
    margin: 0 0 16px;
    color: #111827;
    font-weight: 600;
    font-size: 18px;
}

/* The bar's look is the shared .gift-progress in stylesv2-custom.css; the hero keeps its spacing. */
.featured-gift-progress {
    margin: 0 0 20px;
}

.featured-gift-hero__cta {
    display: inline-block;
    padding: 12px 28px;
    background-color: #111827;
    color: #ffffff;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    transition: background-color 0.2s ease;
    user-select: none;
}

.featured-gift-hero:hover .featured-gift-hero__cta,
.featured-gift-hero:focus .featured-gift-hero__cta {
    background-color: #374151;
    color: #ffffff;
}

@media (min-width: 768px) {
    .featured-cover {
        min-height: 640px;
        /* Buffer between the site navbar and the colored hero. Matches the
           Profile design's desktop top buffer. Mobile keeps zero gap because
           the collapsed navbar is shorter and the hero content centers
           visually without help. */
        margin-top: 32px;
    }

    .featured-cover__container {
        padding: 96px 32px 128px;
    }

    .featured-gift-hero {
        display: flex;
        align-items: stretch;
    }

    .featured-gift-hero__image {
        flex: 1 1 50%;
        aspect-ratio: auto;
    }

    .featured-gift-hero__body {
        flex: 1 1 50%;
        padding: 32px 36px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .featured-gift-hero__name {
        font-size: 32px;
    }
}
