/**
 * Klevu Custom Product Card Styles
 * 
 * Minimal base styles for the custom product card template.
 * Override these styles in your WordPress theme as needed.
 * 
 * @package Klevu_Feed
 * @since 1.7.7
 */

/* ====================================================== */
/* ========== QUICK SEARCH WRAPPER STYLES =============== */
/* ====================================================== */

/* Quick search wrapper - contains input and results target */
.klevu-quick-search-wrapper {
    position: relative;
}

/* Target element for quick search results dropdown */
.klevu-quick-search-results-target {
    position: relative;
}

/* ====================================================== */
/* ============ CUSTOM PRODUCT BLOCK STYLES ============= */
/* ====================================================== */

/* Product Card Container */
.klevu-custom-product-wrapper {
    list-style: none;
    position: relative;
}

.klevu-custom-product-wrapper .kuProdWrap {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

/* Product Link */
.klevu-custom-product-wrapper .klevu-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
    flex: 1;
}

/* Product Image */
.klevu-custom-product-wrapper .klevu-product-image-wrapper,
.kuResults ul li.klevu-custom-product-wrapper .kuProdWrap .kuProdTop {
    position: relative !important;
    padding-bottom: 100%; /* 1:1 aspect ratio */
    overflow: hidden !important;
    height: auto !important;
    width: 100% !important;
}

.klevu-custom-product-wrapper .klevuImgWrap,
.kuResults ul li.klevu-custom-product-wrapper .kuProdWrap .kuProdTop .klevuImgWrap {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    text-align: left !important;
}

.klevu-custom-product-wrapper .klevu-product-image,
.kuResults ul li.klevu-custom-product-wrapper .kuProdWrap .kuProdTop .klevuImgWrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Sale Badge */
.klevu-custom-product-wrapper .klevu-sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #e74c3c;
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 1;
}

/* Product Info */
.klevu-custom-product-wrapper .klevu-product-info {
    padding: 15px 0;
}

.klevu-custom-product-wrapper .klevu-product-title {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
}

/* Price */
.klevu-custom-product-wrapper .klevu-product-price {
    font-size: 14px;
}

.klevu-custom-product-wrapper .klevu-original-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 8px;
}

.klevu-custom-product-wrapper .klevu-sale-price,
.klevu-custom-product-wrapper .klevu-current-price {
    font-weight: bold;
}

/* Add to Cart */
.klevu-custom-product-wrapper .klevu-addtocart-wrapper {
    margin-top: auto;
}

.klevu-custom-product-wrapper .klevu-addtocart-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
    cursor: pointer;
    border: none;
    width: 100%;
    box-sizing: border-box;
}

.klevu-custom-product-wrapper .klevu-addtocart-btn:hover {
    background-color: #555;
}

/* ====================================================== */
/* ================ CSS CLASS REFERENCE ================= */
/* ====================================================== */
/*
 * Use these classes in your WordPress theme to customize:
 *
 * .klevu-custom-product-wrapper  - Product card container
 * .klevu-product-link            - Main product link
 * .klevu-product-image-wrapper   - Image container
 * .klevu-product-image           - Product image
 * .klevu-sale-badge              - Sale badge
 * .klevu-product-info            - Product info container
 * .klevu-product-title           - Product title
 * .klevu-product-price           - Price container
 * .klevu-original-price          - Original/strikethrough price
 * .klevu-sale-price              - Sale price
 * .klevu-current-price           - Current price (when not on sale)
 * .klevu-addtocart-wrapper       - Add to cart container
 * .klevu-addtocart-btn           - Add to cart button
 */

