/* ==============================
    CART DRAWER OVERLAY
============================== */

.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, .42);
  /* ডাবল গ্লাস/ব্লার দূর করার জন্য নিচের দুটি লাইন বন্ধ করা হলো */
  /* backdrop-filter: blur(4px); */
  /* -webkit-backdrop-filter: blur(4px); */
  z-index: 1000100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity .35s ease,
    visibility .35s ease;
  will-change: opacity;
}

.cart-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

/* ==============================
   CART DRAWER — MERGED
============================== */

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;

  width: min(420px, 100vw);
  height: 100vh;
  height: 100svh;
  height: 100dvh;

  background: #fff;
  z-index: 1000101;

  display: flex;
  flex-direction: column;

  overflow: hidden;
  box-shadow:
    -10px 0 45px rgba(0, 0, 0, .12),
    -2px  0 10px rgba(0, 0, 0, .05);

  /* Keep closed drawers fully off-screen (including box-shadow) and invisible
     so first paint / CSS-load cannot flash a slice of the panel. */
  transform: translate3d(calc(100% + 40px), 0, 0);
  visibility: hidden;
  pointer-events: none;
  transition:
    transform .38s cubic-bezier(.22, 1, .36, 1),
    visibility 0s linear .38s;
  will-change: transform;

  font-family: "Hind Siliguri", "Inter", system-ui, sans-serif;
}

.cart-drawer.is-open {
  transform: translate3d(0, 0, 0);
  visibility: visible;
  pointer-events: auto;
  transition:
    transform .38s cubic-bezier(.22, 1, .36, 1),
    visibility 0s;
}

/* ==============================
   CART DRAWER HEAD
============================== */

.cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 22px 18px;
  background: #fff;
  border-bottom: 1px solid #efefef;
  position: sticky;
  top: 0;
  z-index: 5;
  flex-shrink: 0;
}

.cart-drawer-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.cart-drawer-close {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 50%;
  color: #222;
  font-size: 20px;
  font-weight: 400;
  cursor: pointer;
  transition:
    background .25s ease,
    color .25s ease,
    border-color .25s ease,
    transform .25s ease,
    box-shadow .25s ease;
}

.cart-drawer-close:hover {
  background: #111;
  color: #fff;
  border-color: #111;
  transform: rotate(90deg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
}

.cart-drawer-close:active  { transform: scale(.95); }

.cart-drawer-close:focus-visible {
  outline: 2px solid #111;
  outline-offset: 3px;
}

/* ==============================
    CART DRAWER BODY — MERGED
    (এই অংশ স্ক্রল হবে)
============================== */

.cart-drawer-body,
.cart-items,
.cart-drawer-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 12px 18px 180px;
  background-color: #ffffff; /* <- এই নতুন লাইনটি এখানে বসিয়ে দিন */
}
/* ==============================
   CART DRAWER ITEMS
============================== */

.cart-select-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0 0 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid #f0f0f0;
}
.cart-select-all-btn {
  border: 1px solid #e5e5e5;
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
}
.cart-select-count {
  margin-left: auto;
  font-size: 12px;
  color: #666;
}
.cart-line-check {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding-top: 8px;
}
.cart-line-check input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.cart-drawer-item.is-deselected {
  opacity: .55;
}
.cart-drawer-select-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: #666;
}

.cart-drawer-item {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid #f2f2f2;
  transition: background .25s ease;
}

.cart-drawer-item:hover      { background: #fafafa; }
.cart-drawer-item:first-child { padding-top: 8px; }
.cart-drawer-item:last-child  { border-bottom: none; padding-bottom: 10px; }

.cart-drawer-item-main {
  flex: 1;
  min-width: 0;
}

.cart-drawer-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

/* ==============================
   CART THUMB
============================== */

.cart-drawer-thumb {
  flex-shrink: 0;
  width: 82px;
  height: 82px;
  max-width: 82px;
  max-height: 82px;
  overflow: hidden;
  border-radius: 8px;
  background: #f7f7f7;
  border: 1px solid #ececec;
}

.cart-drawer-thumb img {
  width: 82px;
  height: 82px;
  max-width: 82px;
  max-height: 82px;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

.cart-drawer-item:hover .cart-drawer-thumb img { transform: scale(1.05); }

.cart-drawer-thumb-placeholder {
  font-size: 30px;
  opacity: .4;
}

/* ==============================
   CART ITEM META
============================== */

.cart-drawer-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111;
  line-height: 1.45;
  letter-spacing: -.01em;
}

.cart-drawer-remove {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 50%;
  color: #777;
  font-size: 18px;
  cursor: pointer;
  transition: all .25s ease;
  flex-shrink: 0;
}

.cart-drawer-remove:hover {
  background: #111;
  border-color: #111;
  color: #fff;
}

.cart-drawer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

/* ==============================
   QTY STEPPER
============================== */

.cart-drawer-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e4e4e4;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.cart-drawer-qty button {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background .25s ease;
}

.cart-drawer-qty button:hover { background: #f5f5f5; }

.cart-drawer-qty span {
  min-width: 42px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
}

.cart-drawer-line-price {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  white-space: nowrap;
}

/* ==============================
    RECOMMENDATIONS — MERGED
============================== */

.cart-cross-sell,
.cart-recommendations,
.customers-also-bought {
  max-height: 320px;
  overflow-y: auto;
  background: #ffffff !important; /* ব্যাকগ্রাউন্ড সলিড সাদা করা হলো */
  padding: 10px;
}

/* রিকমেন্ডেশনের ভেতরের প্রোডাক্ট বক্সগুলোর জন্য */
.customers-also-bought img, 
.cart-recommendations img {
  border-radius: 8px;
}
/* ==============================
   CART DRAWER FOOTER — MERGED
   (sticky, সবসময় নিচে)
============================== */

.cart-drawer-foot {
  position: sticky;
  bottom: 0;
  z-index: 999;
  flex-shrink: 0;
  background: #fff;
  border-top: 1px solid #ececec;
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 20px rgba(0, 0, 0, .06);
}

.cart-drawer-footer,
.cart-summary,
.cart-checkout {
  position: static;
  bottom: auto;
  background: transparent;
  padding: 0;
  border-top: 0;
  z-index: auto;
}

/* ==============================
   CART TOTAL
============================== */

.cart-drawer-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}

/* ==============================
   CHECKOUT BUTTON — MERGED
============================== */

.cart-drawer-checkout {
  width: 100%;
  height: 52px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: none;
  border-radius: 14px;

  background: #111;
  color: #fff;

  font-size: 16px;
  font-weight: 700;
  letter-spacing: .3px;

  cursor: pointer;
  transition: all .3s ease;

  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

.cart-drawer-checkout:hover {
  background: #333333;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
}

.cart-drawer-checkout:active        { transform: scale(.98); }

.cart-drawer-checkout:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, .25);
}

/* ==============================
   MOBILE NAVBAR CONFLICT FIX
============================== */

@media (max-width: 768px) {

  .cart-drawer-foot {
    padding-bottom: calc(20px + 64px + env(safe-area-inset-bottom, 0px));
  }

  .cart-drawer-body,
  .cart-items,
  .cart-drawer-content {
    padding-bottom: 220px;
  }

}

/* ==============================
   HIDE MOBILE BOTTOM NAV WHILE
   CART DRAWER IS OPEN
   (body.cart-drawer-open is toggled
   by cart-drawer.js's openCartDrawer/
   closeCartDrawer)
============================== */

body.cart-drawer-open #mobile-bottom-nav {
  display: none !important;
}
