/* Checkout & cart flow — safe-area fallbacks if styles.css is absent */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --touch-min: 44px;
}

/* Checkout & cart flow */
.checkout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px clamp(16px, 4vw, 24px);
  padding-top: max(16px, var(--safe-top));
  padding-left: max(clamp(16px, 4vw, 24px), var(--safe-left));
  padding-right: max(clamp(16px, 4vw, 24px), var(--safe-right));
  background: var(--color-primary);
  color: #fff;
}

.checkout-header .logo {
  flex-shrink: 1;
  min-width: 0;
}

.checkout-header__secure {
  font-size: 13px;
  opacity: .9;
}

.checkout-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 32px) clamp(16px, 4vw, 24px) clamp(48px, 8vw, 64px);
  padding-bottom: max(clamp(48px, 8vw, 64px), var(--safe-bottom));
}

.checkout-wrap--flow {
  max-width: 1180px;
}

.checkout-wrap--billing {
  max-width: 1280px;
}

.checkout-title {
  font-family: var(--font-display);
  font-size: 2rem;
  text-align: center;
  margin-bottom: 32px;
}

.checkout-steps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  font-size: 14px;
  font-weight: 600;
}

.checkout-step {
  color: var(--color-text-muted);
}

.checkout-step--active {
  color: var(--color-text);
}

.checkout-step--done {
  color: var(--color-green);
}

.checkout-step__num {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-bg-gray);
  font-size: 12px;
  margin-right: 4px;
}

.checkout-step--active .checkout-step__num {
  background: var(--color-primary);
  color: #fff;
}

.checkout-step__sep {
  color: var(--color-border);
  margin: 0 4px;
}

.checkout-secure {
  margin-left: auto;
  font-size: 13px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.cart-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  padding: 0;
}

.cart-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
  background: #fff;
}

.cart-col-product { width: 48%; }
.cart-col-delivery { width: 16%; }
.cart-col-card { width: 20%; }
.cart-col-price { width: 16%; }

.cart-main {
  width: 100%;
}

