/* Cart drawer, shipping modal, privacy modal, success banner. Moved from index.html in v2 stage 2. */

/* Privacy modal */
.privacy-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 40px 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.privacy-overlay.open {
  display: flex;
  opacity: 1;
}
.privacy-modal {
  background: #0a0a0a;
  border: 1px solid rgba(232, 146, 124, 0.25);
  border-radius: 4px;
  max-width: 820px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
  transform: translateY(12px);
  transition: transform 0.25s ease;
}
.privacy-overlay.open .privacy-modal {
  transform: translateY(0);
}
.privacy-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid rgba(232, 146, 124, 0.15);
  flex-shrink: 0;
}
.privacy-modal__header h2 {
  font-family: 'Recoleta', serif;
  font-size: 24px;
  color: #E8927C;
  letter-spacing: 0.05em;
  margin: 0;
}
.privacy-modal__close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
  transition: color 0.2s;
}
.privacy-modal__close:hover {
  color: #E8927C;
}
.privacy-modal__body {
  overflow-y: auto;
  padding: 28px 32px 36px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
}
.privacy-modal__body h3 {
  font-family: 'Recoleta', serif;
  font-size: 18px;
  color: #E8927C;
  letter-spacing: 0.04em;
  margin: 28px 0 10px;
}
.privacy-modal__body h3:first-child {
  margin-top: 0;
}
.privacy-modal__body h4 {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 18px 0 6px;
}
.privacy-modal__body p {
  margin: 0 0 12px;
}
.privacy-modal__body ul {
  margin: 0 0 12px;
  padding-left: 20px;
}
.privacy-modal__body li {
  margin-bottom: 6px;
}
.privacy-modal__body a {
  color: #E8927C;
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 146, 124, 0.3);
}
.privacy-modal__body a:hover {
  border-bottom-color: #E8927C;
}
.privacy-modal__body .effective-date {
  font-style: italic;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 24px;
}
body.privacy-open {
  overflow: hidden;
}

/* Banner animations */
@keyframes slideDown {
  from { transform: translate(-50%, -100%); opacity: 0; }
  to   { transform: translate(-50%, 0); opacity: 1; }
}
@keyframes slideUp {
  from { transform: translate(-50%, 0); opacity: 1; }
  to   { transform: translate(-50%, -100%); opacity: 0; }
}

@media (max-width: 768px) {
  /* Privacy modal */
  .privacy-overlay { padding: 20px 12px; }
  .privacy-modal { max-height: 90vh; }
  .privacy-modal__header { padding: 18px 20px !important; }
  .privacy-modal__header h2 { font-size: 20px !important; }
  .privacy-modal__body { padding: 22px 20px 30px !important; font-size: 14px !important; line-height: 1.65 !important; }
  .privacy-modal__body h3 { font-size: 16px !important; margin: 22px 0 8px !important; }
  .privacy-modal__body h4 { font-size: 12px !important; }
}

/* ---------- Cart drawer ---------- */
.cart-count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px;
  background: rgba(232,146,124,0.9);
  color: #030303;
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: 0;
}
.cart-count-badge[data-empty="true"] {
  background: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.7);
}

