/* ============================================================
   LENA BAKERY — checkout.css
   Styles cho trang checkout (3 bước), success page
   ============================================================ */

/* --- Variables (KFC Clean High-Contrast Style) --- */
:root {
  --co-sidebar-w: 340px;
  --bg-clean: #f8f9fa;
  --card-clean: #ffffff;
  --border-clean: #e5e7eb;
  --text-main: #111827;
  --text-muted: #6b7280;
  --accent-kfc: #8b3a2a;
  --accent-kfc-hover: #a84332;
  --accent-kfc-light: #fff5f5;
}

/* === BODY === */
.checkout-page,
.success-page {
  background: #f8f9fa !important;
  color: var(--text-main);
  min-height: 100vh;
}

header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

/* === HEADER NAV === */
.co-nav {
  width: min(1200px, calc(100% - 48px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.co-nav .brand {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  text-decoration: none;
  color: #111827;
  letter-spacing: -0.5px;
}
.co-nav .brand em { color: var(--accent); font-style: italic; }

.co-nav-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}

.co-step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  padding: 6px 14px;
  border-radius: 24px;
  cursor: pointer;
  user-select: none;
  transition: all .25s;
  background: #f3f4f6;
}
.co-step:hover:not(.active) {
  color: var(--accent);
  background: #fef2f2;
}

.co-step .step-num {
  width: 22px; height: 22px;
  background: #d1d5db;
  color: #ffffff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  transition: all .25s;
}

.co-step.active {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 4px 12px rgba(139,58,42,0.25);
}
.co-step.active .step-num {
  background: #ffffff;
  color: var(--accent);
}
.co-step.done { 
  color: #065f46; 
  background: #d1fae5; 
}
.co-step.done .step-num { 
  background: #10b981; 
  color: #fff; 
}

.co-step-sep { color: #d1d5db; font-size: 14px; }

.co-back-link {
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s;
}
.co-back-link:hover { color: var(--accent); }

/* === MAIN LAYOUT === */
.co-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.co-panel {
  display: none;
}
.co-panel.active {
  display: grid;
  grid-template-columns: 1fr var(--co-sidebar-w);
  gap: 40px;
  align-items: start;
  padding-top: 40px;
}

.co-left {
  min-width: 0;
  width: 100%;
}

/* Step 1 */
#step1.active { grid-template-columns: 1fr var(--co-sidebar-w); }

/* === MOBILE SINGLE COLUMN === */
@media screen and (max-width: 900px) {
  .co-panel,
  .co-panel.active,
  #step1, #step1.active,
  #step2, #step2.active,
  #step3, #step3.active {
    display: block !important;
    grid-template-columns: unset !important;
  }
  .co-left {
    width: 100% !important;
    max-width: 100% !important;
  }
}
/* Step 2 */
#step2.active { grid-template-columns: 1fr 320px; }
/* Step 3: single column + payment layout */
#step3.active { grid-template-columns: 1fr; }

@media (max-width: 900px) {
  .co-panel.active,
  #step1.active,
  #step2.active,
  #step3.active {
    grid-template-columns: 100% !important;
    display: flex !important;
    flex-direction: column !important;
  }
}

.co-section-label {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 12px;
}

.co-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 500;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 36px;
}
.co-title em { color: var(--accent); font-style: italic; }

/* === PRODUCT GRID: Desktop 2+ cột, Mobile 1 cột === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

/* === MOBILE HORIZONTAL CARD (KFC-style) === */
@media screen and (max-width: 900px) {
  .product-grid,
  #productGrid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    grid-template-columns: unset !important;
  }

  /* Thẻ ngang: ảnh trái, info phải */
  .product-card {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    min-width: 0 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    align-items: stretch !important;
  }

  /* Ảnh vuông trái */
  .product-img-wrap {
    width: 130px !important;
    min-width: 130px !important;
    height: auto !important;
    min-height: 160px !important;
    flex-shrink: 0 !important;
  }

  /* Nội dung phải */
  .product-info {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 12px 14px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  /* Tên + giá */
  .product-meta h3 {
    font-size: 15px !important;
    margin-bottom: 2px !important;
  }
  .product-price {
    font-size: 15px !important;
  }

  /* Mô tả ngắn gọn trên mobile */
  .product-desc {
    font-size: 11.5px !important;
    -webkit-line-clamp: 2 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin-bottom: 8px !important;
  }

  /* Badge vị + topping nhỏ gọn hơn */
  .product-options {
    margin-bottom: 6px !important;
  }
  .opt-chips {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
  }
  .chip {
    padding: 4px 10px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }
  .topping-select {
    font-size: 12px !important;
    padding: 6px 10px !important;
  }

  /* Nút +/− to hơn */
  .qty-control {
    border-radius: 12px !important;
  }
  .qty-btn {
    width: 40px !important;
    height: 40px !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    min-width: 40px !important;
  }
  .qty-val {
    width: 38px !important;
    line-height: 40px !important;
    font-size: 16px !important;
  }
  .qty-row {
    margin-top: 8px !important;
  }

  /* Badge góc */
  .product-badge {
    top: 8px !important;
    right: 8px !important;
    font-size: 8px !important;
    padding: 3px 8px !important;
  }
}

