/* Outer panel = grid column. Transparent so the page bg shows through
 * above and below the sticky card — that's what makes the card's top
 * and bottom borders read as edges instead of blending into a column
 * of white. Stretches to fill the layout cell as the sticky-positioning
 * context. */
.esther-shop-feature-panel {
    background: transparent;
    position: relative;
}

.esther-shop-feature-panel__sticky {
    position: sticky;
    /* Site header is itself position:sticky with min-height 80px.
     * Clear it with a small visual gap so the card never slides under. */
    top: calc(80px + var(--s-4));
    padding: var(--s-6);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 16px rgb(20 20 21 / 0.04);
    /* Provides positioning context for the overlay card */
}

.esther-shop-feature-panel__image-link {
    display: block;
    color: inherit;
    text-decoration: none;
    position: relative;
}

.esther-shop-feature-panel__media {
    aspect-ratio: 6 / 5;
    max-height: calc(100vh - 80px - var(--s-4) * 4);
    background: var(--color-surface);
    overflow: hidden;
    position: relative;
}

.esther-shop-feature-panel__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform var(--t-slow), opacity var(--t-base);
}

.esther-shop-feature-panel__image[src=""] {
    opacity: 0;
}

.esther-shop-feature-panel__image-link:hover .esther-shop-feature-panel__image {
    transform: scale(1.01);
}

/* Overlay card pinned to the bottom-right of the feature image.
 * Holds the product name + price + Buy now CTA — matches the mockup
 * pattern from Shop Page 1.webp. */
.esther-shop-feature-panel__overlay {
    position: absolute;
    right: calc(var(--s-6) + var(--s-4));
    bottom: calc(var(--s-6) + var(--s-4));
    width: min(320px, calc(100% - var(--s-6) * 4));
    background: var(--color-surface);
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 28px rgb(20 20 21 / 0.18), 0 4px 8px rgb(20 20 21 / 0.10);
    z-index: 1;
}

.esther-shop-feature-panel__meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--s-4);
    padding: var(--s-4) var(--s-4) var(--s-3);
}

.esther-shop-feature-panel__name {
    margin: 0;
    font-size: var(--fs-body);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    line-height: var(--lh-tight);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.esther-shop-feature-panel__price {
    font-size: var(--fs-body);
    font-weight: var(--fw-semibold);
    color: var(--color-text);
    white-space: nowrap;
}

.esther-shop-feature-panel__price .woocommerce-Price-amount {
    font-weight: inherit;
}

.esther-shop-feature-panel__cta {
    padding-block: var(--s-3);
    font-size: var(--fs-small);
}

/* Highlight selected product in the grid — darken the thumb instead of an outline */
.esther-product-card.is-selected .esther-product-card__thumb img {
    filter: brightness(0.85);
}

/* Mobile / tablet: panel becomes static and sits above the grid (or hide entirely
   when grid collapses to 1col under 600px — handled by the parent layout). */
@media (max-width: 1023px) {
    .esther-shop-feature-panel {
        position: static;
    }
}
