/* Main Order Styles - Desktop & Responsive */

/* Form Order */
#form-order {
  background-image: url("/static/images/order/bg-main.png");
  background-size: cover;
  background-position: center;
  border-radius: 50px;
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
}

/* Mở rộng main full width, giữ content max-width 1440 ở bên trong */
.order_distribution {
  max-width: 100%;
}

/* Header: logo trái + banner preorder giữa + nút đóng phải */
.form-order-header {
  display: flex;
  height: 100px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #fff;
  position: relative;
  overflow: hidden;
}

.header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  z-index: 2;
  padding-left: 80px;
}

.header-logo img {
  height: 24px;
  width: 150px;
  object-fit: contain;
}

.header-banner-preorder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  position: relative;
  z-index: 1;
}

.header-banner-preorder img {
  height: 100px;
  object-fit: contain;
  object-position: center;
}

.header-banner-preorder .header-banner-left {
  height: 60px;
}

.header-banner-left {
  z-index: 2;
}

.header-banner-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.header-banner-right {
  padding-right: 3px;
  z-index: 2;
}

.header-banner-title {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.header-banner-close {
  background-color: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.form-order-header-mb {
  display: none;
  height: auto;
  padding: 16px;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 2px solid white;
  flex-direction: column;
  gap: 12px;
}

.header-mb-background {
  position: absolute;
  top: 0;
  left: -0.25px;
  width: calc(100% + 0.5px);
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(255, 182, 193, 0.3) 0%,
    rgba(255, 228, 225, 0.2) 100%
  );
  background-image: url("/static/images/order/header-leaf-mobile.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
}

.header-mb-logo {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-mb-logo img {
  height: 18px;
  width: auto;
  object-fit: contain;
}

.form-order-header-mb .header-banner-close {
  position: absolute;
  right: 7px;
  top: 7px;
  width: 12px;
  height: 12px;
  z-index: 10;
  padding: 0;
}

.form-order-header-mb .header-banner-close img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header-mb-title {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-mb-title img {
  width: 100%;
  max-width: 343px;
  height: auto;
  object-fit: contain;
}

/* Banner Promo Section */
.banner-promo-section {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  padding: 0px 80px 0;
  max-width: 1440px;
  margin: 0 auto;
}

.banner-promo-section-mobile {
  display: none;
  margin: 10px 0;
  position: relative;
  background-image: url("/static/images/order/leaf-mobile.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.banner-mobile-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;
}

.banner-mobile-preorder {
  width: 100%;
  max-width: 343px;
  position: relative;
  z-index: 2;
  aspect-ratio: 943/107;
}

.banner-mobile-preorder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.banner-mobile-limited {
  width: 100%;
  max-width: 327px;
  height: 80px;
  position: relative;
  z-index: 2;
  margin-top: 0;
}

.banner-mobile-limited img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.banner-promo-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-promo-item.banner-countdown {
  width: calc((100% - 24px) * 2 / 3);
  height: 140px;
}

.banner-promo-item.banner-limited {
  width: calc((100% - 24px) * 1 / 3);
  height: 140px;
}

.banner-promo-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  padding: 1px;
}

.banner-promo-item.banner-countdown .banner-promo-img {
  position: absolute;
  right: -35px;
  top: 15px;
}

.info {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* Checkout Page Layout */
.checkout-page {
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: stretch;
  gap: 24px;
  padding: 20px 80px;
  height: 100%;
}

.left-column {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 8px;
  position: relative;
}

/* Form Section */
.checkout-page .form-section {
  grid-column: 1 / 2;
  grid-row: 1;
  background: white;
  padding: 24px;
  border-radius: 20px;
  box-shadow: 0 0 16px rgba(137, 94, 0, 0.1);
}

/* Promo Info Section */
.promo-info-section {
  margin-top: 0;
  width: 100%;
  position: relative;
}

/* Desktop: hide all mobile-specific elements */
.mobile-screen-1,
.mobile-address-banner,
.mobile-terms,
.mobile-action-buttons,
.mobile-next-order {
  display: none;
}

/* Desktop: show promo info desktop */
.promo-info-desktop {
  display: block;
}

/* Desktop: show left column (form) */
.left-column {
  display: flex;
}

.promo-info-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  position: relative;
  border-radius: 20px;
  padding-right: 24px;
}

/* Gift banner - absolute positioned on the left */
.promo-gift-absolute {
  position: absolute;
  left: -11px;
  top: -75.5px;
  width: 265px;
  height: 301px;
  z-index: 10;
}

.promo-gift-absolute img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
}

/* Right side container */
.promo-info-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  max-width: 586.5px;
}

/* Top row with 25 chai and 01 don */
.promo-info-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  padding-top: 20px;
}

.promo-info-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.promo-25-chai {
  width: 244px;
  height: 120px;
}

.promo-01-don {
  width: 289px;
  height: 120px;
}

/* Divider between banners */
.promo-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0;
  height: 112px;
  position: relative;
}

