/* =========================================================================
   Back Market-style Product Details page
   Scoped reskin of resources/views/frontend/product_details/details.blade.php
   ========================================================================= */

/* --- Hide breadcrumb at top of product page --- */
body section.mb-4.pt-3 > .container > nav[aria-label="breadcrumb"] {
    display: none !important;
}

/* --- Top wrapper: kill the bg-white panel padding for an airy layout --- */
body section.mb-4.pt-3 > .container > .bg-white.py-3 {
    background: transparent !important;
    padding: 0 !important;
}

/* ========================================================================
   PRODUCT DETAILS COLUMN (right side)
   The root element in details.blade.php is <div class="text-left">.
   ======================================================================== */

/* Title */
.text-left > h2.mb-4.fs-16.fw-700.text-dark {
    font-size: 30px !important;
    line-height: 1.18 !important;
    font-weight: 800 !important;
    color: #0a1230 !important;
    margin-bottom: 6px !important;
    letter-spacing: -0.01em;
}

/* Subtitle */
.text-left > p.mb-3.fs-14.text-secondary {
    font-size: 15px !important;
    color: #6b7280 !important;
    margin-bottom: 14px !important;
}

/* Rating row — keep but lift slightly */
.text-left .row.align-items-center.mb-3:first-of-type .rating {
    font-size: 16px;
}
.text-left .row.align-items-center.mb-3:first-of-type .opacity-50.fs-13 {
    color: #6b7280 !important;
    opacity: 1 !important;
    text-decoration: underline;
}

/* Hide "Estimate Shipping Time" pill */
.text-left .row.align-items-center.mb-3 > .col-auto.fs-13.mt-1 {
    display: none !important;
}

/* Hide "Add to wishlist" / "Add to compare" text-link row */
.text-left .row.align-items-center:not(.mb-3) > .col.mb-3 > .d-flex {
    display: none !important;
}

/* Hide "Brand: Demo brand" row */
.text-left > .d-flex.flex-wrap.align-items-center.mb-3:has(> span.w-80px) {
    display: none !important;
}

/* Hide Inhouse / Sold by + Message Seller + Order Via WhatsApp row */
.text-left > .d-flex.flex-wrap.align-items-center:not(.mb-3) {
    display: none !important;
}

/* Hide live viewers strip */
.text-left #live-product-viewing-visitors {
    display: none !important;
}

/* Hide the <hr> dividers — BackMarket has no horizontal rules in this column */
.text-left > hr {
    display: none !important;
}

/* ========================================================================
   PRICE SECTION
   Targets: .row.no-gutters.mb-3 that contains a strong.fs-16.fw-700 (price)
   ======================================================================== */

/* Hide the "Price" label column so the price spans the row */
.text-left .row.no-gutters.mb-3:has(strong.fs-16.fw-700) > .col-sm-2:first-child {
    display: none !important;
}
.text-left .row.no-gutters.mb-3:has(strong.fs-16.fw-700) > .col-sm-10 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

/* The main price */
.text-left .row.no-gutters.mb-3 strong.fs-16.fw-700 {
    font-size: 32px !important;
    font-weight: 800 !important;
    color: #0a1230 !important;
    line-height: 1.1;
}

/* Old price (strikethrough) */
.text-left .row.no-gutters.mb-3 del.fs-13 {
    font-size: 16px !important;
    color: #9ca3af !important;
    margin-left: 10px !important;
}

/* Hide unit-of-measure (/kg) — BackMarket doesn't show this */
.text-left .row.no-gutters.mb-3 .opacity-70.ml-1,
.text-left .row.no-gutters.mb-3 .opacity-70:not(.ml-1) {
    display: none !important;
}

/* Discount % badge → BackMarket "Save $X" green pill */
.text-left .row.no-gutters.mb-3 .bg-primary.ml-2.fs-11.fw-700 {
    background: #d6f5c5 !important;
    color: #0d5c2a !important;
    width: auto !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    margin-left: 10px !important;
}

/* "Total Price" label/row — hidden by id (the original markup already has
   d-none on this row by default; we keep the rule for safety). */
.text-left #chosen_price_div {
    display: none !important;
}

/* ========================================================================
   QUANTITY CONTROLS — hide ONLY the +/- input (BackMarket sets qty 1 in cart).
   IMPORTANT: do NOT hide .product-quantity itself, because the Add-to-Cart
   row ALSO lives inside the same .product-quantity flex container. Hiding
   the wrapper would hide the cart button too.
   ======================================================================== */

/* Hide the "Quantity" label column on the cart row, expand the right col */
.text-left .row.no-gutters.mb-3:has(.product-quantity .bm-cart-row) > .col-sm-2 {
    display: none !important;
}
.text-left .row.no-gutters.mb-3:has(.product-quantity .bm-cart-row) > .col-sm-9 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

