/* =========================================================
   BanglaNest — cart page
   ========================================================= */

/* Page frame: Astra's "Cart" title off, one centred column */
.woocommerce-cart .entry-header,
.woocommerce-cart .ast-archive-description { display: none; }
.woocommerce-cart .site-content > .ast-container { max-width: 1240px; }
.woocommerce-cart #primary { margin: 24px 0 56px !important; padding: 0 !important; }
.woocommerce-cart .entry-content > .woocommerce,
.woocommerce-cart .woocommerce { max-width: none; }

.bn-cart {
    max-width: 700px;
    margin: 0 auto;
    color: var(--bn-ink);
}
.bn-cart .bn-muted { color: var(--bn-muted); }

.bn-cart-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--bn-line);
}
.bn-site .bn-cart-title {
    margin: 0;
    font: 400 32px/1.1 var(--bn-serif);
    color: var(--bn-ink);
}
.bn-cart-count-text { font-size: 13px; color: var(--bn-muted); }

/* Section rule: LABEL ———————— right */
.bn-cart-rule {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--bn-ink);
}
.bn-cart-rule i { flex: 1; height: 1px; background: var(--bn-line); }
.bn-cart-rule .bn-muted { font-weight: 500; }

/* ---------- Items ---------- */
.bn-cart-items { border: 0; margin: 0; }
.bn-cart-item {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    gap: 22px;
    padding: 22px 0;
    border-bottom: 1px solid var(--bn-line);
}
.bn-ci-thumb a, .bn-ci-thumb > img { display: block; }
.bn-ci-thumb img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
    background: var(--bn-card-media);
}
.bn-ci-body { display: flex; flex-direction: column; min-width: 0; }
.bn-ci-top { display: flex; justify-content: space-between; gap: 16px; }
.bn-ci-cat {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--bn-accent);
}
.bn-site .bn-ci-name {
    margin: 0;
    font: 400 19px/1.25 var(--bn-serif);
    color: var(--bn-ink);
}
.bn-site .bn-ci-name a { color: inherit; }
.bn-site .bn-ci-name a:hover { color: var(--bn-accent); }
.bn-ci-subtotal { font-size: 16px; font-weight: 700; white-space: nowrap; }

.bn-ci-meta {
    display: flex; flex-wrap: wrap; gap: 4px 14px;
    margin-top: 8px;
    font-size: 11.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--bn-muted);
}
.bn-ci-meta dl.variation { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 0; }
.bn-ci-meta dl.variation dt, .bn-ci-meta dl.variation dd { margin: 0; float: none; }
.bn-ci-meta dl.variation dd p { margin: 0; }