.promo-divider-line {
  width: 112px;
  height: 3px;
  background: #fff;
  transform: rotate(90deg);
  position: absolute;
}

/* Bottom row - apply location */
.promo-info-bottom-row {
  width: 100%;
  height: 58.5px;
  border-radius: 12px;
  overflow: hidden;
}

.promo-info-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  pointer-events: none;
}

.form-section-title {
  color: var(--color-primary);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  margin-top: 0;
}

.checkout-page .form-section input {
  width: 100%;
  height: 38px;
  padding-left: 12px;
  outline: none;
  border: 1px solid #e9c4b3;
  border-radius: 8px;
}

.checkout-page .left-column .form-section .form-group .input-label {
  height: 38px !important;
}

.checkout-page .form-section textarea {
  width: 100%;
  min-height: 80px;
  max-height: 120px;
  padding-left: 15px;
  padding-top: 15px;
  float: left;
  resize: none;
  border: 1px solid #ddd;
  border-radius: 8px;
  border: 1px solid #e9c4b3;
}

.checkout-page .form-section textarea::placeholder {
  color: #826b63;
}

/* Summary Section */
.checkout-page .summary-section {
  grid-column: 2 / 3;
  grid-row: 1;
  background: rgba(255, 255, 255, 0.7);
  padding: 24px;
  border-radius: 20px;
  box-shadow: 0 0 16px rgba(137, 94, 0, 0.1);
  position: relative;
  align-self: flex-start;
}

/* Progress bar */
.summary-progress-bar {
  position: absolute;
  top: -1.5px;
  left: 23px;
  width: 265px;
  height: 4px;
  display: flex;
  align-items: center;
}

