/* Checkout page premium luxury styling */
:root {
  --checkout-side-width: 420px;
}

.checkout-content {
  background-color: #FAF6F0; /* Luxury cream backdrop */
  padding-top: 40px;
  padding-bottom: 120px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr var(--checkout-side-width);
  gap: 40px;
  align-items: start;
}

@media (max-width: 992px) {
  .checkout-grid { 
    grid-template-columns: 1fr; 
    gap: 30px; 
  }
}

/* Luxury Cards */
.form-card, .order-card {
  background: var(--white);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 12px 40px rgba(44, 26, 14, 0.04);
  border: 1px solid rgba(200, 146, 42, 0.08);
}
.form-card .card-body, .order-card .card-body { 
  padding: 0; 
}

/* Typography Headers */
.form-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-dark);
}

.checkout-left .note {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--text-mid);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Premium Form Elements */
.form-group { 
  margin-bottom: 20px; 
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dark);
}
.form-control {
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  font-family: 'DM Sans', sans-serif;
  border-radius: 30px; /* beautiful pill shape inputs */
  border: 1.5px solid #E5DFD5;
  background-color: #FAF9F6;
  color: var(--text-dark);
  transition: all 0.3s ease;
  box-sizing: border-box;
  height: 48px;
}
.form-control:focus {
  outline: none;
  border-color: var(--gold);
  background-color: var(--white);
  box-shadow: 0 0 0 4px rgba(200, 146, 42, 0.08);
}
.form-group textarea.form-control {
  border-radius: 20px; /* soft rounding for address box */
  min-height: 110px;
  height: auto;
  padding-top: 14px;
  padding-bottom: 14px;
  resize: vertical;
}

/* Gold Pill Pay Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 36px;
  background: var(--gold);
  color: var(--white);
  border-radius: 30px;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(200,146,42,0.25);
  transition: all 0.3s ease;
}
.btn-primary:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(200,146,42,0.35);
}

/* Order Summary Column */
.order-summary {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}
.order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px dashed #E5DFD5;
}
.order-row:last-of-type {
  border-bottom: none;
}

/* Shop Style Parity for Item Typography */
.order-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500; /* soft medium weight, identical to shop title */
  color: var(--text-dark);
  line-height: 1.45;
  margin-bottom: 4px;
}
.order-qty {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--text-mid);
  font-weight: 400;
}
.order-price {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; /* beautiful luxury look */
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold-dark);
  white-space: nowrap;
}

/* Order Thumb Frame object-fit containment */
.order-row .order-thumb {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #FAF8F5; /* subtle light pad */
  border: 1px solid rgba(200, 146, 42, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}
.order-row .order-thumb img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain; /* prevents product image stretching/cropping */
  display: block;
}

/* Grand Total Row styling */
.order-total {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1.5px solid #FAF6F0;
  text-align: right;
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  color: var(--text-dark);
}
.order-total strong {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--gold-dark);
  margin-left: 8px;
}

/* Spinner for checkout clicks */
.btn-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #ffffff;
  animation: checkoutSpin 0.8s linear infinite;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}
@keyframes checkoutSpin {
  to { transform: rotate(360deg); }
}

/* Checkout Page Specific Hero adjust to cream background */
.checkout-content-wrap {
  background-color: #FAF6F0;
}

/* Custom modern errors */
.alert.alert-danger {
  background: #FFF6F6;
  border: 1px solid #FFD6D6;
  color: #6B1B1B;
  padding: 16px;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  margin-bottom: 24px;
}
.alert.alert-danger ul {
  margin: 0;
  padding-left: 20px;
}

@media (max-width: 600px) {
  .form-card, .order-card {
    padding: 24px 20px;
  }
}