.bn-ci-price { margin-top: 8px; font-size: 14px; }
.bn-ci-price del { color: #9a938c; margin-right: 4px; }
.bn-ci-price ins { text-decoration: none; font-weight: 600; }
.bn-ci-each { color: var(--bn-muted); font-size: 12px; margin-left: 2px; }
.bn-ci-stock {
    margin: 6px 0 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #1d7a46;
}
.bn-ci-stock.is-backorder { color: var(--bn-accent); }

.bn-ci-actions { display: flex; align-items: center; gap: 18px; margin-top: 14px; }
.bn-cart .quantity {
    display: inline-flex !important;
    align-items: center;
    height: 38px;
    box-sizing: border-box;
    margin: 0 !important;
    border: 1px solid #d9d2ca;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}
.bn-cart .quantity .qty {
    width: 40px !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: center;
    font: 600 15px var(--bn-sans);
    color: var(--bn-ink);
    -moz-appearance: textfield;
}
.bn-cart .quantity .qty::-webkit-outer-spin-button,
.bn-cart .quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bn-cart .quantity .bn-qty-btn,
.bn-cart .quantity .minus,
.bn-cart .quantity .plus {
    display: grid !important;
    place-items: center;
    width: 34px !important;
    height: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--bn-ink) !important;
    box-shadow: none !important;
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}
.bn-cart .quantity .bn-qty-btn:hover,
.bn-cart .quantity .minus:hover,
.bn-cart .quantity .plus:hover { background: var(--bn-cream) !important; }

.bn-site .bn-cart a.bn-ci-remove,
.bn-site .bn-cart .product-remove a.remove {
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    background: none !important;
    color: var(--bn-muted) !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.bn-site .bn-cart a.bn-ci-remove:hover { color: var(--bn-hot) !important; }

/* Update button: WooCommerce needs it in the form; quantity changes submit it automatically */
.bn-cart .bn-update-cart {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Deal tracker ---------- */
.bn-deal-track { margin-top: 30px; }
.bn-deal-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 22px 0 22px;
    padding: 0;
    list-style: none;
    counter-reset: none;
}
.bn-deal-steps li {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 0;
    text-align: center;
}
/* dashed connector between dots */
.bn-deal-steps li + li::before {
    content: "";
    position: absolute;
    top: 37px;
    right: calc(50% + 24px);
    width: calc(100% - 48px);
    border-top: 1.5px dashed #d6cec5;
}
.bn-deal-steps li.is-done + li.is-done::before { border-top: 1.5px solid var(--bn-accent); }
.bn-ds-num { font-size: 11px; letter-spacing: .14em; color: var(--bn-muted); }
.bn-ds-dot {
    display: grid;
    place-items: center;
    width: 32px; height: 32px;
    margin: 4px 0 8px;
    border-radius: 50%;
    border: 1.5px solid #d6cec5;
    background: #fff;
    color: var(--bn-ink);
}
.bn-ds-dot svg { width: 16px; height: 16px; }
.bn-deal-steps li.is-done .bn-ds-dot { background: var(--bn-accent); border-color: var(--bn-accent); color: #fff; }
.bn-deal-steps li.is-next .bn-ds-dot { border-color: var(--bn-accent); box-shadow: 0 0 0 4px rgba(185,85,27,.12); }
.bn-ds-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--bn-muted); }
.bn-ds-title { font-size: 13px; font-weight: 700; line-height: 1.3; max-width: 170px; }
.bn-ds-pill {
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #fbe9df;
    color: var(--bn-accent-dark);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.bn-deal-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 12px;
    background: var(--bn-cream);
    border: 1px solid #ece3d8;
}
.bn-deal-box-icon {
    display: grid; place-items: center;
    width: 40px; height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--bn-accent);
}
.bn-deal-box-icon svg { width: 22px; height: 22px; }
.bn-deal-box-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bn-deal-box-text > span { font-size: 14px; color: var(--bn-ink-2); }
.bn-site .bn-deal-box-text strong { font: 400 24px/1.15 var(--bn-serif); color: var(--bn-ink); }
.bn-deal-box-text small { font-size: 13px; color: var(--bn-muted); }
.bn-site .bn-deal-box-btn {
    flex-shrink: 0;
    min-height: 44px;
    padding: 0 20px;
    font-size: 12.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.bn-deal-box.is-done { background: #edf6f0; border-color: #cfe6d7; }
.bn-deal-box.is-done .bn-deal-box-icon { color: #1d6b43; }

/* ---------- Complete your offer ---------- */
.bn-offer { margin-top: 36px; }
.bn-offer .bn-cart-rule { margin-bottom: 6px; }
.bn-site .bn-offer-all {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12.5px; font-weight: 500;
    letter-spacing: 0; text-transform: none;
    color: var(--bn-accent);
}
.bn-offer-all svg { width: 13px; height: 13px; }
.bn-offer-sub { margin: 0 0 14px; font-size: 14px; color: var(--bn-muted); }

.bn-offer-wrap { position: relative; }
.bn-offer-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 2 * 14px) / 3.15);
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 4px;
}
.bn-offer-rail::-webkit-scrollbar { display: none; }
.bn-offer-card { scroll-snap-align: start; min-width: 0; }
.bn-offer-media {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bn-card-media);
}
.bn-offer-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bn-site .bn-offer-add {
    position: absolute;
    right: 10px; bottom: 10px;
    display: grid; place-items: center;
    width: 34px; height: 34px;
    padding: 0 !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: var(--bn-ink) !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    box-shadow: 0 2px 10px rgba(28,26,24,.15);
    transition: background .15s, color .15s;
}
.bn-site .bn-offer-add:hover { background: var(--bn-accent) !important; color: #fff !important; }
.bn-offer-add.loading { opacity: .6; }
.bn-offer-add.added::after, .bn-offer-card .added_to_cart { display: none !important; }
.bn-site .bn-offer-name {
    display: block;
    margin-top: 10px;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--bn-ink);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.bn-offer-price { display: block; margin-top: 3px; font-size: 14px; font-weight: 700; }
.bn-offer-price del { margin-left: 6px; font-size: 12px; font-weight: 400; color: #9a938c; }

.bn-site .bn-offer-arrow {
    position: absolute;
    top: calc((100% - 56px) / 2);
    z-index: 2;
    display: grid; place-items: center;
    width: 34px; height: 34px;
    padding: 0;
    border: 1px solid var(--bn-line);
    border-radius: 50%;
    background: #fff;
    color: var(--bn-ink);
    box-shadow: 0 2px 10px rgba(28,26,24,.1);
    cursor: pointer;
}
.bn-offer-arrow svg { width: 15px; height: 15px; }
.bn-offer-arrow.is-prev { left: -14px; }
.bn-offer-arrow.is-next { right: -14px; }
.bn-site .bn-offer-arrow:hover { background: var(--bn-ink); color: #fff; }

/* ---------- Coupon ---------- */
.bn-coupon { margin-top: 34px; }
.bn-coupon-row { display: flex; gap: 10px; }
.bn-site .bn-coupon-row #coupon_code {
    flex: 1;
    width: auto;
    height: 46px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid #d9d2ca;
    border-radius: 8px;
    background: #fff;
    font: 400 14px var(--bn-sans);
}
.bn-site .bn-coupon-row #coupon_code:focus { border-color: var(--bn-accent); outline: none; }
.bn-site .bn-coupon .bn-coupon-btn {
    height: 46px;
    padding: 0 26px;
    border: 0;
    border-radius: 8px;
    background: var(--bn-ink) !important;
    color: #fff !important;
    font: 600 12.5px var(--bn-sans);
    letter-spacing: .12em;
    text-transform: uppercase;
}
.bn-site .bn-coupon .bn-coupon-btn:hover { background: #000 !important; }

/* ---------- Totals ---------- */
.bn-totals { margin-top: 26px; width: auto !important; float: none !important; }
.bn-tot-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    font-size: 14.5px;
    color: var(--bn-ink-2);
}
.bn-tot-row.is-saving span:last-child { color: #b42318; font-weight: 600; }
.bn-tot-row .is-free { color: #1d6b43; font-weight: 700; }
.bn-tot-row .bn-muted { font-size: 13px; }
.bn-tot-row.is-total {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--bn-line);
    color: var(--bn-ink);
}
.bn-site .bn-tot-row.is-total span { font: 400 24px/1 var(--bn-serif); }
.bn-tot-row.is-total strong { font-size: 24px; font-weight: 700; }
.bn-tot-row a.woocommerce-remove-coupon { margin-left: 6px; font-size: 12px; color: var(--bn-muted); }

.bn-cod-box {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 12px;
    background: var(--bn-cream);
    border: 1px solid #ece3d8;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--bn-ink-2);
}
.bn-cod-box > svg { width: 24px; height: 24px; flex-shrink: 0; margin-top: 1px; color: var(--bn-accent); }
.bn-cod-box strong { display: block; color: var(--bn-ink); font-weight: 600; }

.bn-totals .wc-proceed-to-checkout { padding: 18px 0 0 !important; }
.bn-site .bn-totals a.bn-checkout-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 54px;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 8px;
    background: var(--bn-accent) !important;
    color: #fff !important;
    font: 700 14px var(--bn-sans) !important;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.bn-site .bn-totals a.bn-checkout-btn:hover { background: var(--bn-accent-dark) !important; }
.bn-checkout-btn svg { width: 17px; height: 17px; }
.bn-checkout-note { margin: 10px 0 0; text-align: center; font-size: 12px; color: var(--bn-muted); }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
    .woocommerce-cart #primary { margin-top: 12px !important; }
    .bn-cart-item { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 18px 0; }
    .bn-site .bn-cart-title { font-size: 26px; }
    .bn-site .bn-ci-name { font-size: 16px; }
    .bn-ci-subtotal { font-size: 14px; }
    .bn-ci-actions { gap: 14px; margin-top: 10px; }

    .bn-ds-title { font-size: 12px; }
    .bn-deal-steps li + li::before { width: calc(100% - 40px); right: calc(50% + 20px); }
    .bn-deal-box { flex-wrap: wrap; padding: 16px; }
    .bn-site .bn-deal-box-text strong { font-size: 20px; }
    .bn-site .bn-deal-box-btn { width: 100%; }

    .bn-offer-rail { grid-auto-columns: calc((100% - 12px) / 2.2); gap: 12px; }
    .bn-offer-arrow { display: none !important; }
    .bn-cart-rule .bn-muted { display: none; }
}

.bn-cart .screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
.bn-cart, .bn-cart * { box-sizing: border-box; }
.bn-cart { overflow-wrap: anywhere; }

/* Photo box keeps its shape even before / without an image */
.bn-ci-thumb {
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bn-card-media);
}
.bn-ci-thumb a { width: 100%; height: 100%; }
.bn-ci-thumb img,
.bn-offer-media img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Server-rendered steppers: hide Astra's own −/+ if it adds them too */
.quantity.bn-has-steps .minus,
.quantity.bn-has-steps .plus { display: none !important; }

/* =========================================================
   Full-width cart page, whatever Astra's page-level "boxed" /
   "narrow" container settings say for the Cart page.
   ========================================================= */
body.woocommerce-cart { background: var(--bn-bg) !important; }
.woocommerce-cart #page,
.woocommerce-cart .hfeed.site,
.woocommerce-cart .site {
    width: auto !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: var(--bn-bg) !important;
}
.woocommerce-cart .site-content > .ast-container,
.woocommerce-cart #content > .ast-container {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 1240px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}
.woocommerce-cart #primary,
.woocommerce-cart .content-area,
.woocommerce-cart .ast-article-single,
.woocommerce-cart article.page,
.woocommerce-cart .entry-content {
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}
.woocommerce-cart #secondary { display: none !important; }

/* =========================================================
   The Cart page may be assigned a "page-shopping-cart.php" template that
   renders <body id="error-page">, which pulls in WordPress's wp_die()
   error styles (700px box, border, grey background, underlined h1,
   blue links, 14px paragraphs). Cancel all of it.
   ========================================================= */
html:has(body#error-page.bn-site) { background: var(--bn-bg) !important; }
body#error-page.bn-site {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: var(--bn-bg) !important;
    color: var(--bn-ink) !important;
    font-family: var(--bn-sans) !important;
}
body#error-page.bn-site h1 {
    border-bottom: 0 !important;
    clear: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
body#error-page.bn-site p {
    font-size: inherit;
    line-height: inherit;
    margin: 0;
}
body#error-page.bn-site .bn-ci-stock { margin-top: 6px; font-size: 11px; }
body#error-page.bn-site .bn-offer-sub { margin: 0 0 14px; font-size: 14px; }
body#error-page.bn-site .bn-checkout-note { margin-top: 10px; font-size: 12px; }
body#error-page.bn-site ul li,
body#error-page.bn-site ol li { margin-bottom: 0; }
body#error-page.bn-site a:not(.bn-btn):not(.button):not(.bn-checkout-btn):not(.bn-offer-add) { color: inherit; }
body#error-page.bn-site a:focus { box-shadow: none; }
.bn-tot-row del { margin-right: 6px; color: #9a938c; font-weight: 400; }
