/* Container */
.checkout-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr; /* mobile */
  gap: 2.5rem;
  margin-top: 1.25rem;
}

/* Left content */
.checkout-main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Right summary */
.checkout-summary {
  width: 100%;
}

/* Desktop layout */
@media (min-width: 1024px) {
  .checkout-container {
    grid-template-columns: repeat(3, 1fr); /* lg:grid-cols-3 */
  }

  .checkout-main {
    grid-column: span 2; /* lg:col-span-2 */
  }

  .checkout-summary {
    grid-column: span 1; /* summary à droite */
  }
}


/* ===============================
   NOTE CARD
================================ */
.note-card {
  background: #ffffff;
  border-radius: 1rem; /* rounded-2xl */
  border: 1px solid #f3f4f6; /* border-gray-100 */
  box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* shadow-sm */
  padding: 1.5rem;
}

.note-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.note-icon {
  width: 2.5rem;   /* w-10 */
  height: 2.5rem;  /* h-10 */
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6; /* bg-gray-100 */
  border-radius: 999px;
}

.note-icon-svg {
  width: 1.25rem; /* w-5 */
  height: 1.25rem; /* h-5 */
  color: #4b5563; /* text-gray-600 */
}

.note-title {
  font-size: 1.125rem; /* text-lg */
  font-weight: 600; /* font-semibold */
  color: #1f2937; /* text-gray-800 */
}


.note-textarea-wrapper {
  position: relative;
}

.note-textarea {
  width: 100%;
  border-radius: 0.75rem; /* rounded-xl */
  border: 1px solid #e5e7eb; /* border-gray-200 */
  background: #f9fafb; /* bg-gray-50 */
  padding: 1rem;
  font-size: 0.875rem; /* text-sm */
  color: #111827;
  resize: none;
  transition: all 0.2s ease;
}

.note-textarea::placeholder {
  color: #9ca3af; /* placeholder-gray-400 */
}

.note-textarea:focus {
  outline: none;
  background: #ffffff;
  border-color: #000000;
  box-shadow: 0 0 0 2px #000000; /* focus:ring-2 focus:ring-black */
}

.note-optional {
  position: absolute;
  bottom: 0.75rem;
  right: 1rem;
  font-size: 0.75rem; /* text-xs */
  color: #9ca3af; /* text-gray-400 */
}

.note-counter {
  margin-top: 0.5rem;
  font-size: 0.75rem; /* text-xs */
  color: #9ca3af; /* text-gray-400 */
  text-align: right;
}

/* ===============================
   PAYMENT CARD
================================ */
.payment-card {
  background: #ffffff;
  border-radius: 1rem; /* rounded-2xl */
  border: 1px solid #f3f4f6; /* border-gray-100 */
  box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* shadow-sm */
  padding: 1.5rem; /* p-6 */
}


.payment-header {
  display: flex;
  align-items: center;
  gap: 0.75rem; /* gap-3 */
  margin-bottom: 1.25rem; /* mb-5 */
}

.payment-icon {
  width: 2.5rem;  /* w-10 */
  height: 2.5rem; /* h-10 */
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6; /* bg-gray-100 */
  border-radius: 999px; /* full */
}

.payment-icon-svg {
  width: 1.25rem; /* w-5 */
  height: 1.25rem; /* h-5 */
  color: #374151; /* text-gray-700 */
}

.payment-title {
  font-size: 1.125rem; /* text-lg */
  font-weight: 600; /* font-semibold */
  color: #1f2937; /* text-gray-800 */
}

.payment-option {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem; /* p-5 */
  border-radius: 1rem; /* rounded-2xl */
  border: 1px solid #e5e7eb; /* border-gray-200 */
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 0.5rem;
}

.payment-option.active {
  border-color: #000000;
  background: #f9fafb; /* bg-gray-50 */
}

.payment-radio {
  margin-top: 0.25rem; /* mt-1 */
  accent-color: #000000; /* accent-black */
}


.payment-option-content {
  flex: 1;
}

.payment-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.payment-option-title {
  font-weight: 600;
  color: #1f2937; /* text-gray-800 */
}

.payment-option-badge {
  font-size: 0.75rem; /* text-xs */
  font-weight: 500; /* font-medium */
  padding: 0.25rem 0.75rem; /* px-3 py-1 */
  border-radius: 999px;
  background: #f3f4f6; /* bg-gray-100 */
  color: #374151; /* text-gray-700 */
}

.payment-option-description {
  margin-top: 0.25rem; /* mt-1 */
  font-size: 0.875rem; /* text-sm */
  color: #6b7280; /* text-gray-500 */
}

.payment-note {
  font-size: 0.75rem; /* text-xs */
  color: #9ca3af; /* text-gray-400 */
  margin-top: 1rem; /* mt-4 */
}


/* ===============================
   ADDRESS CARD
================================ */
.address-card {
  background: #ffffff; /* bg-white */
  border-radius: 1rem; /* rounded-2xl */
  border: 1px solid #f3f4f6; /* border-gray-100 */
  box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* shadow-sm */
  padding: 1.5rem; /* p-6 */
  display: flex;
  flex-direction: column;
  gap: 1rem; /* space-y-4 */
}

/* HEADER */
.address-header {
  display: flex;
  align-items: center;
  gap: 0.75rem; /* gap-3 */
  margin-bottom: 1rem; /* mb-4 */
}

.address-icon {
  width: 2.5rem;  /* w-10 */
  height: 2.5rem; /* h-10 */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f3f4f6; /* bg-gray-100 */
}

.address-icon-svg {
  width: 1.25rem; /* w-5 */
  height: 1.25rem; /* h-5 */
  color: #4b5563; /* text-gray-600 */
}

