/* Checkout Page Styles */

.checkout-main {
  padding: 40px 0 80px;
  min-height: calc(100vh - 60px);
  background-color: #0a0a0a;
}

.checkout-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.checkout-title {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 32px;
}

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

/* Checkout Form Sections */
.checkout-forms {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.checkout-section {
  background-color: #111;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 24px;
}

.section-heading {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #333;
}

/* Form Styles */
.form-group {
  margin-bottom: 16px;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #aaa;
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background-color: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.form-group input::placeholder {
  color: #666;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
}

.exp-inputs {
  display: flex;
  gap: 12px;
}

.exp-inputs select {
  flex: 1;
}

/* FFL Notice */
.ffl-notice {
  display: flex;
  gap: 16px;
  background-color: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.3);
}

.ffl-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.ffl-content h3 {
  font-size: 15px;
  font-weight: 600;
  color: #dc2626;
  margin: 0 0 8px 0;
}

.ffl-content p {
  font-size: 13px;
  color: #999;
  margin: 0;
  line-height: 1.5;
}

/* Payment Icons */
.payment-icons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #333;
}

.payment-badge {
  font-size: 13px;
  color: #22c55e;
  font-weight: 500;
}

.card-icons {
  display: flex;
  gap: 8px;
}

.card-icons img {
  height: 24px;
  border-radius: 4px;
}

/* Payment Error */
.payment-error {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background-color: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 8px;
  color: #dc2626;
  font-size: 14px;
}

.payment-error[hidden] {
  display: none;
}

/* Place Order Button */
.btn-place-order {
  width: 100%;
  padding: 18px 24px;
  background-color: #dc2626;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-place-order:hover:not(:disabled) {
  background-color: #b91c1c;
}

.btn-place-order:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-place-order:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spinner {
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Order Summary */
.order-summary {
  background-color: #111;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 24px;
  position: sticky;
  top: 24px;
}

.summary-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #333;
}

.summary-items {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.summary-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #222;
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-item-image {
  width: 60px;
  height: 60px;
  background-color: #1a1a1a;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.summary-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.summary-item-name {
  font-size: 13px;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.3;
}

.summary-item-qty {
  font-size: 12px;
  color: #888;
}

.summary-item-price {
  font-size: 14px;
  font-weight: 600;
  color: #22c55e;
  white-space: nowrap;
}

/* Summary Totals */
.summary-totals {
  padding-top: 16px;
  border-top: 1px solid #333;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: #aaa;
}

.summary-row.summary-total {
  padding-top: 16px;
  margin-top: 8px;
  border-top: 1px solid #333;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.shipping-tbd {
  font-size: 12px;
  color: #666;
  font-style: italic;
}

/* Secure Badge */
.secure-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #222;
  font-size: 12px;
  color: #666;
}

/* Back to Store Link */
.back-to-store {
  color: #888;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.back-to-store:hover {
  color: #fff;
}

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

.checkout-empty svg {
  margin-bottom: 24px;
  opacity: 0.5;
}

.checkout-empty h2 {
  font-size: 24px;
  color: #fff;
  margin-bottom: 12px;
}

.checkout-empty p {
  color: #666;
  margin-bottom: 32px;
}

.btn-back-to-store {
  display: inline-block;
  padding: 14px 32px;
  background-color: #dc2626;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background-color 0.2s;
}

.btn-back-to-store:hover {
  background-color: #b91c1c;
}

/* Success Page */
.checkout-success {
  text-align: center;
  padding: 60px 24px;
  max-width: 500px;
  margin: 0 auto;
}

.success-icon {
  margin-bottom: 24px;
}

.checkout-success h2 {
  font-size: 28px;
  color: #22c55e;
  margin-bottom: 16px;
}

.checkout-success p {
  color: #888;
  margin-bottom: 32px;
  font-size: 16px;
}

.transaction-id {
  background-color: #111;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 16px 24px;
  margin-bottom: 32px;
  display: inline-block;
}

.transaction-id span {
  color: #888;
  font-size: 13px;
}

.transaction-id strong {
  display: block;
  color: #fff;
  font-size: 18px;
  margin-top: 4px;
  font-family: monospace;
}

.next-steps {
  text-align: left;
  background-color: #111;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
}

.next-steps h3 {
  color: #fff;
  font-size: 16px;
  margin: 0 0 16px 0;
}

.next-steps ol {
  color: #aaa;
  font-size: 14px;
  line-height: 1.8;
  margin: 0;
  padding-left: 20px;
}

.next-steps li {
  margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 900px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }
  
  .order-summary {
    position: static;
    order: -1;
  }
}

@media (max-width: 600px) {
  .checkout-main {
    padding: 24px 0 60px;
  }
  
  .checkout-section {
    padding: 20px 16px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .checkout-main {
    padding: 24px 0 60px;
  }
  
  .checkout-section {
    padding: 20px 16px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
}
