/* The homepage's existing finds, photographed in use. No layout dependencies
   outside this section and no changes to the product-selection mechanism. */
.fun-finds {
    padding: 24px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    background: #fff;
    color: #0f172a;
}

.fun-finds__eyebrow {
    margin: 0 0 4px;
    color: #047857;
    font-size: 14px;
    font-weight: 600;
}

.fun-finds__heading h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -.025em;
}

.fun-finds__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.fun-find {
    position: relative;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    min-width: 0;
    padding: 0 0 16px;
    border-bottom: 1px solid #edf0f2;
}

.fun-find:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.fun-find__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
}

.fun-find__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fun-find__media--scene {
    background: #f1f5f9;
}

.fun-find__media--scene img {
    object-fit: cover;
}

.fun-find__alternate {
    display: none;
}

/* Keep the complete characters inside the shallow desktop gallery frame. */
.fun-find[data-product-id="6879083"] .fun-find__media--scene img {
    object-position: center 60%;
}

.fun-find[data-product-id="7000043"] .fun-find__media--scene img {
    object-position: center bottom;
}

.fun-find[data-product-id="7000558"] .fun-find__media--scene img {
    object-position: center top;
}

.fun-find__placeholder {
    width: 40px;
    height: 40px;
    color: #94a3b8;
}

.fun-find__details {
    min-width: 0;
    padding-top: 2px;
}

.fun-find h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.fun-find h3 a {
    color: inherit;
    text-decoration: none;
}

/* A single product-named link covers the media and price as well as the title. */
.fun-find h3 a::after {
    position: absolute;
    inset: -5px;
    border-radius: 14px;
    content: '';
}

.fun-find h3 a:focus-visible {
    outline: none;
}

.fun-find h3 a:focus-visible::after {
    outline: 2px solid #047857;
    outline-offset: 2px;
}

.fun-find__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    column-gap: 12px;
    margin-top: 8px;
}

.fun-find__price {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
}

.fun-find__cta {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    color: #047857;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-underline-offset: 3px;
}

.fun-find:focus-within .fun-find__cta {
    color: #065f46;
    text-decoration: underline;
}

@media (hover: hover) {
    .fun-find:hover .fun-find__cta {
        color: #065f46;
        text-decoration: underline;
    }
}

/* The primary image stays underneath, including while the alternate loads.
   Touch devices keep the primary photo and do not download the hover asset. */
@media (min-width: 640px) and (hover: hover) and (pointer: fine) {
    .fun-find__alternate {
        display: block;
        position: absolute;
        inset: 0;
        opacity: 0;
    }

    .fun-find:hover .fun-find__alternate,
    .fun-find:focus-within .fun-find__alternate {
        opacity: 1;
    }

    /* The lit moon fills its square original; contain it to preserve the tip. */
    .fun-find[data-product-id="7000559"] .fun-find__alternate img {
        object-fit: contain;
        background: #b7a79b;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .fun-find__alternate { transition: opacity 180ms ease; }
    .fun-find__cta { transition: color 180ms ease; }
}

@media (max-width: 359px) {
    .fun-finds { padding-inline: 16px; }
    .fun-find { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
}

@media (max-width: 639px) {
    /* Bring Bob forward in the small photo; keep the same scene and row size. */
    .fun-find[data-product-id="7000611"] .fun-find__media--scene img {
        transform: scale(1.5);
        transform-origin: 55% 45%;
    }
}

@media (min-width: 640px) {
    .fun-finds { padding: 32px; }
    .fun-finds__heading h2 { font-size: 30px; }
    .fun-finds__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
    .fun-find { display: flex; flex-direction: column; gap: 14px; padding: 0; border: 0; }
    .fun-find__media { width: 100%; aspect-ratio: 4 / 3; border-radius: 16px; }
    .fun-find__media:not(.fun-find__media--scene) img { max-width: 150px; max-height: 150px; }
    .fun-find__details { display: flex; flex: 1; flex-direction: column; width: 100%; padding: 0 2px; }
    .fun-find__footer { margin-top: auto; padding-top: 8px; }
}

@media (min-width: 1024px) {
    .fun-finds__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