.product-card {
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  transition: all .3s cubic-bezier(.25,.1,.25,1);
  position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.product-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,.08); transform: translateY(-3px); border-color: #d1d5db; }
.product-card.in-cart { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,58,42,.15); }

.product-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  letter-spacing: 1.5px;
  padding: 4px 12px;
  border-radius: 40px;
  text-transform: uppercase;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(139,58,42,0.3);
}

.product-img-wrap {
  height: 200px;
  overflow: hidden;
  background: #f3f4f6;
}
.product-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1s cubic-bezier(.25,.1,.25,1);
}
.product-card:hover .product-img-wrap img { transform: scale(1.05); }

.product-info { padding: 20px; background: #ffffff; }

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.product-meta h3 { font-family: var(--font-serif); font-size: 19px; font-weight: 600; color: #111827; }
.product-price { font-family: var(--font-sans); font-size: 18px; color: var(--accent); font-weight: 700; }

.product-desc { font-size: 13px; color: #4b5563; line-height: 1.55; margin-bottom: 16px; }

/* Options: flavor / topping */
.product-options { margin-bottom: 12px; }
.opt-label { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #6b7280; font-weight: 700; display: block; margin-bottom: 6px; }

.opt-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.chip input[type=radio] { display: none; }
.chip {
  padding: 6px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 20px;
  font-size: 12px;
  color: #4b5563;
  transition: all .2s;
  background: #f9fafb;
  font-weight: 500;
}
.chip:hover { border-color: #cbd5e1; color: #111827; }
.chip:has(input:checked) {
  border-color: var(--accent);
  background: #fff5f5;
  color: var(--accent);
  font-weight: 700;
}

.topping-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: #111827;
  background: #ffffff;
  outline: none;
  cursor: pointer;
  transition: border .2s;
}
.topping-select:focus { border-color: var(--accent); }

/* Qty control — KFC style */
.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #f9fafb;
}

.qty-btn {
  width: 44px; height: 44px;
  border: none;
  background: #ffffff;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  transition: all .15s;
  line-height: 1;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.qty-btn:hover { background: #fee2e2; }
.qty-btn:active { background: #fecaca; }

.qty-val {
  width: 42px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  border-left: 1.5px solid #e5e7eb;
  border-right: 1.5px solid #e5e7eb;
  line-height: 44px;
  background: #ffffff;
  color: #111827;
}

.qty-subtotal { font-size: 14px; font-weight: 700; color: var(--accent); }

.fruit-note {
  padding: 16px 20px;
  background: #fffbeb;
  border-radius: 12px;
  font-size: 13px;
  color: #92400e;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
}

/* === CART SIDEBAR === */
.co-cart {
  position: sticky;
  top: 90px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  padding: 24px;
  min-height: 200px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
}
.cart-title { font-family: var(--font-serif); font-size: 19px; font-weight: 600; color: #111827; }
.cart-count { font-size: 12px; color: #6b7280; font-weight: 600; }

.cart-empty { font-size: 13.5px; color: #9ca3af; text-align: center; padding: 32px 0; }

.cart-list { list-style: none; padding: 0; margin: 0; }
.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}
.ci-name { font-size: 14px; font-weight: 600; color: #111827; }
.ci-meta { font-size: 12px; color: #6b7280; grid-column: 1; }
.ci-price { font-size: 14px; font-weight: 700; color: var(--accent); grid-row: 1 / 3; align-self: center; }

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 0;
  font-size: 15px;
  color: #374151;
}
.cart-total-row strong { font-size: 20px; font-weight: 700; color: var(--accent); font-family: var(--font-sans); }

.cart-next-btn {
  width: 100%;
  margin-top: 18px;
  padding: 16px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
  cursor: pointer;
  transition: all .25s;
  box-shadow: 0 4px 14px rgba(139,58,42,0.25);
}
.cart-next-btn:not(:disabled):hover { background: #a84332; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(139,58,42,0.35); }
.cart-next-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* === INFO FORM (STEP 2) === */
.info-form { margin-bottom: 28px; }

.form-row { margin-bottom: 22px; }
.form-row label { display: block; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: #374151; font-weight: 700; margin-bottom: 8px; }
.form-row .optional { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 11.5px; color: #6b7280; }

.form-row input[type=text],
.form-row input[type=tel],
.form-row textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  color: #111827;
  background: #ffffff;
  outline: none;
  transition: all .2s;
}
.form-row input:focus,
.form-row textarea:focus { 
  border-color: var(--accent); 
  box-shadow: 0 0 0 3px rgba(139,58,42,0.1); 
}
.form-row textarea { resize: vertical; min-height: 80px; }
.form-row input.shake { animation: shakeField .4s; border-color: #ef4444; }

@keyframes shakeField {
  0%,100%{transform:translateX(0)}
  20%{transform:translateX(-6px)}
  40%{transform:translateX(6px)}
  60%{transform:translateX(-4px)}
  80%{transform:translateX(4px)}
}

/* Ship method cards */
.ship-method-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.ship-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  cursor: pointer;
  transition: all .25s;
  background: #ffffff;
}
.ship-card:hover { border-color: #cbd5e1; }
.ship-card input[type=radio] { display: none; }
.ship-card.active { border-color: var(--accent); background: #fff5f5; box-shadow: 0 4px 16px rgba(139,58,42,.08); }
.ship-card-icon { font-size: 26px; flex-shrink: 0; }
.ship-card strong { color: #111827; font-size: 14px; font-weight: 700; display: block; margin-bottom: 2px; }
.ship-card small { font-size: 12px; color: #6b7280; line-height: 1.5; }
.badge-free { display: inline-block; margin-top: 4px; color: #059669; font-weight: 700; font-size: 11px; }
.ship-warn-badge { display: inline-block; margin-top: 4px; color: #b45309; font-weight: 700; font-size: 11px; }

/* Ship notice box */
.ship-notice-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 12px;
  margin-top: 10px;
  animation: fadeInDown 0.3s ease;
}
.ship-notice-box .snb-icon { font-size: 22px; flex-shrink: 0; line-height: 1.2; }
.ship-notice-box .snb-content strong { display: block; font-size: 13.5px; color: #92400e; margin-bottom: 3px; font-weight: 700; }
.ship-notice-box .snb-content p { font-size: 12.5px; color: #78350f; margin: 0; line-height: 1.5; }
.ship-notice-box .snb-content p strong { display: inline; color: #92400e; }

.text-warn { color: #d97706 !important; font-size: 13px; font-weight: 600; }
.text-success { color: #059669 !important; font-size: 13px; font-weight: 600; }
.fs-ship-alert { margin-top: 12px; padding: 12px 14px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; font-size: 12.5px; color: #92400e; line-height: 1.5; position: relative; }

.btn-ship-explain {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  color: var(--accent, #8b3a2a);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  vertical-align: baseline;
}
.btn-ship-explain u {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}
.btn-ship-explain:hover u {
  color: #a84332;
  text-decoration-color: #a84332;
}

.ship-explain-popover {
  margin-top: 10px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1.5px solid #fde68a;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  animation: fadeInDown 0.25s ease;
}
.ship-explain-popover .sep-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #fef3c7;
}
.ship-explain-popover .sep-header strong {
  font-size: 13px;
  color: #92400e;
  font-weight: 700;
}
.ship-explain-popover .sep-close {
  background: #fef3c7;
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  color: #92400e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ship-explain-popover p {
  margin: 4px 0 !important;
  font-size: 12px !important;
  color: #4b5563 !important;
  line-height: 1.45 !important;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tip row */
.tip-row { }
.tip-options { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tip-chip {
  padding: 8px 18px;
  border: 1.5px solid #e5e7eb;
  border-radius: 20px;
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all .2s;
  background: #ffffff;
  color: #374151;
  font-weight: 600;
}
.tip-chip:hover:not(.active) { border-color: #cbd5e1; color: #111827; }
.tip-chip.active { border-color: #d97706; background: #fffbeb; color: #92400e; font-weight: 700; }

.tip-custom-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #4b5563; }
.tip-custom-row input { width: 130px; padding: 9px 14px; border: 1.5px solid #d1d5db; border-radius: 10px; font-family: var(--font-sans); font-size: 13.5px; outline: none; }
.tip-custom-row input:focus { border-color: var(--accent); }

.tip-display { margin-top: 10px; font-size: 13px; color: #6b7280; }
.tip-display strong { color: var(--accent); }

/* Step nav buttons */
.step-nav { display: flex; gap: 14px; margin-top: 16px; }
.btn-back {
  padding: 15px 24px;
  border: 1.5px solid #d1d5db;
  border-radius: 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  background: #ffffff;
  color: #4b5563;
  cursor: pointer;
  transition: all .2s;
}
.btn-back:hover { border-color: #111827; color: #111827; }

.btn-next {
  flex: 1;
  padding: 16px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 14px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s;
  box-shadow: 0 4px 14px rgba(139,58,42,0.25);
}
.btn-next:hover { background: #a84332; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(139,58,42,0.35); }

/* Summary sidebar (step 2) */
.summary-sidebar {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
.summary-title { font-family: var(--font-serif); font-size: 18px; font-weight: 600; color: #111827; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid #f3f4f6; }
.summary-list { list-style: none; padding: 0; margin: 0 0 16px; font-size: 13.5px; color: #374151; line-height: 1.8; }
.sum-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 6px 0; color: #4b5563; }
.sum-row.total { border-top: 1.5px solid #e5e7eb; margin-top: 10px; padding-top: 14px; font-size: 17px; color: #111827; font-weight: 700; }
.sum-row.total strong { color: var(--accent); font-size: 20px; }

/* === STEP 3: PAYMENT === */
.pay-method-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
.pay-tab {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  cursor: pointer;
  background: #ffffff;
  transition: all .25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.pay-tab:hover { border-color: #cbd5e1; }
.pay-tab input[type=radio] { display: none; }
.pay-tab-icon { font-size: 28px; flex-shrink: 0; }
.pay-tab strong { display: block; font-size: 15px; color: #111827; margin-bottom: 2px; font-weight: 700; }
.pay-tab small { font-size: 12px; color: #6b7280; line-height: 1.4; display: block; }
.pay-tab.active {
  border-color: var(--accent);
  background: #fff5f5;
  box-shadow: 0 4px 20px rgba(139,58,42,.12);
}
.pay-tab.active strong { color: var(--accent); }

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

.qr-box {
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 20px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,.05);
}

/* COD Box */
.cod-box {
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 20px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,.05);
}
.cod-icon { font-size: 48px; margin-bottom: 12px; }
.cod-box h3 { font-family: var(--font-serif); font-size: 20px; font-weight: 600; color: #111827; margin-bottom: 10px; }
.cod-box p { font-size: 14px; color: #4b5563; line-height: 1.6; margin-bottom: 20px; }
.cod-amount-card {
  background: #fff8f8;
  border: 1.5px dashed var(--accent);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 20px;
}
.cod-amount-card span { display: block; font-size: 12px; color: #6b7280; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.cod-amount-card strong { font-size: 28px; color: var(--accent); font-family: var(--font-sans); font-weight: 800; }
.cod-reminder { font-size: 12.5px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; padding: 12px 14px; border-radius: 10px; line-height: 1.5; }

.btn-cod-main {
  background: linear-gradient(135deg, #059669, #10b981) !important;
  box-shadow: 0 8px 24px rgba(16,185,129,.25) !important;
}
.btn-cod-main:hover:not(:disabled) {
  box-shadow: 0 14px 36px rgba(16,185,129,.35) !important;
}

.qr-bank-info { margin-bottom: 16px; }
.qr-bank-name { font-family: var(--font-sans); font-size: 18px; font-weight: 700; display: block; color: #004b8d; }
.qr-acc { font-size: 20px; font-weight: 800; letter-spacing: 2px; display: block; color: #111827; }
.qr-acc-name { font-size: 12px; color: #6b7280; letter-spacing: 1px; text-transform: uppercase; font-weight: 600; }

.qr-img-wrap {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto 16px;
  border-radius: 14px;
  overflow: hidden;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}
.qr-img-wrap img { width: 100%; height: 100%; object-fit: contain; }
.qr-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #6b7280; background: #f9fafb; }

.qr-amount-display { font-size: 14px; color: #4b5563; margin-bottom: 6px; }
.qr-amount-display strong { font-size: 24px; color: var(--accent); font-family: var(--font-sans); font-weight: 800; }
.qr-content-display { 
  font-size: 13.5px; 
  color: #4b5563; 
  margin-bottom: 14px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: 8px; 
  flex-wrap: wrap; 
}
.qr-content-display code { 
  background: #f3f4f6; 
  padding: 5px 12px; 
  border-radius: 8px; 
  font-size: 13.5px; 
  font-weight: 700; 
  color: #111827; 
  border: 1px solid #e5e7eb; 
}
.btn-copy-code {
  background: #fff5f5;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}
.btn-copy-code:hover {
  background: var(--accent);
  color: #fff;
}
.qr-note { font-size: 12px; color: #6b7280; line-height: 1.6; border-top: 1px solid #f3f4f6; padding-top: 12px; }

/* Payment actions */
.payment-actions { }
.payment-final-summary {
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 18px;
  padding: 22px 26px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.8;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
.payment-final-summary hr {
  border: none;
  border-top: 1px solid #f3f4f6;
  margin: 12px 0;
}
.fs-title { font-family: var(--font-serif); font-size: 18px; font-weight: 600; color: #111827; margin-bottom: 12px; }
.fs-row { display: flex; justify-content: space-between; gap: 12px; color: #374151; }
.fs-total { border-top: 1.5px solid #e5e7eb; margin-top: 10px; padding-top: 12px; font-size: 17px; font-weight: 700; color: #111827; }
.fs-total strong { color: var(--accent); font-size: 20px; }

.payment-btns { margin-bottom: 20px; }
.btn-confirm-paid {
  width: 100%;
  padding: 18px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 14px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .3px;
  transition: all .25s;
  box-shadow: 0 6px 20px rgba(139,58,42,.3);
}
.btn-confirm-paid:hover:not(:disabled) { background: #a84332; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(139,58,42,.4); }
.btn-confirm-paid:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }

.payment-spinner { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 12px; font-size: 14px; color: var(--gray); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.payment-back-row { margin-bottom: 20px; text-align: center; }
.btn-step-back {
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 20px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--black);
  cursor: pointer;
  width: 100%;
  transition: all .2s;
}
.btn-step-back:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(139,58,42,.03);
}

.payment-alternatives { margin-bottom: 20px; }
.payment-alternatives p { font-size: 13px; color: var(--gray); margin-bottom: 10px; }
.btn-cod {
  padding: 14px 24px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: white;
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
}
.btn-cod:hover { border-color: var(--accent); color: var(--accent); }

.payment-contacts p { font-size: 13px; color: var(--gray); margin-bottom: 10px; }
.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  margin-right: 8px;
  margin-bottom: 8px;
  transition: transform .2s;
}
.contact-pill:hover { transform: translateY(-2px); }
.zalo-pill { background: #0068ff22; color: #0068ff; }
.fb-pill   { background: #0084ff22; color: #0084ff; }

.step-nav-bottom { margin-top: 32px; }

/* === TOAST === */
.co-toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--black);
  color: var(--white);
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 13px;
  max-width: 320px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  transform: translateY(80px);
  opacity: 0;
  transition: all .3s cubic-bezier(.25,.1,.25,1);
  z-index: 9999;
}
.co-toast.error { border-left: 4px solid #ef4444; }
.co-toast.show { transform: translateY(0); opacity: 1; }

/* === SUCCESS PAGE === */
.success-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.success-hero { text-align: center; margin-bottom: 40px; }
.success-icon { font-size: 64px; margin-bottom: 16px; animation: bounceIn .6s; }
@keyframes bounceIn { 0%{transform:scale(0)}60%{transform:scale(1.15)}100%{transform:scale(1)} }
.success-title { font-family: var(--font-serif); font-size: clamp(28px,5vw,48px); font-weight: 500; letter-spacing: -1.5px; margin-bottom: 12px; }
.success-title em { color: var(--accent); font-style: italic; }
.success-sub { font-size: 15px; color: var(--gray); line-height: 1.7; max-width: 500px; margin: 0 auto 16px; }
.success-status { font-size: 13px; color: var(--gray); }
.status-badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 20px; font-weight: 600; }
.status-dot { display: inline-block; width: 7px; height: 7px; background-color: currentColor; border-radius: 50%; margin-right: 6px; }
.status-new { background: #f59e0b1c; color: #b45309; }

/* ====================================================
   INVOICE — Visa-style premium card design
   Nền trắng, chữ đen, dải vàng accent, bố cục thẻ
   ==================================================== */

.invoice {
  background: #ffffff;
  border: 1px solid #d4d0ca;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: 0 4px 32px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06);
  color: #111111;
  font-family: var(--font-sans);
}

/* Top accent stripe — giống dải màu trên thẻ Visa */
.invoice::before {
  content: '';
  display: block;
  height: 6px;
  background: linear-gradient(90deg, #1a1a2e 0%, #b8956a 40%, #c8a96e 60%, #1a1a2e 100%);
}

.invoice-inner {
  padding: 36px 40px 32px;
}

/* --- Header row --- */
.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1.5px solid #e8e4de;
}

.invoice-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Chip giả — giống chip thẻ ngân hàng */
.inv-chip {
  width: 40px;
  height: 30px;
  background: linear-gradient(135deg, #d4aa5f 0%, #f0d080 35%, #b8903a 65%, #e8c870 100%);
  border-radius: 5px;
  position: relative;
  flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(255,255,255,.5), 0 2px 4px rgba(0,0,0,.2);
}
.inv-chip::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 18px;
  border: 1px solid rgba(0,0,0,.25);
  border-radius: 3px;
  background: linear-gradient(135deg, #c8a050 0%, #f0d080 50%, #b8903a 100%);
}
.inv-chip::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  height: 12px;
  background: rgba(0,0,0,.2);
  box-shadow: -6px 0 0 rgba(0,0,0,.15), 6px 0 0 rgba(0,0,0,.15);
}

.inv-brand-text {}
.inv-shop-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: #111111;
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.inv-shop-tag {
  font-size: 11px;
  color: #888;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.invoice-meta {
  text-align: right;
}
.inv-label {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #aaa;
  font-weight: 700;
  margin-bottom: 4px;
}
.inv-code {
  font-size: 18px;
  font-family: var(--font-serif);
  color: #111111;
  font-weight: 700;
  letter-spacing: 1px;
}
.inv-date {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

/* --- Parties (FROM / TO) --- */
.invoice-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 28px;
  background: #f8f6f2;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e8e4de;
}

.inv-party {
  padding: 18px 20px;
  font-size: 13px;
  color: #333;
  line-height: 1.75;
}

.inv-party:first-child {
  border-right: 1px solid #e8e4de;
}

.inv-party-label {
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #b8956a;
  font-weight: 800;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.inv-party-label::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 1.5px;
  background: #b8956a;
}

.inv-party-name {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  margin-bottom: 2px;
}

/* --- Items Table --- */
.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
  font-size: 13.5px;
}

.invoice-table thead tr {
  background: #111111;
  color: #ffffff;
}

.invoice-table th {
  padding: 11px 14px;
  text-align: left;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}

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

.invoice-table tbody tr:nth-child(even) {
  background: #fafaf8;
}
.invoice-table tbody tr:hover {
  background: #f5f2ec;
}

.invoice-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #eeebe5;
  color: #222;
  vertical-align: middle;
}

.invoice-table td:last-child { text-align: right; font-weight: 600; }

.invoice-table tfoot .inv-row td {
  color: #666;
  font-size: 13px;
  border-bottom: 1px solid #eeebe5;
  padding: 10px 14px;
}

.invoice-table tfoot .inv-row td:last-child {
  font-weight: 500;
  color: #444;
}

/* Total row — nổi bật nhất */
.invoice-table .inv-total {
  background: #111111;
}
.invoice-table .inv-total td {
  font-size: 15px;
  border-top: none;
  border-bottom: none;
  padding: 15px 14px;
  color: #ffffff;
  font-weight: 700;
}
.invoice-table .inv-total td strong {
  color: #f0d080;
  font-size: 17px;
  font-family: var(--font-serif);
}

/* --- Ship notice (inside invoice) --- */
.inv-ship-note {
  margin: 16px 40px;
  padding: 12px 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  font-size: 12.5px;
  color: #92400e;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.inv-ship-note-icon { font-size: 18px; flex-shrink: 0; line-height: 1.2; }

/* --- Note box --- */
.inv-note {
  margin: 0 40px 16px;
  background: #f8f6f2;
  border-left: 3px solid #b8956a;
  padding: 12px 16px;
  font-size: 13px;
  border-radius: 0 8px 8px 0;
  color: #444;
}

/* --- Footer strip --- */
.invoice-footer {
  background: #111111;
  color: #aaa;
  padding: 16px 40px;
  font-size: 11.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  line-height: 1.7;
}

.invoice-footer .inv-footer-brand {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.invoice-footer .inv-footer-contact {
  font-size: 11px;
  color: #888;
  text-align: right;
}

/* Visa-style logo mark at bottom right */
.inv-visa-mark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.5px;
}
.inv-visa-mark .v1 { color: #1a1f71; }
.inv-visa-mark .v2 { color: #f7b600; }

/* Success actions */
.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.btn-print,
.btn-contact,
.btn-order-more,
.btn-home {
  padding: 14px 24px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all .25s;
}
.btn-print { background: var(--black); color: white; }
.btn-print:hover { background: var(--accent); }
.btn-contact.zalo { background: #0068ff; color: white; }
.btn-contact.fb   { background: #0084ff; color: white; }
.btn-contact:hover { transform: translateY(-2px); opacity: .9; }
.btn-order-more { background: var(--cream); border: 1.5px solid var(--line); color: var(--black); }
.btn-order-more:hover { border-color: var(--accent); }
.btn-home { background: transparent; border: 1.5px solid var(--line); color: var(--gray); }
.btn-home:hover { color: var(--black); border-color: var(--black); }

/* qty-row layout */
.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

/* ============================================================
   CART BOTTOM SHEET (KFC-style)
   Chỉ hiển thị trên mobile, trượt lên từ đáy màn hình
   ============================================================ */

/* Overlay tối phía sau sheet */
.cart-sheet-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1100;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.cart-sheet-overlay.open {
  opacity: 1;
}

/* Sheet chính */
.cart-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1101;
  background: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.cart-sheet.open {
  transform: translateY(0);
}

/* Handle kéo (pill) */
.cart-sheet-handle {
  width: 40px;
  height: 4px;
  background: #e0d8d0;
  border-radius: 4px;
  margin: 12px auto 0;
  flex-shrink: 0;
}

/* Header sheet */
.cart-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 10px;
  flex-shrink: 0;
  border-bottom: 1px solid #f0ebe4;
}
.cart-sheet-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--black);
}
.cart-sheet-close {
  width: 32px; height: 32px;
  border: none;
  background: #f0ebe4;
  border-radius: 50%;
  font-size: 14px;
  color: var(--gray);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.cart-sheet-close:hover { background: #e0d8d0; color: var(--black); }

/* Danh sách items trong sheet — cuộn được */
.cart-sheet-list {
  list-style: none;
  padding: 8px 20px;
  margin: 0;
  overflow-y: auto;
  flex: 1;
}
.cart-sheet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f5f0ea;
}
.cart-sheet-item:last-child { border-bottom: none; }

.csi-img {
  width: 56px; height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--cream);
}
.csi-info { flex: 1; min-width: 0; }
.csi-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.csi-meta {
  font-size: 11.5px;
  color: var(--gray);
  margin-top: 2px;
}
.csi-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

/* Trống giỏ hàng */
.cart-sheet-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray);
  font-size: 14px;
}

/* Footer cố định dưới đáy sheet */
.cart-sheet-footer {
  padding: 14px 20px 16px;
  border-top: 1px solid #f0ebe4;
  flex-shrink: 0;
  background: #fff;
}
.cart-sheet-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 15px;
  color: var(--black);
}
.cart-sheet-total-row strong {
  font-size: 20px;
  font-family: var(--font-serif);
  color: var(--accent);
}
.cart-sheet-next-btn {
  width: 100%;
  padding: 16px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 14px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all .25s;
}
.cart-sheet-next-btn:hover { background: var(--accent); transform: translateY(-1px); }

/* Ẩn sheet và overlay trên desktop */
@media (min-width: 901px) {
  .cart-sheet,
  .cart-sheet-overlay {
    display: none !important;
  }
}

/* Hiện overlay khi open */
@media (max-width: 900px) {
  .cart-sheet-overlay.open {
    display: block;
  }
}

/* === PRINT STYLES === */

@media print {
  header, .success-hero, .success-actions, #confettiCanvas, .co-mobile-bar { display: none !important; }
  body { background: white !important; }
  .success-main { padding: 0 !important; max-width: 100% !important; }
  .invoice {
    box-shadow: none !important;
    border: 1.5px solid #ccc !important;
    border-radius: 12px !important;
    break-inside: avoid;
  }
  .invoice::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .invoice-table thead tr,
  .invoice-table .inv-total,
  .invoice-footer {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* === MOBILE FLOATING CART BAR === */
.co-mobile-bar {
  display: none;
}

/* === RESPONSIVE & MOBILE REFINEMENT === */
@media (max-width: 900px) {
  .co-nav {
    width: 100%;
    padding: 0 16px;
    height: 60px;
  }

  .co-main {
    max-width: 100%;
    width: 100%;
    padding: 0 16px 130px;
    box-sizing: border-box;
  }

  .co-panel.active,
  #step1.active,
  #step2.active,
  #step3.active {
    display: block !important;
    width: 100% !important;
    padding-top: 16px;
  }

  .co-left {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
  }

  .co-title {
    margin-bottom: 20px;
    font-size: 26px;
  }

  .product-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    width: 100% !important;
    margin-bottom: 20px;
  }

  .product-card {
    width: 100% !important;
    box-sizing: border-box;
  }

  .product-img-wrap {
    height: 200px;
    width: 100%;
  }

  .product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .co-cart {
    position: static;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
  }

  /* Ẩn sidebar giỏ hàng ở dưới đáy bước 1 trên mobile để dùng Floating Bar */
  #step1 .co-cart {
    display: none;
  }

  .co-mobile-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 17, 14, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #fff;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 1000;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
    transform: translateY(0);
    transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
  }

  .co-mobile-bar-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .co-m-count {
    font-size: 11px;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
  }

  .co-m-total {
    font-size: 20px;
    font-weight: 700;
    color: #f0d080;
    font-family: var(--font-serif);
    line-height: 1.1;
  }

  .co-mobile-bar-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-sans);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(139, 58, 42, 0.4);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .co-mobile-bar-btn:active {
    transform: scale(0.96);
  }

  .payment-layout {
    display: block !important;
    width: 100% !important;
  }

  .qr-box {
    max-width: 100%;
    margin: 0 0 24px 0;
    width: 100%;
    box-sizing: border-box;
    padding: 22px 16px;
  }

  .invoice-parties {
    grid-template-columns: 1fr;
  }

  .invoice-header {
    flex-direction: column;
    gap: 16px;
  }
  .invoice-meta {
    text-align: left;
  }

  .ship-method-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 600px) {
  /* Tối ưu Header & Navigation Steps trên Mobile */
  .co-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .co-nav-steps {
    display: flex;
    gap: 2px;
    font-size: 10.5px;
    background: rgba(139, 58, 42, 0.06);
    padding: 3px 6px;
    border-radius: 999px;
  }

  .co-step {
    padding: 3px 6px;
    font-size: 10.5px;
    gap: 4px;
  }

  .co-step .step-num {
    width: 16px;
    height: 16px;
    font-size: 9.5px;
  }

  .co-step-sep {
    font-size: 11px;
  }

  .co-back-link {
    display: none;
  }

  .product-info {
    padding: 16px;
  }

  .product-meta h3 {
    font-size: 17px;
  }

  .product-price {
    font-size: 17px;
  }

  .product-desc {
    font-size: 12.5px;
    margin-bottom: 12px;
  }

  .opt-chips {
    gap: 6px;
  }

  .chip {
    padding: 6px 14px;
    font-size: 12px;
  }

  .topping-select {
    padding: 10px 12px;
    font-size: 13.5px;
  }

  /* Form & inputs cải thiện cảm ứng (touch-friendly) */
  .form-row input[type=text],
  .form-row input[type=tel],
  .form-row textarea {
    font-size: 15px; /* Tránh tự zoom trên iOS */
    padding: 13px 15px;
  }

  .pay-method-tabs {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .pay-tab {
    padding: 14px 16px;
  }

  .qr-img-wrap {
    width: 200px;
    height: 200px;
  }

  /* Invoice trên Mobile */
  .invoice-inner {
    padding: 22px 16px 18px;
  }

  .invoice-table {
    font-size: 12px;
  }

  .invoice-table th,
  .invoice-table td {
    padding: 9px 8px;
  }

  .invoice-footer {
    padding: 16px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .invoice-footer .inv-footer-contact {
    text-align: left;
  }

  .inv-ship-note,
  .inv-note {
    margin-left: 16px;
    margin-right: 16px;
  }

  .success-actions {
    flex-direction: column;
    width: 100%;
  }

  .success-actions .btn-print,
  .success-actions .btn-contact,
  .success-actions .btn-order-more,
  .success-actions .btn-home {
    width: 100%;
    text-align: center;
    padding: 14px;
  }
}
