/**
 * Cart page — mobile-only layout (≤767px)
 * Scoped to .bn-cart-page — desktop unchanged.
 */

@media (max-width: 767px) {
  body:has(.bn-cart-page) {
    background: #f3f4f6;
  }

  body:has(.bn-cart-page) .bn-m-search-bar,
  body:has(.bn-cart-page) .bn-m-sticky-icons {
    display: none !important;
  }

  body:has(.bn-cart-page) .page-title {
    display: none !important;
  }

  body:has(.bn-cart-page) {
    padding-bottom: calc(58px + 72px);
  }

  .bn-cart-page.cart-section {
    position: relative;
    padding-top: 0 !important;
    padding-bottom: 24px !important;
    background: #f3f4f6;
  }

  .bn-cart-page .large-container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .bn-cart-page .sec-title.centred {
    display: none !important;
  }

  /* ----- Mobile header ----- */
  .bn-cart-m-header {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 4px 0 14px;
  }

  .bn-cart-m-back {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #111;
    text-decoration: none;
    font-size: 15px;
  }

  .bn-cart-m-heading {
    flex: 1;
    min-width: 0;
  }

  .bn-cart-m-heading h1 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    color: #111;
  }

  .bn-cart-m-heading p {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.3;
    color: #64748b;
  }

  /* ----- Product list (table → cards) ----- */
  .bn-cart-page .row.clearfix {
    min-height: 0 !important;
    margin: 0 !important;
  }

  .bn-cart-page .content-side,
  .bn-cart-page .sidebar-side {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding: 0 !important;
    float: none !important;
  }

  .bn-cart-page .table-outer {
    border: none !important;
    overflow: visible !important;
    margin-bottom: 12px !important;
    background: transparent !important;
  }

  .bn-cart-page .cart-table {
    min-width: 0 !important;
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  .bn-cart-page .cart-table thead {
    display: none !important;
  }

  .bn-cart-page .cart-table tbody tr {
    display: grid !important;
    grid-template-columns: 72px 1fr auto;
    grid-template-rows: auto auto;
    gap: 4px 10px;
    align-items: start;
    padding: 12px;
    background: #fff;
    border: 1px solid #e8ecf1 !important;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  }

  .bn-cart-page .cart-table tbody tr:last-child {
    border-bottom: none !important;
  }

  .bn-cart-page .cart-table td {
    border: none !important;
    padding: 0 !important;
    text-align: left !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
  }

  .bn-cart-page .cart-col-product {
    grid-column: 1 / 3;
    grid-row: 1;
  }

  .bn-cart-page .cart-col-product .product-box {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }

  .bn-cart-page .cart-col-product .product-box .image-box {
    flex: 0 0 72px !important;
    width: 72px !important;
    height: 72px !important;
    margin: 0 !important;
    border: 1px solid #eef1f5 !important;
    border-radius: 10px !important;
    background: #f8fafc !important;
    padding: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  .bn-cart-page .cart-col-product .product-box .image-box img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
  }

  .bn-cart-page .cart-col-product .product-box h6 {
    flex: 1;
    min-width: 0;
    margin: 0 !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
  }

  .bn-cart-page .cart-col-product .product-box h6 a {
    color: #111 !important;
    text-decoration: none !important;
  }

  .bn-cart-page .cart-col-remove {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
    justify-self: end;
  }

  .bn-cart-page .cart-col-remove .cancel-btn {
    width: 32px;
    height: 32px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    background: #fff;
    color: #94a3b8 !important;
    font-size: 13px !important;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  }

  .bn-cart-page .cart-col-remove .cancel-btn:active {
    color: var(--theme-color) !important;
    border-color: #fecdd3;
    background: #fff5f5;
  }

  .bn-cart-page .cart-col-price {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    font-size: 12px !important;
    color: #64748b !important;
    font-weight: 500 !important;
    padding-left: 0;
  }

  .bn-cart-page .cart-col-price::before {
    content: "Unit: ";
    color: #94a3b8;
  }

  .bn-cart-page .cart-col-qty {
    grid-column: 1;
    grid-row: 2;
    margin-top: 8px;
  }

  .bn-cart-page .cart-col-qty .item-quantity {
    display: block !important;
    max-width: none !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    position: relative !important;
  }

  .bn-cart-page .cart-col-qty .bootstrap-touchspin {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: auto !important;
    max-width: none !important;
    height: 36px !important;
    padding: 2px !important;
    margin: 0 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 999px !important;
    background: #fff !important;
    overflow: hidden !important;
    position: relative !important;
  }

  .bn-cart-page .cart-col-qty .bootstrap-touchspin .input-group-btn,
  .bn-cart-page .cart-col-qty .bootstrap-touchspin .input-group-btn-vertical {
    position: static !important;
    display: flex !important;
    flex-direction: column !important;
    width: auto !important;
    height: auto !important;
    pointer-events: auto !important;
  }

  .bn-cart-page .cart-col-qty .bootstrap-touchspin .input-group-btn-vertical {
    flex-direction: row !important;
  }

  .bn-cart-page .cart-col-qty .bootstrap-touchspin .bootstrap-touchspin-down,
  .bn-cart-page .cart-col-qty .bootstrap-touchspin .bootstrap-touchspin-up {
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 999px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
    float: none !important;
  }

  .bn-cart-page .cart-col-qty .quantity-spinner,
  .bn-cart-page .cart-col-qty .bootstrap-touchspin input.quantity-spinner {
    width: 36px !important;
    min-width: 36px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: center !important;
    flex: 0 0 36px !important;
    order: 0 !important;
  }

  .bn-cart-page .cart-col-qty .bootstrap-touchspin .bootstrap-touchspin-down {
    order: -1 !important;
  }

  .bn-cart-page .cart-col-qty .bootstrap-touchspin .bootstrap-touchspin-up {
    order: 1 !important;
  }

  .bn-cart-page .cart-col-qty .bootstrap-touchspin .bootstrap-touchspin-prefix,
  .bn-cart-page .cart-col-qty .bootstrap-touchspin .bootstrap-touchspin-postfix {
    display: none !important;
  }

  .bn-cart-page .cart-col-qty .bootstrap-touchspin .glyphicon-chevron-up:before {
    content: "\f067" !important;
    font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome" !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    color: #334155 !important;
  }

  .bn-cart-page .cart-col-qty .bootstrap-touchspin .glyphicon-chevron-down:before {
    content: "\f068" !important;
    font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome" !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    color: #334155 !important;
  }

  .bn-cart-page .cart-col-qty .bootstrap-touchspin .btn:hover,
  .bn-cart-page .cart-col-qty .bootstrap-touchspin .btn:focus {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    outline: none !important;
    box-shadow: none !important;
  }

  .bn-cart-page .cart-col-qty .bootstrap-touchspin .bootstrap-touchspin-down.disabled,
  .bn-cart-page .cart-col-qty .bootstrap-touchspin .bootstrap-touchspin-up.disabled,
  .bn-cart-page .cart-col-qty .bootstrap-touchspin .bootstrap-touchspin-down:disabled,
  .bn-cart-page .cart-col-qty .bootstrap-touchspin .bootstrap-touchspin-up:disabled {
    opacity: 0.35 !important;
    pointer-events: none !important;
    filter: grayscale(1);
  }

  .bn-cart-page .cart-col-total {
    grid-column: 3;
    grid-row: 2;
    align-self: center;
    justify-self: end;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--theme-color) !important;
    white-space: nowrap;
  }

  .bn-cart-page .cart-col-total::before {
    content: "Total\A";
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.2;
    white-space: normal;
    margin-bottom: 2px;
  }

  /* ----- Order summary ----- */
  .bn-cart-summary-title {
    margin: 4px 0 10px;
    font-size: 15px;
    font-weight: 700;
    color: #111;
  }

  .bn-cart-page .total-cart {
    margin-top: 4px !important;
    margin-bottom: 0 !important;
    padding: 16px !important;
    border: 1px solid #e8ecf1 !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  }

  .bn-cart-page .total-cart .title-box {
    padding-bottom: 8px !important;
    margin-bottom: 10px !important;
    border-bottom: 1px dashed #e8ecf1 !important;
  }

  .bn-cart-page .total-cart .title-box:last-of-type {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  .bn-cart-page .total-cart h4 {
    font-size: 14px !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
    color: #475569 !important;
    margin: 0 !important;
  }

  .bn-cart-page .total-cart h5 {
    font-size: 14px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    color: #111 !important;
    margin: 0 !important;
  }

  .bn-cart-page .total-cart .title-box[style*="border-top"] h4,
  .bn-cart-page .total-cart .title-box[style*="border-top"] h5 {
    font-size: 16px !important;
    color: #111 !important;
  }

  .bn-cart-page .total-cart .title-box[style*="border-top"] h5 {
    color: var(--theme-color) !important;
  }

  .bn-cart-page .total-cart > .theme-btn.btn-block {
    display: none !important;
  }

  .bn-cart-page .total-cart > br {
    display: none !important;
  }

  /* ----- Sticky checkout bar ----- */
  .bn-cart-checkout-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 58px;
    z-index: 1055;
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #e8ecf1;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(8px);
  }

  .bn-cart-checkout-total {
    flex: 1;
    min-width: 0;
  }

  .bn-cart-checkout-label {
    display: block;
    font-size: 11px;
    line-height: 1.2;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
  }

  .bn-cart-checkout-total .cart-total {
    display: block;
    font-size: 17px !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
    color: var(--theme-color) !important;
    margin: 0 !important;
  }

  .bn-cart-checkout-btn {
    flex: 0 0 auto;
    min-width: 132px;
    height: 44px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 10px;
    background: var(--theme-color) !important;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    border: none;
    box-shadow: 0 4px 14px rgba(192, 35, 50, 0.28);
  }

  .bn-cart-checkout-btn:active {
    transform: scale(0.98);
  }

  /* ----- Empty cart ----- */
  .bn-cart-empty {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 320px !important;
    height: auto !important;
    padding: 32px 20px !important;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  }

  .bn-cart-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #fef2f2;
    color: var(--theme-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
  }

  .bn-cart-empty h3 {
    margin: 0 0 8px !important;
    font-size: 18px !important;
    line-height: 1.3 !important;
    color: #111 !important;
    font-weight: 700 !important;
  }

  .bn-cart-empty p {
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
    max-width: 260px;
  }

  .bn-cart-empty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 20px;
    border-radius: 10px;
    background: var(--theme-color);
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
  }

  /* ----- You may also like (cart page) ----- */
  .bn-cart-recommendations {
    padding-top: 8px !important;
    padding-bottom: 28px !important;
    background: #f3f4f6;
  }

  .bn-cart-recommendations .large-container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .bn-cart-recommendations .sec-title {
    margin-bottom: 12px !important;
  }

  .bn-cart-recommendations .sec-title h2 {
    font-size: 16px !important;
    line-height: 1.3 !important;
    margin: 0 !important;
  }

  .bn-cart-recommendations .shop-carousel {
    margin: 0 !important;
  }

  .bn-cart-recommendations .shop-carousel .owl-stage-outer {
    overflow: hidden !important;
    padding: 2px 0 8px !important;
  }

  .bn-cart-recommendations .shop-carousel .owl-stage {
    display: flex !important;
    align-items: stretch !important;
  }

  .bn-cart-recommendations .shop-carousel .owl-item {
    padding: 0 4px;
    display: flex !important;
    height: auto !important;
  }

  .bn-cart-recommendations .shop-block-two {
    width: 100% !important;
    max-width: none !important;
    flex: 1 1 auto !important;
    display: flex !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
  }

  .bn-cart-recommendations .shop-block-two .inner-box {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 100% !important;
    border: 1px solid #e8ecf1 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    background: #fff !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
  }

  .bn-cart-recommendations .shop-block-two .inner-box:before {
    display: none !important;
  }

  .bn-cart-recommendations .shop-block-two .inner-box:hover {
    transform: none !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  }

  .bn-cart-recommendations .shop-block-two .option-list,
  .bn-cart-recommendations .shop-block-two .product-halal {
    display: none !important;
  }

  .bn-cart-recommendations .shop-block-two .image-box {
    margin: 0 !important;
  }

  .bn-cart-recommendations .shop-block-two .image-box .image,
  .bn-cart-recommendations .shop-block-two .image-box figure {
    width: 100% !important;
    aspect-ratio: 1 !important;
    height: auto !important;
    margin: 0 !important;
    background: #f8fafc !important;
  }

  .bn-cart-recommendations .shop-block-two .image-box img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }

  .bn-cart-recommendations .shop-block-two .lower-content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    padding: 8px !important;
    text-align: left !important;
  }

  .bn-cart-recommendations .shop-block-two .lower-content .text {
    display: block !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--theme-color) !important;
    margin: 0 0 3px !important;
  }

  .bn-cart-recommendations .shop-block-two .lower-content h4 {
    font-size: 12px !important;
    line-height: 1.35 !important;
    margin: 0 0 4px !important;
    font-weight: 600 !important;
    min-height: calc(12px * 1.35 * 2);
  }

  .bn-cart-recommendations .shop-block-two .lower-content h4 a {
    color: #111 !important;
  }

  .bn-cart-recommendations .shop-block-two .lower-content h5 {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--theme-color) !important;
    margin: 0 0 4px !important;
  }

  .bn-cart-recommendations .shop-block-two .lower-content del {
    display: block !important;
    font-size: 11px !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
    margin-top: 2px;
  }

  .bn-cart-recommendations .shop-block-two .sr-rating-box.sr-rating-has-data {
    display: flex !important;
    align-items: center !important;
    margin: 0 0 4px !important;
    min-height: 16px !important;
  }

  .bn-cart-recommendations .shop-block-two .product-stock,
  .bn-cart-recommendations .shop-block-two .product-stock-out {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px;
    font-size: 10px !important;
    margin: 0 0 6px !important;
  }

  .bn-cart-recommendations .shop-block-two .product-stock {
    color: #16a34a !important;
  }

  .bn-cart-recommendations .shop-block-two .product-stock-out {
    color: #dc2626 !important;
  }

  .bn-cart-recommendations .shop-block-two .product-stock img,
  .bn-cart-recommendations .shop-block-two .product-stock-out img {
    width: 12px !important;
    height: 12px !important;
  }

  .bn-cart-recommendations .shop-block-two .cart-btn {
    display: block !important;
    position: relative !important;
    left: auto !important;
    bottom: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 100% !important;
    margin-top: auto !important;
    padding-top: 2px !important;
  }

  .bn-cart-recommendations .shop-block-two .cart-btn .theme-btn {
    width: 100% !important;
    min-height: 32px !important;
    padding: 6px 8px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    border-radius: 6px !important;
    color: var(--theme-color) !important;
    background: #fff !important;
    border: 1px solid var(--theme-color) !important;
    box-shadow: none !important;
  }

  .bn-cart-recommendations .shop-block-two .cart-btn .theme-btn span {
    display: none !important;
  }

  .bn-cart-recommendations .shop-block-two .cart-btn .theme-btn.not {
    opacity: 0.55 !important;
    z-index: 1 !important;
  }
}
