/**
 * La Buchette - Product Loop Styles
 */

/* ============================================
   Fix horizontal overflow & page width
   ============================================ */
.lb-shop-layout {
    max-width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

body.archive.tax-product_cat {
    overflow-x: hidden;
}

/* ============================================
   Content area padding
   ============================================ */
.content-area,
.site-main {
    padding-left: 10px;
    padding-right: 10px;
    box-sizing: border-box;
}

/* ============================================
   Result count
   ============================================ */
.woocommerce-result-count {
    color: var(--lb-dark, #2C3E50) !important;
}

/* ============================================
   Hide ordering dropdown
   ============================================ */
.woocommerce-ordering {
    display: none !important;
}

/* ============================================
   Product Grid - CSS Grid layout
   ============================================ */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 0;
    list-style: none;
}

ul.products::before,
ul.products::after {
    content: none !important;
    display: none !important;
}

ul.products li.product {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    border: 1px solid var(--lb-gray-lighter, #ECF0F1);
    border-radius: 8px;
    background: #fff;
    padding: 0 0 12px !important;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* ============================================
   Product Image
   ============================================ */
ul.products li.product a.woocommerce-loop-product__link img,
ul.products li.product .woocommerce-loop-product__link img {
    border-radius: 8px 8px 0 0;
    margin: 0;
    padding: 0;
    display: block;
    width: 100%;
}

/* ============================================
   Product Title
   ============================================ */
ul.products li.product .woocommerce-loop-product__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--lb-dark, #2C3E50);
    padding: 8px 14px 0 !important;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
    line-height: 1.4;
}

/* ============================================
   Price
   ============================================ */
ul.products li.product .price {
    font-size: 18px;
    font-weight: 700;
    color: #71331C;
    padding: 2px 14px 0;
    display: block;
}

ul.products li.product .price del {
    font-size: 13px;
    font-weight: 400;
    color: #999;
}

ul.products li.product .price ins {
    text-decoration: none;
}

/* ============================================
   Quick Specs Tags
   ============================================ */
.lb-quick-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 4px;
    padding: 0 14px;
}

.lb-spec-tag {
    display: inline-block;
    padding: 3px 8px;
    background: var(--lb-gray-lighter, #ECF0F1);
    color: var(--lb-dark-light, #34495E);
    font-size: 11px;
    font-weight: 500;
    border-radius: 3px;
    line-height: 1.4;
}

/* Category-specific tag colors */
.lb-cat-buches-de-bois .lb-spec-tag {
    background: #FEF3E2;
    color: #8B5E0F;
}

.lb-cat-poeles .lb-spec-tag {
    background: #FDEDED;
    color: #922B21;
}

.lb-cat-remorques .lb-spec-tag {
    background: #E8F6EF;
    color: #1A5232;
}

/* ============================================
   Sale Badge
   ============================================ */
.lb-sale-badge {
    font-weight: 700 !important;
    font-size: 14px !important;
    min-width: 48px;
    text-align: center;
    padding: 4px 10px !important;
    border-radius: var(--lb-radius-sm, 4px) !important;
    background: #E74C3C !important;
    color: var(--lb-white, #fff) !important;
}

/* ============================================
   Add to Cart - Text Link Style
   ============================================ */
ul.products li.product .button.add_to_cart_button,
ul.products li.product .button.product_type_variable,
ul.products li.product .button.product_type_simple {
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 16px 14px 8px !important;
    margin-top: auto;
    color: #71331C !important;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: 18px;
    font-weight: 600;
    text-align: left;
    display: block;
    width: auto;
    line-height: 1.4;
}

ul.products li.product .button.add_to_cart_button:hover,
ul.products li.product .button.product_type_variable:hover,
ul.products li.product .button.product_type_simple:hover {
    background: none !important;
    color: #4a1f10 !important;
    text-decoration: underline;
}

/* ============================================
   Wishlist Icon - always visible, top-right
   ============================================ */
ul.products li.product .shopengine-wishlist.badge.se-btn {
    position: absolute !important;
    top: 8px;
    right: 8px;
    z-index: 5;
    width: 32px;
    height: 32px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85) !important;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    padding: 0 !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

ul.products li.product .shopengine-wishlist.badge.se-btn:hover {
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ============================================
   Hide Quick View & Comparison
   ============================================ */
ul.products li.product .shopengine-quickview-trigger.se-btn,
ul.products li.product .shopengine-comparison.badge {
    display: none !important;
}

/* ============================================
   Responsive - Tablet
   ============================================ */
@media (max-width: 1024px) {
    ul.products {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    ul.products li.product .woocommerce-loop-product__title {
        font-size: 13px;
        padding: 10px 12px 0;
    }

    ul.products li.product .price {
        font-size: 16px;
        padding: 4px 12px 0;
    }

    .lb-quick-specs {
        padding: 0 12px;
    }

    ul.products li.product .button.add_to_cart_button,
    ul.products li.product .button.product_type_variable,
    ul.products li.product .button.product_type_simple {
        padding: 10px 12px !important;
        font-size: 20px;
    }
}

/* ============================================
   Responsive - Mobile
   ============================================ */
@media (max-width: 544px) {
    ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    ul.products li.product .woocommerce-loop-product__title {
        font-size: 12px;
        padding: 8px 10px 0;
        min-height: 2.4em;
    }

    ul.products li.product .price {
        font-size: 15px;
        padding: 4px 10px 0;
    }

    ul.products li.product .price del {
        font-size: 11px;
    }

    .lb-quick-specs {
        gap: 3px;
        padding: 0 10px;
    }

    .lb-spec-tag {
        font-size: 10px;
        padding: 2px 6px;
    }

    ul.products li.product .button.add_to_cart_button,
    ul.products li.product .button.product_type_variable,
    ul.products li.product .button.product_type_simple {
        padding: 8px 10px !important;
        font-size: 18px;
    }

    ul.products li.product .shopengine-wishlist.badge.se-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}