.cart-table th,
.cart-table td {
  padding: 20px 16px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.cart-table th {
  font-weight: 600;
  background: #fff;
  color: #111;
  white-space: nowrap;
}

.cart-table__product {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  min-width: 0;
}

.cart-table__product img {
  width: 150px;
  height: 170px;
  flex-shrink: 0;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.cart-table__product strong,
.cart-delivery strong,
.cart-card strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.cart-table__product strong {
  font-size: 16px;
  line-height: 1.35;
}

.cart-sku,
.cart-item-options {
  display: block;
  margin-top: 6px;
  color: var(--color-text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.cart-delivery,
.cart-card,
.cart-price {
  min-width: 0;
}

.cart-edit-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
}

.cart-edit-link:hover {
  text-decoration: underline;
}

.cart-delivery p,
.cart-card p {
  margin: 0 0 12px;
  line-height: 1.35;
}

.cart-delivery__date {
  white-space: nowrap;
}

.cart-card__none {
  margin-bottom: 6px !important;
}

.cart-price__name {
  display: block;
  margin-bottom: 8px;
  line-height: 1.4;
}

.cart-price__amounts {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.cart-price__amounts s {
  color: var(--color-text-muted);
  font-size: 13px;
}

.cart-price__amounts strong {
  font-weight: 500;
}

.cart-summary {
  background: var(--color-bg-gray);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  width: min(100%, 380px);
  justify-self: end;
}

.cart-summary h3 {
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--color-border);
}

.summary-line--discount span:last-child,
.summary-line--promo span:last-child {
  color: var(--color-green);
}

.summary-line--subtotal {
  font-weight: 600;
  border-top: 1px solid var(--color-border);
  margin-top: 4px;
  padding-top: 12px;
}

.summary-line--total {
  font-size: 15px;
  font-weight: 700;
  border-bottom: none;
}

.summary-promo-note {
  margin: 0 0 8px;
  padding: 0 0 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

.summary-promo-note--compact {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--color-border);
  border-bottom: none;
}

.cart-summary__promo {
  margin: -4px 0 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
  background: rgba(34, 139, 34, 0.08);
  border: 1px solid rgba(34, 139, 34, 0.2);
}

.checkout-preview__totals {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.checkout-preview__totals .summary-line {
  padding: 6px 0;
  font-size: 13px;
}

.checkout-preview__totals .summary-line--total {
  font-size: 14px;
}

.summary-line--extra {
  padding-left: 14px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.summary-line--extra span:first-child::before {
  content: "+ ";
  color: var(--color-text-muted);
}

.pdp-price-summary__row--extra {
  color: var(--color-text-muted);
  font-size: 13px;
}

.pdp-price-summary__row--extra strong {
  color: var(--color-text);
  font-weight: 600;
}

.checkout-complete__opts {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.summary-line--total {
  border: none;
  font-size: 1.1rem;
  padding-top: 16px;
}

.btn--checkout {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 16px 24px;
  min-height: var(--touch-min, 44px);
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background .2s;
  touch-action: manipulation;
}

.btn--checkout:hover {
  background: #333;
  color: #fff;
}

.pdp-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.pdp-actions .btn--checkout {
  margin-top: 0;
}

.pdp-btn--secondary {
  width: 100%;
  min-height: var(--touch-min, 44px);
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--color-text);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  touch-action: manipulation;
}

.pdp-btn--secondary:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.pdp-btn--secondary:disabled {
  opacity: 0.85;
  cursor: default;
}

.pdp-added-msg {
  margin-top: 12px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
  background: var(--color-green-light, #d8f3dc);
  border: 1px solid rgba(45, 106, 79, 0.25);
  border-radius: var(--radius);
  color: var(--color-green, #2d6a4f);
  text-align: center;
}

.pdp-added-msg a {
  color: var(--color-primary);
  font-weight: 600;
}

.btn--full { width: 100%; }

.checkout-note {
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 12px;
}

.checkout-flow {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.checkout-preview {
  position: sticky;
  top: 16px;
  min-width: 0;
  max-width: 300px;
  padding-right: 4px;
}

.checkout-flow--billing .checkout-preview {
  max-width: none;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 24px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.checkout-flow--billing .checkout-preview__items {
  max-height: min(42vh, 340px);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
  margin-bottom: 4px;
}

.checkout-preview__count {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.checkout-preview__items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.checkout-preview__item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  min-width: 0;
}

.checkout-preview__item img {
  width: 72px;
  height: 84px;
  flex-shrink: 0;
  border-radius: var(--radius);
  object-fit: contain;
  background: #fff;
}

.checkout-preview__copy {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.checkout-preview__name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.checkout-preview__price {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
}

.checkout-preview .cart-item-options,
.checkout-preview__options {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.checkout-preview__edit {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.checkout-preview__edit:hover {
  text-decoration: underline;
}

.checkout-form-col,
.checkout-billing-col {
  min-width: 0;
  position: relative;
  z-index: 1;
  background: #fff;
}

.checkout-guest-bar {
  margin: 0 0 20px;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fafafa;
  font-size: 14px;
}

.checkout-guest-bar--member {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.checkout-guest-bar a {
  color: var(--color-primary);
  font-weight: 600;
}

.review-intro {
  margin: -12px 0 20px;
  font-size: 14px;
  color: var(--color-text-muted);
}

.review-intro a {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
}

.review-block__products {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.review-product {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.review-product__copy {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.review-product .cart-item-options {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.review-product__copy strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
  margin-bottom: 4px;
}

.review-product__sku {
  display: block;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.review-product__price {
  display: block;
  margin-top: 8px;
  font-weight: 600;
}

.review-block__delivery {
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.6;
}

.review-block__body--billing {
  display: block;
}

.checkout-billing-col {
  display: contents;
}

.checkout-form-col {
  display: grid;
  gap: 0;
}

.checkout-form h2 {
  font-size: 1.1rem;
  margin: 24px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-primary-light);
}

.checkout-form h2:first-child { margin-top: 0; }

.checkout-form label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}

.checkout-form input:not([type="checkbox"]):not([type="radio"]),
.checkout-form select,
.checkout-form textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 12px;
  min-height: var(--touch-min, 44px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

.checkout-form select {
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center;
  padding-right: 36px;
  min-width: 0;
  max-width: 100%;
}

.checkout-form textarea {
  min-height: 120px;
  line-height: 1.5;
  resize: vertical;
}

.checkout-form input[type="date"] {
  -webkit-appearance: auto;
  appearance: auto;
}

.delivery-date-section {
  margin-bottom: 20px;
}

.delivery-field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
}

.delivery-date-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.delivery-date-chip {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 14px;
  min-height: var(--touch-min, 44px);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.delivery-date-chip:hover {
  border-color: var(--color-primary);
}

.delivery-date-chip.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.delivery-date-picker {
  position: relative;
}

.delivery-date-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.delivery-date-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  min-height: var(--touch-min, 44px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.delivery-date-open:hover,
.delivery-date-open:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(95, 87, 174, 0.15);
  outline: none;
}

.delivery-date-open__icon {
  flex-shrink: 0;
  color: var(--color-primary);
  display: flex;
  align-items: center;
}

.delivery-time-hint {
  margin-top: 8px;
  line-height: 1.55;
}

.card-message-section {
  margin: 8px 0 24px;
  padding-top: 8px;
}

.card-message-section .card-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-primary-light);
}

.card-message-section .card-section-head h2 {
  margin: 0;
  padding: 0;
  border: none;
}

.optional-badge,
.label-note {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.card-toggle {
  margin-bottom: 16px !important;
}

.card-message-fields.is-disabled {
  display: none;
}

.card-message-fields .field-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: -8px 0 16px;
  text-align: right;
}

#card-suggest-btn {
  margin-bottom: 8px;
  font-size: 13px;
}

.delivery-time-section {
  margin: 8px 0 24px;
}

.delivery-time-toggle {
  margin-bottom: 12px !important;
}

.delivery-time-fields.is-disabled,
.delivery-time-default.is-disabled {
  display: none;
}

.delivery-time-default {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.delivery-time-fields .field-hint {
  margin-top: -8px;
}

.review-card--none {
  color: var(--color-text-muted);
  font-style: italic;
}

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

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

.checkbox, .radio {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400 !important;
  font-size: 14px;
  line-height: 1.45;
  cursor: pointer;
  margin-bottom: 16px !important;
}

.checkbox input,
.radio input {
  -webkit-appearance: checkbox;
  appearance: auto;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  padding: 0;
  border: none;
  border-radius: 0;
  display: inline-block;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--color-primary);
}

.radio input {
  -webkit-appearance: radio;
  border-radius: 50%;
}

.pdp-options .checkbox input,
.pdp-options .radio input {
  width: 18px;
  height: 18px;
  min-height: 18px;
}

.fieldset {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.fieldset legend {
  font-weight: 600;
  font-size: 14px;
  padding: 0 8px;
}

.checkout-flow--billing {
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 40px);
}

.checkout-billing-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 2.5vw, 28px);
  align-items: stretch;
  min-width: 0;
}

.checkout-billing-main .checkout-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.checkout-form--billing,
.checkout-form--payment {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.checkout-form--billing .form-row {
  margin-bottom: 0;
}

.checkout-form--billing .form-row label,
.checkout-form--billing > label {
  margin-bottom: 14px;
}

.checkout-form--payment > label:not(.checkbox) {
  margin-bottom: 14px;
}

.checkout-form--payment .checkbox {
  margin-top: 4px;
  margin-bottom: 16px;
}

.checkout-form--payment .btn--checkout-review {
  margin-top: auto;
}

.checkout-flow--billing .checkout-panel {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.checkout-form--billing h2,
.checkout-form--payment h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.checkout-panel {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 24px);
}

.checkout-payment-col {
  position: sticky;
  top: 16px;
  align-self: start;
}

.checkout-form-divider {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 20px 0 16px;
}

.express-checkout-section {
  margin-top: 4px;
}

.express-checkout-toggle {
  font-weight: 600 !important;
  margin-bottom: 8px !important;
}

.express-checkout-lead {
  margin: 0 0 14px;
}

.express-checkout-fields.is-disabled {
  display: none;
}

.checkout-account-error {
  margin: 4px 0 0;
  font-size: 13px;
  color: #b42318;
}

.btn--checkout-review {
  width: 100%;
  margin-top: 8px;
}

.payment-cards {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.payment-cards__icon {
  display: block;
  width: 56px;
  height: 36px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 5px;
  vertical-align: middle;
  opacity: 1;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.payment-cards__icon--active {
  transform: scale(1.06);
  box-shadow: 0 0 0 2px var(--accent, #c41e5a);
}

.payment-cards__icon--dim {
  opacity: 0.35;
}

.payment-field-error {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: #b42318;
}

.payment-input--invalid,
.checkout-form--payment input.payment-input--invalid,
.checkout-form--payment select.payment-input--invalid {
  border-color: #f04438;
  box-shadow: 0 0 0 1px rgba(240, 68, 56, 0.15);
}

.payment-form__expiry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(84px, 104px);
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}

.payment-form__expiry > label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 0 !important;
  min-width: 0;
  min-height: 0;
}

.payment-form__expiry input,
.payment-form__expiry select {
  margin-top: 0;
  width: 100%;
  min-height: var(--touch-min, 44px);
}

.payment-form__exp-field {
  min-width: 0;
}

.payment-form__exp-field--year select {
  font-variant-numeric: tabular-nums;
}

.payment-form__cvv input {
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.checkout-form--payment {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.checkout-done-title {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 24px;
}

.review-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.review-block {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  background: #fff;
}

.review-block__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.review-block__head h2 {
  font-size: 1.1rem;
}

.review-block__head a {
  font-size: 13px;
  color: var(--color-primary);
}

.review-block__body {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.6;
}

.review-note {
  margin-top: 8px;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.review-img {
  width: 80px;
  height: 93px;
  flex-shrink: 0;
  border-radius: var(--radius);
  object-fit: contain;
  object-position: center;
  background: var(--color-bg-gray);
}

.review-card {
  margin-top: 12px;
  padding: 12px;
  background: var(--color-bg-gray);
  border-radius: var(--radius);
}

.review-card-pay {
  font-weight: 600;
  margin-top: 12px;
}

.review-total-big {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-green);
  margin-top: 8px;
}

.review-totals {
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
}

.trust-badges {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.checkout-terms {
  font-size: 11px;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 8px;
}

.checkout-complete {
  text-align: center;
  padding: 64px 24px;
}

.checkout-complete h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.checkout-complete .btn {
  margin: 8px;
}

.checkout-complete__items {
  list-style: none;
  margin: 16px auto;
  padding: 0;
  max-width: 520px;
  text-align: left;
  font-size: 14px;
  line-height: 1.6;
}

.checkout-complete__items li {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
}

.checkout-complete__total {
  font-size: 1.1rem;
  margin: 16px 0;
}

body.threeds-open {
  overflow: hidden;
  touch-action: none;
}

.threeds-overlay {
  --3ds-accent: #1434cb;
  --3ds-accent-dark: #0a2266;
  --3ds-header: linear-gradient(135deg, #071d52 0%, #1434cb 100%);
  --3ds-progress: linear-gradient(90deg, #1434cb, #5b7cfa);
  --3ds-surface: #f4f7ff;
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 32px);
  background: rgba(8, 15, 30, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-sizing: border-box;
}

.threeds-overlay--redirect {
  padding: 0;
  align-items: stretch;
  background: #e8edf4;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: threeds-redirect-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.threeds-overlay--redirect.threeds-overlay--leaving {
  animation: threeds-redirect-out 0.45s ease forwards;
}

@keyframes threeds-redirect-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes threeds-redirect-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* —— Redirect interstitial —— */
.threeds-redirect {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #e8edf4 0%, #f4f6f9 40%, #eef2f7 100%);
}

.threeds-redirect__top {
  background: #fff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.threeds-redirect__top-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.threeds-redirect__top-inner .threeds-icon {
  color: var(--3ds-accent);
}

.threeds-redirect__top-sep {
  color: #94a3b8;
  font-weight: 400;
}

.threeds-redirect__top-muted {
  font-weight: 500;
  color: #64748b;
}

.threeds-redirect__main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 6vw, 48px) 20px;
}

.threeds-redirect__panel {
  width: min(100%, 440px);
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.04),
    0 24px 48px rgba(15, 23, 42, 0.08);
  padding: clamp(24px, 5vw, 32px);
  text-align: center;
}

.threeds-redirect__brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 28px;
  text-align: left;
  background: var(--3ds-surface);
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.threeds-redirect__brand-mark {
  flex-shrink: 0;
  width: 52px;
  height: 34px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.threeds-redirect__brand-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.threeds-redirect__program {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--3ds-accent);
}

.threeds-redirect__issuer {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  line-height: 1.35;
}

.threeds-redirect__merchant {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.threeds-redirect__status-block {
  margin-bottom: 24px;
}

.threeds-redirect__title {
  margin: 20px 0 10px;
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(1.25rem, 3.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.threeds-redirect__status {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: #475569;
  min-height: 2.8em;
}

.threeds-redirect__progress {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-bottom: 24px;
}

.threeds-redirect__progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--3ds-progress);
}

.threeds-redirect__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  text-align: left;
}

.threeds-redirect__meta-item {
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.threeds-redirect__meta-item dt {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.threeds-redirect__meta-item dd {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.threeds-redirect__note {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
}

/* —— OTP modal —— */
.threeds-modal {
  width: min(100%, 400px);
  max-width: 400px;
  flex: 0 1 auto;
  align-self: center;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.08),
    0 32px 64px rgba(0, 0, 0, 0.2);
  animation: threeds-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes threeds-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.threeds-modal__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--3ds-header);
  color: #fff;
}

.threeds-modal__brand-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 38px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.threeds-modal__brand-mark {
  width: 46px;
  height: 28px;
  object-fit: contain;
}

.threeds-modal__header-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.threeds-modal__program {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.threeds-modal__issuer {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.88;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.threeds-modal__header .threeds-icon--shield {
  flex-shrink: 0;
  opacity: 0.85;
}

.threeds-modal__summary {
  display: grid;
  gap: 0;
  background: var(--3ds-surface);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.threeds-modal__summary-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  border-top: 1px solid rgba(15, 23, 42, 0.05);
}

.threeds-modal__summary-item:first-child {
  border-top: none;
}

.threeds-modal__summary-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.threeds-modal__summary-value {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  text-align: right;
}

.threeds-modal__summary-item--amount .threeds-modal__summary-value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--3ds-accent-dark);
}

.threeds-modal__body {
  padding: 20px 20px 12px;
}

.threeds-modal__title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.threeds-modal__hint {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
}

.threeds-modal__body.is-verifying .threeds-modal__title,
.threeds-modal__body.is-verifying .threeds-modal__hint {
  display: none;
}

.threeds-modal__stage {
  position: relative;
  min-height: 0;
}

.threeds-modal__stage > [hidden] {
  display: none !important;
}

#threeds-form.is-verifying .threeds-modal__form-fields {
  display: none !important;
}

#threeds-form.is-verifying .threeds-modal__verifying {
  display: flex !important;
}

#threeds-form:not(.is-verifying) .threeds-modal__verifying {
  display: none !important;
}

.threeds-modal__label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #334155;
  margin-bottom: 8px;
}

.threeds-modal__input {
  width: 100%;
  max-width: 280px;
  margin: 0 auto 12px;
  display: block;
  padding: 12px 14px;
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-align: center;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.threeds-modal__input::placeholder {
  letter-spacing: 0.2em;
  color: #cbd5e1;
  font-weight: 500;
}

.threeds-modal__input:focus {
  outline: none;
  border-color: var(--3ds-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--3ds-accent) 18%, transparent);
}

.threeds-modal__resend-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.threeds-modal__resend {
  background: none;
  border: none;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--3ds-accent);
  cursor: pointer;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.threeds-modal__resend:hover:not(:disabled) {
  background: color-mix(in srgb, var(--3ds-accent) 10%, transparent);
}

.threeds-modal__resend:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.threeds-modal__resend-msg {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
  color: #475569;
  background: #f1f5f9;
  width: 100%;
  box-sizing: border-box;
}

.threeds-modal__resend-msg--success {
  color: #166534;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
}

.threeds-modal__error {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.45;
}

.threeds-modal__verifying {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 12px 28px;
  min-height: 0;
  box-sizing: border-box;
}

.threeds-modal__verifying-title {
  margin: 14px 0 4px;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.threeds-modal__verifying-sub {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  max-width: 260px;
  line-height: 1.45;
}

.threeds-modal__verify-progress {
  width: min(100%, 260px);
  height: 4px;
  margin-top: 16px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.threeds-modal__verify-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--3ds-progress);
}

.threeds-modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 2px;
}

.threeds-btn {
  flex: 1;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.threeds-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.threeds-btn--ghost {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.threeds-btn--ghost:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #94a3b8;
}

.threeds-btn--primary {
  background: var(--3ds-accent);
  border: none;
  color: #fff;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--3ds-accent) 35%, transparent);
}

.threeds-btn--primary:hover:not(:disabled) {
  filter: brightness(1.06);
}

.threeds-modal__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #64748b;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.threeds-modal__footer .threeds-icon {
  color: var(--3ds-accent);
  flex-shrink: 0;
}

.threeds-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--3ds-accent);
  border-radius: 50%;
  animation: threeds-spin 0.75s linear infinite;
}

.threeds-spinner--lg {
  width: 48px;
  height: 48px;
  border-width: 3px;
  margin: 0 auto;
}

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

/* Payment form polish */
.checkout-form--payment {
  border-top: none;
}

.checkout-form--payment .payment-trust {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 16px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #166534;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
}

.checkout-form--payment .payment-trust svg {
  flex-shrink: 0;
}

.link-btn {
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}

.link-btn.cart-edit-link {
  color: var(--color-primary);
  font-size: 14px;
}

.muted { color: var(--color-text-muted); font-size: 13px; }

/* Product page options */
.pdp-options {
  margin-top: 20px;
}

.pdp-step {
  margin-bottom: 20px;
  padding: 18px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fafafa;
}

.pdp-step--addons {
  padding: 18px 22px 20px;
  border-color: #cfcfcf;
  border-radius: 9px;
  background: #f0f0f0;
}

.pdp-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-right: 8px;
  vertical-align: middle;
}

.pdp-step h3 {
  display: inline;
  font-size: 15px;
  font-weight: 700;
  vertical-align: middle;
}

.pdp-step--addons h3 {
  color: var(--color-primary);
  font-size: 22px;
  line-height: 1;
}

.pdp-step .size-options,
.pdp-step .pdp-addons,
.pdp-step .pdp-vases,
.pdp-step .pdp-zip {
  margin-top: 14px;
}

.pdp-vases__title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
}

.pdp-vases__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pdp-vase {
  display: block;
  cursor: pointer;
}

.pdp-vase input {
  display: none;
}

.pdp-vase__box {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
}

.pdp-vase.is-selected .pdp-vase__box,
.pdp-vase input:checked + .pdp-vase__box {
  border: 2px solid #111;
}

.pdp-vase__body {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.pdp-vase__thumb {
  width: 48px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
}

.pdp-vase__label {
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
}

.pdp-vases__promo {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}

.pdp-vases__promo-images {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.pdp-vases__promo-images img {
  width: 72px;
  height: 86px;
  object-fit: contain;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fff;
}

.pdp-vases__promo-copy h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-family: Georgia, "Times New Roman", serif;
  text-decoration: underline;
}

.pdp-vases__promo-copy p {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.45;
}

.pdp-vases__promo-price {
  margin-top: 4px !important;
}

.is-hidden {
  display: none !important;
}

.pdp-custom-vase-cta {
  margin-top: 16px;
  padding: 18px 12px;
  text-align: center;
  border-top: 1px solid var(--color-border);
}

.pdp-custom-vase-cta .btn {
  min-width: min(100%, 340px);
  background: var(--color-primary);
  border-color: var(--color-primary);
  font-size: 18px;
  font-weight: 700;
}

.pdp-custom-vase-cta p {
  margin: 12px 0 0;
  font-size: 14px;
  color: #111;
}

.pdp-custom-vase-cta.is-complete p::before {
  content: "Custom vase saved. ";
  font-weight: 700;
  color: var(--color-primary);
}

.pdp-custom-vase-cta.needs-custom-vase {
  outline: 3px solid rgba(196, 30, 90, 0.3);
  outline-offset: 3px;
}

.pdp-custom-vase-cta.needs-custom-vase p::before {
  content: "Please create your custom vase first. ";
  font-weight: 700;
  color: var(--color-primary);
}

.pdp-custom-vase {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
}

.pdp-custom-vase__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.pdp-custom-vase__header h4 {
  margin: 0 0 4px;
  font-size: 18px;
}

.pdp-custom-vase__header p,
.pdp-custom-vase__note {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

.pdp-custom-vase__body {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  align-items: start;
}

.pdp-custom-vase__preview {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #f7f7f7;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.pdp-custom-vase__preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pdp-custom-vase__fields {
  display: grid;
  gap: 12px;
}

.pdp-custom-vase__fields label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
}

.pdp-custom-vase__fields input,
.pdp-custom-vase__fields select {
  width: 100%;
  min-height: var(--touch-min, 44px);
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  font-size: 15px;
}

.facevase-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
  overflow: auto;
}

.facevase-modal__dialog {
  width: min(100%, 1040px);
  min-height: min(820px, calc(100dvh - 32px - var(--safe-top, 0px) - var(--safe-bottom, 0px)));
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.facevase-modal__bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  height: 52px;
  background: #000;
  color: #fff;
}

.facevase-modal__brand {
  text-align: center;
  font-size: 27px;
  line-height: 1;
}

.facevase-modal__brand::before {
  content: "*";
  display: inline-block;
  margin-right: 1px;
  transform: translateY(-8px) rotate(20deg);
  font-weight: 700;
}

.facevase-modal__brand span {
  font-weight: 700;
}

.facevase-modal__back,
.facevase-modal__close {
  width: 44px;
  height: 44px;
  margin: auto;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: transparent;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
}

.facevase-modal__close {
  border: 3px solid #fff;
  font-size: 30px;
}

.facevase-modal__back[hidden] {
  visibility: hidden;
  display: block;
}

.facevase-modal__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--color-border);
}

.facevase-step {
  position: relative;
  border: 0;
  background: transparent;
  color: #9ca3af;
  font-weight: 700;
  cursor: pointer;
}

.facevase-step::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 0;
  right: 0;
  height: 1px;
  background: #d1d5db;
  z-index: 0;
}

.facevase-step:first-child::before {
  left: 50%;
}

.facevase-step:last-child::before {
  right: 50%;
}

.facevase-step span {
  position: relative;
  z-index: 1;
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #9ca3af;
  color: transparent;
}

.facevase-step.is-active,
.facevase-step.is-complete {
  color: var(--color-primary);
}

.facevase-step.is-active span,
.facevase-step.is-complete span {
  background: var(--color-primary);
}

.facevase-step.is-complete span {
  color: #fff;
  font-size: 0;
}

.facevase-step.is-complete span::after {
  content: "✓";
  font-size: 16px;
  line-height: 24px;
}

.facevase-modal__content {
  min-height: 560px;
}

.facevase-pane {
  display: none;
  padding: 20px 32px 28px;
}

.facevase-pane.is-active {
  display: block;
}

.facevase-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}

.facevase-tabs button,
.facevase-fonts button {
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid #9ca3af;
  border-radius: 7px;
  background: #fff;
  color: var(--color-primary);
  font-weight: 700;
  cursor: pointer;
}

.facevase-tabs button.is-active,
.facevase-fonts button.is-active {
  background: var(--color-primary);
  color: #fff;
}

.facevase-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 26px;
  max-width: 780px;
  margin: 0 auto;
}

.facevase-template {
  display: grid;
  gap: 8px;
  border: 2px solid transparent;
  background: transparent;
  cursor: pointer;
}

.facevase-template.is-selected {
  border-color: var(--color-primary);
}

.facevase-template__img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  background: #f3f4f6;
}

.facevase-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--color-text-muted);
  padding: 24px 0;
}

