/* ========================================
   DRIFT — Cart, Checkout & Orders Styles
   ======================================== */

/* === Cart Page === */
.cart-page {
  padding-top: 120px;
  padding-bottom: 64px;
  min-height: 80vh;
}

.cart-page h2 {
  margin-bottom: 32px;
  font-size: 48px;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 48px;
  align-items: start;
}

/* Empty State */
.cart-empty {
  text-align: center;
  padding: 80px 24px;
}

.cart-empty svg {
  width: 80px;
  height: 80px;
  color: var(--muted);
  margin-bottom: 24px;
}

.cart-empty h3 {
  margin-bottom: 12px;
  font-size: 32px;
}

.cart-empty p {
  color: var(--muted);
  margin-bottom: 32px;
  font-size: 15px;
}

/* Cart Items */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  position: relative;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item-details h4 {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  text-transform: none;
  color: var(--white);
  margin-bottom: 4px;
}

.cart-item-variant {
  font-size: 13px;
  color: var(--muted);
}

.cart-item-price {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--silver);
  white-space: nowrap;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 2px;
}

.cart-item-qty button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--silver);
  transition: color 0.2s ease;
}

.cart-item-qty button:hover {
  color: var(--white);
}

.cart-item-qty input {
  width: 36px;
  height: 32px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 0;
}

.cart-item-remove {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 16px;
  transition: color 0.2s ease;
  cursor: pointer;
}

.cart-item-remove:hover {
  color: var(--red);
}


/* Order Summary */
.order-summary {
  background: var(--void);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
  position: sticky;
  top: 96px;
}

.order-summary h4 {
  font-size: 20px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
}

.summary-row .label {
  color: var(--silver);
}

.summary-row .value {
  font-family: var(--font-mono);
  color: var(--white);
}

.summary-row.discount .value {
  color: #00e676;
}

.summary-row.total {
  padding-top: 16px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}

.summary-row.total .label {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--white);
  text-transform: uppercase;
}

.summary-row.total .value {
  font-size: 24px;
  font-weight: 600;
}

/* Coupon Input */
.coupon-section {
  margin: 20px 0;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

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

.coupon-form input {
  flex: 1;
  padding: 10px 14px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.coupon-form button {
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--surface);
  color: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.coupon-form button:hover {
  border-color: var(--white);
}

.coupon-msg {
  font-size: 12px;
  margin-top: 8px;
}

.coupon-msg.success {
  color: #00e676;
}

.coupon-msg.error {
  color: var(--red);
}

.summary-actions {
  margin-top: 24px;
}

.summary-actions .btn {
  width: 100%;
  margin-bottom: 12px;
}

.continue-shopping {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  transition: color 0.3s ease;
}

.continue-shopping:hover {
  color: var(--white);
}

/* ============================================
   CHECKOUT PAGE
   ============================================ */
.checkout-page {
  padding-top: 120px;
  padding-bottom: 64px;
}

.checkout-page h2 {
  font-size: 48px;
  margin-bottom: 32px;
}

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

.checkout-form-section {
  margin-bottom: 40px;
}

.checkout-form-section h4 {
  font-size: 18px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Radio Options */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.radio-option:hover {
  border-color: var(--muted);
}

.radio-option.selected {
  border-color: var(--accent);
  background: rgba(255,255,255,0.03);
}

.radio-option.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.radio-option input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.radio-option .radio-label {
  flex: 1;
}

.radio-option .radio-label strong {
  display: block;
  font-size: 14px;
  color: var(--white);
  margin-bottom: 2px;
  font-weight: 500;
}

.radio-option .radio-label span {
  font-size: 12px;
  color: var(--muted);
}

.radio-price {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--white);
  white-space: nowrap;
}

/* Checkout Summary Items */
.checkout-items {
  margin-bottom: 16px;
}

.checkout-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.checkout-item-img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  flex-shrink: 0;
}

.checkout-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

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

.checkout-item-info h6 {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkout-item-info span {
  font-size: 11px;
  color: var(--muted);
}

.checkout-item-price {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--silver);
  white-space: nowrap;
  align-self: center;
}

/* ============================================
   ORDER CONFIRMATION
   ============================================ */
.order-page {
  padding-top: 120px;
  padding-bottom: 64px;
  min-height: 80vh;
}

.order-confirmed {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.checkmark-wrapper {
  margin-bottom: 32px;
}

.checkmark-svg {
  width: 80px;
  height: 80px;
}

.order-confirmed h2 {
  font-size: 48px;
  margin-bottom: 8px;
}

.order-confirmed .order-subtitle {
  font-size: 16px;
  color: var(--silver);
  margin-bottom: 8px;
}

.order-id {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--accent);
  margin-bottom: 32px;
  letter-spacing: 0.05em;
}

/* Order Summary Table */
.order-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 32px;
  text-align: left;
}

.order-table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-body);
}

.order-table td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--silver);
}

.order-table td:last-child {
  font-family: var(--font-mono);
  text-align: right;
}

.order-table th:last-child {
  text-align: right;
}

.order-delivery-info {
  background: var(--void);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px;
  margin-bottom: 32px;
  text-align: left;
}

.order-delivery-info h5 {
  font-size: 14px;
  margin-bottom: 12px;
}

.order-delivery-info p {
  font-size: 14px;
  color: var(--silver);
  line-height: 1.6;
}

.order-delivery-info .delivery-date {
  font-family: var(--font-mono);
  color: var(--white);
  font-weight: 600;
}

.order-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.whatsapp-btn {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.whatsapp-btn:hover {
  background: #20bd5a;
  color: #fff;
  border-color: #20bd5a;
}

@media (max-width: 1024px) {
  .cart-layout,
  .checkout-layout {
    grid-template-columns: 100%;
    width: 100%;
  }

  .checkout-layout form {
    width: 100%;
    min-width: 0;
  }

  .order-summary {
    position: static;
    order: -1;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .cart-page,
  .checkout-page,
  .order-page {
    padding-top: 96px;
  }

  .cart-page h2,
  .checkout-page h2 {
    font-size: 36px;
  }

  .cart-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    grid-template-rows: auto auto auto;
    gap: 6px 16px;
    align-items: start;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
  }

  .cart-item-image {
    grid-column: 1;
    grid-row: 1 / span 3;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
  }

  .cart-item-image img {
    border-radius: 8px;
  }

  .cart-item-details {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .cart-item-price {
    grid-column: 2;
    grid-row: 2;
    display: block;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--silver);
    margin-top: 2px;
  }

  .cart-item-qty {
    grid-column: 2;
    grid-row: 3;
    margin-left: 0;
    margin-top: 4px;
    display: flex;
    align-items: center;
    width: fit-content;
  }

  .cart-item-remove {
    position: absolute !important;
    top: 4px !important;
    left: 4px !important;
    right: auto !important;
    bottom: auto !important;
    width: 24px !important;
    height: 24px !important;
    background: rgba(0,0,0,0.7) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    font-size: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .order-summary {
    padding: 24px;
  }

  .summary-actions .btn {
    width: 100%;
    box-sizing: border-box;
  }

  .order-actions {
    flex-direction: column;
  }

  .cart-layout,
  .checkout-layout {
    max-width: 540px;
    margin: 0 auto;
    width: 100%;
  }
}