.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 900;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 420px; max-width: 100vw;
  background: #0a0a0a;
  color: #FFFBEB;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  display: flex; flex-direction: column;
  box-shadow: -20px 0 60px rgba(0,0,0,0.5);
  font-family: 'Inter', sans-serif;
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 32px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cart-drawer__header h2 {
  font-family: 'Recoleta', serif;
  font-weight: 400;
  font-size: 28px;
  letter-spacing: 0.02em;
  color: #E8927C;
}
.cart-drawer__close {
  background: none; border: 0; color: rgba(255,255,255,0.7);
  font-size: 32px; line-height: 1; cursor: pointer;
  padding: 0; width: 32px; height: 32px;
  transition: color 0.2s ease;
}
.cart-drawer__close:hover { color: #FFFBEB; }

.cart-drawer__body {
  flex: 1; overflow-y: auto;
  padding: 16px 32px;
}

.cart-empty {
  color: rgba(255,255,255,0.45);
  font-size: 14px; letter-spacing: 0.05em;
  text-align: center; padding: 60px 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cart-item:last-child { border-bottom: 0; }
.cart-item img {
  width: 84px; height: 84px;
  object-fit: cover; object-position: center 32%;
  border-radius: 4px;
  background: #1a1a1a;
}
.cart-item__name {
  font-family: 'Recoleta', serif;
  font-size: 18px;
  color: #FFFBEB;
  margin-bottom: 4px;
}
.cart-item__price {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.cart-item__qty {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
}
.cart-item__qty button {
  background: none;
  border: 1px solid rgba(255,255,255,0.18);
  color: #FFFBEB;
  width: 26px; height: 26px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px; line-height: 1;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.cart-item__qty button:hover { border-color: #E8927C; }
.cart-item__qty span {
  min-width: 24px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.cart-item__remove {
  margin-left: auto;
  background: none !important;
  border: 0 !important;
  width: auto !important;
  color: rgba(255,255,255,0.45) !important;
  font-size: 11px !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0 !important;
}
.cart-item__remove:hover { color: #E8927C !important; }

.cart-drawer__footer {
  padding: 24px 32px 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
}
.cart-drawer__total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 16px;
  font-family: 'Recoleta', serif;
  font-size: 20px;
  color: #FFFBEB;
}
.cart-drawer__total small {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
}
.cart-checkout-btn {
  width: 100%;
  padding: 16px;
  background: #E8927C;
  color: #030303;
  border: 0;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.cart-checkout-btn:hover:not(:disabled) { background: #f0a48f; }
.cart-checkout-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.cart-drawer__shipping-note {
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.4);
  text-align: center;
}
.cart-drawer__age-note {
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.05em;
  line-height: 1.6;
  color: #E8927C;
  text-align: center;
}

@media (max-width: 480px) {
  .cart-drawer { width: 100vw; }
  .cart-drawer__header { padding: 24px 24px 20px; }
  .cart-drawer__body { padding: 12px 24px; }
  .cart-drawer__footer { padding: 20px 24px 28px; }
}

/* Shipping-details modal: shown between the cart and the Commas checkout.
   The address has to be collected here because the Commas checkout only takes
   contact + billing details, and its webhook returns name and email alone. It
   rides across to Shopify in the checkout session's metadata. */
.ship-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(3,3,3,0.82);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
}
.ship-modal {
  width: 100%; max-width: 480px;
  background: #0b0b0b;
  border: 1px solid rgba(232,146,124,0.18);
  padding: 32px;
}
.ship-modal h3 {
  margin: 0 0 6px;
  font-family: 'Recoleta', serif;
  font-size: 24px; font-weight: 300;
  color: #FFFBEB;
}
.ship-modal__sub {
  margin: 0 0 24px;
  font-size: 12px; line-height: 1.6;
  color: rgba(255,255,255,0.45);
}
.ship-field { margin-bottom: 12px; }
.ship-field label {
  display: block; margin-bottom: 6px;
  font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}
.ship-field input, .ship-field select {
  width: 100%; box-sizing: border-box; padding: 12px;
  background: #030303;
  border: 1px solid rgba(255,255,255,0.12);
  color: #FFFBEB;
  font-family: 'Inter', sans-serif; font-size: 14px;
}
.ship-field input:focus, .ship-field select:focus {
  outline: none; border-color: #E8927C;
}
.ship-row { display: flex; gap: 12px; }
.ship-row > * { flex: 1; min-width: 0; }
.ship-hint {
  margin: -6px 0 14px;
  font-size: 11px; line-height: 1.5;
  color: rgba(255,255,255,0.42);
}
.ship-actions { display: flex; gap: 10px; margin-top: 24px; }
.ship-btn {
  flex: 1; padding: 15px; border: 0; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.ship-btn--go { background: #E8927C; color: #030303; }
.ship-btn--go:hover:not(:disabled) { background: #f0a48f; }
.ship-btn--go:disabled { opacity: 0.4; cursor: wait; }
.ship-btn--back {
  background: transparent; color: rgba(255,251,235,0.7);
  border: 1px solid rgba(255,255,255,0.14);
}
.ship-error {
  margin-bottom: 16px; padding: 11px 12px;
  background: rgba(190,60,60,0.12);
  border: 1px solid rgba(190,60,60,0.38);
  color: #ffb4b4; font-size: 12px; line-height: 1.5;
}
@media (max-width: 480px) {
  .ship-modal { padding: 24px; }
  .ship-row { display: block; }
}