.address-title {
  font-size: 1.125rem; /* text-lg */
  font-weight: 600; /* font-semibold */
  color: #1f2937; /* text-gray-800 */
}

/* LIST OF ADDRESSES */
.address-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem; /* gap-4 */
}

@media (min-width: 640px) {
  .address-list {
    grid-template-columns: repeat(2, 1fr); /* sm:grid-cols-2 */
  }
}

/* ADDRESS ITEM */
.address-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem; /* gap-4 */
  padding: 1rem; /* p-4 */
  border: 1px solid #e5e7eb; /* border-gray-200 */
  border-radius: 0.75rem; /* rounded-xl */
  cursor: pointer;
  transition: all 0.2s ease;
}

.address-item:hover {
  background: #f9fafb; /* hover:bg-gray-50 */
}

.address-radio {
  margin-top: 0.25rem; /* mt-1 */
}

.address-item-content {
  flex: 1;
}

.address-name {
  font-weight: 600;
  color: #1f2937; /* text-gray-800 */
}

.address-details,
.address-phone {
  font-size: 0.875rem; /* text-sm */
  color: #6b7280; /* text-gray-600 */
  margin-top: 0.25rem;
}

/* ADD NEW ADDRESS LINK */
.address-add {
  display: inline-block;
  margin-top: 0.5rem; /* mt-2 */
  font-size: 0.875rem; /* text-sm */
  font-weight: 500; /* font-medium */
  color: #000;
  text-decoration: none;
  transition: all 0.2s;
}

.address-add:hover {
  text-decoration: underline;
}

/* EMPTY STATE */
.address-empty {
  background: #f9fafb; /* bg-gray-50 */
  border: 1px dashed #d1d5db; /* border-dashed border-gray-300 */
  border-radius: 0.75rem; /* rounded-xl */
  padding: 1.5rem; /* p-6 */
  text-align: center;
}

.address-empty-title {
  font-weight: 500; /* font-medium */
  color: #374151; /* text-gray-700 */
  margin-bottom: 0.5rem; /* mb-2 */
}

.address-empty-text {
  font-size: 0.875rem; /* text-sm */
  color: #6b7280; /* text-gray-500 */
  margin-bottom: 1rem; /* mb-4 */
}

.address-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.5rem; /* px-6 py-2 */
  border-radius: 999px; /* rounded-full */
  background: #000;
  color: #fff;
  font-size: 0.875rem; /* text-sm */
  font-weight: 600; /* font-semibold */
  text-decoration: none;
  transition: all 0.2s ease;
}

.address-login-btn:hover {
  background: #111827; /* hover:bg-gray-800 */
}


/* ===============================
   SUMMARY CARD
================================ */
.summary-container {
  grid-column: span 1 / span 1; /* lg:col-span-1 */
}

.summary-card {
  background: #ffffff; /* bg-white */
  border: 1px solid #e5e7eb; /* border */
  border-radius: 1rem; /* rounded-xl */
  padding: 1rem; /* p-4 */
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 1.5rem; /* sticky top-6 */
}

/* TITLE */
.summary-title {
  font-size: 1.25rem; /* text-xl */
  font-weight: 700; /* font-bold */
  margin-bottom: 1rem; /* mb-4 */
}

/* ITEMS */
.summary-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* space-y-2 */
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* gap-2 */
  padding: 0.5rem; /* p-2 */
  background: #fff;
  border-radius: 0.75rem; /* rounded-xl */
  box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* shadow-sm */
  transition: box-shadow 0.3s ease;
}

.summary-item:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.1); /* hover:shadow-md */
}

.summary-item-image {
  width: 5rem; /* w-20 */
  height: 5rem; /* h-20 */
  object-fit: cover;
  border-radius: 0.5rem; /* rounded-lg */
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
}

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

.summary-item-name {
  font-size: 0.875rem; /* text-sm */
  font-weight: 600; /* font-semibold */
  color: #1f2937; /* text-gray-800 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-item-details {
  font-size: 0.75rem; /* text-xs */
  color: #6b7280; /* text-gray-500 */
  margin-top: 0.25rem; /* mt-1 */
}

.summary-item-price {
  text-align: right;
}

.summary-item-total {
  font-size: 0.875rem; /* text-sm */
  font-weight: 700; /* font-bold */
  color: #111827; /* text-gray-900 */
}

.summary-item-unit {
  font-size: 0.75rem; /* text-xs */
  color: #9ca3af; /* text-gray-400 */
}

/* TOTALS */
.summary-totals {
  border-top: 1px solid #e5e7eb; /* border-t */
  padding-top: 1rem; /* pt-4 */
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* space-y-2 */
  font-size: 1rem; /* text-md */
}

.summary-total-row {
  display: flex;
  justify-content: space-between;
  color: #1f2937; /* text-gray-800 */
}

.summary-savings {
  color: #16a34a; /* green-600 */
}

.summary-discount {
  color: #dc2626; /* red-600 */
}

.summary-shipping span {
  font-weight: 700; /* font-bold */
}

.summary-total {
  font-size: 1.125rem; /* text-lg */
  font-weight: 700; /* font-bold */
  border-top: 1px solid #e5e7eb;
  padding-top: 1rem; /* pt-4 */
}



.summary-confirm-btn {
  width: 100%;
  padding: 0.95rem 1.25rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #111827, #000);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;

  box-shadow: 0 10px 25px rgba(0,0,0,.18);
  transition: all .25s ease;
}

.summary-confirm-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 35px rgba(0,0,0,.25);
}

.summary-confirm-btn:active:not(:disabled) {
  transform: translateY(0);
}

/* Disabled */
.summary-confirm-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Icon */
.btn-icon {
  width: 1.1rem;
  height: 1.1rem;
}


.summary-confirm-btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loader {
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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




