/* ============================================================
   Trang giỏ hàng (gio-hang.html) & thanh toán (thanh-toan.html)
   Dùng chung biến màu từ homepage-refresh.css (:root --hotel-*)
   Prefix: sp- (chung), cp- (giỏ hàng), co- (thanh toán)
   ============================================================ */

.shop-page {
  background: linear-gradient(180deg, #fff8fc 0%, #fff 320px);
}

/* ---------- Breadcrumb & heading (đồng bộ các trang trong) ---------- */

.sp-breadcrumb {
  border-bottom: 1px solid #f3e6ee;
}

.sp-breadcrumb .breadcrumb {
  margin: 0;
  padding: 16px 0;
  background: transparent;
  font-size: 13px;
}

.sp-breadcrumb .breadcrumb-item a {
  color: var(--hotel-muted);
  font-weight: 600;
  transition: color .2s ease;
}

.sp-breadcrumb .breadcrumb-item a:hover {
  color: var(--hotel-coral);
}

.sp-breadcrumb .breadcrumb-item.active {
  color: var(--hotel-coral);
  font-weight: 700;
}

.sp-main {
  padding: 44px 0 80px;
}

.sp-heading {
  margin-bottom: 26px;
}

.sp-heading .sp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--hotel-coral);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.sp-heading .sp-eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: currentColor;
}

.sp-heading h1 {
  margin: 8px 0 0;
  color: #202b31;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 750;
  letter-spacing: -.02em;
}

/* ---------- Chỉ báo bước mua hàng ---------- */

.sp-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 34px;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

.sp-steps li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--hotel-muted);
  font-size: 13px;
  font-weight: 700;
}

.sp-steps li span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid #e8dce3;
  border-radius: 50%;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.sp-steps li.is-active {
  color: var(--hotel-coral);
}

.sp-steps li.is-active span {
  border-color: var(--hotel-coral);
  background: var(--hotel-coral);
  color: #fff;
}

.sp-steps li.is-done {
  color: #1d8a4b;
}

.sp-steps li.is-done span {
  border-color: #1d8a4b;
  background: #e9f8ef;
  color: #1d8a4b;
}

.sp-steps li+li::before {
  content: "";
  width: 34px;
  height: 2px;
  margin-right: 9px;
  background: #eee0e8;
}

/* ---------- Layout 2 cột ---------- */

.sp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 30px;
  align-items: start;
}

/* ---------- Card chung ---------- */

.sp-card {
  overflow: hidden;
  border: 1px solid #f2e3eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 35px rgba(72, 32, 53, .08);
}

.sp-card+.sp-card {
  margin-top: 22px;
}

.sp-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 24px;
  border-bottom: 1px solid #f6ebf1;
}

.sp-card-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #202b31;
  font-size: 17px;
  font-weight: 750;
}

.sp-card-head h2 i {
  color: var(--hotel-coral);
}

.sp-card-body {
  padding: 24px;
}

/* ---------- Trạng thái giỏ hàng trống (dùng chung 2 trang) ---------- */

.sp-empty[hidden] {
  display: none !important;
}

.sp-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 24px 60px;
  border: 2px dashed #f0d7e4;
  border-radius: 14px;
  background: #fffafc;
  text-align: center;
}

.sp-empty-icon {
  position: relative;
  display: grid;
  width: 96px;
  height: 96px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 50%;
  background: #fff0f7;
  color: var(--hotel-coral);
  font-size: 38px;
}

.sp-empty-icon::after {
  content: "0";
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--hotel-navy);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.sp-empty h2 {
  margin: 0 0 8px;
  color: #202b31;
  font-size: 22px;
  font-weight: 750;
}

.sp-empty p {
  max-width: 420px;
  margin: 0 0 24px;
  color: var(--hotel-muted);
  font-size: 14px;
  line-height: 1.7;
}

.sp-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.sp-empty-actions .sp-btn-primary,
.sp-empty-actions .sp-btn-shopee {
  width: auto;
  min-width: 220px;
  margin: 0;
  padding-left: 22px;
  padding-right: 22px;
}

.sp-empty-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--hotel-muted);
  font-size: 13px;
  font-weight: 750;
  transition: color .2s ease;
}

.sp-empty-back:hover {
  color: var(--hotel-coral);
}

/* Gợi ý sản phẩm dưới khối giỏ trống */

.sp-empty-suggest {
  width: 100%;
  max-width: 560px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid #f6e3ed;
}

.sp-empty-suggest h3 {
  margin: 0 0 16px;
  color: #394b52;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sp-empty-suggest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.sp-empty-suggest-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  border: 1px solid #f2e3eb;
  border-radius: 10px;
  background: #fff;
  color: #394b52;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease, color .2s ease;
}

