/**
 * DAZZLE BY OT — LUXURY CHECKOUT & SECURE DISPATCH STYLES (checkout.css)
 * "Time, Defined."
 */

/* ==========================================================================
   MINIMAL NAVBAR & HEADER
   ========================================================================== */
.checkout-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  background: rgba(14, 14, 14, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #242424;
  z-index: 100;
}

.checkout-navbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkout-navbar .brand-wordmark {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.checkout-navbar .wordmark-main {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.18em;
  color: var(--text-1);
}

.checkout-navbar .wordmark-sub {
  font-size: 9px;
  letter-spacing: 0.35em;
  color: var(--gold);
  margin-top: 2px;
}

.checkout-security-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.25);
  padding: 6px 14px;
  border-radius: 20px;
}

.return-cart-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.return-cart-link:hover {
  color: var(--gold);
}

/* ==========================================================================
   PAGE CONTAINER & 2-COLUMN GRID
   ========================================================================== */
.checkout-page-main {
  padding-top: 108px;
  padding-bottom: 96px;
  min-height: 100vh;
  background-color: var(--ink);
}

.checkout-grid-layout {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 36px;
  align-items: start;
}

/* ==========================================================================
   LEFT FORM COLUMN: AIRY SECTIONS & CLEAN INPUTS
   ========================================================================== */
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.form-section {
  border: 1px solid #262626;
  border-radius: 8px;
  padding: 32px 28px;
  background: #141414;
  margin: 0;
}

.section-legend {
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.legend-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  background: var(--gold);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.legend-text {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: 0.02em;
}

.form-group {
  margin-bottom: 20px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: #ece6dc;
  margin-bottom: 8px;
  line-height: 1.4;
}

.required-star {
  color: var(--gold);
  margin-left: 2px;
}

.optional-tag {
  font-size: 11.5px;
  color: #8c877d;
  font-weight: 400;
  margin-left: 4px;
}

/* Form Inputs */
.form-input, .form-textarea, .form-select {
  width: 100%;
  box-sizing: border-box;
  background: #191919;
  border: 1px solid #303030;
  border-radius: 6px;
  color: #f5f2eb;
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  outline: none;
}

.form-input {
  height: 48px;
  padding: 0 16px;
}

.form-textarea {
  padding: 14px 16px;
  resize: vertical;
  min-height: 90px;
}

.form-input::placeholder, .form-textarea::placeholder {
  color: #635f58;
  font-weight: 400;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--gold);
  background: #1c1c1c;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

/* Select Dropdown Styling */
.custom-select-wrap {
  position: relative;
  width: 100%;
}

.form-select {
  height: 48px;
  padding: 0 40px 0 16px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  background-color: #191919;
}

.form-select option {
  background-color: #1a1a1a;
  color: #f5f2eb;
  padding: 10px 16px;
  font-size: 14px;
}

.select-chevron-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #8c877d;
}

/* Input Helper Notes */
.input-helper {
  display: block;
  font-size: 12px;
  color: #8c877d;
  margin-top: 6px;
  line-height: 1.5;
}

.field-feedback {
  font-size: 12px;
  color: #e55353;
  margin-top: 4px;
  min-height: 0;
}

/* Grid Layouts */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.9fr;
  gap: 16px;
}

/* ==========================================================================
   DELIVERY SPEED & PAYMENT CARDS
   ========================================================================== */
.delivery-options-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.delivery-option-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid #2e2e2e;
  border-radius: 6px;
  background: #181818;
  cursor: pointer;
  transition: all 0.2s ease;
}

.delivery-option-card:hover {
  border-color: rgba(201, 168, 76, 0.4);
  background: #1c1c1c;
}

.delivery-option-card.selected {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.06);
}

.delivery-option-card input[type="radio"] {
  margin-top: 4px;
  accent-color: var(--gold);
  width: 17px;
  height: 17px;
}

.option-content {
  flex: 1;
}

.option-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.option-title {
  font-size: 14.5px;
  font-weight: 500;
  color: #f5f2eb;
}

.option-cost {
  font-size: 15px;
  color: var(--gold);
  font-weight: 600;
}

.option-desc {
  font-size: 12.5px;
  color: #8c877d;
  margin: 0;
  line-height: 1.4;
}