.facevase-template__art {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  border: 1px solid #d1d5db;
  color: #111;
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  background: #f4f4f4;
}

.facevase-template__art--ocean { background: linear-gradient(#c7d2fe, #93c5fd, #dbeafe); }
.facevase-template__art--sunny { background: radial-gradient(#fff 2px, transparent 3px), #facc15; background-size: 20px 20px; }
.facevase-template__art--purple { background: radial-gradient(#fff 2px, transparent 3px), #c4b5fd; background-size: 18px 18px; }
.facevase-template__art--berry { background: radial-gradient(#ef4444 3px, transparent 4px), #fecdd3; background-size: 24px 24px; }

.facevase-upload-picker {
  min-height: 520px;
  background: #f3f4f6;
}

.facevase-upload-picker .fsp-picker--inline,
.facevase-upload-picker .fsp-picker--inline .fsp-picker__inline {
  min-height: 520px;
}

.facevase-upload {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 520px;
  background: #f3f4f6;
}

.facevase-upload__sources {
  display: grid;
  align-content: start;
  background: #e5e7eb;
  box-shadow: 7px 0 18px rgba(0, 0, 0, 0.16);
}

.facevase-upload-source,
.facevase-upload__sources label,
.facevase-upload__sources button {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 56px;
  padding: 0 20px;
  border: 0;
  background: transparent;
  font-size: 14px;
  color: #555;
  cursor: pointer;
  text-align: left;
}

.facevase-upload-source.is-active,
.facevase-upload__sources label.is-active,
.facevase-upload__sources button:hover,
.facevase-upload-source:hover {
  background: #d8d8d8;
}

.facevase-upload-source__icon {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  color: #666;
}

.facevase-upload-source__svg {
  display: block;
  width: 22px;
  height: 22px;
}

.facevase-upload__main {
  position: relative;
  min-height: 520px;
}

.facevase-upload__panel {
  display: none;
  min-height: 520px;
}

.facevase-upload__panel.is-active {
  display: block;
}

.facevase-upload__drop {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 452px;
  margin: 34px;
  border: 1px dashed #cbd5e1;
  color: #777;
  text-align: center;
  cursor: pointer;
  background: #fff;
}

.facevase-upload__drop.is-dragover {
  border-color: var(--color-primary);
  background: #ede9fe;
}

.facevase-upload-drop__svg {
  display: block;
  width: 62px;
  height: 72px;
  margin-bottom: 16px;
}

.facevase-upload__drop strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
  color: #444;
}

.facevase-upload__drop p {
  margin: 0;
  font-size: 14px;
}

.facevase-upload__url {
  display: grid;
  gap: 12px;
  max-width: 520px;
  margin: 80px auto;
  padding: 0 24px;
}

.facevase-upload__url label {
  font-size: 16px;
  font-weight: 600;
  color: #444;
}

.facevase-upload__url-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.facevase-upload__url-row input {
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 14px;
}

.facevase-upload__url-go {
  border: 0;
  border-radius: 4px;
  padding: 10px 18px;
  background: var(--color-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.facevase-upload__url-go:hover {
  background: var(--color-primary-dark);
}

.facevase-upload__hint,
.facevase-upload__oauth {
  margin: 0;
  font-size: 14px;
  color: #777;
  line-height: 1.5;
}

.facevase-upload__oauth {
  max-width: 420px;
  margin: 80px auto 20px;
  padding: 0 24px;
  text-align: center;
}

.facevase-upload__oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto;
  padding: 12px 24px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: #444;
  cursor: pointer;
}

.facevase-upload__oauth-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.facevase-upload__oauth-btn .facevase-upload-source__svg {
  width: 20px;
  height: 20px;
}

.facevase-editor {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(280px, 420px);
  gap: 28px;
  align-items: start;
}

.facevase-editor__preview-col {
  display: grid;
  gap: 16px;
}

.facevase-flat-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: 12px;
  border: 1px solid #d1d5db;
  background: #f4f4f4;
  overflow: hidden;
}

.facevase-flat-preview canvas,
.facevase-preview__wrap canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.facevase-text-field {
  display: grid;
  gap: 10px;
}

.facevase-text-tools {
  display: grid;
  align-content: start;
  gap: 18px;
}

.facevase-text-tools textarea {
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  border: 3px solid #c4b5fd;
  border-radius: 2px;
  font-size: 20px;
  line-height: 1.3;
  resize: vertical;
}

.facevase-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.facevase-swatches button {
  width: 28px;
  height: 28px;
  border: 2px solid transparent;
  background: var(--swatch);
  cursor: pointer;
}

.facevase-swatches button.is-active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px #fff inset;
}

.facevase-fonts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.facevase-fonts button {
  min-width: 88px;
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
}

.facevase-fonts button.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}

.facevase-preview {
  display: grid;
  grid-template-columns: minmax(260px, 430px) minmax(260px, 430px);
  gap: 36px;
  align-items: center;
  justify-content: center;
  min-height: 480px;
}

.facevase-preview__vase {
  position: relative;
  width: min(100%, 390px);
  aspect-ratio: 0.62 / 1;
  margin: 0 auto;
  border-radius: 38% 38% 22% 22% / 7% 7% 9% 9%;
  border: 5px solid #cbd5e1;
  background: linear-gradient(90deg, #f8fafc, #fff, #cbd5e1);
  box-shadow: inset 24px 0 50px rgba(255,255,255,.8), inset -24px 0 42px rgba(15,23,42,.15);
  overflow: hidden;
  perspective: 900px;
}

.facevase-preview__vase::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 16%;
  right: 16%;
  height: 44px;
  border: 4px solid #cbd5e1;
  border-radius: 50%;
  background: #f8fafc;
  z-index: 2;
  pointer-events: none;
}

.facevase-preview__wrap {
  position: absolute;
  inset: 56px 28px 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  transform-style: preserve-3d;
  transition: transform 0.12s ease;
  overflow: hidden;
}

.facevase-preview__bouquet img {
  width: 100%;
  max-height: 440px;
  object-fit: contain;
}

.facevase-rotate {
  display: grid;
  gap: 8px;
  width: min(340px, 60%);
  margin: 0 auto 14px;
  color: var(--color-primary);
  font-weight: 700;
  text-align: center;
}

.facevase-edit-link {
  margin-left: calc(50% - 210px);
}

.facevase-modal__footer {
  position: sticky;
  bottom: 0;
  padding: 18px;
  border-top: 1px solid var(--color-border);
  background: #fff;
  text-align: center;
  box-shadow: 0 -3px 18px rgba(0, 0, 0, 0.08);
}

.facevase-primary {
  min-width: min(100%, 320px);
  min-height: 54px;
  border: 0;
  background: #000;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.pdp-addons--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 30px;
}

.pdp-addon {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 0;
  border-top: none;
}

.pdp-addon__body {
  min-width: 0;
}

.pdp-addon__label {
  display: block;
  margin: 0 0 5px;
  color: #111;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
}

.pdp-addon__price {
  font-size: 13px;
  font-weight: 400;
}

.pdp-addon__controls {
  display: flex;
  gap: 8px;
  min-width: 0;
}

.pdp-addon__select,
.pdp-addon__qty-select {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 5px 30px 5px 10px;
  border: 1px solid #c7c7c7;
  border-radius: 4px;
  background: #fff;
  color: #111;
  font-size: 15px;
  line-height: 1.25;
}

.pdp-addon__qty-select {
  flex: 0 0 70px;
}

.pdp-zip input {
  display: block;
  width: 100%;
  max-width: 280px;
  margin-top: 4px;
  min-height: var(--touch-min, 44px);
  font-size: 16px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
}

.pdp-zip-help,
.pdp-login-hint {
  font-size: 13px;
  margin: 8px 0 0;
}

.pdp-zip-help a,
.pdp-login-hint a {
  color: var(--color-primary);
}

.pdp-size-intro {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.pdp-price-summary {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fafafa;
}

.pdp-price-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  padding: 4px 0;
}

.pdp-price-summary__row--total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border);
  font-size: 15px;
  font-weight: 700;
}

.pdp-price-summary__row--extra + .pdp-price-summary__row--extra {
  padding-top: 0;
}

.pdp-price-summary__row--extra + .pdp-price-summary__row:not(.pdp-price-summary__row--extra) {
  margin-top: 4px;
}

.pdp-price-summary__row--total strong {
  color: var(--color-primary);
  font-size: 1.15rem;
}

.pdp-price-summary__note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.size-option__srp {
  display: block;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 8px;
  text-align: center;
}

.size-option__srp s { text-decoration: line-through; }

.size-option__price {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: #111;
  margin-top: 4px;
  text-align: center;
}

.size-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.size-option input { display: none; }

.size-option__box {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 16px 12px 14px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  font-size: 13px;
  min-width: 0;
  flex: 1;
  height: 100%;
  background: #fff;
  transition: border-color 0.15s;
}

.size-option__label {
  font-size: 15px;
  text-align: center;
}

.size-option input:checked + .size-option__box {
  border-color: #111;
  border-width: 3px;
  background: #fff;
}

.size-options--variants {
  display: flex;
  flex-direction: column;
  gap: 10px;
  grid-template-columns: none;
}

.size-option--variant {
  width: 100%;
}

.size-option__box--variant {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  text-align: left;
  min-width: 0;
}

.size-option__variant-thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 74px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--color-bg-gray);
}

.size-option__variant-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.size-option__variant-body {
  flex: 1;
  min-width: 0;
}

.size-option__variant-body .size-option__label {
  text-align: left;
  display: block;
  margin-bottom: 4px;
}

.size-option__variant-body .size-option__srp,
.size-option__variant-body .size-option__price,
.size-option__variant-body .size-option__price-sub {
  text-align: left;
}

.size-option__price--more {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #111;
}

.size-option__price-sub {
  display: block;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.pdp-addon__thumb {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 0;
  background: #fff;
  border: 1px solid #d1d1d1;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .pdp-vases__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pdp-addons--grid {
    grid-template-columns: 1fr;
  }

  .pdp-vases__promo {
    flex-direction: column;
    align-items: flex-start;
  }

  .pdp-custom-vase__body {
    grid-template-columns: 1fr;
  }

  .pdp-custom-vase__preview {
    max-width: 220px;
  }

  .facevase-modal {
    padding: 0;
  }

  .facevase-modal__dialog {
    min-height: 100dvh;
    min-height: -webkit-fill-available;
  }

  .facevase-modal {
    padding-top: var(--safe-top, 0px);
    padding-bottom: var(--safe-bottom, 0px);
  }

  .facevase-modal__steps {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 12px;
  }

  .checkout-flow,
  .checkout-flow--billing {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
  }

  /*
   * Mobile: forms first, order summary below (DOM has preview first for desktop grid).
   * Delivery: Delivery Information → … → Order summary
   * Billing: Billing Information → Payment → Order summary
   */
  .checkout-flow > .checkout-form-col,
  .checkout-flow > .checkout-billing-main {
    order: 1;
  }

  .checkout-flow > .checkout-preview {
    order: 2;
    position: static;
    max-width: none;
    margin-top: 20px;
    margin-bottom: 0;
    padding-top: 16px;
    padding-bottom: 0;
    border-top: 1px solid var(--color-border);
    border-bottom: none;
  }

  .checkout-billing-main {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
  }

  .checkout-billing-main > .checkout-form--billing {
    order: 1;
  }

  .checkout-billing-main > .checkout-payment-col {
    order: 2;
  }

  #payment-form,
  #checkout-payment {
    scroll-margin-top: calc(76px + env(safe-area-inset-top, 0px));
  }

  .checkout-flow--billing .checkout-preview__items {
    max-height: none;
    overflow: visible;
  }

  .checkout-panel {
    padding: 18px 16px;
  }

  .checkout-payment-col {
    position: static;
  }

  .checkout-preview {
    position: static;
    max-width: none;
  }

  .checkout-flow--billing .checkout-preview {
    box-shadow: none;
  }

  .checkout-billing-col {
    display: block;
  }

  .facevase-template-grid,
  .facevase-upload,
  .facevase-editor,
  .facevase-preview {
    grid-template-columns: 1fr;
  }

  .facevase-pane {
    padding: 16px;
  }

  .facevase-upload,
  .facevase-upload-picker {
    grid-template-columns: 1fr;
  }

  .facevase-upload__sources {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .facevase-upload-source__label {
    font-size: 12px;
  }

  .facevase-upload__drop {
    min-height: 260px;
    margin: 18px;
  }

  .facevase-flat-preview {
    min-height: 320px;
  }

  .cart-layout,
  .checkout-flow,
  .checkout-flow--billing,
  .review-layout {
    grid-template-columns: 1fr;
  }
  .cart-summary {
    position: static;
  }
  .form-row,
  .form-row--3 { grid-template-columns: 1fr; }
  .checkout-secure { margin-left: 0; width: 100%; }
  .checkout-header .logo { font-size: clamp(1.1rem, 4vw, 1.5rem); }
  .checkout-header__secure { font-size: 12px; }
  .checkout-title { font-size: clamp(1.5rem, 5vw, 2rem); }
  .checkout-billing-col {
    grid-template-columns: 1fr;
  }
  .review-block__body { flex-direction: column; }
  .trust-badges { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .checkout-steps {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    gap: 12px;
    padding-bottom: 6px;
    margin-bottom: 24px;
    scrollbar-width: none;
  }

  .checkout-steps::-webkit-scrollbar {
    display: none;
  }

  .checkout-step {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .checkout-step__sep {
    flex-shrink: 0;
  }

  .checkout-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding-left: max(16px, var(--safe-left));
    padding-right: max(16px, var(--safe-right));
  }

  .checkout-header__secure {
    width: 100%;
  }

  .checkout-wrap {
    padding-left: max(16px, var(--safe-left));
    padding-right: max(16px, var(--safe-right));
    padding-bottom: max(48px, var(--safe-bottom));
  }

  .checkout-title {
    margin-bottom: 24px;
  }

  .cart-table { min-width: 0; width: 100%; font-size: 14px; table-layout: auto; }
  .cart-table colgroup { display: none; }
  .cart-table thead { display: none; }
  .cart-table,
  .cart-table tbody,
  .cart-table tr,
  .cart-table td {
    display: block;
    width: 100%;
  }
  .cart-table tr {
    margin-bottom: 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    padding: 0 0 8px;
  }
  .cart-table th,
  .cart-table td {
    padding: 12px 14px;
    border-bottom: none;
  }
  .cart-table__product {
    gap: 12px;
    padding-top: 14px;
  }
  .cart-table__product img { width: 72px; height: 84px; }
  .cart-table__product strong { font-size: 15px; }
  .cart-delivery,
  .cart-card-cell,
  .cart-price {
    padding-top: 4px;
    padding-bottom: 8px;
  }
  .cart-delivery::before,
  .cart-card-cell::before,
  .cart-price::before {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 6px;
  }
  .cart-delivery::before { content: "Delivery"; }
  .cart-card-cell::before { content: "Card"; }
  .cart-price::before { content: "Price"; }
  .cart-price {
    font-size: 16px;
    font-weight: 700;
  }
  .cart-table-scroll {
    overflow: visible;
    margin: 0;
    padding: 0;
  }

  .cart-summary {
    width: 100%;
    justify-self: stretch;
    padding: 18px 16px;
  }

  .cart-summary .btn,
  .cart-main .btn--checkout {
    width: 100%;
    min-height: var(--touch-min);
    font-size: 16px;
  }

  .checkout-complete { padding: 48px 16px; }
  .checkout-complete h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); }
  .checkout-complete .btn { width: 100%; margin: 8px 0; }

  .pdp-step {
    padding: 16px 14px;
  }

  .pdp-step--addons h3 {
    font-size: clamp(1.125rem, 5vw, 1.375rem);
  }

  .pdp-vases__grid {
    grid-template-columns: 1fr;
  }

  .pdp-vase__box {
    min-height: var(--touch-min);
  }

  .pdp-custom-vase-cta .btn {
    width: 100%;
    font-size: 16px;
    min-height: var(--touch-min);
  }

  .pdp-zip input {
    font-size: 16px;
    min-height: var(--touch-min);
  }

  .pdp-addon__select,
  .pdp-addon__qty-select {
    min-height: var(--touch-min);
    font-size: 16px;
  }

  .delivery-date-quick {
    flex-direction: column;
  }

  .delivery-date-chip {
    width: 100%;
    flex: none;
  }

  .size-options--variants {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    min-width: 0;
  }

  .size-option--variant,
  .size-option__box--variant {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .size-option__variant-thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 64px;
  }

  .pdp-options,
  .product-page {
    max-width: 100%;
    min-width: 0;
  }

  .pdp-step {
    max-width: 100%;
    min-width: 0;
  }

  #pdp-add-checkout,
  #pdp-add-continue,
  .pdp-actions .btn--checkout,
  .btn--checkout,
  .btn--checkout-review {
    width: 100%;
    min-height: var(--touch-min);
    font-size: 16px;
  }

  .product-page .pdp-step:has(.pdp-actions) {
    position: static;
    box-shadow: none;
    border-radius: var(--radius);
    padding-bottom: 16px;
  }

  .product-page .pdp-actions {
    position: sticky;
    bottom: 0;
    z-index: 40;
    margin: 12px -14px -16px;
    padding: 12px 14px max(12px, var(--safe-bottom));
    border-radius: 12px 12px 0 0;
    background: #fafafa;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.08);
    display: grid;
    gap: 8px;
  }

  body:has(.product-page) .chat-fab,
  body:has(.product-page) .tg-float {
    display: none;
  }

  .pdp-login-hint {
    font-size: 13px;
    text-align: center;
  }

  .payment-form__expiry {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .payment-form__cvv {
    grid-column: 1 / -1;
    max-width: none;
  }

  .payment-form__row {
    grid-template-columns: 1fr;
  }

  .checkout-panel {
    padding: 16px 14px;
  }

  .checkout-preview__item img {
    width: 64px;
    height: 74px;
  }

  .trust-badges {
    gap: 10px;
    justify-content: center;
  }

  .trust-badges img {
    max-height: 32px;
  }

  .facevase-modal__steps {
    grid-template-columns: 1fr;
  }

  .facevase-upload__sources {
    grid-template-columns: 1fr;
  }

  .facevase-upload__drop {
    min-height: 200px;
    margin: 12px;
  }
}

/* ===== Cross-platform: checkout, 3DS, cart (iOS / Android / tablets / desktop) ===== */
:root {
  --viewport-h: 100vh;
  --viewport-h: 100dvh;
}

.threeds-overlay {
  padding:
    max(16px, var(--safe-top))
    max(16px, var(--safe-right))
    max(16px, var(--safe-bottom))
    max(16px, var(--safe-left));
  overscroll-behavior: contain;
}

.threeds-modal {
  max-height: min(90vh, calc(var(--vh, 1vh) * 90));
  max-height: min(90dvh, calc(var(--vh, 1vh) * 90));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.threeds-modal__label {
  text-align: center;
}

.threeds-modal__form-fields {
  display: block;
}

.threeds-modal [hidden] {
  display: none !important;
}

.threeds-modal__resend {
  min-height: var(--touch-min);
  padding: 10px 14px;
  touch-action: manipulation;
}

.threeds-modal__input {
  touch-action: manipulation;
}

.threeds-redirect__top-inner {
  padding-top: max(14px, var(--safe-top));
}

@supports not (color-mix(in srgb, red 50%, transparent)) {
  .threeds-modal__input:focus {
    box-shadow: 0 0 0 4px rgba(20, 52, 203, 0.18);
  }

  .threeds-modal__resend:hover:not(:disabled) {
    background: rgba(20, 52, 203, 0.1);
  }

  .threeds-btn--primary {
    box-shadow: 0 2px 8px rgba(20, 52, 203, 0.35);
  }
}

@supports not (backdrop-filter: blur(8px)) {
  .threeds-overlay:not(.threeds-overlay--redirect) {
    background: rgba(8, 15, 30, 0.88);
  }
}

@media (max-width: 1024px) {
  .checkout-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  .checkout-form select,
  .checkout-form textarea,
  .payment-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  .payment-form select,
  .threeds-modal__input {
    font-size: max(16px, 1em);
  }

  .threeds-modal__input {
    letter-spacing: 0.28em;
  }
}

@media (max-width: 640px) {
  .threeds-overlay:not(.threeds-overlay--redirect) {
    align-items: flex-end;
    padding:
      max(0px, var(--safe-top))
      max(0px, var(--safe-right))
      max(0px, var(--safe-bottom))
      max(0px, var(--safe-left));
  }

  .threeds-modal {
    width: 100%;
    max-width: none;
    border-radius: 16px 16px 0 0;
    max-height: min(92dvh, calc(var(--vh, 1vh) * 92));
    align-self: flex-end;
  }

  .threeds-modal__body {
    padding: 18px 16px 10px;
  }

  .threeds-modal__input {
    max-width: none;
    letter-spacing: 0.22em;
  }

  .threeds-modal__actions {
    flex-direction: column-reverse;
  }

  .threeds-btn {
    width: 100%;
    min-height: var(--touch-min);
  }

  .threeds-modal__issuer {
    white-space: normal;
  }

  .cart-table-scroll {
    margin: 0;
    padding: 0;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .threeds-overlay:not(.threeds-overlay--redirect) {
    align-items: center;
    padding: max(8px, var(--safe-top)) max(12px, var(--safe-right)) max(8px, var(--safe-bottom)) max(12px, var(--safe-left));
  }

  .threeds-modal {
    border-radius: 12px;
    max-height: calc(100dvh - 16px - var(--safe-top) - var(--safe-bottom));
    align-self: center;
  }

  .threeds-modal__body {
    padding: 12px 14px 8px;
  }

  .threeds-modal__verifying {
    padding: 16px 10px 20px;
  }

  .threeds-redirect__main {
    padding: 16px 12px;
  }

  .threeds-redirect__panel {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .threeds-modal,
  .threeds-overlay--redirect {
    animation: none !important;
  }

  .threeds-spinner {
    animation-duration: 1.5s;
  }
}

.is-ios .threeds-modal__input {
  font-size: max(16px, 1em);
}

@media (pointer: coarse) {
  .checkout-step,
  .link-btn,
  .cart-table button,
  .payment-form__card-brands img {
    touch-action: manipulation;
  }
}

@media (hover: none) and (pointer: coarse) {
  .threeds-btn:active:not(:disabled) {
    transform: none;
  }

  .size-option__box:active,
  .delivery-date-chip:active,
  .pdp-vase__box:active {
    opacity: 0.92;
  }
}

@media (max-width: 640px) and (orientation: landscape) {
  .threeds-modal {
    max-height: min(96dvh, calc(var(--vh, 1vh) * 96));
  }

  .chat-panel {
    max-height: min(88dvh, calc(var(--vh, 1vh) * 88));
  }

  .product-page .pdp-actions {
    position: static;
    box-shadow: none;
    margin: 12px 0 0;
    padding: 0;
    border-radius: 0;
  }
}

/* Checkout step scroll targets — clear sticky header on iPhone/Safari */
#delivery-form,
#billing-form,
#payment-form,
#place-order-form,
.checkout-billing-main,
.checkout-payment-col,
.review-layout,
.checkout-wrap {
  scroll-margin-top: calc(12px + var(--safe-top, 0px) + 64px);
}

/* ===== Address autocomplete (English-only) ===== */
.checkout-form label.address-autocomplete-label,
.address-autocomplete-label {
  position: relative;
  z-index: 6;
  overflow: visible;
  margin-bottom: 4px;
}

.checkout-form > .address-autocomplete {
  margin-bottom: 16px;
}

.checkout-form label.address-autocomplete-label.is-open,
.address-autocomplete.is-open {
  z-index: 80;
}

.address-autocomplete {
  position: relative;
  display: block;
  width: 100%;
  z-index: 1;
}

.address-autocomplete.is-open {
  z-index: 80;
}

.address-autocomplete input {
  width: 100%;
}

.address-autocomplete__list {
  position: absolute;
  z-index: 90;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--color-border, #e8e4e0);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(26, 20, 18, 0.18);
  max-height: min(280px, 45vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.address-autocomplete__list--portal {
  position: fixed;
  z-index: 10000;
  margin: 0;
}

.address-autocomplete__item {
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--color-text, #1a1a1a);
  cursor: pointer;
  min-height: var(--touch-min, 44px);
  display: flex;
  align-items: center;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

.address-autocomplete__item:hover,
.address-autocomplete__item.is-active {
  background: var(--color-primary-light, #fce4ec);
  color: var(--color-primary, #c41e5a);
}

.address-autocomplete__status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.checkout-panel,
.checkout-form-col,
.checkout-billing-main,
.checkout-flow {
  overflow: visible;
}

/* ===== Cross-browser / multi-device checkout hardening ===== */
.checkout-wrap,
.checkout-flow,
.checkout-billing-main,
.review-layout {
  max-width: 100%;
  min-width: 0;
}

.checkout-header {
  padding-left: max(clamp(16px, 4vw, 24px), var(--safe-left, 0px));
  padding-right: max(clamp(16px, 4vw, 24px), var(--safe-right, 0px));
  padding-top: max(16px, var(--safe-top, 0px));
}

/* Prevent iOS/Android input zoom + keep tap targets usable */
@media (max-width: 1024px) {
  .checkout-form input:not([type="checkbox"]):not([type="radio"]),
  .checkout-form select,
  .checkout-form textarea,
  .checkout-form button,
  .btn--checkout {
    font-size: 16px;
    min-height: var(--touch-min, 44px);
    touch-action: manipulation;
  }

  .btn--checkout {
    width: 100%;
  }

  .checkout-steps {
    gap: 6px;
    font-size: 12px;
    line-height: 1.3;
  }

  .address-autocomplete__list--portal {
    max-height: min(240px, 42dvh, calc(var(--app-height, 100vh) * 0.42));
  }
}

/* Short phones / landscape */
@media (max-width: 900px) and (max-height: 480px) {
  .checkout-header__secure {
    display: none;
  }

  .address-autocomplete__list--portal {
    max-height: min(160px, 36vh);
  }
}

/* WebKit sticky checkout header */
.is-ios .checkout-header,
.is-safari .checkout-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--color-primary, #c41e5a);
}

.is-android .checkout-form input,
.is-samsung .checkout-form input,
.is-webview .checkout-form input {
  font-size: 16px;
}

/* Firefox select quirks */
@-moz-document url-prefix() {
  .checkout-form select {
    background-image: none;
    padding-right: 12px;
  }
}

/* Prefer dvh when supported */
@supports (height: 100dvh) {
  .address-autocomplete__list {
    max-height: min(280px, 45dvh);
  }
}
