/**
 * HALINK DV04 - Cart, Checkout, Thank you
 */

/* Flow header + steps */
.hl-wc-flow__header {
  margin-bottom: 1.5rem;
}

.hl-wc-flow__intro {
  text-align: center;
  font-size: 16.88px;
  color: #64748b;
  margin: 0 0 1.25rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.hl-wc-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.hl-wc-steps__item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--hl-border-color);
  background: #fff;
  color: #64748b;
  font-size: 14.62px;
  font-weight: 600;
}

.hl-wc-steps__item.is-active {
  background: var(--hl-navy);
  border-color: var(--hl-navy);
  color: #fff;
}

.hl-wc-steps__item.is-done {
  background: rgba(13, 43, 107, 0.08);
  border-color: rgba(13, 43, 107, 0.15);
  color: var(--hl-navy);
}

.hl-wc-steps__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: inherit;
  text-decoration: none;
}

.hl-wc-steps__num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.06);
}

.hl-wc-steps__item.is-active .hl-wc-steps__num {
  background: var(--hl-gold);
  color: var(--hl-navy);
}

.hl-wc-steps__line {
  width: 28px;
  height: 2px;
  background: #cbd5e1;
  border-radius: 999px;
}

/* Cart */
.hl-cart-page__layout,
.hl-checkout-page__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.25rem;
  align-items: start;
}

.hl-cart-table-wrap {
  overflow-x: auto;
}

.hl-cart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.75px;
}

.hl-cart-table thead th {
  padding: 0.75rem 0.5rem;
  border-bottom: 2px solid var(--hl-border-color);
  color: var(--hl-navy);
  font-size: 14.62px;
  font-weight: 800;
  text-align: left;
}

.hl-cart-table tbody td {
  padding: 1rem 0.5rem;
  border-bottom: 1px solid var(--hl-border-color);
  vertical-align: middle;
}

.hl-cart-table .product-thumbnail img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid var(--hl-border-color);
}

.hl-cart-table .product-name a {
  color: var(--hl-navy);
  font-weight: 700;
  text-decoration: none;
}

.hl-cart-table .product-name a:hover {
  color: var(--hl-gold);
}

.hl-cart-table .product-remove .remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 20.25px;
  line-height: 1;
  text-decoration: none;
}

.hl-cart-table .product-remove .remove:hover {
  background: #fecaca;
}

.hl-cart-table .quantity .qty {
  width: 64px;
  min-height: 38px;
  border: 1px solid var(--hl-border-color);
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
}

.hl-cart-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.hl-cart-coupon {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.hl-cart-coupon .input-text {
  min-width: 180px;
  min-height: 42px;
  border: 1px solid var(--hl-border-color);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 15.75px;
}

.hl-cart-actions__buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hl-cart-totals__title,
.hl-checkout-review h3 {
  font-size: 20.25px;
  font-weight: 800;
  color: var(--hl-navy);
  margin: 0 0 1rem;
}

.hl-cart-totals__table,
.woocommerce-checkout-review-order-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.75px;
}

.hl-cart-totals__table th,
.hl-cart-totals__table td,
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--hl-border-color);
}

.hl-cart-totals__table .order-total th,
.hl-cart-totals__table .order-total td,
.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
  font-size: 18px;
  font-weight: 800;
  color: var(--hl-navy);
  border-bottom: 0;
  padding-top: 0.75rem;
}

.hl-cart-totals__checkout {
  margin-top: 1rem;
}

.hl-cart-totals__checkout .checkout-button {
  display: block;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: var(--hl-gold) !important;
  color: var(--hl-navy) !important;
  font-weight: 800 !important;
  font-size: 16.88px !important;
  text-align: center;
  text-decoration: none;
  line-height: 46px;
  cursor: pointer;
  transition: var(--hl-transition);
}

.hl-cart-totals__checkout .checkout-button:hover {
  background: #e6b800 !important;
  color: var(--hl-navy) !important;
}

/* Nút Đặt hàng — checkout */
.hl-wc-flow #place_order,
.hl-checkout-page #place_order,
#payment #place_order {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-top: 0.75rem;
  padding: 0.85rem 1.25rem !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #33373d !important;
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 18px !important;
  text-align: center;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s ease;
  box-shadow: none !important;
}

.hl-wc-flow #place_order:hover,
.hl-checkout-page #place_order:hover,
#payment #place_order:hover {
  background: #1f2328 !important;
  color: #fff !important;
}

#payment .place-order {
  margin: 0;
  padding: 0;
}

#payment .woocommerce-terms-and-conditions-wrapper,
#payment .woocommerce-privacy-policy-text {
  font-size: 14.62px;
  line-height: 1.55;
  color: #64748b;
  margin-bottom: 0.75rem;
}

