/* Cart drawer — site-wide (home, shop, wishlist, product, etc.) */
.cart-drawer {
  box-sizing: border-box;
  min-height: 0;
}
.cart-drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 16px 24px !important;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}
.cart-item-v2 {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  align-items: flex-start;
  max-width: 100%;
  box-sizing: border-box;
}
.cart-item-v2 img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 12px;
  background: #fafafa;
  border: 1px solid #eee;
  flex-shrink: 0;
}
.cart-item-v2 .cart-item-meta {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.cart-item-v2 .cart-item-name {
  font-size: 15px;
  font-weight: 700;
  color: #1a1218;
  line-height: 1.3;
  margin: 0 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cart-item-v2 .cart-item-line {
  font-size: 13px;
  font-weight: 700;
  color: #c2185b;
  margin-top: 4px;
}
.cart-item-v2 .cart-qty-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.cart-item-v2 .cart-qty-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}
.cart-item-v2 .cart-remove {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: #b71c1c;
  background: rgba(198, 40, 40, 0.08);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  padding: 7px 14px;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
}
.cart-item-v2 .cart-remove:hover {
  background: rgba(198, 40, 40, 0.14);
  border-color: rgba(198, 40, 40, 0.2);
}
@media (max-width: 480px) {
  .cart-item-v2 .cart-qty-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .cart-item-v2 .cart-remove {
    margin-left: 0 !important;
    width: 100%;
    text-align: center;
    margin-top: 0;
  }
}

/* v31 — single panel drawer, fix remove clip, no double-sidebar look */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(26, 18, 24, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}
.cart-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: min(400px, 100vw);
  z-index: 501;
  display: flex;
  flex-direction: column;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 32px rgba(26, 18, 24, 0.12);
  overflow: hidden;
}
.cart-drawer.open {
  transform: translateX(0);
}
.cart-drawer-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.cart-drawer-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}
.cart-drawer-footer {
  flex-shrink: 0;
  padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: #fffaf9;
}
.cart-drawer-body .cart-item-v2:last-child {
  border-bottom: none;
}
.cart-item-v2 .cart-qty-row {
  flex-wrap: wrap;
  gap: 6px 8px;
}
.cart-item-v2 .cart-remove {
  margin-left: 0;
  max-width: 100%;
}
@media (min-width: 481px) {
  .cart-item-v2 .cart-remove {
    margin-left: auto;
  }
}
.cart-checkout-btn {
  border-radius: 14px !important;
  min-height: 48px;
  font-weight: 800;
}