.summary-progress-fill {
  width: 60px;
  height: 6px;
  background: linear-gradient(90deg, #e60041 0%, #fb64b6 100%);
  border-radius: 25px;
}

/* Product header */
.summary-product-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-product-title {
  font-weight: 700;
  font-size: 24px;
  line-height: 32px;
  color: #e60041;
  margin: 0;
  padding: 0;
}

.summary-product-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.summary-product-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.summary-product-image {
  width: 123px;
  height: 54px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.summary-product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.summary-product-image.inactive {
  opacity: 0.5;
}

.summary-product-price-info.inactive span {
  color: #999 !important;
}

.summary-product-price-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-price-label {
  font-size: 14px;
  font-weight: 700;
  color: #4a5565;
}

.summary-price-value {
  font-weight: 700;
  font-size: 16px;
  color: var(--color-primary);
}

.summary-product-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.summary-product-right .qty-label {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.5);
  text-align: center;
  white-space: nowrap;
}

/* Dual section (gift + remaining) */
.summary-dual-section {
  display: flex;
  gap: 6px;
}

/* Gift box */
.summary-gift-box {
  flex: 1;
  background: linear-gradient(158.61deg, #fdf2f8 0%, #ffffff 50%, #fff7ed 100%);
  border: 1px dashed #e60041;
  border-radius: 16px;
  padding: 10px;
  position: relative;
  overflow: hidden;
}

.summary-gift-content {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.summary-gift-image-wrapper {
  position: relative;
  flex-shrink: 0;
}

.summary-gift-glow {
  position: absolute;
  width: 96px;
  height: 96px;
  background: #e60041;
  opacity: 0.2;
  filter: blur(24px);
  border-radius: 14px;
  top: 0;
  left: 0;
}

.summary-gift-image {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.summary-gift-image img {
  width: 97px;
  height: 109px;
  object-fit: cover;
}

.summary-gift-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.summary-gift-header {
  display: flex;
  align-items: center;
  gap: 4px;
}

.summary-gift-icon {
  width: 24px;
  height: 24px;
  background: #e60041;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.summary-gift-label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: #e60041;
}

.summary-gift-label strong {
  font-weight: 700;
}

.summary-gift-label span {
  font-weight: 700;
}

/* Remaining quantity box */
.summary-remaining-box {
  width: 106px;
  background: white;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.summary-remaining-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.summary-remaining-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 2px;
}

.summary-remaining-icon {
  width: 7px;
  height: 10px;
  object-fit: contain;
}

.summary-remaining-label {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.4;
  color: #4a5565;
  text-align: center;
}

.summary-remaining-number {
  font-weight: 700;
  font-size: 20px;
  line-height: 1.4;
  color: #e60041;
  text-align: center;
}

.summary-remaining-text {
  font-weight: 400;
  font-size: 10px;
  line-height: 1.4;
  color: #4a5565;
  text-align: center;
  width: 88px;
}

.summary-remaining-progress {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 25px;
  overflow: hidden;
  position: relative;
}

.summary-remaining-progress-fill {
  width: 41px;
  height: 8px;
  background: linear-gradient(90deg, #ff8904 0%, #e60041 100%);
  opacity: 0.59;
  border-radius: 25px;
}

/* Total section */
.summary-total-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 2px solid var(--color-primary);
  padding-top: 10px;
}

.summary-total-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-total-label {
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
  color: #e60041;
}

.summary-total-right {
  display: flex;
  align-items: center;
}

.summary-total-price {
  font-weight: 700;
  font-size: 18px;
  line-height: 28px;
  color: #e60041;
  text-align: right;
}

/* Delivery section */
.summary-delivery-section {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
}

.summary-delivery-content {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 40px;
}

.summary-delivery-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.summary-delivery-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.summary-delivery-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.summary-delivery-label {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  color: #e60041;
}

.summary-delivery-date {
  background: white;
  border: 1px solid #e60041;
  border-radius: 50px;
  padding: 2px 20px;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.4;
  color: #e60041;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
}

/* Terms text */
.summary-terms p {
  font-size: 14px;
  line-height: 1.4;
  color: #000000;
  margin: 0;
}

.summary-terms strong {
  font-weight: 600;
}

.summary-terms a {
  color: #e60041;
  text-decoration: none;
}

/* Order button */
.summary-order-button {
  width: 100%;
}

.summary-order-button .order-btn {
  width: 100%;
  min-height: 48px;
  border-radius: 33554400px;
  background: linear-gradient(180deg, #e8315b 0%, #ff5a7c 100%);
  box-shadow: 0 10px 15px -3px rgba(252, 206, 232, 0.5),
    0 4px 6px -4px rgba(252, 206, 232, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 20px;
  border: none;
  cursor: pointer;
}

.summary-order-button .order-btn .order-now-text {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.4;
  color: white;
}

.checkout-page .summary-section .product-item {
  width: 64px;
  height: 64px;
  background: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkout-page .summary-section .product-item.inactive {
  opacity: 0.5;
  pointer-events: auto;
}

.checkout-page .summary-section .product-content p.inactive {
  color: #999 !important;
}

.checkout-page .summary-section .product-item-light.inactive {
  opacity: 0.5;
  pointer-events: auto;
}

.checkout-page .summary-section .product-content-light p.inactive {
  color: #999 !important;
}

/* Summary preorder: tên giá, quà tặng, giao hàng, nút */
.summary-section .summary-product-row {
  justify-content: space-between;
}

.summary-section .product-content-init .product-name,
.summary-section .product-content-init .product-price {
  padding: 0;
  margin: 0;
  text-align: left;
  font-weight: 600;
  line-height: 140%;
}

.summary-section .product-content-init .product-price {
  font-weight: 400;
  color: #e60041;
}

.summary-section .summary-qty {
  flex-direction: column;
  align-items: flex-end;
}

.summary-section .qty-label {
  font-weight: 400;
  color: rgba(0, 0, 0, 0.5);
}

.summary-gift {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  color: #333;
}

.summary-gift .gift-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.delivery-time-block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: #fff;
  width: 100%;
}

.delivery-time-block .delivery-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.delivery-time-label {
  display: block;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.7);
  font-size: 13px;
}

.delivery-time-value {
  display: block;
  font-weight: 700;
  color: #e60041;
  font-size: 15px;
}

.description-info .terms-text {
  width: 100%;
  padding: 0;
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #333;
}

.description-info .terms-text a {
  color: #e60041;
  font-weight: 600;
  text-decoration: none;
}

/* Quantity Control */
.checkout-page .summary-section .quantity-control {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 36px;
  position: relative;
  height: 30px;
}

.checkout-page .summary-section .quantity-control .quantity-btn {
  background: white;
  border: 0px solid;
  font-size: 15px;
  cursor: pointer;
  color: #927619;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}

.checkout-page .summary-section .quantity-control .quantity-btn.minus::before {
  content: "";
  display: block;
  width: 10px;
  height: 2px;
  background: #927619;
  border-radius: 2px;
}

.checkout-page .summary-section .quantity-control .quantity-btn.plus::after {
  content: "";
  height: 2px;
  width: 10px;
  background: #927619;
  border-radius: 2px;
  position: absolute;
}

.checkout-page .summary-section .quantity-control .quantity-btn.plus::before {
  content: "";
  display: block;
  width: 2px;
  height: 10px;
  background: #927619;
  border-radius: 2px;
  position: absolute;
}

.checkout-page .summary-section .quantity-control .quantity-input {
  width: 40px;
  height: 30px;
  text-align: center;
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 600;
  color: #000;
  background: transparent;
  appearance: textfield;
}

.checkout-page
  .summary-section
  .quantity-control
  .quantity-input::-webkit-outer-spin-button,
.checkout-page
  .summary-section
  .quantity-control
  .quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Grid Form */
.grid-form {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  column-gap: 10px;
  row-gap: 10px;
}

.grid-form select,
.grid-form .form-group input,
.grid-form textarea {
  padding: 12px;
  font-size: 14px;
  border: 1px solid #f1cfcf;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
}

.grid-form textarea {
  resize: vertical;
  min-height: 100px;
}

.grid-form .form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 0px;
}

.grid-form .form-group .error-msg,
.grid-form .form-group-2 .error-msg {
  color: red;
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

.grid-form .form-group-2 {
  grid-column: span 2;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.grid-form .form-group {
  grid-column: span 3;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.grid-form .form-group label,
.grid-form .form-group-2 label {
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  height: 38px;
  display: flex;
  align-items: center;
  color: #826b63;
  pointer-events: none;
  font-size: 14px;
  transition: opacity 0.2s;
  font-weight: normal;
}

/* Select chưa chọn: chỉ hiện label (ẩn chữ option placeholder của select) */
.grid-form .form-group-2:not(.has-value) select {
  color: transparent;
}

.grid-form .form-group-2 select option {
  color: #333;
}

/* Ẩn label khi select đã có value (để label đóng vai placeholder custom) */
.grid-form .form-group-2.has-value label {
  opacity: 0;
}

.grid-form .form-group label span,
.grid-form .form-group-2 label span {
  color: #e60041;
}

.grid-form .form-group input:not(:placeholder-shown) + label,
.grid-form .form-group-2 input:not(:placeholder-shown) + label {
  opacity: 0;
}

.grid-form .full-row {
  grid-column: 1 / -1;
}

textarea:focus {
  outline: none;
  outline-offset: 0;
  box-shadow: none;
}

/* Native select trong form địa chỉ - luôn hiện icon mũi tên ở cuối */
.grid-form .form-group-2 select {
  background-color: white;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23826B63' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  border: 1px solid #e9c4b3;
  border-radius: 8px;
  min-height: 38px;
  padding: 6px 36px 6px 12px;
  font-size: 14px;
  color: #826b63;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.grid-form .form-group-2 select:focus {
  border-color: #e9c4b3;
  outline: none;
}

.grid-form .form-group-2 select:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
  opacity: 1;
}

.mobile-action-buttons {
  display: flex;
  gap: 10px;
  width: 100%;
}

.mobile-action-buttons .order-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-action-buttons .mobile-prev-btn {
  flex: 1;
  background: white;
  border: 1px solid #f03e66;
  box-shadow: 0px 10px 15px 0px rgba(252, 206, 232, 0.5),
    0px 4px 6px 0px rgba(252, 206, 232, 0.5);
  padding: 10px;
}

.mobile-action-buttons .mobile-prev-btn span {
  color: #e9335d;
  font-weight: 700;
  font-size: 16px;
}

.mobile-action-buttons .mobile-prev-btn img {
  width: 17px;
  height: 17px;
}

.mobile-action-buttons .mobile-order-btn {
  flex: 1;
  background: linear-gradient(180deg, #e8315b 0%, #ff5a7c 100%);
  box-shadow: 0px 10px 15px 0px rgba(252, 206, 232, 0.5),
    0px 4px 6px 0px rgba(252, 206, 232, 0.5);
  padding: 10px;
}

.mobile-action-buttons .mobile-order-btn span {
  color: white;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
}

.mobile-action-buttons .mobile-order-btn img {
  width: 17px;
  height: 17px;
}

.order-btn img {
  display: inline-block;
}

.summary-section .summary-section-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.summary-section .summary-section-info .product-mobile {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.into-money strong {
  font-size: 16px !important;
}

.checkout-page .summary-section .product-content-init p,
.checkout-page .summary-section .product-content-light p {
  font-size: clamp(1.2rem, 1.4vw, 1.6rem) !important;
}

/* Responsive */
@media screen and (max-width: 1440px) {
  .checkout-page .summary-section .product-content-init p,
  .checkout-page .summary-section .product-content-light p {
    font-size: 14px !important;
  }
}

@media screen and (max-width: 1024px) {
  .banner-promo-img {
    object-fit: contain;
  }

  .checkout-page .summary-section .quantity-control .quantity-btn {
    width: 25px !important;
    height: 25px !important;
  }

  .checkout-page .form-section textarea {
    max-height: 100px !important;
  }

  .checkout-page {
    padding: 28px 30px !important;
  }

  .summary-section .summary-section-info .product-mobile {
    gap: 0px !important;
  }

  /* Header adjustments */
  .header-logo {
    padding-left: 40px;
  }

  .header-logo img {
    height: 20px;
    width: 130px;
  }

  .header-banner-preorder {
    gap: 16px;
  }

  .header-banner-preorder img {
    height: 90px;
  }

  /* Banner section */
  .banner-promo-section {
    padding: 0 40px 0;
    gap: 16px;
  }

  .banner-promo-item.banner-countdown {
    height: 120px;
  }

  .banner-promo-item.banner-limited {
    height: 120px;
  }

  /* Checkout page */
  .checkout-page {
    padding: 20px 40px !important;
    gap: 16px;
  }

  /* Form section */
  .checkout-page .form-section {
    padding: 20px;
  }

  .form-section-title {
    font-size: 18px;
    margin-bottom: 14px;
  }

  .grid-form {
    column-gap: 8px;
    row-gap: 8px;
  }

  .checkout-page .form-section input,
  .checkout-page .form-section textarea {
    font-size: 13px;
  }

  /* Promo info section */
  .promo-info-container {
    padding-right: 10px;
  }

  .promo-gift-absolute {
    left: -8px;
    top: -65px;
    width: 200px;
    height: 230px;
  }

  .promo-info-right {
    max-width: 420px;
  }

  .promo-25-chai {
    width: 195px;
    height: 90px;
  }

  .promo-01-don {
    width: 230px;
    height: 90px;
  }

  .promo-divider {
    height: 100px;
    padding: 8px;
  }

  .promo-divider-line {
    width: 100px;
    height: 2px;
  }

  .promo-info-bottom-row {
    height: 40px;
  }

  /* Summary section */
  .info .checkout-page .summary-section {
    padding: 20px;
    width: 100%;
  }

  .summary-product-title {
    font-size: 20px;
  }

  .summary-product-image {
    width: 110px;
    height: 48px;
  }

  .summary-price-label {
    font-size: 13px;
  }

  .summary-price-value {
    font-size: 15px;
  }

  .summary-gift-box {
    padding: 8px;
  }

  .summary-gift-image {
    width: 65px;
    height: 65px;
  }

  .summary-gift-image img {
    width: 85px;
    height: 95px;
  }

  .summary-gift-label {
    font-size: 13px;
  }

  .summary-remaining-box {
    width: 95px;
  }

  .summary-remaining-number {
    font-size: 18px;
  }

  .summary-total-label,
  .summary-total-price {
    font-size: 17px;
  }

  .summary-delivery-content {
    padding: 6px 16px;
  }

  .summary-delivery-icon {
    width: 40px;
    height: 40px;
  }

  .summary-delivery-label {
    font-size: 14px;
  }

  .summary-delivery-date {
    font-size: 16px;
  }

  .summary-terms p {
    font-size: 13px;
  }

  .summary-order-button .order-btn {
    min-height: 44px;
    padding: 14px 18px;
  }

  .summary-order-button .order-btn .order-now-text {
    font-size: 16px;
  }
}

@media screen and (max-width: 768px) {
  .recaptcha-mobile-hide {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
  }

  #form-order {
    overflow-y: auto;
    background-image: url("/static/images/order/bg-mobile.png") !important;
    background-position: center !important;
    border-radius: 12px;
  }

  .form-order-header {
    display: none !important;
  }

  .banner-promo-section {
    display: none !important;
  }

  .banner-promo-section-mobile {
    display: block !important;
  }

  .form-order-header-mb {
    display: flex !important;
  }

  .info {
    height: auto !important;
    padding: 0 10px 0 10px !important;
  }

  .checkout-page .summary-section {
    grid-column: 1 / 3;
  }

  .checkout-page .form-section {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 16px rgba(137, 94, 0, 0.1);
    padding: 10px;
    border-radius: 20px;
    max-height: 100% !important;
  }

  .form-section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #e60041;
  }

  .left-column {
    gap: 10px;
  }

  .grid-form {
    grid-template-columns: 1fr 1fr;
    grid-gap: 10px;
  }

  /* Họ tên và SĐT: mỗi field chiếm 1 cột */
  .grid-form .form-group:nth-child(1),
  .grid-form .form-group:nth-child(2) {
    grid-column: span 1 !important;
  }

  /* Tỉnh/TP và Quận/Huyện: mỗi field chiếm 1 cột */
  .grid-form .form-group-2:nth-child(3),
  .grid-form .form-group-2:nth-child(4) {
    grid-column: span 1 !important;
  }

  /* Phường/xã: chiếm full width */
  .grid-form .form-group-ward {
    grid-column: span 2 !important;
  }

  /* Địa chỉ: chiếm full width */
  .grid-form .form-group-address {
    grid-column: span 2 !important;
  }

  /* Textarea ghi chú: chiếm full width */
  .grid-form textarea.full-row {
    grid-column: span 2 !important;
  }

  .grid-form select,
  .grid-form .form-group input,
  .grid-form textarea {
    border: 1px solid white;
    background: white;
    border-radius: 8px;
    height: 38px !important;
    font-size: 14px !important;
    padding: 8px 12px !important;
    color: #4a5565;
  }

  .grid-form select:disabled,
  .grid-form .form-group input:disabled,
  .grid-form textarea:disabled {
    border: 1px solid #f1cfcf;
    background-color: #f5f5f5;
    opacity: 0.6;
  }

  .grid-form textarea {
    min-height: 80px !important;
    height: auto !important;
    resize: none;
  }

  .grid-form .form-group input::placeholder,
  .grid-form textarea::placeholder {
    color: #4a5565;
  }

  .mobile-next-order {
    display: block !important;
  }

  .mobile-next-btn {
    width: 100%;
    min-height: 41px;
    border-radius: 50px;
    background: linear-gradient(180deg, #e8315b 0%, #ff5a7c 100%);
    box-shadow: 0 10px 15px -3px rgba(252, 206, 232, 0.5),
      0 4px 6px -4px rgba(252, 206, 232, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    color: white;
    font-weight: 700;
    font-size: 16px;
  }

  .no-mobile {
    display: none !important;
  }

  .no-mobile-time {
    background: none !important;
    border: 1px dashed #e60041;
    padding: 5px !important;
    display: flex !important;
    align-items: center !important;
  }

  .checkout-page {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Desktop promo info - hide on mobile */
  .promo-info-desktop {
    display: none !important;
  }

  /* Mobile Screen 1: Summary view (default) - show summary and promo banners */
  .checkout-page .summary-section {
    display: block;
    order: 1;
  }

  .checkout-page .left-column {
    display: none !important;
    order: 2;
  }

  .checkout-page .mobile-screen-1 {
    display: block !important;
    order: 3;
    width: 100%;
  }

  /* Mobile Screen 2: Form view (when "Tiếp theo" clicked) */
  .checkout-page.show-form .summary-section {
    display: none !important;
  }

  .checkout-page.show-form .left-column {
    display: flex !important;
    order: 1;
  }

  .checkout-page.show-form .mobile-screen-1 {
    display: none !important;
  }

  .checkout-page.show-form .mobile-address-banner {
    display: flex !important;
    order: 2;
  }

  /* When back button clicked - return to Screen 1 */
  .checkout-page.show-summary .left-column {
    display: none !important;
  }

  .checkout-page.show-summary .summary-section {
    display: block !important;
    order: 1;
  }

  .checkout-page.show-summary .mobile-screen-1 {
    display: block !important;
    order: 3;
  }

  .checkout-page.show-summary .mobile-address-banner {
    display: none !important;
  }

  .summary-section .summary-section-info {
    gap: 10px !important;
  }

  .checkout-page .summary-section {
    background: rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 0 16px rgba(137, 94, 0, 0.1) !important;
    border-radius: 20px !important;
    padding: 10px !important;
  }

  /* Mobile Promo Banners (Screen 1) - Layout ngang */
  .mobile-promo-banners {
    display: flex;
    flex-direction: row;
    gap: 0;
    padding: 10px 10px;
    align-items: center;
    position: relative;
    width: 100%;
  }

  .mobile-promo-gift {
    width: 50%;
    height: 100%;
    text-align: center;
  }

  .mobile-promo-gift img {
    width: 170px;
    height: auto;
    object-fit: contain;
  }

  .mobile-promo-rules {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 50%;
  }

  .mobile-promo-rule img {
    width: 100%;
    height: 60px;
    object-fit: contain;
    display: block;
  }

  .mobile-promo-divider {
    width: 100%;
    height: 3px;
    background: white;
    margin: 0;
  }

  /* Mobile Address Banner (Screen 2) */
  .mobile-address-banner {
    width: 100%;
    display: none;
    justify-content: center;
  }

  .mobile-address-banner img {
    width: 100%;
    max-width: 388px;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
  }

  .checkout-page .banner-section {
    display: none;
  }

  /* Hide desktop order button on mobile Screen 1 */
  .summary-order-button {
    display: none !important;
  }

  /* Show mobile action buttons only on Screen 2 */
  .mobile-action-buttons {
    display: none !important;
  }

  .checkout-page.show-form .mobile-action-buttons {
    display: flex !important;
  }

  /* Show mobile terms only on Screen 2 */
  .mobile-terms {
    display: none !important;
  }

  .checkout-page.show-form .mobile-terms {
    display: block !important;
  }

  .summary-section .summary-section-info .info2-mobile {
    justify-content: space-between;
    background: white;
    border-radius: 12px;
    padding: 10px !important;
  }

  .info2-mobile .info2-left {
    flex-direction: column;
    width: 40% !important;
    gap: 0 !important;
    align-items: center !important;
  }

  .info2-mobile .product-quantity {
    align-items: flex-end !important;
    width: 60% !important;
  }

  .info2-mobile .info2-left .product-item-init .product-item,
  .product-item-light .product-item {
    background: #fff5f0 !important;
    border-radius: 8px !important;
    padding: 0 10px !important;
    height: auto !important;
    width: auto !important;
  }

  .info2-mobile .info2-left .product-item-init .product-item .pro-desktop,
  .product-item-light .product-item .pro-desktop {
    display: none !important;
  }

  .info2-mobile .info2-left .product-item-init .product-item .pro-mobile,
  .product-item-light .product-item .pro-mobile {
    display: block !important;
  }

  .mobile-banner {
    display: grid !important;
    grid-template-columns: 1.5fr 2fr;
  }

  .mobile-terms {
    display: block !important;
    padding: 8px 0 10px !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    text-align: left !important;
    color: #000000 !important;
  }

  .mobile-terms a {
    color: #e60041 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
  }

  .mobile-action-buttons {
    display: flex !important;
    padding-top: 8px !important;
  }

  .grid-form .form-group-2 select {
    min-height: 38px !important;
    padding: 8px 36px 8px 12px !important;
    font-size: 14px !important;
    border: 1px solid white !important;
    background-color: white !important;
    background-position: right 12px center !important;
    color: #4a5565;
  }

  .grid-form .form-group label,
  .grid-form .form-group-2 label {
    font-size: 14px;
    color: #4a5565;
  }

  /* Promo info section mobile */
  .promo-info-section {
    margin-top: 10px;
  }

  .promo-info-container {
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    min-height: auto;
    gap: 10px;
  }

  .promo-gift-absolute {
    position: relative;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
  }

  .promo-gift-absolute img {
    width: 200px;
    height: auto;
    max-width: 100%;
  }

  .promo-info-right {
    max-width: 100%;
    gap: 10px;
  }

  .promo-info-top-row {
    flex-direction: column;
    gap: 10px;
    padding-top: 0;
  }

  .promo-25-chai,
  .promo-01-don {
    width: 100%;
    height: 60px;
  }

  .promo-divider {
    display: none;
  }

  .promo-info-bottom-row {
    height: auto;
    min-height: 40px;
  }

  .promo-info-bottom-row img {
    object-fit: contain;
  }

  /* Mobile styles for new summary design */
  .summary-progress-bar {
    display: none;
  }

  .summary-product-header {
    background: transparent;
    border-radius: 0;
    padding: 0;
  }

  .summary-product-title {
    font-size: 16px;
    line-height: 22px;
  }

  .summary-product-details {
    flex-direction: row;
    justify-content: space-between;
    gap: 12px;
  }

  .summary-product-left {
    flex-direction: row;
    align-items: center;
    width: auto;
  }

  .summary-product-image {
    width: 123px;
    height: 54px;
    background: transparent;
    padding: 0;
    border-radius: 8px;
  }

  .summary-price-label {
    font-size: 14px;
  }

  .summary-price-value {
    font-size: 16px;
  }

  .summary-product-right {
    width: auto;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
  }

  .summary-product-right .quantity-control {
    height: 30px;
  }

  .summary-product-right .qty-label {
    font-size: 12px;
  }

  .summary-dual-section {
    flex-direction: row;
    gap: 6px;
  }

  .summary-remaining-box {
    width: 100px;
    flex-shrink: 0;
  }

  .summary-gift-box {
    flex: 1;
    padding: 10px;
  }

  .summary-gift-image {
    width: 70px;
    height: 70px;
  }

  .summary-gift-image img {
    width: 89px;
    height: 100px;
  }

  .summary-gift-label {
    font-size: 12px;
  }

  .summary-delivery-section {
    background: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 10px;
  }

  .summary-delivery-content {
    justify-self: center;
  }

  .summary-delivery-icon {
    width: 40px;
    height: 40px;
  }

  .summary-delivery-label {
    font-size: 12px;
  }

  .summary-delivery-date {
    font-size: 16px;
    font-weight: 800;
    padding: 2px 20px;
  }

  .summary-total-section {
    background: transparent;
    border-radius: 0;
    padding-top: 6px;
    border-top: 1.5px solid #e60052;
    margin-bottom: 0;
  }

  .summary-total-label {
    font-size: 18px;
  }

  .summary-total-price {
    font-size: 18px;
  }

  /* Success Popup Mobile */
  .success-popup-overlay {
    padding: 10px;
  }

  .success-popup-dialog {
    max-width: 440px;
  }

  .success-popup-header {
    padding: 15px 10px 0;
  }

  .success-popup-character img {
    width: 100px;
    height: 100px;
  }

  .success-popup-title {
    font-size: 16px;
    padding: 0 15px;
  }

  .delivery-label,
  .delivery-date {
    font-size: 14px;
  }

  .success-popup-subtitle {
    font-size: 13px;
    padding: 0 15px;
  }

  .success-order-card {
    padding: 8px;
    gap: 10px;
  }

  .order-icon {
    width: 32px;
    height: 32px;
  }

  .order-icon svg {
    width: 18px;
    height: 18px;
  }

  .order-id-label {
    font-size: 12px;
  }

  .order-id-value {
    font-size: 14px;
  }

  .detail-row {
    font-size: 12px;
    gap: 8px;
  }

  .gift-badge-text {
    font-size: 12px;
  }

  /* Error Popup Mobile */
  .error-popup-dialog {
    max-width: 100%;
  }

  .error-icon-container {
    width: 56px;
    height: 56px;
  }

  .error-icon-img {
    width: 56px;
    height: 56px;
  }

  .error-popup-title {
    font-size: 16px;
  }

  .error-popup-message {
    font-size: 13px;
  }

  .error-popup-btn {
    height: 44px;
    font-size: 14px;
  }
}

@media (max-width: 425px) {
  /* Mobile button text size */
  .mobile-action-buttons .mobile-prev-btn span,
  .mobile-action-buttons .mobile-order-btn span {
    font-size: 14px;
  }

  .mobile-next-order .order-btn span,
  .mobile-action-buttons .mobile-prev-btn span {
    font-size: 16px;
  }
  .mb-w-100 {
    width: 100%;
  }

  .banner-mobile-wrapper {
    padding: 0 10px;
  }

  .banner-mobile-limited {
    max-width: 290px;
    height: 70px;
  }

  .summary-product-details {
    flex-direction: row;
    gap: 10px;
  }

  .summary-product-left {
    width: auto;
  }

  .summary-product-right {
    width: auto;
    align-items: flex-end;
  }

  .summary-product-image {
    width: 100px;
    height: 45px;
  }
}

@media (max-width: 367px) {
  .header-mb-logo img {
    height: 16px;
  }

  .header-mb-title img {
    max-width: 280px;
  }

  .form-section-title {
    font-size: 14px;
  }

  .banner-mobile-limited {
    max-width: 270px;
    height: 65px;
  }

  .summary-product-title {
    font-size: 14px;
  }

  .summary-total-label,
  .summary-total-price {
    font-size: 16px;
  }

  .checkout-page.show-form .mobile-action-buttons {
    flex-direction: column-reverse;
  }
}
