/* ═══════════════════════════════════════════
   Checkout Widget
   ═══════════════════════════════════════════ */

.co-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  animation: coBgIn 0.22s ease both;
}

@keyframes coBgIn { from { opacity: 0; } to { opacity: 1; } }

.co {
  width: 100%;
  background: #111;
  border-radius: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  animation: coSheetIn 0.32s cubic-bezier(0.16,1,0.3,1) both;
  overflow: hidden;
}

@keyframes coSheetIn {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@media (min-width: 768px) {
  .co-overlay { align-items: center; justify-content: center; }
  .co {
    max-width: 480px;
    border-radius: 20px;
    animation: coModalIn 0.25s ease both;
  }
  @keyframes coModalIn {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
  }
}

.co__handle {
  width: 36px; height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.15);
  margin: 12px auto 0;
  flex-shrink: 0;
}

.co__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.co__title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.co__close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; cursor: pointer;
  transition: background 0.2s;
}
.co__close:hover { background: rgba(255,255,255,0.14); }


.co__body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 20px;
}
.co__body::-webkit-scrollbar { display: none; }


.co__product {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  margin-bottom: 20px;
}
.co__product-thumb {
  width: 64px; height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  color: rgba(255,255,255,0.3);
}
.co__product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.co__product-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 6px;
}
.co__product-seller {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}
.co__product-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--c-accent, #b8f53d);
  margin-top: 6px;
  letter-spacing: -0.3px;
}


.co__variation-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-top: 6px;
}