/* Payment Methods */
.payment-methods-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.payment-method-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid #2e2e2e;
  border-radius: 6px;
  background: #181818;
}

.payment-method-card.active-payment {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.06);
  cursor: pointer;
}

.payment-method-card.disabled-payment {
  opacity: 0.45;
  cursor: not-allowed;
}

.payment-method-card input[type="radio"] {
  margin-top: 4px;
  accent-color: var(--gold);
  width: 17px;
  height: 17px;
}

.payment-card-body {
  flex: 1;
}

.payment-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.payment-name {
  font-size: 14.5px;
  font-weight: 500;
  color: #f5f2eb;
}

.badge-status-active {
  font-size: 10.5px;
  font-family: var(--font-mono);
  background: rgba(61, 122, 94, 0.25);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.4);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.badge-coming-soon {
  font-size: 10px;
  font-family: var(--font-mono);
  background: #222222;
  color: #8c877d;
  border: 1px solid #333333;
  padding: 2px 8px;
  border-radius: 4px;
}

.payment-note {
  font-size: 12.5px;
  color: #a8a298;
  margin: 0;
  line-height: 1.45;
}

/* Submit Action Button */
.checkout-submit-wrapper {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-place-order {
  width: 100%;
  height: 54px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  background: var(--gold);
  color: #0e0e0e;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-place-order:hover {
  background: var(--gold-bright, #dbba5c);
}

.btn-place-order:active {
  transform: scale(0.99);
}

.order-policy-notice {
  font-size: 12px;
  color: #8c877d;
  text-align: center;
  margin: 0;
  line-height: 1.5;
}

/* ==========================================================================
   RIGHT SUMMARY COLUMN
   ========================================================================== */
.checkout-summary-card {
  border: 1px solid #262626;
  border-radius: 8px;
  padding: 32px 28px;
  background: #141414;
  position: sticky;
  top: 108px;
}

.summary-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #242424;
}

.checkout-items-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  max-height: 320px;
  overflow-y: auto;
}

.checkout-item-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.checkout-item-thumb {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  background: #1c1c1c;
  border: 1px solid #303030;
  object-fit: cover;
  flex-shrink: 0;
}

.checkout-item-meta {
  flex: 1;
  min-width: 0;
}

.checkout-item-name {
  font-size: 13.5px;
  font-weight: 500;
  color: #f5f2eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.checkout-item-qty {
  font-size: 12px;
  color: #8c877d;
}

.checkout-item-price {
  font-size: 14px;
  color: var(--gold);
  font-weight: 500;
}

/* Coupon Box */
.coupon-box {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #242424;
}

.coupon-input-group {
  display: flex;
  gap: 8px;
}

.coupon-input {
  flex: 1;
  height: 42px;
  border: 1px solid #303030;
  background: #191919;
  border-radius: 6px;
  padding: 0 14px;
  color: #f5f2eb;
  font-size: 13px;
  outline: none;
}

.coupon-input:focus {
  border-color: var(--gold);
}

.coupon-apply-btn {
  height: 42px;
  padding: 0 18px;
  border: 1px solid #303030;
  background: #202020;
  color: #8c877d;
  border-radius: 6px;
  font-size: 13px;
  cursor: not-allowed;
}

.coupon-note {
  display: block;
  font-size: 11px;
  color: #736f66;
  margin-top: 6px;
}

.summary-line-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 14px;
  color: #b8b1a5;
}

.summary-divider {
  height: 1px;
  background: #242424;
  margin: 18px 0;
}

.total-row {
  font-size: 16.5px;
  color: #ffffff;
  font-weight: 600;
}

.total-row .total-val {
  color: var(--gold);
  font-size: 21px;
  font-weight: 700;
}

.summary-security-note {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: #8c877d;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px dashed #242424;
  line-height: 1.4;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE ADAPTATION)
   ========================================================================== */
@media (max-width: 960px) {
  .checkout-navbar {
    height: 62px;
  }

  .checkout-security-pill span {
    display: none;
  }

  .checkout-page-main {
    padding-top: 84px;
    padding-bottom: 48px;
  }

  .checkout-grid-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .checkout-summary-column {
    order: -1;
  }

  .checkout-summary-card {
    position: static;
    padding: 20px 16px;
  }

  .form-row-2, .form-row-3 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .form-section {
    padding: 20px 16px;
  }
}
