/* =============================================
   Product Card Enhanced Design
   Uses theme CSS variables throughout.
   Loaded independently — no Vite rebuild needed.
   ============================================= */

/* ----- Section 1: Card Container ----- */
.wv-card-product {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: var(--bg-primary, #FFFFFF);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    padding: 0;
    border: 1px solid var(--border-light, #E5E7EB);
}
.wv-card-product:hover {
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
    transform: translateY(-4px);
    border-color: var(--border-medium, #D1D5DB);
}

/* ----- Section 2: Top-left Badge ----- */
.wv-card-product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    background: #1F2937;
    color: #FFFFFF;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.2rem 0.6rem;
    border-radius: 0.25rem;
    line-height: 1.4;
    pointer-events: none;
}

/* ----- Section 3: Image Area ----- */
.wv-card-product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--bg-secondary, #F9FAFB);
}
.wv-card-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.wv-card-product:hover .wv-card-product-image img {
    transform: scale(1.06);
}
.wv-card-product-image .wv-card-product-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #9CA3AF);
}

/* ----- Section 4: Title ----- */
.wv-card-product-title {
    margin: 0.75rem 0.5rem 0.25rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary, #111111);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.7rem;
}
.wv-card-product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}
.wv-card-product-title a:hover {
    color: var(--brand-gold, #B8922E);
}

/* ----- Section 5: Price Area ----- */
.wv-card-product-prices {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.25rem 0.5rem;
}
.wv-card-product-price {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--price-color, var(--brand-dark, #111111));
}
.wv-card-product-price--old {
    font-size: 0.875rem;
    color: var(--text-muted, #9CA3AF);
    text-decoration: line-through;
}

/* Featured badge variant */
.wv-card-product-badge--featured {
    background: #B8922E;
    color: #FFFFFF;
}

/* ----- Section 7: Cart Button ----- */
.wv-card-product-actions {
    margin: 0.5rem 0.5rem 0.75rem;
}
.wv-card-product-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    background: #1F2937;
    color: #FFFFFF;
    font-size: 0.8125rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: auto;
    min-width: 120px;
    line-height: 1.4;
}
.wv-card-product-btn:hover {
    background: #374151;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.25);
}
.wv-card-product-btn:active {
    transform: translateY(0) scale(0.97);
}
.wv-card-product-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Theme-aware button overrides */
html.theme-coffee-wood .wv-card-product-btn {
    background: #5C3D2E;
}
html.theme-coffee-wood .wv-card-product-btn:hover {
    background: #4A2F22;
    box-shadow: 0 4px 12px rgba(92, 61, 46, 0.3);
}

html.theme-dark-gentleman .wv-card-product-btn {
    background: var(--brand-gold, #C9A84C);
    color: var(--bg-primary, #12121E);
}
html.theme-dark-gentleman .wv-card-product-btn:hover {
    background: #D4B040;
    box-shadow: 0 4px 16px rgba(201, 168, 76, 0.3);
}

/* ----- Section 8: Rating Area ----- */
.wv-card-product-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin: 0 0.5rem 0.75rem;
    font-size: 0.7rem;
    color: var(--text-muted, #9CA3AF);
    line-height: 1;
}
.wv-card-product-stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    font-size: 0.75rem;
    line-height: 1;
    color: var(--brand-gold, #B8922E);
    letter-spacing: 0;
}
.wv-card-product-stars .star-empty {
    color: var(--border-medium, #D1D5DB);
}
.wv-card-product-reviews {
    margin-left: 0.25rem;
    color: var(--text-muted, #9CA3AF);
}

/* ----- Responsive: Mobile Single Column ----- */
@media (max-width: 639px) {
    .wv-card-product {
        width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
}
