/*
 * WebVue Woodmart Premium Product Cards v2
 * Designed to visually match the supplied premium card reference.
 */

.wv-premium-product-cards-active {
    --wv-black: #151515;
    --wv-white: #fff;
    --wv-cream: #fff6e8;
    --wv-text: #262626;
    --wv-muted: #747474;
    --wv-line: #dedede;
}

/* =========================================================
   CARD SHELL
========================================================= */

.wv-premium-product-cards-active .wv-premium-card {
    text-align: left !important;
}

.wv-premium-product-cards-active .wv-premium-card .product-wrapper,
.wv-premium-product-cards-active .wv-premium-card.wd-product,
.wv-premium-product-cards-active li.wv-premium-card.product {
    overflow: hidden;
    border: 1px solid #dfdfdf !important;
    border-radius: 4px !important;
    background: #fff !important;
    box-shadow: 0 5px 18px rgba(0,0,0,.04);
}

/* =========================================================
   IMAGE AREA
========================================================= */

.wv-premium-product-cards-active .wv-premium-card .product-element-top,
.wv-premium-product-cards-active .wv-premium-card .product-image-link {
    position: relative;
    overflow: hidden;
    margin: 0 !important;
    border-radius: 4px 4px 0 0 !important;
    background:
        linear-gradient(135deg, #fffaf1 0%, #fff3df 100%) !important;
}

.wv-premium-product-cards-active .wv-premium-card .product-element-top img,
.wv-premium-product-cards-active .wv-premium-card .product-image-link img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    padding: 20px;
}

/* =========================================================
   CONTENT AREA
========================================================= */

.wv-premium-product-cards-active .wv-premium-card .product-information,
.wv-premium-product-cards-active .wv-premium-card .wd-product-information,
.wv-premium-product-cards-active .wv-premium-card .product-details {
    padding: 17px 18px 18px !important;
}

/* =========================================================
   RATING BADGE
========================================================= */

.wv-card-rating-badge {
    position: absolute;
    z-index: 8;
    left: 0;
    bottom: 0;

    display: inline-flex;
    align-items: center;
    gap: 4px;

    min-height: 27px;
    padding: 6px 9px;

    border-radius: 0 4px 0 0;
    background: #8b4a00;
    color: #fff;

    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}

.wv-card-rating-star {
    color: #ffd768;
}

/* =========================================================
   TITLE
========================================================= */

.wv-premium-product-cards-active .wv-premium-card .product-title,
.wv-premium-product-cards-active .wv-premium-card .woocommerce-loop-product__title {
    margin: 0 0 7px !important;
    color: var(--wv-text) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    text-align: left !important;
}

/* =========================================================
   PRODUCT META
========================================================= */

.wv-card-meta {
    margin: 0 0 11px;
}

.wv-card-subtitle {
    margin: 0 0 11px;
    color: #777;
    font-size: 11px;
    line-height: 1.45;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* =========================================================
   HIGHLIGHTS
========================================================= */

.wv-card-highlights {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 13px;
    margin-bottom: 11px;
}

.wv-card-highlight {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    color: #515151;
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
}

.wv-card-highlight-icon {
    display: inline-flex;
    width: 13px;
    height: 13px;
    color: #444;
}

.wv-card-highlight-icon svg {
    width: 100%;
    height: 100%;
}

/* =========================================================
   ATTRIBUTE CHIPS
========================================================= */

.wv-card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.wv-card-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 24px;
    padding: 4px 8px;

    border: 1px solid #dedede;
    border-radius: 4px;

    background: #fff;
    color: #383838;

    font-size: 9.5px;
    line-height: 1;
}

/* =========================================================
   PRICE
========================================================= */

.wv-premium-product-cards-active .wv-premium-card .price {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;

    margin: 12px 0 13px !important;

    color: #1b1b1b !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

.wv-premium-product-cards-active .wv-premium-card .price ins {
    color: #1b1b1b !important;
    text-decoration: none !important;
}

.wv-premium-product-cards-active .wv-premium-card .price del {
    color: #9c9c9c !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    opacity: 1 !important;
}

.wv-card-discount-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 21px;
    margin: 0 0 12px 0;
    padding: 4px 7px;

    border-radius: 4px;
    background: #111;
    color: #fff;

    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}

/* =========================================================
   ACTION BUTTONS
========================================================= */

.wv-card-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 2px;
}

.wv-card-actions > a,
.wv-card-actions > button {
    width: 100% !important;
    min-height: 45px !important;
    margin: 0 !important;
    padding: 0 12px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px;

    border-radius: 4px !important;
    box-shadow: none !important;

    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-transform: none !important;
}

/* BUY NOW = black */
.wv-card-buy-now {
    border: 1px solid #111 !important;
    background: #111 !important;
    color: #fff !important;
}

.wv-card-buy-now:hover {
    background: #fff !important;
    color: #111 !important;
}

/* ADD TO CART = white */
.wv-card-actions .add_to_cart_button,
.wv-card-actions .product_type_variable,
.wv-card-actions .product_type_simple,
.wv-card-actions .product_type_grouped,
.wv-card-actions .product_type_external {
    border: 1px solid #cfcfcf !important;
    background: #fff !important;
    color: #111 !important;
}

.wv-card-actions .add_to_cart_button:hover,
.wv-card-actions .product_type_variable:hover,
.wv-card-actions .product_type_simple:hover,
.wv-card-actions .product_type_grouped:hover,
.wv-card-actions .product_type_external:hover {
    border-color: #111 !important;
    background: #f7f7f7 !important;
}

.wv-card-btn-icon,
.wv-card-cart-icon {
    display: inline-flex;
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
}

.wv-card-btn-icon svg,
.wv-card-cart-icon svg {
    width: 100%;
    height: 100%;
}

/* Hide some Woodmart extra action chrome that clashes with reference */
.wv-premium-product-cards-active .wv-premium-card .wd-buttons,
.wv-premium-product-cards-active .wv-premium-card .wd-quick-shop-2,
.wv-premium-product-cards-active .wv-premium-card .quick-shop-form {
    border-radius: 4px !important;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .wv-premium-product-cards-active .wv-premium-card .product-information,
    .wv-premium-product-cards-active .wv-premium-card .wd-product-information,
    .wv-premium-product-cards-active .wv-premium-card .product-details {
        padding: 13px !important;
    }

    .wv-premium-product-cards-active .wv-premium-card .product-title,
    .wv-premium-product-cards-active .wv-premium-card .woocommerce-loop-product__title {
        font-size: 14px !important;
    }

    .wv-card-subtitle {
        font-size: 10px;
    }

    .wv-card-highlight {
        font-size: 9px;
    }

    .wv-card-chip {
        min-height: 22px;
        padding: 4px 6px;
        font-size: 8.8px;
    }

    .wv-premium-product-cards-active .wv-premium-card .price {
        font-size: 17px !important;
    }

    .wv-card-actions > a,
    .wv-card-actions > button {
        min-height: 42px !important;
        font-size: 10px !important;
    }
}

/* Very narrow cards / 2-column phone grids */
@media (max-width: 480px) {

    .wv-card-actions {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .wv-card-highlights {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .wv-premium-product-cards-active .wv-premium-card .product-element-top img,
    .wv-premium-product-cards-active .wv-premium-card .product-image-link img {
        padding: 10px;
    }
}
