/**
 * Bangladesh Ecommerce - WooCommerce Styles
 * Full override — no WC default leakage
 */

/* =============================================
   SHOP PRODUCT GRID
============================================= */
.woocommerce-products-header { display: none !important; }

ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
    margin: 0 0 28px !important;
    padding: 0 !important;
    list-style: none !important;
}

/* ── Product Card ── */
ul.products li.product {
    list-style: none !important;
    background: #fff !important;
    border: 1px solid #ededed !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    /* Reset any WC floats */
    float: none !important;
    width: auto !important;
}

ul.products li.product:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.12) !important;
    transform: translateY(-4px) !important;
    border-color: #c8e6c9 !important;
}

/* ── Image area ── */
.be-card-img {
    position: relative !important;
    overflow: hidden !important;
    background: #f7f7f7 !important;
    aspect-ratio: 1 / 1 !important;
    width: 100% !important;
    flex-shrink: 0 !important;
}

.be-card-img-link {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    text-decoration: none !important;
}

/* THE KEY FIX: override WC's absolute positioning on img */
ul.products li.product img,
ul.products li.product .be-card-thumb,
.be-card-img img {
    position: static !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform .4s ease !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

ul.products li.product:hover .be-card-thumb,
ul.products li.product:hover img {
    transform: scale(1.07) !important;
}

.be-card-noimg {
    width: 100% !important;
    height: 100% !important;
    min-height: 180px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ddd !important;
    font-size: 44px !important;
    background: #f5f5f5 !important;
}

/* ── Sale badge ── */
.be-badge-sale {
    position: absolute !important;
    top: 9px !important;
    left: 9px !important;
    background: #e53935 !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    border-radius: 5px !important;
    z-index: 4 !important;
    font-family: var(--font-bangla) !important;
    line-height: 1.4 !important;
}

/* Hide WC default onsale badge */
ul.products li.product .onsale {
    display: none !important;
}

/* ── Wishlist button ── */
.be-card-wish {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 30px !important;
    height: 30px !important;
    background: #fff !important;
    border: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 13px !important;
    color: #bbb !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.13) !important;
    z-index: 4 !important;
    transition: all .2s ease !important;
    outline: none !important;
    padding: 0 !important;
}

.be-card-wish:hover,
.be-card-wish.on {
    color: #e53935 !important;
    transform: scale(1.1) !important;
}

/* ── Card body ── */
.be-card-body {
    padding: 11px 12px 13px !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
}

/* ── Title ── */
.be-card-title,
ul.products li.product .woocommerce-loop-product__title {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    margin: 0 0 5px !important;
    padding: 0 !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    font-family: var(--font-bangla) !important;
    text-decoration: none !important;
}

.be-card-title:hover { color: var(--primary) !important; }

/* ── Stars ── */
.be-card-stars {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin-bottom: 6px !important;
}

.be-stars-row {
    color: #f8b500 !important;
    font-size: 11px !important;
    display: flex !important;
    gap: 1px !important;
}

.be-stars-count {
    font-size: 11px !important;
    color: #aaa !important;
    font-family: var(--font-bangla) !important;
}

/* ── Price ── */
.be-card-price,
ul.products li.product .price {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    margin-bottom: 10px !important;
    flex-wrap: wrap !important;
}

.be-price-now {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1a7a3c !important;
    font-family: var(--font-bangla) !important;
}

.be-price-was {
    font-size: 12px !important;
    color: #bbb !important;
    text-decoration: line-through !important;
    font-family: var(--font-bangla) !important;
}

/* WC price ins/del override */
ul.products li.product .price ins {
    text-decoration: none !important;
    color: #1a7a3c !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    background: transparent !important;
}
ul.products li.product .price del {
    color: #bbb !important;
    font-size: 12px !important;
    text-decoration: line-through !important;
}
ul.products li.product .price .amount {
    font-family: var(--font-bangla) !important;
}

/* ── Action buttons ── */
.be-card-btns {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 7px !important;
    margin-top: auto !important;
}

.be-btn-c {
    padding: 8px 5px !important;
    background: transparent !important;
    color: #1a7a3c !important;
    border: 1.5px solid #1a7a3c !important;
    border-radius: 7px !important;
    font-family: var(--font-bangla) !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all .2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    text-align: center !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    line-height: 1.3 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.be-btn-c:hover {
    background: #1a7a3c !important;
    color: #fff !important;
}

.be-btn-b {
    padding: 8px 5px !important;
    background: #1a7a3c !important;
    color: #fff !important;
    border: 1.5px solid #1a7a3c !important;
    border-radius: 7px !important;
    font-family: var(--font-bangla) !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all .2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    text-align: center !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    line-height: 1.3 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.be-btn-b:hover {
    background: #145f2e !important;
    border-color: #145f2e !important;
    color: #fff !important;
}

/* HIDE WC default add-to-cart button completely */
ul.products li.product > a.button,
ul.products li.product > .button,
ul.products li.product .add_to_cart_button,
ul.products li.product .added_to_cart,
ul.products li.product .ajax_add_to_cart {
    display: none !important;
}

/* ── WooCommerce loop link — remove default block styles ── */
ul.products li.product .woocommerce-loop-product__link {
    display: block !important;
    text-decoration: none !important;
    color: inherit !important;
}

/* =============================================
   SINGLE PRODUCT
============================================= */
.single-product .product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.single-product .woocommerce-product-gallery {
    border-radius: 12px;
    overflow: hidden;
}

.single-product .product_title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.single-product .price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.single-product .price del {
    font-size: 18px;
    color: var(--text-light);
    font-weight: 400;
    margin-left: 8px;
}

.single-product .woocommerce-product-details__short-description {
    font-size: 14px;
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 20px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.single-product .quantity input {
    width: 70px;
    height: 44px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    padding: 0 10px;
}

.single-product .single_add_to_cart_button {
    height: 44px;
    padding: 0 32px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: var(--font-bangla);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s ease;
}

.single-product .single_add_to_cart_button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* =============================================
   CART PAGE
============================================= */
.woocommerce-cart table.cart {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

.woocommerce-cart table.cart th {
    background: var(--primary);
    color: white;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    font-family: var(--font-bangla);
}

.woocommerce-cart table.cart td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-family: var(--font-bangla);
}

.woocommerce-cart .cart_totals {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

.woocommerce-cart .cart_totals h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.woocommerce-cart .wc-proceed-to-checkout a {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    text-align: center;
    border-radius: 8px;
    font-family: var(--font-bangla);
    font-size: 16px;
    font-weight: 700;
    transition: all .25s ease;
    margin-top: 16px;
    text-decoration: none;
}

.woocommerce-cart .wc-proceed-to-checkout a:hover {
    background: var(--primary-dark);
}

/* =============================================
   CHECKOUT PAGE
============================================= */
.woocommerce-checkout .col2-set {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3,
.woocommerce-checkout #order_review_heading {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.woocommerce-checkout .woocommerce-input-wrapper input,
.woocommerce-checkout .woocommerce-input-wrapper select,
.woocommerce-checkout .woocommerce-input-wrapper textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-bangla);
    font-size: 14px;
    outline: none;
    transition: all .25s ease;
}

.woocommerce-checkout .woocommerce-input-wrapper input:focus,
.woocommerce-checkout .woocommerce-input-wrapper select:focus {
    border-color: var(--primary);
}

#place_order {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: var(--font-bangla);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s ease;
}

#place_order:hover { background: var(--primary-dark); }

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 1200px) {
    ul.products { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 960px) {
    ul.products { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 768px) {
    ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
    .single-product .product { grid-template-columns: 1fr; }
    .woocommerce-checkout .col2-set { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .be-btn-c, .be-btn-b { font-size: 10.5px !important; padding: 7px 3px !important; }
}
