/* ============================================================
   CB Listing Enhancer — cble-style.css v1.1
   Full card layout control via template override
   ============================================================ */

/* ── Card ── */
.woocommerce ul.products li.product.cble-product-card,
.woocommerce-page ul.products li.product.cble-product-card {
    border: 1.5px solid #F0E6DC;
    border-radius: 16px;
    background: #FFFFFF;
    box-shadow: 0 2px 12px rgba(61,26,14,0.07);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    position: relative;
    display: flex !important;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden;
}

.woocommerce ul.products li.product.cble-product-card:hover,
.woocommerce-page ul.products li.product.cble-product-card:hover {
    box-shadow: 0 8px 28px rgba(61,26,14,0.14);
    transform: translateY(-3px);
}

/* ── Image wrap ── */
.cble-image-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 14px 14px 0 0;
    flex-shrink: 0;
}

.cble-img-link {
    display: block;
    overflow: hidden;
}

.cble-product-img {
    width: 100% !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block !important;
    transition: transform 0.4s ease;
}

.cble-product-card:hover .cble-product-img {
    transform: scale(1.04);
}

/* ── Express badge ── */
.cble-express-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #7B1C1C 0%, #A32020 100%);
    color: #FFD970;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(123,28,28,0.35);
    pointer-events: none;
    letter-spacing: 0.3px;
}

/* ── Off badge (top right) ── */
.cble-off-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #E8823A, #C0392B);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    z-index: 3;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(232,130,58,0.35);
}

/* ── CTA button — sits at bottom of image area ── */
.cble-cta-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 16px;
    background: linear-gradient(135deg, #C0392B 0%, #922B21 100%);
    color: #FFFFFF !important;
    font-size: 14px;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    text-decoration: none !important;
    letter-spacing: 0.4px;
    transition: background 0.22s ease;
    border: none;
    cursor: pointer;
    box-shadow: none;
    position: relative;
    z-index: 2;
}

.cble-cta-btn:hover {
    background: linear-gradient(135deg, #A93226 0%, #7B241C 100%) !important;
    color: #FFFFFF !important;
}

.cble-cart-icon { font-size: 16px; line-height: 1; }

/* ── Card body ── */
.cble-card-body {
    padding: 12px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1;
}

/* ── Stars ── */
.cble-stars-row {
    display: flex;
    align-items: center;
    gap: 3px;
}

.cble-star { font-size: 14px; line-height: 1; }
.cble-star-full  { color: #F5A623; }
.cble-star-half  { color: #F5A623; opacity: 0.7; }
.cble-star-empty { color: #D8CCC4; }

.cble-review-count {
    font-size: 12px;
    color: #9A7B6A;
    margin-left: 3px;
}

/* ── Title ── */
.cble-title-link {
    text-decoration: none !important;
    color: inherit;
}

.cble-product-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #2C1208 !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align:left !important;
}

/* ── Price row ── */
.cble-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cble-sale-price {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: #2C1208;
    line-height: 1;
}

.cble-mrp {
    font-size: 12px;
    color: #9A7B6A;
    font-weight: 400;
}

.cble-mrp s {
    text-decoration: line-through;
    color: #B8A898;
}

.cble-disc-badge {
    background: #E8823A;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    flex-shrink: 0;
}

/* ── Trust badges ── */
.cble-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.cble-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #5C3D2A;
    background: #FFF8F2;
    border: 1px solid #F0DFD0;
    border-radius: 20px;
    padding: 3px 9px 3px 7px;
    white-space: nowrap;
}

.cble-trust-icon  { font-size: 12px; line-height: 1; }
.cble-trust-label { font-weight: 500; line-height: 1; }

/* ── Weight info ── */
.cble-weight-info {
    font-size: 11.5px;
    color: #8A6A5A;
}

.cble-weight-info strong { color: #5C3D2A; }

/* ── Hide theme's default WC elements we've replaced ── */
.cble-product-card .onsale { display: none !important; }
.cble-product-card .button.add_to_cart_button,
.cble-product-card .added_to_cart { display: none !important; }
/* Hide the DUPLICATE theme title - only when our title is present */
.cble-product-card .product-caption > .woocommerce-loop-product__title:not(.cble-product-title) { display: none !important; }
/* Hide theme's default price - only the standalone .price, not inside our block */
.cble-product-card .product-caption > .price { display: none !important; }
/* Hide theme's default rating - only outside our stars row */
.cble-product-card .product-caption > .woocommerce-product-rating { display: none !important; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .cble-card-body { padding: 10px 12px 14px; gap: 6px; }
    .cble-product-title { font-size: 13px !important; }
    .cble-sale-price { font-size: 18px; }
    .cble-trust-badge { font-size: 10px; padding: 2px 7px 2px 6px; }
    .cble-cta-btn { font-size: 13px; padding: 11px 14px; }
}