.co__summary {
  margin-bottom: 20px;
}
.co__summary-title {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.co__summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 14px;
}
.co__summary-row:last-child { border-bottom: none; }
.co__summary-label { color: rgba(255,255,255,0.5); }
.co__summary-value { color: #fff; font-weight: 500; }
.co__summary-row.is-total .co__summary-label { color: #fff; font-weight: 700; font-size: 15px; }
.co__summary-row.is-total .co__summary-value {
  color: var(--c-accent, #b8f53d);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.3px;
}


.co__secure {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(78,203,141,0.06);
  border: 1px solid rgba(78,203,141,0.12);
  border-radius: 12px;
  margin-bottom: 20px;
}
.co__secure i { color: #8ab633; font-size: 16px; }
.co__secure span { font-size: 12px; color: rgba(255,255,255,0.5); line-height: 1.5; }
.co__secure strong { color: rgba(255,255,255,0.8); }


.co__methods {
  margin-bottom: 20px;
}
.co__methods-title {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.co__method-opts {
  display: flex;
  gap: 8px;
}
.co__method {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  font-weight: 500;
  transition: all 0.2s;
  font-family: inherit;
}
.co__method i { font-size: 18px; }
.co__method:hover { border-color: rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); }
.co__method.is-selected {
  border-color: var(--c-accent, #b8f53d);
  background: rgba(184,245,61,0.06);
  color: var(--c-accent, #b8f53d);
}


.co__footer {
  padding: 16px 20px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.co__pay-btn {
  width: 100%;
  padding: 15px;
  border-radius: 14px;
  background: var(--c-accent, #b8f53d);
  color: #080808;
  font-size: 16px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
  font-family: inherit;
  letter-spacing: -0.2px;
}
.co__pay-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(184,245,61,0.3); }
.co__pay-btn:active { transform: translateY(0); }
.co__pay-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.co__pay-note {
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  margin-top: 10px;
}


.co__processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 20px;
  text-align: center;
}
.co__processing-spinner {
  width: 48px; height: 48px;
  border: 3px solid rgba(184,245,61,0.2);
  border-top-color: var(--c-accent, #b8f53d);
  border-radius: 50%;
  animation: coSpin 0.7s linear infinite;
}
@keyframes coSpin { to { transform: rotate(360deg); } }

.co__processing h3 {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}
.co__processing p {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  line-height: 1.5;
}


.co__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 48px 20px;
  text-align: center;
}
.co__success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(78,203,141,0.12);
  border: 2px solid rgba(78,203,141,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  color: #8ab633;
  animation: coSuccessIn 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes coSuccessIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.co__success h3 {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}
.co__success p {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  max-width: 280px;
}
.co__success-btn {
  padding: 12px 28px;
  border-radius: 12px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
  margin-top: 4px;
}
.co__success-btn:hover { background: rgba(255,255,255,0.12); }

.co__product-info {
  flex: 1;
  min-width: 0;
}


.co__variation-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}


.co__summary-note {
  color: rgba(255,255,255,0.35);
  font-size: 12px;
}


.co__summary-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 8px 0;
}


.co__trust {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(78,203,141,0.06);
  border: 1px solid rgba(78,203,141,0.12);
  border-radius: 12px;
  margin-bottom: 16px;
}
.co__trust i { color: #8ab633; font-size: 16px; flex-shrink: 0; }
.co__trust span { font-size: 12px; color: rgba(255,255,255,0.5); line-height: 1.5; }
.co__trust strong { color: rgba(255,255,255,0.8); }


.co__trust--accent {
  background: rgba(184,245,61,0.04);
  border-color: rgba(184,245,61,0.1);
}
.co__trust--accent i { color: var(--c-accent, #b8f53d); }


.co__success-close {
  width: 100%;
  padding: 12px 28px;
  border-radius: 12px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
  margin-top: 4px;
}
.co__success-close:hover { background: rgba(255,255,255,0.12); }

@keyframes coSlideOut {
  from { transform: translateY(0); opacity: 1; }
  to   { transform: translateY(100%); opacity: 0; }
}
/* ─── Delivery Address Form ──────────────────────────────────── */
.co__address-intro {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 24px;
  padding: 14px 16px;
  background: rgba(184,245,61,0.04);
  border: 1px solid rgba(184,245,61,0.1);
  border-radius: 12px;
}
.co__address-intro i { 
  color: var(--c-accent, #b8f53d); 
  font-size: 18px;
}

.co__address-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.co__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.co__field label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.3px;
}
.co__field-row {
  display: flex;
  gap: 14px;
}
.co__field-row .co__field { flex: 1; }

.co__input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}
.co__input:focus {
  border-color: var(--c-accent, #b8f53d);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 3px rgba(184,245,61,0.08);
}
.co__input::placeholder { 
  color: rgba(255,255,255,0.2); 
  font-size: 14px;
}

.co__field-error {
  font-size: 12px;
  color: #ef4444;
  font-weight: 500;
  padding-left: 2px;
}

.co__address-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  line-height: 1.6;
}
.co__address-note i { 
  color: var(--c-accent, #b8f53d); 
  flex-shrink: 0; 
  margin-top: 1px;
  font-size: 14px;
}

/* Delivery summary on success */
.co__delivery-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  width: 100%;
  text-align: left;
  margin: 8px 0;
}
.co__delivery-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
}
.co__delivery-row i {
  color: var(--c-accent, #b8f53d);
  width: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 14px;
}

.co__success-note {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  text-align: center;
}
.co__delivery-code-block {
    padding: 16px;
    background: rgba(184, 245, 61, 0.05);
    border: 1px solid rgba(184, 245, 61, 0.15);
    border-radius: 14px;
    width: 100%;
    text-align: center;
    margin-bottom: 12px;
    DISPLAY: FLEX;
    FLEX-DIRECTION: COLUMN;
    align-items: center;
}

.co__delivery-code-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}
.co__delivery-code-label i { color: var(--c-accent, #b8f53d); }

.co__delivery-code {
  font-family: var(--ff-display, 'Syne', monospace);
  font-size: 28px;
  font-weight: 800;
  color: var(--c-accent, #b8f53d);
  letter-spacing: 8px;
  padding: 8px 0;
}

.co__delivery-code-note {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  line-height: 1.5;
  margin-top: 8px;
}
.co__delivery-code-note strong {     color: rgba(255, 255, 255, 0.7);
    font-weight: 500; }
