/* Product Card Styles */
.product-card {
    --card-gradient-top: #9E6573;
    --card-gradient-bottom: #FAC0CE;
    --card-text-color: #662C39;
    --card-overlay-color: #FFC5D3;
    --card-border-color: #662C39;
    --card-button-bg: #662C39;
    --card-button-fg: #FFC5D3;
    --card-button-hover-bg: rgba(102, 44, 57, 0.85);

    position: relative;
    width: 100%;
    height: 100%;
    /* 4px bezel around the inner card */
    padding: 4px;
    border-radius: 12px;
    background: var(--card-border-color);
    overflow: visible;
    transform: translateY(0) scale(1);
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-7px) scale(1.015);
}

.image-container {
    --overlay-height: 42%; /* adjustable overlay height */
    --peek: 75px; /* how much of the image peeks below the curve */
    position: relative;
    width: 100%;
    height: 100%;
}

.product-inner {
    /* inner surface that gets the gradient and shadow */
    position: absolute;
    inset: 4px; /* match bezel padding */
    background: linear-gradient(to bottom, var(--card-gradient-top), var(--card-gradient-bottom));
    border-radius: 8px; /* 12 - 4 to match outer radius minus bezel */
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: box-shadow 280ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: box-shadow;
}

.product-card:hover .product-inner {
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26);
}

.product-image {
    width: 100%;
    /* stop the image where the overlay starts, allow a small peek */
    height: calc(100% - var(--overlay-height) + var(--peek));
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    /* fallback background if image fails to load */
    background-color: var(--card-gradient-top);
    transform: scale(1);
    transform-origin: center center;
    transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1), filter 420ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, filter;
}

.product-card:hover .product-image {
    transform: scale(1.04);
    filter: saturate(1.06) brightness(1.02);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--overlay-height);
    overflow: visible;
    z-index: 2;
}

.overlay-shape {
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.overlay-shape path {
    fill: #b67485;
}

.product-card.is-pick::before {
    content: 'A_Media Pick';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--surface-color);
    color: var(--card-border-color);
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 999px;
    border: 4px solid var(--card-border-color);
    z-index: 5;
    pointer-events: none;
    white-space: nowrap;
}

.overlay-content {
    position: absolute;
    bottom: 6px;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    color: var(--card-overlay-color);
    padding: 8px 12px;
    box-sizing: border-box;
    text-align: left;
    pointer-events: none; /* keep svg buttons clickable only if desired */
    transform: translateY(0);
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.product-card:hover .overlay-content {
    transform: translateY(-2px);
}

.overlay-content .buttons { pointer-events: auto; }

.product-meta {
    width: 100%;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    margin-bottom: 8px;
}

.product-title {
    flex: 1;
    min-width: 0;
    font-size: 1.35rem;
    margin-bottom: 0;
    color: #f0f0f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    flex-shrink: 0;
    font-size: 1.25rem;
    font-weight: bold;
    color: #f0f0f0;
    margin-bottom: 0;
}

.buttons {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: stretch;
}

.add-to-cart, .wishlist, .share {
    background: var(--card-button-bg);
    color: var(--surface-color);
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 180ms ease, background-color 180ms ease;
}

.add-to-cart {
    flex: 1;
    padding: 0 12px;
}

.wishlist, .share {
    width: 34px;
    padding: 0;
}

.add-to-cart:hover, .wishlist:hover, .share:hover {
    background: var(--card-button-hover-bg);
    transform: translateY(-1px);
}