/**
* Theme Name: Urna Child
* Description: This is a child theme for Urna
* Author: Thembay
* Author URI: https://thembay.com/
* Version: 2.6
* Template: urna
*/


/*  [ Add your custom css below ]
- - - - - - - - - - - - - - - - - - - - */

/* ===== COFFAIR NEWMATIC CARD STYLE ===== */

/* Reset the default Urna product card */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    padding: 0 !important;
    margin-bottom: 20px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.07) !important;
    border: 1px solid #eef0f4 !important;
    background: #fff !important;
    transition: transform .2s ease, box-shadow .2s ease !important;
    position: relative !important;
}
.woocommerce ul.products li.product:hover,
.woocommerce-page ul.products li.product:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 28px rgba(0,0,0,.13) !important;
}

/* The card wrapper */
.nm-card-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    background: #fff;
}

/* Brand badge */
.nm-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #f97316;
    color: #fff;
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 3px 10px;
    border-radius: 20px;
    z-index: 3;
    line-height: 1.6;
    pointer-events: none;
}

/* Image area */
.nm-img-link {
    display: block;
    text-decoration: none;
    background: #f8f9fb;
    border-bottom: 1px solid #f0f0f0;
    overflow: hidden;
}
.nm-img {
    width: 100% !important;
    height: 180px !important;
    object-fit: contain !important;
    padding: 14px !important;
    display: block !important;
    transition: transform .3s ease !important;
}
.nm-card-wrap:hover .nm-img {
    transform: scale(1.04);
}
.nm-img-placeholder {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
}

/* Body */
.nm-body {
    padding: 12px 14px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.nm-title-link {
    text-decoration: none !important;
}
.nm-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #111 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}
.nm-desc {
    font-size: 12px !important;
    color: #6b7280 !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Action buttons */
.nm-actions {
    display: flex;
    gap: 7px;
    padding: 8px 14px 14px;
}
.nm-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: opacity .15s;
    white-space: nowrap;
}
.nm-btn:hover { opacity: .85; }
.nm-btn-cart {
    background: #ef4444 !important;
    color: #fff !important;
}
.nm-btn-cart:hover { color: #fff !important; }
.nm-btn-devis {
    background: #22c55e !important;
    color: #fff !important;
}
.nm-btn-devis:hover { color: #fff !important; }

/* Hide default Urna elements inside our new card */
.nm-card-wrap .product-content,
.nm-card-wrap .block-inner,
.nm-card-wrap .group-buttons,
.nm-card-wrap .caption { display: none !important; }

/* Product title truncation for regular shop too */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 14px !important;
    font-weight: 600 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    line-height: 1.4em !important;
    max-height: 2.8em !important;
}
/* ===== END COFFAIR CARD ===== */

/* ===== RELATED PRODUCTS: nm2-card grid style ===== */
.related ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
.related ul.products li.product {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: none !important;
    position: relative !important;
}
.related ul.products li.product .nm2-card {
    background: #fff !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    transition: border-color .2s, box-shadow .2s !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}
.related ul.products li.product .nm2-card:hover {
    border-color: #f97316 !important;
    box-shadow: 0 4px 16px rgba(249,115,22,.1) !important;
}
.nm2-card-img-wrap {
    width: 100% !important;
    height: 160px !important;
    background: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    border-bottom: 1px solid #efefef !important;
    text-decoration: none !important;
    position: relative !important;
}
.nm2-card-img-wrap img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    padding: 6px !important;
    transition: transform .3s !important;
}
.nm2-card:hover .nm2-card-img-wrap img {
    transform: scale(1.05) !important;
}
.nm2-card-badge {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    background: #f97316 !important;
    color: #fff !important;
    font-size: 9.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: .5px !important;
    padding: 3px 9px !important;
    border-radius: 20px !important;
    z-index: 3 !important;
    line-height: 1.5 !important;
}
.nm2-card-body {
    padding: 10px 11px 6px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}
.nm2-card-title-link {
    text-decoration: none !important;
}
.nm2-card-title {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #222 !important;
    line-height: 1.4 !important;
    margin: 0 0 5px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}
.nm2-card-title:hover {
    color: #f97316 !important;
}
.nm2-card-desc {
    font-size: 11.5px !important;
    color: #888 !important;
    line-height: 1.5 !important;
    flex: 1 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin: 0 0 8px !important;
}
.nm2-card-actions {
    display: flex !important;
    gap: 6px !important;
    padding: 0 11px 11px !important;
}
.nm2-btn {
    flex: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 8px 6px !important;
    border-radius: 3px !important;
    font-size: 12.5px !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer !important;
    transition: opacity .15s !important;
}
.nm2-btn-cart {
    background: #ef4444 !important;
    color: #fff !important;
}
.nm2-btn-cart:hover {
    background: #dc2626 !important;
    color: #fff !important;
}
.nm2-btn-devis {
    background: #22c55e !important;
    color: #fff !important;
}
.nm2-btn-devis:hover {
    background: #16a34a !important;
    color: #fff !important;
}

@media(max-width:900px) {
    .related ul.products { grid-template-columns: repeat(2, 1fr) !important; }
}
@media(max-width:520px) {
    .related ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
    .nm2-btn { font-size: 10.5px !important; padding: 7px 3px !important; }
    .nm2-card-title { font-size: 12px !important; }
    .nm2-card-img-wrap { height: 130px !important; }
}
/* ===== END RELATED PRODUCTS ===== */

/* Hide grid/list toggle on all WooCommerce pages */
.display-mode-warpper, .display-mode-btn, .shop-view-icon,
.tbay-filter .display-mode-warpper { display: none !important; }


/* Widget titles left aligned */
.widget-title,
.widgettitle,
.widget .widget-title {
    text-align: left !important;
}

/* Boutique mobile layout fix: keep toolbar and product grid stacked. */
@media(max-width:768px) {
    .nm2-main {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        min-width: 0 !important;
    }
    .nm2-topbar,
    .nm2-results-bar,
    .nm2-grid {
        width: 100% !important;
    }
}
