/* ===========================
   CartModal — BEM
   =========================== */

/* Backdrop */
body.cart-modal-open::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9998;
  animation: cartBackdropFadeIn 0.3s ease forwards;
}

@keyframes cartBackdropFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Modal panel — slides in from the right */
.cart-modal-pdp {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  height: 100dvh;
  min-height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
  font-family: 'Archivo', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #fff;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -6px 0 32px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.cart-modal-pdp.active {
  transform: translateX(0);
}

@media (max-width: 767px) {
  .cart-modal-pdp {
    max-width: 100%;
  }
}

/* ---------- Header ---------- */

.cart-modal-pdp__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px;
  flex-shrink: 0;
}

.cart-modal-pdp__title {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 130%;
  letter-spacing: 0.01em;
  color: #1D1D1F; 
  margin: 0;
}

.cart-modal-pdp__close-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
}

/* ---------- Product List ---------- */

.cart-modal-pdp__list {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px;
}

.cart-modal-pdp__list::-webkit-scrollbar {
  width: 4px;
}

.cart-modal-pdp__list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

/* ---------- Product Item ---------- */

.cart-modal-pdp__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #eee;
}

.cart-modal-pdp__item:last-child {
  border-bottom: none;
}

.cart-modal-pdp__item-image {
  width: 86px;
  height: 86px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background-color: #E6E7EB;
}

.cart-modal-pdp__item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cart-modal-pdp__item-title {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 130%;
  letter-spacing: 0%;
  color: #202129;
}

.cart-modal-pdp__item-description {
  font-family: 'Archivo', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 130%;
  letter-spacing: 0%;
  color: #202129;
}

.cart-modal-pdp__item-price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.cart-modal-pdp__item-price {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 130%;
  letter-spacing: 0%;
  color: #202129;
}

.cart-modal-pdp__item-tax {
  font-family: 'Archivo', sans-serif;
  font-weight: 400;
  font-size: 10px;
  line-height: 140%;
  letter-spacing: 0%;
  color: #74798A;
}

/* ---------- Quantity Controls ---------- */

.cart-modal-pdp__item-qty {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  align-self: start;
  border: 1px solid #E6E7EB;
    padding: 10px;
    border-radius: 8px;

}

.cart-modal-pdp__qty-btn {
  background: #F2F3F5;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: #202129;
  padding: 0;
}

.cart-modal-pdp__qty-btn:hover {
  background: #f5f5f5;
}

.cart-modal-pdp__qty-value {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #1D1D1F;
  min-width: 20px;
  text-align: center;
}

/* ---------- Empty State ---------- */

.cart-modal-pdp__empty {
  flex: 1;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.cart-modal-pdp__empty:not(.dsp-none) {
  display: flex;
}

.cart-modal-pdp__empty-text {
  font-family: 'Archivo', sans-serif;
  font-size: 14px;
  color: #75787B;
  text-align: center;
  line-height: 1.6;
}

/* ---------- Footer ---------- */

.cart-modal-pdp__footer {
  flex-shrink: 0;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0px -8px 12px 0px #0000000F;
}

.cart-modal-pdp__subtotal-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.cart-modal-pdp__subtotal-label {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 130%;
  letter-spacing: 0%;
  font-variant-numeric: lining-nums tabular-nums;
  color: #1D1D1F;
}

.cart-modal-pdp__subtotal-price-group {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 2px;
}

.cart-modal-pdp__subtotal-price {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 130%;
  letter-spacing: 0%;
  font-variant-numeric: lining-nums tabular-nums;
  color: #1D1D1F;
}

.cart-modal-pdp__subtotal-tax {
  font-family: 'Archivo', sans-serif;
  font-weight: 400;
  font-size: 10px;
  line-height: 140%;
  color: #75787B;
}

.cart-modal-pdp__checkout-btn {
  width: 100%;
  background: #1D1D1F;
  color: #fff;
  font-family: 'Archivo', sans-serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 130%;
  letter-spacing: 0%;
  font-variant-numeric: lining-nums tabular-nums;
  border: none;
  border-radius: 40px;
  padding: 16px 20px;
  cursor: pointer;
  text-align: center;
}


/* ---------- Utility ---------- */

.dsp-none {
  display: none !important;
}