#payment .woocommerce-terms-and-conditions-wrapper a,
#payment .woocommerce-privacy-policy-text a {
  color: var(--hl-navy);
  font-weight: 600;
  text-decoration: underline;
}

#payment .woocommerce-terms-and-conditions-wrapper a:hover,
#payment .woocommerce-privacy-policy-text a:hover {
  color: var(--hl-gold);
}

.hl-cart-empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.hl-cart-empty__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  color: var(--hl-navy);
  opacity: 0.35;
}

.hl-cart-empty__icon svg {
  width: 100%;
  height: 100%;
}

.hl-cart-empty__title {
  font-size: 24.75px;
  font-weight: 800;
  color: var(--hl-navy);
  margin: 0 0 0.5rem;
}

.hl-cart-empty__text {
  color: #64748b;
  margin: 0 0 1.25rem;
}

/* Checkout */
.hl-checkout-page__section-head h2 {
  font-size: 22.5px;
  font-weight: 800;
  color: var(--hl-navy);
  margin: 0 0 0.35rem;
}

.hl-checkout-page__section-head p {
  font-size: 15.75px;
  color: #64748b;
  margin: 0 0 1.25rem;
}

.hl-checkout-page .form-row label {
  font-size: 14.62px;
  font-weight: 700;
  color: var(--hl-dark);
  margin-bottom: 0.35rem;
}

.hl-checkout-page .form-row input.input-text,
.hl-checkout-page .form-row textarea,
.hl-checkout-page .form-row select,
.hl-checkout-page .select2-container .select2-selection--single {
  min-height: 42px;
  border: 1px solid var(--hl-border-color);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 15.75px;
}

.hl-checkout-page .form-row {
  margin-bottom: 0.85rem;
}

.hl-checkout-page .woocommerce-billing-fields h3,
.hl-checkout-page .woocommerce-shipping-fields h3,
.hl-checkout-page .woocommerce-additional-fields h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--hl-navy);
  margin: 0 0 0.75rem;
}

.hl-checkout-page__aside {
  position: sticky;
  top: 90px;
}

.hl-checkout-review .woocommerce-checkout-review-order-table thead {
  display: none;
}

.hl-checkout-review .product-name {
  font-size: 14.62px;
  color: var(--hl-dark);
}

.hl-checkout-review .product-total {
  font-weight: 700;
  color: var(--hl-navy);
  text-align: right;
}

#payment {
  background: #f8fafc;
  border: 1px solid var(--hl-border-color);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-top: 1rem;
}

#payment ul.payment_methods {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
}

#payment ul.payment_methods li {
  margin-bottom: 0.5rem;
  font-size: 15.75px;
}

/* Thank you */
.hl-thankyou-page__status {
  text-align: center;
  padding: 2rem 1.5rem;
  margin-bottom: 1rem;
}

.hl-thankyou-page__status--success .hl-thankyou-page__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 31.5px;
}

.hl-thankyou-page__status--failed .hl-thankyou-page__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 31.5px;
  font-weight: 800;
}

.hl-thankyou-page__status h1,
.hl-thankyou-page__status h2,
.hl-thankyou-page__title {
  font-size: 27px;
  font-weight: 800;
  color: var(--hl-navy);
  margin: 0 0 0.5rem;
}

.hl-thankyou-page__status p,
.hl-thankyou-page__text {
  color: #64748b;
  font-size: 16.88px;
  margin: 0;
}

.hl-thankyou-page__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.hl-thankyou-page__item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hl-thankyou-page__label {
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.hl-thankyou-page__item strong {
  font-size: 16.88px;
  color: var(--hl-navy);
}

.hl-thankyou-page__total {
  color: var(--hl-gold) !important;
  font-size: 20.25px !important;
}

.hl-thankyou-page__legacy {
  display: none !important;
}

.hl-thankyou-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 1rem;
}

/* Order details — thank you / order received */
.hl-thankyou-page__details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem 0;
}

.hl-order-details,
.hl-order-customer {
  margin: 0;
}

.hl-order-details__title,
.hl-order-customer__title {
  font-size: 20.25px;
  font-weight: 800;
  color: var(--hl-navy);
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--hl-border-color);
}

.hl-order-details__table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.hl-order-details__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.75px;
  margin: 0;
}

.hl-order-details__table thead th {
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--hl-border-color);
  text-align: left;
}

.hl-order-details__table thead th:last-child,
.hl-order-details__table tbody td.product-total,
.hl-order-details__table tfoot td {
  text-align: right;
}

.hl-order-details__table tbody td {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--hl-border-color);
  vertical-align: top;
  color: var(--hl-navy);
}

.hl-order-details__table .product-name {
  font-weight: 600;
  line-height: 1.45;
}

.hl-order-details__table .product-name a {
  color: var(--hl-navy);
  text-decoration: none;
}

.hl-order-details__table .product-name a:hover {
  color: var(--hl-gold);
}

