.cart-drawer {
  position: fixed;
  z-index: 10020;
  inset-inline-start: 0;
  inset-block-start: 0;
  width: 100vw;
  height: 100%;
  display: flex;
  justify-content: flex-end;
  background-color: rgba(var(--color-mask), 0.5);
  transition: all 200ms ease;
}

.cart-drawer {
  visibility: hidden;
  opacity: 0;
  overflow: hidden !important;
  pointer-events: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.cart-drawer.active {
  visibility: visible;
  opacity: 1;
  overflow: visible !important;
  pointer-events: auto;
  -webkit-user-select: auto;
  -moz-user-select: auto;
  -ms-user-select: auto;
  user-select: auto;
}

.cart-drawer__inner {
  height: 100%;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 200ms ease;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background-color: rgb(var(--color-page-background));
}

.cart-drawer__fixed-checkout {
  transform: translateX(100%);
  transition: transform 200ms ease;
}

.cart-drawer__inner .cart-drawer__inner-wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.cart-drawer__warnings {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: center;
}

.cart-drawer.active .cart-drawer__inner,
.cart-drawer.active .cart-drawer__fixed-checkout {
  transform: translateX(0);
}

.cart-drawer__header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block-end: 20px;
}

.cart-drawer__header::after {
  content: "";
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: -20px;
  width: calc(100% + 40px);
  height: 1px;
  background-color: rgb(var(--color-entry-line));
}

.cart-drawer__close {
  color: rgb(var(--color-text));
  cursor: pointer;
  width: 24px;
  height: 24px;
  line-height: 0;
  inset-block-start: 2px;
  inset-inline-end: -4px;
  padding: 6px;
  position: absolute;
}

cart-drawer {
  display: block;
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 100vw;
  height: 100%;
}

.cart-drawer-container {
  width: 440px;
}

.cart-drawer__overlay {
  position: fixed;
  inset: 0;
}

.cart-drawer__overlay:empty {
  display: block;
}

/* cart-drawer-items {
  overflow: auto;
  flex: 1;
} */

.cart-drawer__inner {
  overflow-y: scroll;
}

@media screen and (max-height: 650px) {
  cart-drawer-items {
    overflow: visible;
  }

  .cart-drawer__inner {
    overflow-y: scroll;
  }
}

@media (max-width: 959px) {
  .cart-drawer-container {
    width: 90%;
  }
}

cart-drawer-items::-webkit-scrollbar {
  width: 3px;
}

cart-drawer-items::-webkit-scrollbar-thumb {
  background-color: rgba(18, 18, 18, 0.7);
  border-radius: 100px;
}

cart-drawer-items::-webkit-scrollbar-track-piece {
  margin-block-start: 20px;
}

/* cart-drawer-footer */

.cart-drawer__footer__container {
  display: flex;
  justify-content: flex-end;
  padding-block: 40px;
}

.cart-drawer__checkout-container {
  width: 100%;
  position: relative;
  padding: 40px 0;
}

.cart-drawer__checkout-container::after {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: -20px;
  width: calc(100% + 40px);
  height: 1px;
  background-color: rgb(var(--color-entry-line));
}

.cart-drawer__amount-wrapper {
  margin: 0;
  padding: 0;
}

.cart-drawer__amount-wrapper li {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgb(var(--color-text));
  margin-block-end: 8px;
}

.cart-drawer__amount-wrapper li em {
  font-style: normal;
  margin-inline-end: 12px;
}

.cart-drawer__amount-wrapper .cart__discount span {
  color: rgb(var(--color-discount));
}

.cart-drawer__discount span {
  color: rgb(var(--color-discount));
}

#checkout {
  width: 100%;
}

.cart-drawer__checkout {
  margin-block-start: 15px;
}

.cart-drawer__taxes__desc {
  text-align: center;
}

.cart-drawer__body {
  position: relative;
  display: flex;
  height: 100%;
  flex-direction: column;
}

.cart-drawer__body .cart-drawer__inner {
  flex: 1;
}

.cart-drawer__body .cart-fixed-checkout {
  position: static;
}

/* The ipad end responds to the mobile end in vertical screen */

/* @custom-media --tablet (max-width: 959px); */

/* @custom-media --gt-mobile (min-width: 751px); */

/* detectingScreen need to consider the configuration of the tablet */

/* ==========================================================================
   ZOVARIN ATELIER DRAWER CONVERSION ENGINE ENHANCEMENTS
   - Curated Cross-Sell ("Frequently Added Together")
   - Warm Empty Cart State
   - Mobile 390px perfection & tap ergonomics
   ========================================================================== */

