/* ============================================================
   Cart Drawer & Checkout Styles
   ============================================================ */

/* ---------- Nav cart icon ---------- */
.nav__cart-btn {
  position: relative;
  color: var(--white);
  margin-left: 1rem;
  cursor: pointer;
  background: none;
  border: none;
  display: flex;
  align-items: center;
}
.nav__cart-btn svg { width: 22px; height: 22px; }
.nav__cart-count {
  position: absolute;
  top: -6px;
  right: -8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--black);
  font-size: 0.65rem;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ---------- Overlay ---------- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.cart-overlay--visible {
  opacity: 1;
  visibility: visible;
}

/* ---------- Drawer ---------- */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 90vw;
  height: 100vh;
  background: var(--black);
  color: var(--white);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4);
}
.cart-drawer--open {
  transform: translateX(0);
}

.cart-drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(197, 164, 78, 0.15);
}
.cart-drawer__header h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.3rem;
}
.cart-drawer__close {
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
  transition: color 0.3s;
}
.cart-drawer__close:hover { color: var(--white); }

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

.cart-drawer__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
  gap: 1rem;
}
.cart-drawer__empty svg { opacity: 0.3; }
.cart-drawer__empty p { font-size: 0.95rem; }

/* ---------- Cart item ---------- */
.cart-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  align-items: flex-start;
}
.cart-item__img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}
.cart-item__info {
  flex: 1;
  min-width: 0;
}
.cart-item__info strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.cart-item__desc {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 4px;
}
.cart-item__sub {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #2ecc71;
  margin-bottom: 6px;
}
.cart-item__qty {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}
.cart-item__qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.cart-item__qty-btn:hover { background: rgba(255, 255, 255, 0.1); }
.cart-item__qty span {
  width: 28px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
}

.cart-item__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.cart-item__price {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--gold);
}
.cart-item__remove {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.25);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.cart-item__remove:hover { color: #e74c3c; }

/* ---------- Drawer footer ---------- */
.cart-drawer__footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(197, 164, 78, 0.15);
}
.cart-drawer__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.cart-drawer__total strong {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--gold);
}
.cart-drawer__shipping-note {
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.5rem;
  letter-spacing: 0.03em;
}
.cart-drawer__secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 0.75rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
}

/* ---------- Account toggle ---------- */
.checkout__account-toggle {
  display: flex;
  border: 1px solid rgba(197, 164, 78, 0.25);
  margin-bottom: 1.2rem;
  overflow: hidden;
  border-radius: 2px;
}
.toggle-btn {
  flex: 1;
  padding: 10px 16px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}
.toggle-btn--active {
  background: var(--gold);
  color: var(--black);
}
.toggle-btn:hover:not(.toggle-btn--active) {
  color: rgba(255, 255, 255, 0.8);
}

.checkout__pass-row {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.3s ease,
              margin 0.3s ease;
  margin-bottom: 0;
}
.checkout__pass-row--open {
  max-height: 200px;
  opacity: 1;
  margin-bottom: 12px;
}

.checkout__pass-hint {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 10px;
  font-style: italic;
}

/* ============================================================
   CHECKOUT PAGE
   ============================================================ */
.checkout {
  padding: 100px 0 80px;
  min-height: 100vh;
}
.page--dark .checkout { background: var(--black); }

.checkout__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* -- Form column -- */
.checkout__form-section {
  margin-bottom: 2rem;
}
.checkout__form-section h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.3rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(197, 164, 78, 0.15);
}
.checkout__form-section h2 span {
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
  margin-left: 0.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.form-row--full { grid-template-columns: 1fr; }

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-field label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.form-field input,
.form-field select {
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(197, 164, 78, 0.2);
  border-radius: 4px;
  color: var(--white);
  outline: none;
  transition: border-color 0.3s;
}
.form-field input:focus,
.form-field select:focus {
  border-color: var(--gold);
}
.form-field input::placeholder { color: rgba(255, 255, 255, 0.25); }
.form-field select option { background: var(--black); }

/* -- Payment methods -- */
.pay-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pay-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(197, 164, 78, 0.15);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  background: transparent;
}
.pay-method:hover,
.pay-method--selected {
  border-color: var(--gold);
  background: rgba(197, 164, 78, 0.05);
}
.pay-method input[type="radio"] {
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.pay-method__label {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
}
.pay-method__icons {
  display: flex;
  gap: 6px;
  align-items: center;
}
.pay-method__icon {
  height: 24px;
  width: auto;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #333;
  display: inline-flex;
  align-items: center;
}

/* Card form */
.card-fields {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* -- Summary column -- */
.checkout__summary {
  position: sticky;
  top: 100px;
  padding: 24px;
  border: 1px solid rgba(197, 164, 78, 0.15);
  border-radius: 4px;
}
.checkout__summary h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.summary-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  align-items: center;
}
.summary-item__img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 3px;
  flex-shrink: 0;
}
.summary-item__info {
  flex: 1;
  min-width: 0;
}
.summary-item__info strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
}
.summary-item__info span {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
}
.summary-item__price {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--gold);
  flex-shrink: 0;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.88rem;
}
.summary-line--total {
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid rgba(197, 164, 78, 0.2);
  font-weight: 600;
}
.summary-line--total span:last-child {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--gold);
}