.hl-order-details__table .product-quantity {
  display: inline-block;
  margin-left: 0.25rem;
  font-weight: 700;
  color: #64748b;
  font-size: 14.62px;
}

.hl-order-details__table .wc-item-meta,
.hl-order-details__table dl.variation {
  margin: 0.35rem 0 0;
  font-size: 14.62px;
  color: #64748b;
}

.hl-order-details__table .wc-item-meta li,
.hl-order-details__table dl.variation dt,
.hl-order-details__table dl.variation dd {
  margin: 0.15rem 0;
}

.hl-order-details__table .product-total {
  font-weight: 700;
  white-space: nowrap;
}

.hl-order-details__table tfoot th,
.hl-order-details__table tfoot td {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--hl-border-color);
  font-size: 15.75px;
}

.hl-order-details__table tfoot tr:last-child th,
.hl-order-details__table tfoot tr:last-child td {
  border-bottom: 0;
}

.hl-order-details__table tfoot th {
  font-weight: 600;
  color: #64748b;
  text-align: left;
}

.hl-order-details__total-row th,
.hl-order-details__total-row td {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: var(--hl-navy) !important;
  padding-top: 0.85rem !important;
}

.hl-order-details__total-row td {
  color: var(--hl-gold) !important;
}

.hl-order-details__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.hl-order-details__table .product-purchase-note td {
  font-size: 14.62px;
  color: #64748b;
  background: #f8fafc;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border-bottom: 0;
}

/* Customer address block */
.hl-order-customer__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.hl-order-customer__address {
  font-style: normal;
  font-size: 15.75px;
  line-height: 1.65;
  color: var(--hl-navy);
  margin: 0;
}

.hl-order-customer__address p {
  margin: 0.5rem 0 0;
  color: #64748b;
  font-size: 15.75px;
}

.hl-order-customer__address i {
  width: 16px;
  margin-right: 0.35rem;
  color: var(--hl-gold);
}

/* Hide default WC section chrome inside our cards */
.hl-thankyou-page .woocommerce-order-details,
.hl-thankyou-page .woocommerce-customer-details {
  padding: 0;
  border: 0;
  background: transparent;
}

.hl-thankyou-page .woocommerce-order-details > h2:not(.hl-order-details__title),
.hl-thankyou-page .woocommerce-customer-details > h2:not(.hl-order-customer__title) {
  display: none;
}

/* Woo buttons reset inside flow */
.hl-wc-flow .button,
.hl-wc-flow button.button {
  border: 0;
}

@media (max-width: 991px) {
  .hl-cart-page__layout,
  .hl-checkout-page__layout {
    grid-template-columns: 1fr;
  }

  .hl-checkout-page__aside {
    position: static;
  }

  .hl-cart-table thead {
    display: none;
  }

  .hl-cart-table tbody tr {
    display: block;
    border: 1px solid var(--hl-border-color);
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .hl-cart-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    border: 0;
    padding: 0.35rem 0;
  }

  .hl-cart-table tbody td::before {
    content: attr(data-title);
    font-weight: 700;
    color: #64748b;
    font-size: 13.5px;
  }

  .hl-cart-table .product-remove {
    justify-content: flex-end;
  }

  .hl-cart-table .product-remove::before {
    display: none;
  }

  .hl-cart-actions-row td {
    display: block;
    padding: 0;
  }

  .hl-cart-actions-row td::before {
    display: none;
  }

  .hl-thankyou-page__grid {
    grid-template-columns: 1fr;
  }

  .hl-order-customer__grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .hl-order-details__table thead {
    display: none;
  }

  .hl-order-details__table tbody tr.order_item {
    display: block;
    border: 1px solid var(--hl-border-color);
    border-radius: 0.75rem;
    padding: 0.85rem;
    margin-bottom: 0.65rem;
  }

  .hl-order-details__table tbody td {
    display: block;
    border: 0;
    padding: 0.25rem 0;
  }

  .hl-order-details__table tbody td.product-total {
    text-align: left;
    padding-top: 0.5rem;
    font-size: 16.88px;
  }

  .hl-order-details__table tbody td.product-total::before {
    content: attr(data-title);
    display: block;
    font-size: 12.38px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.15rem;
  }

  .hl-order-details__table tfoot tr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--hl-border-color);
  }

  .hl-order-details__table tfoot tr:last-child {
    border-bottom: 0;
  }

  .hl-order-details__table tfoot th,
  .hl-order-details__table tfoot td {
    border: 0;
    padding: 0;
  }

  .hl-order-details__table tfoot tr:has(.hl-order-details__actions) {
    flex-direction: column;
    align-items: stretch;
  }

  .hl-order-details__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 575px) {
  .hl-wc-steps__label {
    display: none;
  }

  .hl-wc-steps__item {
    padding: 0.35rem;
  }
}