/* Warm Empty Cart State in Drawer - ONLY WHEN CART IS EMPTY */
.cart-drawer .cart-empty .cart__warnings.zv-empty-cart-state,
.cart-drawer .cart-drawer__inner-wrapper.cart-empty .cart__warnings.zv-empty-cart-state,
.cart-drawer__inner-wrapper.cart-empty .cart__warnings {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 16px;
  text-align: center;
  box-sizing: border-box;
  width: 100%;
}

/* Strictly hide empty cart warnings when cart has items */
.cart-drawer .cart-drawer__inner-wrapper:not(.cart-empty) .cart__warnings,
.cart-drawer__inner-wrapper:not(.cart-empty) .cart__warnings {
  display: none !important;
}

.cart-drawer .cart__warnings .cart__empty-text-wrapper.zv-empty-wrapper {
  margin: 10px auto 24px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.zv-empty-cart-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #f5f5f4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border: 1px solid #e7e5e4;
  color: #78716c;
}

.zv-empty-title {
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  color: #1c1917;
  letter-spacing: -0.01em;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.zv-empty-subtitle {
  font-size: 13px;
  line-height: 1.5;
  color: #78716c;
  margin: 0 0 20px 0;
}

.zv-empty-continue-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 260px;
  height: 48px;
  background-color: #1c1917;
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.15s ease;
  box-shadow: 0 4px 12px rgba(28, 25, 23, 0.12);
}

.zv-empty-continue-btn:hover {
  background-color: #000000;
  transform: translateY(-1px);
}

/* Frequently Added Together Cross-Sell Module in Drawer */
.zv-drawer-cross-sell {
  margin: 16px 0 20px;
  padding: 14px 14px 12px;
  background: #fafaf9;
  border: 1px solid #e7e5e4;
  border-radius: 8px;
  box-sizing: border-box;
}

.zv-cross-sell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0efed;
}

.zv-cross-sell-title {
  font-size: 12px;
  font-weight: 700;
  color: #1c1917;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.zv-cross-sell-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #F4EFEA;
  color: #8C6239;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #DFD3C3;
}

.zv-cross-sell-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.zv-cross-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ebe9e6;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.zv-cross-item:hover {
  border-color: #d6d3d1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.zv-cross-thumb {
  width: 52px;
  height: 65px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #f5f5f4;
}

.zv-cross-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.zv-cross-meta {
  flex: 1;
  min-width: 0;
}

.zv-cross-item-title {
  display: block !important;
  max-width: 100% !important;
  font-size: 13px;
  font-weight: 600;
  color: #221A15;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.zv-cross-item-variant {
  font-size: 11px;
  color: #78716c;
  margin-top: 2px;
  line-height: 1.2;
}

.zv-cross-item-price-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.zv-cross-price {
  font-size: 13px;
  font-weight: 700;
  color: #1c1917;
}

.zv-cross-compare {
  font-size: 11px;
  color: #a8a29e;
  text-decoration: line-through;
}

.zv-cross-add-btn {
  flex-shrink: 0;
  height: 34px;
  padding: 0 12px;
  background: #1c1917;
  color: #ffffff;
  border: 1px solid #1c1917;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  touch-action: manipulation;
  white-space: nowrap;
}

.zv-cross-add-btn:hover {
  background: #332d29;
  border-color: #332d29;
}

.zv-cross-add-btn.is-added {
  background: #8C6239;
  border-color: #8C6239;
  color: #ffffff;
  pointer-events: none;
}

@media (max-width: 749px) {
  .zv-drawer-cross-sell {
    padding: 12px 10px;
    margin: 12px 0 16px;
  }
  .zv-cross-thumb {
    width: 44px;
    height: 55px;
  }
  .zv-cross-item-title {
    font-size: 12px;
  }
  .zv-cross-add-btn {
    height: 32px;
    padding: 0 10px;
    font-size: 11px;
  }
}


/* Layer above the sticky header; retain the existing visual styling. */
.cart-drawer__close { background:transparent; border:0; cursor:pointer; }
.zv-cross-variant { width:100%; max-width:100%; font:inherit; font-size:11px; border:1px solid #e7e5e4; border-radius:4px; margin:4px 0; padding:4px; background:#fff; }
.zv-cross-meta { min-width:0; }
.zv-drawer-cross-sell[hidden] { display:none !important; }