/* Hide just the +/- input row, NOT the .product-quantity wrapper.
   The actual class on the qty wrapper is `aiz-plus-minus`. */
.text-left .product-quantity > .aiz-plus-minus,
.text-left .product-quantity > .input-number-increment-decrement {
    display: none !important;
}

/* Keep the cart row visible (defensive — no display:none anywhere on it). */
.text-left .product-quantity .bm-cart-row {
    display: flex !important;
}

/* The cart row + info cards both live inside the .product-quantity flex
   container (which is flex-direction: row). Enable wrapping and give the
   children full width so they stack vertically. */
.text-left .product-quantity {
    flex-wrap: wrap !important;
    align-items: stretch !important;
}
.text-left .product-quantity .bm-cart-row,
.text-left .product-quantity .bm-info-cards {
    width: 100% !important;
    flex: 0 0 100% !important;
}

/* ========================================================================
   ADD TO CART — black, full-width, prominent
   ======================================================================== */
.text-left .add-to-cart {
    background: #0a1230 !important;
    border: 1px solid #0a1230 !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    padding: 14px 24px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    text-align: center !important;
    box-shadow: 0 2px 8px rgba(10, 18, 48, 0.10);
    transition: background 0.18s ease, transform 0.12s ease;
}
.text-left .add-to-cart:hover,
.text-left .add-to-cart:focus {
    background: #1a1f3a !important;
    color: #fff !important;
    transform: translateY(-1px);
}
/* Add to cart icon — keep it but smaller */
.text-left .add-to-cart i.las.la-shopping-bag,
.text-left .add-to-cart i.la.la-share {
    margin-right: 8px;
}

/* Buy Now button — hide (BackMarket combines into single Add to cart) */
.text-left .buy-now {
    display: none !important;
}

/* Make Add to cart row container full width (was col-sm-9) */
.text-left .row.no-gutters:has(> .col-sm-9 > .product-quantity),
.text-left .row.no-gutters:has(> .col-sm-9 > .buy-now) {
    margin-top: 16px;
}
.text-left .row.no-gutters > .col-sm-9 {
    flex: 0 0 calc(100% - 64px) !important;
    max-width: calc(100% - 64px) !important;
}
.text-left .row.no-gutters > .col-sm-3 {
    display: none !important;
}

/* Heart wishlist icon button next to Add to cart */
.bm-wishlist-btn {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #0a1230;
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}
.bm-wishlist-btn:hover {
    background: #f3f4f6;
    color: #d83a3a;
}
.bm-cart-row {
    display: flex;
    align-items: center;
    margin: 14px 0 18px;
}
.bm-cart-row .add-to-cart {
    flex: 1;
}

/* ========================================================================
   TRADE-IN BUTTON — keep but restyle to match BackMarket info-card look
   ======================================================================== */
.text-left a.btn-outline-primary[href*="trade_in"] {
    background: #f1f5fb !important;
    border: 1px solid #e3e8f0 !important;
    color: #0a1230 !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    padding: 12px 18px !important;
    text-align: left !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
}
.text-left a.btn-outline-primary[href*="trade_in"] i {
    margin-right: 10px;
}

/* ========================================================================
   BACK-MARKET STYLE INFO CARDS (Free delivery, Works with carriers, Returns)
   Injected via details.blade.php as <div class="bm-info-cards">
   ======================================================================== */
.bm-info-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 18px 0 8px;
}
.bm-info-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #eef3fb;
    border-radius: 14px;
    border: 1px solid #e5e9f0;
    text-decoration: none !important;
    color: #0a1230 !important;
    transition: background 0.18s ease;
}
.bm-info-card:hover {
    background: #e6edf8;
}
.bm-info-card-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ffffff;
    flex-shrink: 0;
    color: #0a1230;
    font-size: 16px;
}
.bm-info-card-body {
    flex: 1;
    min-width: 0;
}
.bm-info-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #0a1230;
    line-height: 1.2;
}
.bm-info-card-sub {
    font-size: 13px;
    color: #6b7280;
    margin-top: 2px;
}
.bm-info-card-arrow {
    color: #6b7280;
    font-size: 16px;
}

/* ========================================================================
   MOBILE
   ======================================================================== */
@media (max-width: 767px) {
    .text-left > h2.mb-4.fs-16.fw-700.text-dark {
        font-size: 22px !important;
    }
    .text-left .row.no-gutters.mb-3 strong.fs-16.fw-700 {
        font-size: 26px !important;
    }
    .bm-wishlist-btn {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
}
