/* ============================================================
   YUSAYN — Cart Drawer + Toast + Badge Styles
   Uses the same design tokens as style.css
   ============================================================ */

/* ---------- cart icon / badge in nav ---------- */
.nav__cart-btn{
  position: relative;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}
.nav__cart-icon{
  width: 20px;
  height: 20px;
}
.nav__cart-badge{
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  background: #e53935;
  color: #fff;
  font-family: var(--f-mono);
  font-size: 9px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity .25s ease, transform .25s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none;
}
.nav__cart-badge.has-items{
  opacity: 1;
  transform: scale(1);
}
/* Pulse animation when item is added */
@keyframes badgePop{
  0%{ transform: scale(1); }
  40%{ transform: scale(1.35); }
  100%{ transform: scale(1); }
}
.nav__cart-badge.pop{
  animation: badgePop .35s ease;
}

/* ---------- cart drawer backdrop ---------- */
.cart-backdrop{
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.cart-backdrop.is-open{
  opacity: 1;
  visibility: visible;
}

/* ---------- cart drawer panel ---------- */
.cart-drawer{
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  width: min(420px, 92vw);
  background: var(--paper, #fff);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .38s cubic-bezier(.22,1,.36,1);
  box-shadow: -8px 0 40px rgba(0,0,0,.12);
}
.cart-drawer.is-open{
  transform: translateX(0);
}

/* ── drawer header ── */
.cart-drawer__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line, #111);
  flex-shrink: 0;
}
.cart-drawer__title{
  font-family: var(--f-head, 'Archivo Narrow', sans-serif);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0;
}
.cart-drawer__count{
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 11px;
  color: var(--ink-soft, #060606);
  letter-spacing: .08em;
  margin-left: 8px;
}
.cart-drawer__close{
  background: none;
  border: 1px solid var(--line, #111);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink, #000);
  transition: background .2s ease, color .2s ease;
}
.cart-drawer__close:hover{
  background: var(--ink, #000);
  color: var(--paper, #fff);
}
.cart-drawer__close svg{
  width: 14px;
  height: 14px;
}

/* ── drawer items list ── */
.cart-drawer__items{
  flex: 1;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--slot-line, #b6b2a8) transparent;
}
.cart-drawer__items::-webkit-scrollbar{
  width: 4px;
}
.cart-drawer__items::-webkit-scrollbar-thumb{
  background: var(--slot-line, #b6b2a8);
  border-radius: 2px;
}

/* ── individual cart item ── */
.cart-item{
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  transition: background .2s ease;
}
.cart-item:hover{
  background: var(--paper-dim, #f5f4f1);
}
.cart-item__image{
  width: 80px;
  height: 100px;
  background: var(--paper-dim, #f5f4f1);
  overflow: hidden;
}
.cart-item__image img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cart-item__details{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100px;
}
.cart-item__name{
  font-family: var(--f-head, 'Archivo Narrow', sans-serif);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.3;
  margin: 0;
}
.cart-item__meta{
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--ink-soft, #060606);
  text-transform: uppercase;
  margin-top: 4px;
}
.cart-item__price{
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
}
.cart-item__bottom{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

/* ── quantity controls ── */
.cart-item__qty{
  display: flex;
  align-items: center;
  border: 1px solid var(--line, #111);
}
.cart-item__qty button{
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink, #000);
  transition: background .15s ease, color .15s ease;
}
.cart-item__qty button:hover{
  background: var(--ink, #000);
  color: var(--paper, #fff);
}
.cart-item__qty span{
  width: 32px;
  text-align: center;
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 12px;
  border-left: 1px solid var(--line, #111);
  border-right: 1px solid var(--line, #111);
  height: 30px;
  line-height: 30px;
}

/* ── remove button ── */
.cart-item__remove{
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft, #060606);
  padding: 4px 0;
  transition: color .2s ease;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cart-item__remove:hover{
  color: #e53935;
}

/* ── empty state ── */
.cart-drawer__empty{
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
}
.cart-drawer__empty-icon{
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  color: var(--slot-text, #8f8b81);
}
.cart-drawer__empty-text{
  font-family: var(--f-head, 'Archivo Narrow', sans-serif);
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.cart-drawer__empty-sub{
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 11px;
  color: var(--ink-soft, #060606);
  letter-spacing: .06em;
  margin-bottom: 24px;
}
.cart-drawer__shop-link{
  font-family: var(--f-head, 'Archivo Narrow', sans-serif);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1px solid var(--line, #111);
  padding: 12px 28px;
  color: var(--ink, #000);
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
  display: inline-block;
}
.cart-drawer__shop-link:hover{
  background: var(--ink, #000);
  color: var(--paper, #fff);
}

/* ── drawer footer (subtotal + checkout) ── */
.cart-drawer__footer{
  flex-shrink: 0;
  border-top: 1px solid var(--line, #111);
  padding: 20px 24px;
  background: var(--paper, #fff);
}
.cart-drawer__subtotal{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}
.cart-drawer__subtotal-label{
  font-family: var(--f-head, 'Archivo Narrow', sans-serif);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.cart-drawer__subtotal-value{
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 18px;
  font-weight: 500;
}
.cart-drawer__checkout{
  width: 100%;
  padding: 16px;
  background: var(--ink, #000);
  color: var(--paper, #fff);
  border: 1px solid var(--ink, #000);
  font-family: var(--f-head, 'Archivo Narrow', sans-serif);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: opacity .2s ease;
}
.cart-drawer__checkout:hover{
  opacity: .82;
}
.cart-drawer__clear{
  width: 100%;
  padding: 10px;
  background: none;
  border: 1px solid rgba(0,0,0,.12);
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft, #060606);
  cursor: pointer;
  margin-top: 8px;
  transition: background .2s ease, color .2s ease;
}
.cart-drawer__clear:hover{
  background: #e53935;
  color: #fff;
  border-color: #e53935;
}

/* ---------- checkout modal ---------- */
.checkout-modal-backdrop{
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.checkout-modal-backdrop.is-open{
  opacity: 1;
  visibility: visible;
}
.checkout-modal{
  background: var(--paper, #fff);
  width: min(440px, 90vw);
  padding: 40px 32px;
  text-align: center;
  transform: translateY(20px) scale(.96);
  transition: transform .35s cubic-bezier(.22,1,.36,1);
}
.checkout-modal-backdrop.is-open .checkout-modal{
  transform: translateY(0) scale(1);
}
.checkout-modal__title{
  font-family: var(--f-head, 'Archivo Narrow', sans-serif);
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 12px;
}
.checkout-modal__text{
  font-family: var(--f-body, 'Inter', sans-serif);
  font-size: 14px;
  color: var(--ink-soft, #060606);
  line-height: 1.6;
  margin: 0 0 24px;
}
.checkout-modal__actions{
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.checkout-modal__wa{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  background: #25D366;
  color: #fff;
  border: none;
  font-family: var(--f-head, 'Archivo Narrow', sans-serif);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .2s ease;
}
.checkout-modal__wa:hover{ opacity: .88; }
.checkout-modal__wa svg{
  width: 20px;
  height: 20px;
  fill: #fff;
}
.checkout-modal__email{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  background: none;
  border: 1px solid var(--line, #111);
  color: var(--ink, #000);
  font-family: var(--f-head, 'Archivo Narrow', sans-serif);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.checkout-modal__email:hover{
  background: var(--ink, #000);
  color: var(--paper, #fff);
}
.checkout-modal__close{
  margin-top: 16px;
  background: none;
  border: none;
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft, #060606);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- toast notifications ---------- */
.toast-container{
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast{
  pointer-events: auto;
  background: var(--ink, #000);
  color: var(--paper, #fff);
  padding: 14px 22px;
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 12px;
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.2);
  transform: translateY(20px);
  opacity: 0;
  transition: transform .35s cubic-bezier(.22,1,.36,1), opacity .35s ease;
  max-width: 360px;
}
.toast.show{
  transform: translateY(0);
  opacity: 1;
}
.toast__check{
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #4CAF50;
}

/* ---------- product page: price display ---------- */
.product__price{
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 22px;
  margin-bottom: 18px;
  font-weight: 500;
}

/* ---------- product page: quantity selector ---------- */
.qty-row{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.qty-label{
  font-family: var(--f-head, 'Archivo Narrow', sans-serif);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.qty-controls{
  display: flex;
  align-items: center;
  border: 1px solid var(--line, #111);
}
.qty-controls button{
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink, #000);
  transition: background .15s ease, color .15s ease;
}
.qty-controls button:hover{
  background: var(--ink, #000);
  color: var(--paper, #fff);
}
.qty-controls input{
  width: 44px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--line, #111);
  border-right: 1px solid var(--line, #111);
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 13px;
  height: 38px;
  background: none;
  outline: none;
  color: var(--ink, #000);
  -moz-appearance: textfield;
}
.qty-controls input::-webkit-outer-spin-button,
.qty-controls input::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}

/* ---------- product card: price on grid ---------- */
.card__price{
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 13px;
  margin-top: 2px;
  font-weight: 500;
}

/* ---------- cart drawer: coupon ---------- */
.cart-drawer__coupon{
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.cart-drawer__coupon-input{
  display: flex;
  gap: 6px;
}
.cart-drawer__coupon-input input{
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--line, #111);
  background: none;
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink, #000);
  outline: none;
}
.cart-drawer__coupon-input input::placeholder{
  text-transform: none;
  letter-spacing: normal;
  font-size: 11px;
}
.cart-drawer__coupon-input button{
  padding: 9px 14px;
  background: var(--ink, #000);
  color: var(--paper, #fff);
  border: 1px solid var(--ink, #000);
  font-family: var(--f-head, 'Archivo Narrow', sans-serif);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity .2s ease;
}
.cart-drawer__coupon-input button:hover{ opacity: .82; }
.cart-drawer__coupon-applied{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.cart-drawer__coupon-tag{
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  color: #166534;
}
.cart-drawer__coupon-remove{
  background: none;
  border: none;
  font-size: 14px;
  color: #999;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}
.cart-drawer__coupon-remove:hover{ color: #e53935; }
.cart-drawer__coupon-msg{
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 10px;
  letter-spacing: .04em;
  margin-top: 6px;
  min-height: 14px;
}
.cart-drawer__coupon-msg.success{ color: #2e7d32; }
.cart-drawer__coupon-msg.error{ color: #e53935; }
.cart-drawer__discount-row{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.cart-drawer__discount-value{
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 14px;
  font-weight: 500;
  color: #2e7d32;
}

/* ---------- responsive ---------- */
@media (max-width: 600px){
  .cart-drawer{
    width: 100vw;
  }
  .cart-item{
    padding: 16px 18px;
    gap: 12px;
  }
  .cart-item__image{
    width: 65px;
    height: 82px;
  }
  .cart-drawer__header{
    padding: 16px 18px;
  }
  .cart-drawer__footer{
    padding: 16px 18px;
  }
  .toast-container{
    bottom: 16px;
    right: 16px;
    left: 16px;
  }
  .toast{
    max-width: none;
  }
  .checkout-modal{
    padding: 32px 20px;
  }
}
