/* =========================
   CHECKOUT
========================= */
.checkout {
  width: 100%;
  max-width: 1300px;
  margin: auto;
  padding: 50px 30px 100px;
}
/* =========================
   PROGRESS
========================= */
.checkout-progress {
  width: 600px;
  max-width: 100%;
  margin: 0 auto 55px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #98a2b3;
  white-space: nowrap;
}
.step span {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #edf2f7;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
}
.step p {
  font-size: 14px;
  font-weight: 500;
}
.step.active {
  color: #1769ff;
}
.step.active span {
  background: #1769ff;
  color: white;
}
.step.completed span {
  background: #1769ff;
  color: white;
}
.progress-line {
  width: 80px;
  height: 1px;
  margin: 0 15px;
  background: #d9e0e8;
}
/* =========================
   STEPS
========================= */
.checkout-step {
  display: none;
  grid-template-columns: 1.7fr 1fr;
  gap: 25px;
  align-items: start;
}
.checkout-step.active-step {
  display: grid;
}
/* =========================
   CARDS
========================= */
.shipping-card,
.payment-card,
.order-summary {
  background: white;
  border: 1px solid #e5eaf0;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.04);
}
.shipping-card,
.payment-card {
  padding: 30px;
}
/* =========================
   BACK BUTTON
========================= */
.back-cart,
.back-button {
  border: none;
  background: transparent;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 25px;
  transition: color 0.2s ease;
}
.back-cart:hover,
.back-button:hover {
  color: #1769ff;
}
/* =========================
   HEADINGS
========================= */
.section-heading {
  margin-bottom: 30px;
}
.section-heading h1 {
  font-size: 30px;
  letter-spacing: -0.8px;
  margin-bottom: 8px;
  color: #14213d;
}
.section-heading  {
  color: #718096;
  font-size: 15px;
  line-height: 1.6;
}
/* =========================
   FORM
========================= */
#shippingForm {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-group {
  display: flex;
  flex-direction: column;
}
.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: #344054;
  margin-bottom: 8px;
}
.form-group label span {
  color: #1769ff;
}
/* =========================
   INPUT
========================= */
.input-box {
  position: relative;
}
.input-box > i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #8492a6;
  font-size: 17px;
  pointer-events: none;
}
.input-box input,
.input-box select,
.input-box textarea {
  width: 100%;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  padding: 14px 15px 14px 43px;
  background: white;
  color: #172033;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  transition: 0.25s ease;
}
.input-box textarea {
  min-height: 110px;
  resize: vertical;
  padding-top: 14px;
}
.textarea-box > i {
  top: 20px;
  transform: none;
}
.input-box input:focus,
.input-box select:focus,
.input-box textarea:focus {
  border-color: #1769ff;
  box-shadow: 0 0 0 3px rgba(23, 105, 255, 0.08);
}
/* =========================
   ERROR
========================= */
.error {
  min-height: 15px;
  margin-top: 5px;
  color: #e11d48;
  font-size: 11px;
}
/* =========================
   PRIMARY BUTTON
========================= */
.primary-btn {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 8px;
  background: #1769ff;
  color: white;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: 0.25s ease;
}
.primary-btn:hover {
  transform: translateY(-1px);
}
.primary-btn i {
  font-size: 18px;
}
/* =========================
   ORDER SUMMARY
========================= */
.order-summary {
  padding: 28px;
  position: sticky;
  top: 20px;
}
.order-summary h2 {
  font-size: 24px;
  margin-bottom: 25px;
  color: #14213d;
}
/* =========================
   PRODUCT
========================= */
.checkout-product {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 15px;
  align-items: start;
}
.product-image {
  width: 80px;
  height: 80px;
  background: #f5f7fa;
  border-radius: 8px;
  overflow: hidden;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-info .brand {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 5px;
}
.product-info h3 {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  color: #172033;
}
.product-info p {
  font-size: 12px;
  color: #7c8799;
  margin-top: 7px;
}
.checkout-product > strong {
  font-size: 14px;
  white-space: nowrap;
}
/* =========================
   SUMMARY
========================= */
.summary-divider {
  width: 100%;
  height: 1px;
  background: #e7ebf0;
  margin: 25px 0;
}
.summary-row,
.mini-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 17px;
  font-size: 14px;
  color: #718096;
}
.summary-row strong,
.mini-summary strong {
  color: #172033;
  font-weight: 500;
}
.summary-row .free,
.mini-summary .free {
  color: #16a05d;
  font-weight: 600;
}
.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 20px;
  font-weight: 600;
}
.total-row strong {
  font-size: 24px;
  color: #14213d;
}
/* =========================
   PAYMENT
========================= */
.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 25px;
}
.payment-method {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px;
  border: 1px solid #dce2e9;
  border-radius: 9px;
  cursor: pointer;
  transition: 0.25s ease;
}
.payment-method:hover {
  border-color: #1769ff;
}
.payment-method.active {
  border-color: #1769ff;
  background: #f6f9ff;
}
.payment-method input {
  display: none;
}
.payment-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border-radius: 7px;
  font-size: 20px;
  color: #1769ff;
}
.payment-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.payment-text strong {
  font-size: 14px;
  color: #172033;
}
.payment-text span {
  font-size: 12px;
  color: #7c8799;
}
.check-icon {
  display: none;
  color: #1769ff;
  font-size: 20px;
}
.payment-method.active .check-icon {
  display: block;
}
/* =========================
   PAYMENT DETAILS
========================= */
.payment-details {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 25px;
}
.hidden {
  display: none !important;
}
.cod-message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 15px;
  border-radius: 8px;
  background: #f6f9ff;
  color: #1769ff;
  margin-bottom: 25px;
}
.cod-message p {
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
}
/* =========================
   SECURE PAYMENT
========================= */
.secure-payment {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  font-size: 12px;
  color: #8994a5;
}
/* =========================
   DONE
========================= */
.done-step {
  display: none;
  grid-template-columns: 1fr;
  justify-items: center;
}
.done-step.active-step {
  display: grid;
}
.success-card {
  width: 650px;
  max-width: 100%;
  background: white;
  border: 1px solid #e5eaf0;
  border-radius: 14px;
  padding: 60px 50px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.05);
}
.success-icon {
  width: 75px;
  height: 75px;
  margin: 0 auto 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e9f9f0;
  color: #16a05d;
  font-size: 38px;
}
.success-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  color: #16a05d;
}
.success-card h1 {
  font-size: 32px;
  margin: 15px 0;
  color: #14213d;
}
.success-card > p {
  max-width: 500px;
  margin: 0 auto 30px;
  color: #718096;
  font-size: 15px;
  line-height: 1.7;
}
.order-number {
  display: inline-flex;
  flex-direction: column;
  gap: 7px;
  padding: 15px 30px;
  background: #f7f9fc;
  border-radius: 8px;
  margin-bottom: 30px;
}
.order-number span {
  font-size: 12px;
  color: #8492a6;
}
.order-number strong {
  color: #172033;
  letter-spacing: 1px;
}
.success-actions {
  display: flex;
  gap: 12px;
}
.secondary-btn {
  height: 52px;
  flex: 1;
  border: 1px solid #d5dce5;
  border-radius: 8px;
  background: white;
  color: #172033;
  cursor: pointer;
  font-weight: 500;
  transition: 0.25s ease;
}
.secondary-btn:hover {
  border-color: #1769ff;
  color: #1769ff;
}
.success-actions .primary-btn {
  flex: 1;
}
/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
  .checkout-step.active-step {
    grid-template-columns: 1fr;
  }
  .order-summary {
    position: static;
  }
}
@media (max-width: 600px) {
  .checkout {
    padding: 30px 15px 70px;
  }
  .checkout-progress {
    margin-bottom: 35px;
  }
  .step p {
    display: none;
  }
  .progress-line {
    width: 50px;
    margin: 0 10px;
  }
  .shipping-card,
  .payment-card,
  .order-summary {
    padding: 20px;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .section-heading h1 {
    font-size: 25px;
  }
  .checkout-product {
    grid-template-columns: 65px 1fr;
  }
  .product-image {
    width: 65px;
    height: 65px;
  }
  .checkout-product > strong {
    grid-column: 2;
  }
  .success-card {
    padding: 45px 25px;
  }
  .success-card h1 {
    font-size: 26px;
  }
  .success-actions {
    flex-direction: column;
  }
}

/* Responsive Design - Mobile First Approach */

/* Tablet (768px and below) */
@media (max-width: 768px) {
  .checkout {
    padding: 40px 20px 80px;
  }

  .checkout-progress {
    width: 100%;
    margin: 0 auto 40px;
    gap: 5px;
  }

  .step {
    gap: 8px;
  }

  .step span {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .step p {
    font-size: 13px;
  }

  .progress-line {
    width: 60px;
    margin: 0 10px;
  }

  .checkout-step.active-step {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .shipping-card,
  .payment-card,
  .order-summary {
    border-radius: 12px;
  }

  .shipping-card,
  .payment-card {
    padding: 25px;
  }

  .section-heading h1 {
    font-size: 26px;
    letter-spacing: -0.5px;
  }

  .section-heading p {
    font-size: 14px;
  }

  .form-row {
    gap: 16px;
  }

  .form-group label {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .input-box input,
  .input-box select,
  .input-box textarea {
    padding: 12px 12px 12px 38px;
    font-size: 13px;
  }

  .input-box > i {
    left: 12px;
    font-size: 16px;
  }

  .primary-btn {
    height: 48px;
    font-size: 13px;
  }

  .order-summary {
    padding: 25px;
    position: static;
  }

  .order-summary h2 {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .checkout-product {
    grid-template-columns: 70px 1fr auto;
    gap: 12px;
  }

  .product-image {
    width: 70px;
    height: 70px;
  }

  .product-info h3 {
    font-size: 13px;
  }

  .summary-row,
  .mini-summary {
    margin-bottom: 14px;
    font-size: 13px;
  }

  .total-row {
    font-size: 18px;
  }

  .total-row strong {
    font-size: 22px;
  }

  .payment-method {
    padding: 15px;
    gap: 12px;
    border-radius: 8px;
  }

  .payment-icon {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .payment-text strong {
    font-size: 13px;
  }

  .payment-text span {
    font-size: 11px;
  }

  .check-icon {
    font-size: 18px;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  .checkout {
    padding: 25px 15px 60px;
  }

  .checkout-progress {
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .step {
    gap: 6px;
    font-size: 12px;
  }

  .step span {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }

  .step p {
    display: none;
  }

  .progress-line {
    width: 40px;
    margin: 0 8px;
  }

  .back-cart,
  .back-button {
    font-size: 13px;
    margin-bottom: 20px;
  }

  .shipping-card,
  .payment-card {
    padding: 20px;
    border-radius: 10px;
  }

  .section-heading {
    margin-bottom: 25px;
  }

  .section-heading h1 {
    font-size: 22px;
    letter-spacing: -0.3px;
    margin-bottom: 6px;
  }

  .section-heading p {
    font-size: 13px;
    line-height: 1.5;
  }

  #shippingForm {
    gap: 18px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-group label {
    font-size: 11px;
    margin-bottom: 5px;
  }

  .input-box input,
  .input-box select,
  .input-box textarea {
    padding: 11px 11px 11px 35px;
    font-size: 12px;
    border-radius: 7px;
  }

  .input-box textarea {
    min-height: 100px;
  }

  .input-box > i {
    left: 11px;
    font-size: 15px;
  }

  .error {
    font-size: 10px;
  }

  .primary-btn {
    height: 46px;
    font-size: 12px;
    gap: 8px;
  }

  .primary-btn i {
    font-size: 16px;
  }

  .order-summary {
    padding: 20px;
    margin-top: 20px;
  }

  .order-summary h2 {
    font-size: 20px;
    margin-bottom: 18px;
  }

  .checkout-product {
    grid-template-columns: 60px 1fr auto;
    gap: 10px;
    margin-bottom: 18px;
  }

  .product-image {
    width: 60px;
    height: 60px;
  }

  .product-info .brand {
    font-size: 11px;
    margin-bottom: 3px;
  }

  .product-info h3 {
    font-size: 12px;
    line-height: 1.4;
  }

  .product-info p {
    font-size: 11px;
    margin-top: 5px;
  }

  .checkout-product > strong {
    font-size: 13px;
  }

  .summary-divider {
    margin: 18px 0;
  }

  .summary-row,
  .mini-summary {
    margin-bottom: 12px;
    font-size: 12px;
  }

  .total-row {
    font-size: 16px;
  }

  .total-row strong {
    font-size: 20px;
  }

  .payment-methods {
    gap: 10px;
    margin-bottom: 20px;
  }

  .payment-method {
    padding: 13px;
    gap: 10px;
    border-radius: 7px;
  }

  .payment-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .payment-text strong {
    font-size: 12px;
  }

  .payment-text span {
    font-size: 10px;
  }

  .check-icon {
    font-size: 17px;
  }

  .cod-message {
    gap: 10px;
    padding: 12px;
    margin-bottom: 20px;
  }

  .cod-message p {
    font-size: 12px;
    line-height: 1.4;
  }

  .secure-payment {
    margin-top: 15px;
    font-size: 11px;
  }

  /* Success Card */
  .success-card {
    padding: 40px 20px;
    border-radius: 12px;
  }

  .success-icon {
    width: 65px;
    height: 65px;
    margin: 0 auto 20px;
    font-size: 32px;
  }

  .success-label {
    font-size: 11px;
    letter-spacing: 2px;
  }

  .success-card h1 {
    font-size: 24px;
    margin: 12px 0;
  }

  .success-card > p {
    margin: 0 auto 25px;
    font-size: 13px;
    line-height: 1.6;
  }

  .order-number {
    gap: 5px;
    padding: 12px 20px;
    margin-bottom: 25px;
  }

  .order-number span {
    font-size: 11px;
  }

  .order-number strong {
    font-size: 13px;
  }

  .success-actions {
    gap: 10px;
    flex-direction: column;
  }

  .secondary-btn,
  .success-actions .primary-btn {
    height: 46px;
    font-size: 12px;
  }
}

/* Small Mobile (360px and below) */
@media (max-width: 360px) {
  .checkout {
    padding: 20px 12px 50px;
  }

  .checkout-progress {
    margin-bottom: 25px;
  }

  .step span {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }

  .progress-line {
    width: 35px;
    margin: 0 6px;
  }

  .shipping-card,
  .payment-card {
    padding: 15px;
  }

  .section-heading h1 {
    font-size: 20px;
  }

  .section-heading p {
    font-size: 12px;
  }

  .input-box input,
  .input-box select,
  .input-box textarea {
    padding: 10px 10px 10px 32px;
    font-size: 11px;
  }

  .input-box > i {
    left: 10px;
    font-size: 14px;
  }

  .primary-btn {
    height: 44px;
    font-size: 11px;
  }

  .order-summary {
    padding: 15px;
  }

  .order-summary h2 {
    font-size: 18px;
    margin-bottom: 15px;
  }

  .checkout-product {
    grid-template-columns: 55px 1fr auto;
    gap: 8px;
    margin-bottom: 15px;
  }

  .product-image {
    width: 55px;
    height: 55px;
  }

  .product-info h3 {
    font-size: 11px;
  }

  .product-info p {
    font-size: 10px;
  }

  .checkout-product > strong {
    font-size: 12px;
  }

  .summary-row,
  .mini-summary {
    font-size: 11px;
    margin-bottom: 10px;
  }

  .total-row {
    font-size: 14px;
  }

  .total-row strong {
    font-size: 18px;
  }

  .payment-method {
    padding: 12px;
    gap: 8px;
  }

  .payment-icon {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .payment-text strong {
    font-size: 11px;
  }

  .payment-text span {
    font-size: 9px;
  }

  .success-card {
    padding: 30px 15px;
  }

  .success-icon {
    width: 60px;
    height: 60px;
    font-size: 28px;
    margin: 0 auto 15px;
  }

  .success-card h1 {
    font-size: 20px;
    margin: 10px 0;
  }

  .success-card > p {
    font-size: 12px;
    margin: 0 auto 20px;
  }

  .order-number {
    padding: 10px 15px;
    margin-bottom: 20px;
  }

  .order-number span {
    font-size: 10px;
  }

  .secondary-btn,
  .success-actions .primary-btn {
    height: 44px;
    font-size: 11px;
  }
}

/* Large Screens (1024px and above) */
@media (min-width: 1024px) {
  .checkout {
    padding: 50px 30px 100px;
    max-width: 1300px;
  }

  .checkout-step.active-step {
    grid-template-columns: 1.7fr 1fr;
    gap: 25px;
  }

  .order-summary {
    position: sticky;
    top: 20px;
  }
}