.sp-empty-suggest-grid a:hover {
  transform: translateY(-3px);
  border-color: rgba(250, 41, 145, .4);
  box-shadow: 0 10px 24px rgba(72, 32, 53, .1);
  color: var(--hotel-coral);
}

.sp-empty-suggest-grid img {
  width: 100%;
  height: 84px;
  border-radius: 7px;
  object-fit: cover;
  background: #fbf7f2;
}

@media (max-width: 767px) {
  .sp-empty {
    padding: 44px 16px 40px;
  }

  .sp-empty-actions .sp-btn-primary,
  .sp-empty-actions .sp-btn-shopee {
    width: 100%;
  }

  .sp-empty-suggest-grid {
    gap: 8px;
  }

  .sp-empty-suggest-grid img {
    height: 68px;
  }
}

/* ============================================================
   TRANG GIỎ HÀNG
   ============================================================ */

.cp-table-wrap {
  overflow-x: auto;
}

.cp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.cp-table th {
  padding: 14px 16px;
  background: #fff8fc;
  border-bottom: 2px solid #f3e6ee;
  color: #394b52;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

.cp-table td {
  padding: 18px 16px;
  border-bottom: 1px solid #f6ebf1;
  vertical-align: middle;
}

.cp-table tr:last-child td {
  border-bottom: 0;
}

.cp-product {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 220px;
}

.cp-product-thumb {
  display: block;
  flex: 0 0 68px;
  overflow: hidden;
  width: 68px;
  height: 68px;
  border: 1px solid #f2e3eb;
  border-radius: 10px;
  background: #fbf7f2;
}

.cp-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.cp-product:hover .cp-product-thumb img {
  transform: scale(1.08);
}

.cp-product h3 {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.35;
}

.cp-product h3 a {
  color: #26363c;
  transition: color .2s ease;
}

.cp-product h3 a:hover {
  color: var(--hotel-coral);
}

.cp-product small {
  color: var(--hotel-muted);
  font-size: 12px;
}

.cp-price,
.cp-subtotal {
  color: #26363c;
  font-weight: 700;
  white-space: nowrap;
}

.cp-subtotal {
  color: var(--hotel-coral);
  font-weight: 800;
}

.cp-remove {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #f3dbd7;
  border-radius: 8px;
  background: #fff;
  color: #c0392b;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.cp-remove:hover {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}

/* Hàng công cụ dưới bảng */

.cp-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 24px;
  border-top: 1px solid #f6ebf1;
  background: #fffafc;
}

.cp-continue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--hotel-muted);
  font-size: 13px;
  font-weight: 750;
  transition: color .2s ease;
}

.cp-continue:hover {
  color: var(--hotel-coral);
}

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

.cp-coupon input {
  height: 42px;
  width: 200px;
  padding: 0 14px;
  border: 1px solid #e8dce3;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.cp-coupon input:focus {
  outline: 0;
  border-color: var(--hotel-coral);
  box-shadow: 0 0 0 3px rgba(250, 41, 145, .12);
}

.cp-coupon button {
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--hotel-coral);
  border-radius: 6px;
  background: #fff;
  color: var(--hotel-coral);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.cp-coupon button:hover {
  background: var(--hotel-coral);
  color: #fff;
}

/* ---------- Tóm tắt đơn hàng (dùng chung 2 trang) ---------- */

.sp-summary {
  position: sticky;
  top: 100px;
}

.sp-summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 9px 0;
  color: #58666b;
  font-size: 14px;
}

.sp-summary-row+.sp-summary-row {
  border-top: 1px dashed #f0e4ea;
}

.sp-summary-row.sp-summary-total {
  margin-top: 4px;
  border-top: 2px solid #f3e6ee;
  color: #202b31;
  font-size: 15px;
  font-weight: 750;
}

.sp-summary-total strong {
  color: var(--hotel-coral);
  font-size: 24px;
  font-weight: 800;
}

.sp-summary-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 16px;
  color: var(--hotel-muted);
  font-size: 12px;
  line-height: 1.6;
}

.sp-summary-note i {
  margin-top: 2px;
  color: var(--hotel-coral);
}

.sp-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 6px;
  background: var(--hotel-coral);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}