.checkout__place-btn {
  margin-top: 1.5rem;
}

.checkout__badges {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.checkout__badges span {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

/* ---------- Thank-you page (post-checkout) ---------- */
.thank-you {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 4rem;
  background: var(--black);
  position: relative;
  overflow: hidden;
}
.thank-you::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(197, 164, 78, 0.12), transparent 70%);
  pointer-events: none;
}
.thank-you__inner {
  position: relative;
  max-width: 520px;
  text-align: center;
}
.thank-you__label {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid rgba(197, 164, 78, 0.35);
  border-radius: 2px;
}
.thank-you__check {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.75rem;
  color: var(--gold);
  box-shadow: 0 0 40px rgba(197, 164, 78, 0.15);
}
.thank-you__check svg { width: 40px; height: 40px; }
.thank-you__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 1rem;
  line-height: 1.2;
}
.thank-you__text {
  color: rgba(255, 255, 255, 0.65);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 0.75rem;
}
.thank-you__sub {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}
.thank-you__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}
.thank-you__actions .btn { min-width: 220px; }
.thank-you__trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(197, 164, 78, 0.15);
}
.thank-you__trust span {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(197, 164, 78, 0.85);
}

/* -- Success overlay -- */
.order-success {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 10, 10, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s;
}
.order-success--visible {
  opacity: 1;
  visibility: visible;
}
.order-success__inner {
  max-width: 440px;
  padding: 3rem 2rem;
}
.order-success__check {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--gold);
}
.order-success__check svg { width: 36px; height: 36px; }
.order-success h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.order-success p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* ---------- Summary item controls ---------- */
.summary-item__controls {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}
.summary-item__qty-btn {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  padding: 0;
}
.summary-item__qty-btn:hover { background: rgba(255, 255, 255, 0.12); }
.summary-item__controls span {
  width: 22px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
}
.summary-item__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.summary-item__remove {
  font-size: 1rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.25);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0;
}
.summary-item__remove:hover { color: #e74c3c; }

/* ---------- Continue Shopping link ---------- */
.checkout__continue {
  display: block;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: opacity 0.2s;
}
.checkout__continue:hover { opacity: 0.7; }

/* ---------- Shipping speed toggle ---------- */
.shipping-option {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.shipping-option__label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(197, 164, 78, 0.15);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.82rem;
  transition: border-color 0.3s, background 0.3s;
}
.shipping-option__label:has(input:checked) {
  border-color: var(--gold);
  background: rgba(197, 164, 78, 0.06);
}
.shipping-option__label input[type="radio"] {
  accent-color: var(--gold);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.shipping-option__label span { flex: 1; }
.shipping-option__label strong {
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 0.9rem;
}

/* ---------- Free shipping hint ---------- */
.checkout__free-hint {
  margin-top: 0.75rem;
  padding: 10px 14px;
  border-radius: 4px;
  background: rgba(197, 164, 78, 0.08);
  border: 1px dashed rgba(197, 164, 78, 0.3);
  font-size: 0.8rem;
  color: var(--gold);
  text-align: center;
  letter-spacing: 0.02em;
}

/* ---------- Shopify checkout redirect overlay ---------- */
.shopify-checkout-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}
.shopify-checkout-overlay--visible {
  opacity: 1;
  visibility: visible;
}
.shopify-checkout-overlay__inner {
  text-align: center;
  padding: 2rem;
}
.shopify-checkout-overlay__spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.5rem;
  border: 2px solid rgba(197, 164, 78, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: shopify-spin 0.8s linear infinite;
}
.shopify-checkout-overlay__text {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--gold-light);
  letter-spacing: 0.04em;
}
@keyframes shopify-spin {
  to { transform: rotate(360deg); }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .cart-drawer { width: 100%; max-width: 100vw; }
  .checkout__grid { grid-template-columns: 1fr; }
  .checkout__summary { position: static; }
  .shipping-option { flex-direction: column; }
}