.sp-btn-primary:hover {
  background: var(--hotel-coral-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(250, 41, 145, .28);
}

.sp-btn-shopee {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  margin-top: 9px;
  border: 1px solid #ee4d2d;
  border-radius: 6px;
  background: #fff;
  color: #ee4d2d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.sp-btn-shopee:hover {
  background: #ee4d2d;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(238, 77, 45, .26);
}

/* Cam kết dưới nút */

.sp-assurance {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.sp-assurance li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 0;
  color: var(--hotel-muted);
  font-size: 12px;
  font-weight: 650;
}

.sp-assurance i {
  color: var(--hotel-coral);
}

/* ============================================================
   TRANG THANH TOÁN
   ============================================================ */

.co-form .form-group {
  margin-bottom: 18px;
}

.co-form label {
  display: block;
  margin-bottom: 7px;
  color: #394b52;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.co-form label .co-required {
  color: var(--hotel-coral);
}

.co-form .form-control {
  height: 48px;
  padding: 0 15px;
  border: 1px solid #e8dce3;
  border-radius: 8px;
  background: #fdfbfc;
  font-size: 14px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.co-form textarea.form-control {
  height: auto;
  min-height: 96px;
  padding: 12px 15px;
  resize: vertical;
}

.co-form .form-control:focus {
  background: #fff;
  border-color: var(--hotel-coral);
  box-shadow: 0 0 0 3px rgba(250, 41, 145, .12);
}

.co-form select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%236c7c82' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
}

.co-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

/* Phương thức thanh toán */

.co-payments {
  display: grid;
  gap: 12px;
}

.co-payment {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}

.co-payment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.co-payment-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid #ecdfe7;
  border-radius: 10px;
  background: #fdfbfc;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.co-payment:hover .co-payment-box {
  border-color: rgba(250, 41, 145, .4);
}

.co-payment input:checked+.co-payment-box {
  border-color: var(--hotel-coral);
  background: #fff4f9;
  box-shadow: 0 0 0 3px rgba(250, 41, 145, .1);
}

.co-payment input:focus-visible+.co-payment-box {
  box-shadow: 0 0 0 3px rgba(250, 41, 145, .25);
}

.co-payment-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  background: #fff0f7;
  color: var(--hotel-coral);
  font-size: 17px;
}

.co-payment-box strong {
  display: block;
  color: #26363c;
  font-size: 14px;
  font-weight: 750;
}

.co-payment-box p {
  margin: 3px 0 0;
  color: var(--hotel-muted);
  font-size: 12px;
  line-height: 1.55;
}

/* Radio giả lập bên phải */

.co-payment-check {
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-left: auto;
  place-items: center;
  border: 2px solid #ddc9d4;
  border-radius: 50%;
  transition: border-color .2s ease;
}

.co-payment-check::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  transition: background .2s ease;
}

.co-payment input:checked+.co-payment-box .co-payment-check {
  border-color: var(--hotel-coral);
}

.co-payment input:checked+.co-payment-box .co-payment-check::after {
  background: var(--hotel-coral);
}

/* Thông tin chuyển khoản */

.co-bank-info {
  display: none;
  margin: 10px 0 0;
  padding: 14px 16px;
  border: 1px dashed rgba(250, 41, 145, .35);
  border-radius: 8px;
  background: #fff;
  color: #58666b;
  font-size: 13px;
  line-height: 1.8;
}

.co-payment input:checked~.co-bank-info {
  display: block;
}

.co-bank-info strong {
  color: #202b31;
}

/* Danh sách sản phẩm gọn trong tóm tắt */

.co-items {
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
}

.co-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
}

.co-item+.co-item {
  border-top: 1px solid #f6ebf1;
}

.co-item-thumb {
  position: relative;
  overflow: visible;
  width: 52px;
  height: 52px;
  border: 1px solid #f2e3eb;
  border-radius: 8px;
  background: #fbf7f2;
}

.co-item-thumb img {
  width: 100%;
  height: 100%;
  border-radius: 7px;
  object-fit: cover;
}

.co-item-qty {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  place-items: center;
  border-radius: 10px;
  background: var(--hotel-navy);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.co-item-name {
  color: #26363c;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.co-item-name small {
  display: block;
  color: var(--hotel-muted);
  font-weight: 600;
}

.co-item-price {
  color: #26363c;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.co-terms {
  margin: 14px 0 0;
  color: var(--hotel-muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.co-terms a {
  color: var(--hotel-coral);
  font-weight: 700;
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
  .sp-grid {
    grid-template-columns: 1fr;
  }

  .sp-summary {
    position: static;
  }
}

@media (max-width: 767px) {
  .sp-main {
    padding: 28px 0 55px;
  }

  .sp-card-body {
    padding: 18px;
  }

  .sp-steps li span {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .sp-steps li+li::before {
    width: 18px;
    margin-right: 6px;
  }

  .cp-toolbar {
    padding: 16px 18px;
  }

  .cp-coupon {
    width: 100%;
  }

  .cp-coupon input {
    flex: 1 1 auto;
    width: auto;
  }

  .co-form-grid {
    grid-template-columns: 1fr;
  }
}
