/* Order page - extends site.css */

.order-test-banner {
  background: var(--color-warning-bg);
  color: var(--color-warning);
  text-align: center;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-body-sm);
  font-family: var(--font-body);
  border-bottom: 1px solid var(--color-border);
}

.order-notice {
  background: var(--color-info-bg);
  color: var(--color-info);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xl);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

.order-notice[hidden] {
  display: none;
}

.order-intro {
  max-width: 40rem;
  margin: 0 auto var(--space-2xl);
  text-align: center;
}

.order-intro p {
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  margin-bottom: var(--space-md);
}

.order-photo-note {
  max-width: 40rem;
  margin: var(--space-2xl) auto 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-size: var(--text-body-sm);
  line-height: var(--leading-body-sm);
  text-align: center;
}

.qv-photo-note,
.order-photo-banner {
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-size: var(--text-caption);
  line-height: var(--leading-body-sm);
}

.qv-photo-note {
  margin: calc(var(--space-md) * -1) 0 var(--space-lg);
}

.order-photo-banner {
  text-align: center;
  margin: 0 auto var(--space-md);
  max-width: 40rem;
}

.qv-photo-note a,
.order-photo-banner a,
.order-photo-note a {
  color: inherit;
  font-weight: 600;
  white-space: nowrap;
}

.order-visit {
  background: var(--color-text-primary);
  border-radius: var(--radius-md, 8px);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-lg) 0 var(--space-xl);
}

.order-intro .order-visit__title {
  font-family: var(--font-primary);
  font-size: var(--text-h3);
  color: var(--color-primary);
  margin: 0 0 var(--space-xs);
}

.order-intro .order-visit__text {
  font-size: var(--text-body-lg);
  color: var(--color-text-inverse);
  margin: 0;
}

.order-visit__text strong {
  color: var(--color-primary);
}

.order-how-it-works {
  background: var(--color-surface-sunken, #f5f5f5);
  border-radius: var(--radius-md, 8px);
  padding: var(--space-lg);
  margin-top: var(--space-lg);
  text-align: left;
}

.order-how-it-works__title {
  font-family: var(--font-primary);
  font-size: var(--text-h4);
  margin: 0 0 var(--space-sm);
}

.order-how-it-works__steps {
  margin: 0;
  padding-left: var(--space-lg);
  font-family: var(--font-body);
  color: var(--color-text-secondary);
  line-height: var(--leading-body);
}

.order-how-it-works__steps li {
  margin-bottom: var(--space-xs);
}

.order-how-it-works__steps li:last-child {
  margin-bottom: 0;
}

.order-licence {
  font-size: var(--text-body-sm);
  color: var(--color-text-secondary);
  text-align: center;
  margin: var(--space-xl) 0;
  font-family: var(--font-body);
}

.order-status {
  text-align: center;
  padding: var(--space-xl);
  font-family: var(--font-body);
  color: var(--color-text-secondary);
}

.order-status--error {
  color: var(--color-error);
  background: var(--color-error-bg);
  border-radius: var(--radius-md);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  align-items: stretch;
  gap: var(--space-lg);
  margin-bottom: var(--space-3xl);
}

.product-grid[hidden] {
  display: none;
}

.product-card {
  position: relative;
  height: 100%;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  font-family: var(--font-body);
}

.product-card--soldout {
  opacity: 0.72;
}

.product-card--preorder,
.product-card--comingsoon {
  border-style: dashed;
  border-color: var(--color-info, #2196f3);
}

.product-card--comingsoon .product-card__desc {
  flex: 1;
}

.product-card__badge--preorder,
.product-card__badge--comingsoon {
  color: var(--color-info, #2196f3);
}

.product-card__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--color-surface-sunken);
}

.product-card__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-disabled);
  font-size: var(--text-caption);
  text-align: center;
  padding: var(--space-md);
}

.product-card__tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-md);
  text-align: center;
}

.product-card__tile--0 { background: #FFF4D6; }
.product-card__tile--1 { background: #FBE7DC; }
.product-card__tile--2 { background: #EEF1E4; }
.product-card__tile--3 { background: #F6ECE0; }

.product-card__tile-brand {
  font-family: var(--font-primary);
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  color: var(--color-text-primary);
}

.product-card__tile-line {
  font-family: var(--font-body);
  font-size: var(--text-body-sm);
  color: var(--color-text-secondary);
}

.product-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-card__tag {
  font-size: var(--text-caption);
  line-height: 1.4;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--color-surface-sunken);
  color: var(--color-text-secondary);
}

.product-card__tag--diet {
  background: var(--color-success-bg);
  color: var(--color-success);
  font-weight: 600;
}

.product-card__plu {
  font-size: var(--text-caption);
  color: var(--color-text-disabled);
  letter-spacing: 0.04em;
}

.product-card__name {
  font-family: var(--font-primary);
  font-size: var(--text-h4);
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
  line-height: var(--leading-h4);
  /* Three lines on every card, so PLU and price start on the same row
     even when a name wraps to one line and the next wraps to three. */
  min-height: calc(var(--leading-h4) * 3em);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.product-card__desc {
  font-size: var(--text-body-sm);
  color: var(--color-text-secondary);
  margin: 0;
  line-height: var(--leading-body-sm);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.product-card__size-label,
.form-group .qv-size-label {
  font-family: var(--font-body);
  font-size: var(--text-caption);
  font-weight: 500;
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-xs);
}

.product-card__size {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-body-sm);
  background: var(--color-surface);
}

.product-card__price {
  font-weight: 600;
  color: var(--color-text-primary);
}

/* Price, single/case switch, or size picker. Same height on every card
   so the quantity row below it lines up across the grid. */
.product-card__offer {
  --offer-block: 4.85rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--offer-block);
}

.product-card__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: auto;
}

/* Single / Case choice - one segmented control, not two separate boxes */
.unit-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  background: var(--color-surface-sunken);
  border-radius: 14px;
}

.unit-switch__opt {
  display: grid;
  grid-template-rows: 1rem 1.35rem 1.15rem;
  align-items: center;
  justify-items: center;
  align-content: center;
  gap: 2px;
  min-height: 4.25rem;
  padding: 0.4rem 0.35rem;
  border: none;
  border-radius: 11px;
  background: transparent;
  font-family: var(--font-body);
  text-align: center;
  cursor: pointer;
  transition: background var(--transition-default), box-shadow var(--transition-default);
}

.unit-switch__opt:hover:not(:disabled):not(.unit-switch__opt--active) {
  background: rgba(255, 255, 255, 0.72);
}

.unit-switch__opt:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(245, 184, 0, 0.45);
}

.unit-switch__opt--active {
  background: var(--color-primary);
  box-shadow: 0 1px 2px rgba(26, 26, 26, 0.16);
}

.unit-switch__opt:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.unit-switch__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  line-height: 1.2;
  align-self: end;
  max-width: 100%;
  white-space: nowrap;
}

.unit-switch__opt--active .unit-switch__label,
.unit-switch__opt--active .unit-switch__price {
  color: var(--color-secondary);
}

.unit-switch__price {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  line-height: 1.2;
}

.unit-switch__note {
  display: inline-block;
  max-width: 100%;
  padding: 0.08rem 0.45rem;
  border-radius: var(--radius-full);
  background: var(--color-success-bg);
  color: var(--color-success);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  align-self: start;
}

.unit-switch__note:empty {
  padding: 0;
  background: transparent;
}

.unit-switch__opt--active .unit-switch__note {
  background: rgba(26, 26, 26, 0.14);
  color: var(--color-secondary);
}

.unit-switch__opt:disabled .unit-switch__note {
  background: transparent;
  color: var(--color-text-secondary);
  font-weight: 500;
  padding: 0;
}

.qv-price .unit-switch {
  margin-top: var(--space-xs);
  max-width: 22rem;
}

.cart-changed-note {
  margin: 0 0 var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  background: rgba(245, 184, 0, 0.12);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-body-sm);
}

.product-card__deal {
  font-size: var(--text-body-sm);
  color: var(--color-accent);
}

.product-card__badge {
  position: absolute;
  z-index: 1;
  top: calc(var(--space-lg) + 0.55rem);
  left: calc(var(--space-lg) + 0.55rem);
  display: inline-block;
  margin: 0;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: var(--text-caption);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-error);
}

.product-card__qty {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.product-card__stepper {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.product-card__stepper-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--color-surface-sunken);
  border: none;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
  min-height: 44px;
  min-width: 44px;
  font-family: var(--font-body);
}

.product-card__stepper-btn:hover {
  background: var(--color-border);
}

.product-card__stepper-btn:active {
  background: var(--color-border-strong);
}

.product-card__stepper-btn:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.product-card__stepper-val {
  width: 3rem;
  text-align: center;
  font-size: var(--text-body);
  font-weight: 600;
  font-family: var(--font-body);
  background: var(--color-surface);
  border: none;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  padding: var(--space-xs) 0;
  -moz-appearance: textfield;
}

.product-card__stepper-val::-webkit-inner-spin-button,
.product-card__stepper-val::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.product-card__stepper-val:focus {
  outline: 2px solid var(--color-border-focus);
  outline-offset: -2px;
}

.product-card__qty .form-hint {
  white-space: nowrap;
}

.product-card__add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-primary);
  color: var(--color-secondary);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-body-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-default), border-color var(--transition-default), color var(--transition-default);
  min-height: 44px;
}

.product-card__add-btn:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.product-card__add-btn:active {
  background: var(--color-primary-active);
  border-color: var(--color-primary-active);
}

.product-card__add-btn--flash {
  background: var(--color-success-bg);
  color: var(--color-success);
  border-color: var(--color-success);
}

.product-card__check {
  display: none;
  width: 1em;
  height: 1em;
}

.product-card__add-btn--flash .product-card__check {
  display: inline-block;
}

.order-section-title {
  font-family: var(--font-primary);
  font-size: var(--text-h2);
  margin: 0 0 var(--space-md);
}

.order-form-panel {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  max-width: 40rem;
  margin: 0 auto var(--space-3xl);
}

.order-summary {
  background: var(--color-surface-sunken);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-xl);
  font-family: var(--font-body);
}

.order-summary h3 {
  font-family: var(--font-primary);
  font-size: var(--text-h4);
  margin: 0 0 var(--space-sm);
}

.order-summary ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--color-text-secondary);
}

.order-summary__empty {
  color: var(--color-text-disabled);
  font-size: var(--text-body-sm);
  margin: 0;
}

.order-summary__note {
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
  margin: var(--space-sm) 0 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-group--short {
  max-width: 160px;
}

.form-row--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-body);
  font-family: var(--font-body);
  background: var(--color-surface);
}

.form-group select:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px rgba(245, 184, 0, 0.25);
}

.form-group .field-error {
  color: var(--color-error);
  font-size: var(--text-caption);
  margin-top: var(--space-2xs);
  display: none;
}

.form-group.is-invalid input,
.form-group.is-invalid select,
.form-group.is-invalid textarea {
  border-color: var(--color-error);
}

.form-group.is-invalid .field-error {
  display: block;
}

.form-hint {
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
  margin-top: var(--space-2xs);
}

.order-legal {
  font-size: var(--text-body-sm);
  color: var(--color-text-secondary);
  margin: var(--space-lg) 0;
  font-family: var(--font-body);
  line-height: var(--leading-body-sm);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.order-submit-wrap {
  margin-top: var(--space-lg);
}

.order-submit-wrap .btn {
  width: 100%;
  min-height: 44px;
}

.order-submit-wrap .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.thanks-panel {
  max-width: 32rem;
  margin: 0 auto;
  text-align: center;
  font-family: var(--font-body);
  padding: var(--space-2xl) 0;
}

.thanks-panel__ref {
  font-family: var(--font-primary);
  font-size: var(--text-h2);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: var(--space-lg) 0;
  color: var(--color-text-primary);
}

.thanks-panel p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

@media (max-width: 640px) {
  .form-row,
  .form-row--3 {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .order-form-panel {
    padding: var(--space-lg);
  }
}

/* ── Product card clickable area ── */

.product-card__link {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.product-card__link:hover .product-card__name {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Quick-view modal ── */

.qv-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  animation: qv-fade-in 0.2s ease;
}

.qv-overlay[hidden] {
  display: none;
}

@keyframes qv-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.qv-modal {
  position: relative;
  background: var(--color-surface-elevated);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  animation: qv-slide-up 0.25s ease;
}

@keyframes qv-slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.qv-close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  z-index: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: background var(--transition-fast);
}

.qv-close:hover {
  background: var(--color-surface-sunken);
}

.qv-body {
  padding: var(--space-xl);
  font-family: var(--font-body);
}

.qv-img-wrap {
  margin-bottom: var(--space-lg);
}

.qv-img-wrap .product-card__img--placeholder,
.qv-img-wrap .product-card__tile {
  width: 100%;
  height: 200px;
}

.qv-carousel {
  position: relative;
}

.qv-carousel__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--radius-md);
  background: var(--color-surface-sunken);
}

.qv-carousel__track::-webkit-scrollbar {
  display: none;
}

.qv-carousel__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 400px;
  object-fit: contain;
  scroll-snap-align: start;
  cursor: zoom-in;
}

/* ── Full-screen photo zoom ── */

.zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.92);
  animation: qv-fade-in 0.2s ease;
}

.zoom-overlay[hidden] {
  display: none;
}

.zoom-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: zoom-in;
}

.zoom-stage img {
  max-width: 92vw;
  max-height: 84vh;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.2s ease;
}

.zoom-stage--zoomed {
  cursor: zoom-out;
  touch-action: none;
}

.zoom-stage--zoomed img {
  transform: scale(2.5);
}

.zoom-close,
.zoom-nav {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-text-primary);
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.zoom-close:hover,
.zoom-nav:hover {
  background: var(--color-primary);
}

.zoom-close:focus-visible,
.zoom-nav:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(245, 184, 0, 0.6);
}

.zoom-close {
  top: var(--space-md);
  right: var(--space-md);
  font-size: 1.75rem;
}

.zoom-nav {
  top: 50%;
  transform: translateY(-50%);
  padding-bottom: 0.2rem;
  font-size: 2rem;
}

.zoom-nav[hidden] {
  display: none;
}

.zoom-nav--prev { left: var(--space-md); }
.zoom-nav--next { right: var(--space-md); }

.zoom-hint {
  position: absolute;
  bottom: var(--space-md);
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--text-body-sm);
  color: rgba(255, 255, 255, 0.8);
  pointer-events: none;
}

.qv-carousel__nav {
  position: absolute;
  top: 200px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0 0 0.2rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  color: var(--color-text-primary);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.qv-carousel__nav:hover {
  background: var(--color-primary);
}

.qv-carousel__nav:focus-visible,
.qv-carousel__dot:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(245, 184, 0, 0.5);
}

.qv-carousel__nav--prev { left: var(--space-sm); }
.qv-carousel__nav--next { right: var(--space-sm); }

.qv-carousel__dots {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.qv-carousel__dot {
  width: 0.6rem;
  height: 0.6rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-border);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.qv-carousel__dot--active {
  background: var(--color-primary);
  transform: scale(1.2);
}

.qv-carousel--single .qv-carousel__nav,
.qv-carousel--single .qv-carousel__dots {
  display: none;
}

@media (max-width: 640px) {
  .qv-carousel__slide { height: 300px; }
  .qv-carousel__nav { top: 150px; }
}

.qv-plu {
  font-size: var(--text-caption);
  color: var(--color-text-disabled);
  letter-spacing: 0.04em;
  margin: 0 0 var(--space-2xs);
}

.qv-name {
  font-family: var(--font-primary);
  font-size: var(--text-h3);
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 var(--space-xs);
  line-height: var(--leading-h3);
}

.qv-category {
  font-size: var(--text-body-sm);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-md);
}

.qv-price {
  margin-bottom: var(--space-md);
}

.qv-price .product-card__price {
  font-size: var(--text-h4);
}

.qv-desc {
  color: var(--color-text-secondary);
  line-height: var(--leading-body);
  margin: 0 0 var(--space-sm);
}

.qv-brand-story {
  font-size: var(--text-body-sm);
  font-style: italic;
  color: var(--color-text-secondary);
  border-left: 3px solid var(--color-primary);
  padding-left: var(--space-sm);
  margin: 0 0 var(--space-md);
}

#qvTags .product-card__tags {
  margin-bottom: var(--space-sm);
}

.qv-preorder-note {
  background: var(--color-info-bg, #e3f2fd);
  color: var(--color-info, #1565c0);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: var(--text-body-sm);
  line-height: var(--leading-body-sm);
  margin: 0 0 var(--space-lg);
}

.qv-preorder-note[hidden] {
  display: none;
}

.qv-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.qv-meta:empty {
  display: none;
}

.qv-meta-row {
  display: flex;
  gap: var(--space-sm);
  font-size: var(--text-body-sm);
  line-height: var(--leading-body-sm);
}

.qv-meta-label {
  font-weight: 600;
  color: var(--color-text-primary);
  min-width: 7rem;
  flex-shrink: 0;
}

.qv-meta-value {
  color: var(--color-text-secondary);
}

.qv-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border, #e0e0e0);
}

.qv-actions[hidden] {
  display: none;
}

.qv-add-btn {
  flex: 1;
  min-width: 140px;
}

@media (max-width: 640px) {
  .qv-overlay {
    padding: var(--space-sm);
    align-items: flex-end;
  }

  .qv-modal {
    max-height: 90vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .qv-body {
    padding: var(--space-lg);
  }
}

/* ── Header cart icon ── */

.header__cart {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  margin-left: var(--space-sm);
  padding: var(--space-xs);
  border-bottom: none !important;
}

.header__cart:hover {
  color: var(--color-primary);
}

.header__cart svg {
  width: 24px;
  height: 24px;
}

.header__cart-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--color-primary);
  color: var(--color-text-primary);
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-family: var(--font-body);
}

.header__cart-badge[hidden] {
  display: none;
}

/* ── Coming soon: panettone / pandoro strip, brands due in + enquiry ── */

.arriving-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-md);
  background: rgba(245, 184, 0, 0.15);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin: 0 0 var(--space-lg);
}

.arriving-strip[hidden] { display: none; }

.arriving-strip__text {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-text-primary);
}

.arriving-strip__btn {
  padding: var(--space-xs) var(--space-md);
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.arriving-strip__btn:hover {
  background: var(--color-primary-hover);
}

.arriving-strip--link {
  justify-content: center;
  background: none;
  border-left: none;
  padding: 0;
}

.arriving-strip--link .arriving-strip__text {
  font-weight: 400;
  font-size: var(--text-body-sm);
  color: var(--color-text-secondary);
  text-align: center;
}

.arriving-strip__link {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--color-text-primary);
  text-decoration: underline;
  text-decoration-color: var(--color-primary);
  text-underline-offset: 3px;
  cursor: pointer;
}

.arriving-panel {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  margin: 0 auto var(--space-xl);
  max-width: 40rem;
  line-height: var(--leading-body);
}

.arriving-panel[hidden] { display: none; }

.arriving-panel__title {
  font-family: var(--font-primary);
  font-size: var(--text-h3);
  margin: 0 0 var(--space-sm);
}

.arriving-panel p {
  margin: 0 0 var(--space-md);
  color: var(--color-text-secondary);
}

.arriving-brands {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.6rem 1.5rem;
  margin: 0 0 var(--space-sm);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  list-style: none;
}

.arriving-brands li {
  position: relative;
  padding-left: 0.9rem;
  font-size: var(--text-body-sm);
  line-height: 1.35;
  color: var(--color-text-primary);
}

.arriving-brands li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--color-primary, #F5B800);
}

.arriving-brands__note {
  display: block;
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
}

.arriving-brands__more {
  margin: 0 0 var(--space-lg);
  font-size: var(--text-body-sm);
  font-style: italic;
  color: var(--color-text-secondary);
}

.arriving-form {
  margin-top: var(--space-md);
}

.arriving-form__hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

#enquiryCaptcha {
  margin-bottom: var(--space-md);
}

#enquirySuccess[hidden] { display: none; }

#enquirySuccess h3 {
  font-family: var(--font-primary);
  margin: 0 0 var(--space-sm);
}

/* ── Pre-order explainer panel (legacy) ── */

.preorder-explainer {
  background: var(--color-info-bg, #e3f2fd);
  border: 1px solid var(--color-info, #2196f3);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  line-height: var(--leading-body);
}

.preorder-explainer[hidden] { display: none; }

.preorder-explainer p {
  margin: 0 0 var(--space-sm);
  color: var(--color-info, #1565c0);
  font-size: var(--text-body-sm);
}

.preorder-explainer p:last-child { margin-bottom: 0; }

.preorder-explainer__deposit {
  font-weight: 600;
}

/* ── Brand, dietary and sort dropdowns ── */

.catalogue-refine {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm) var(--space-md);
  margin-top: var(--space-md);
}

.catalogue-refine__field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 11rem;
}

.catalogue-refine__label {
  font-size: var(--text-caption);
  font-weight: 600;
  color: var(--color-text-secondary);
}

.catalogue-refine__field--set .catalogue-select {
  border-color: var(--color-primary);
  background-color: rgba(245, 184, 0, 0.08);
}

.catalogue-select {
  width: 100%;
  color: var(--color-text-primary);
  padding: 0.6rem 2rem 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-body-sm);
  font-family: var(--font-body);
  background: var(--color-surface);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  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 d='M2 4l4 4 4-4' fill='none' stroke='%23666' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
}

.catalogue-select:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px rgba(245, 184, 0, 0.25);
}

/* ── Search bar + category filters ── */

.catalogue-toolbar {
  margin-bottom: var(--space-xl);
  scroll-margin-top: 140px;
}

.catalogue-toolbar[hidden] {
  display: none;
}

.catalogue-search {
  position: relative;
  max-width: 28rem;
  margin: 0 auto var(--space-md);
}

.catalogue-search__icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-disabled);
  pointer-events: none;
}

.catalogue-search__input {
  width: 100%;
  padding: 0.75rem 0.75rem 0.75rem 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-body);
  font-family: var(--font-body);
  background: var(--color-surface);
  transition: border-color var(--transition-fast);
}

.catalogue-search__input:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px rgba(245, 184, 0, 0.25);
}

.catalogue-search__input::placeholder {
  color: var(--color-text-disabled);
}

.catalogue-filters {
  display: block;
}

/* Auto margins centre the row when it fits; justify-content: center would clip the first tabs when it scrolls. */
.catalogue-groups {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--color-border);
  -webkit-overflow-scrolling: touch;
}

.catalogue-groups::-webkit-scrollbar {
  display: none;
}

.catalogue-groups--more-right {
  -webkit-mask-image: linear-gradient(to right, #000 82%, transparent);
  mask-image: linear-gradient(to right, #000 82%, transparent);
}

.catalogue-groups--more-left {
  -webkit-mask-image: linear-gradient(to left, #000 82%, transparent);
  mask-image: linear-gradient(to left, #000 82%, transparent);
}

.catalogue-groups--more-left.catalogue-groups--more-right {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
}

.catalogue-group {
  flex-shrink: 0;
  padding: 0.6rem 0.1rem;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.catalogue-group:first-child {
  margin-left: auto;
}

.catalogue-group:last-child {
  margin-right: auto;
}

.catalogue-group:hover {
  color: var(--color-text-primary);
}

.catalogue-group--active {
  color: var(--color-text-primary);
  font-weight: 600;
  border-bottom-color: var(--color-primary);
}

.catalogue-subfilters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-md);
}

.catalogue-filter {
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  font-family: var(--font-body);
  font-size: var(--text-caption);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.catalogue-filter:hover {
  border-color: var(--color-primary);
  background: rgba(245, 184, 0, 0.08);
}

.catalogue-filter--active {
  background: var(--color-primary);
  color: var(--color-text-primary);
  border-color: var(--color-primary);
  font-weight: 600;
}

/* ── Fulfilment radio buttons ── */

.fulfilment-radios {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.fulfilment-option {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.fulfilment-option:hover {
  border-color: var(--color-primary);
}

.fulfilment-option:has(input:checked) {
  border-color: var(--color-primary);
  background: rgba(245, 184, 0, 0.05);
}

.fulfilment-option input[type="radio"] {
  accent-color: var(--color-primary);
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.fulfilment-option__label {
  font-weight: 600;
  font-size: var(--text-body-sm);
  font-family: var(--font-body);
}

.fulfilment-message {
  font-size: var(--text-body-sm);
  color: var(--color-text-secondary);
  background: var(--color-surface-sunken);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-top: var(--space-sm);
  margin-bottom: var(--space-md);
  line-height: var(--leading-body-sm);
}

.fulfilment-message[hidden] {
  display: none;
}

/* ── Address autocomplete dropdown ── */

.address-autocomplete-wrap {
  position: relative;
}

.address-autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  list-style: none;
  padding: 0;
  margin: 0;
}

.address-autocomplete-list[hidden] {
  display: none;
}

.address-autocomplete-list li {
  padding: 0.6rem 0.75rem;
  font-size: var(--text-body-sm);
  font-family: var(--font-body);
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
}

.address-autocomplete-list li:last-child {
  border-bottom: none;
}

.address-autocomplete-list li:hover,
.address-autocomplete-list li.is-active {
  background: rgba(245, 184, 0, 0.08);
}

.address-autocomplete-list li .ac-secondary {
  color: var(--color-text-secondary);
  font-size: var(--text-caption);
}

@media (max-width: 640px) {
  .fulfilment-radios {
    flex-direction: column;
  }
}

/* ── Checkout page ── */

.checkout-panel {
  max-width: 40rem;
  margin: 0 auto var(--space-xl);
}

.checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.checkout-continue {
  font-family: var(--font-body);
  font-size: var(--text-body-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
}

.checkout-continue:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.checkout-empty {
  text-align: center;
  padding: var(--space-2xl) 0;
  font-family: var(--font-body);
  color: var(--color-text-secondary);
}

.checkout-empty[hidden] {
  display: none;
}

.checkout-empty p {
  margin-bottom: var(--space-lg);
  font-size: var(--text-h4);
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
  gap: var(--space-md);
  font-family: var(--font-body);
}

.cart-item:first-child {
  border-top: 1px solid var(--color-border);
}

.cart-item__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.cart-item__name {
  font-weight: 600;
  color: var(--color-text-primary);
  font-size: var(--text-body);
}

.cart-item__plu {
  font-size: var(--text-caption);
  color: var(--color-text-disabled);
}

.cart-item__price {
  font-size: var(--text-body-sm);
  color: var(--color-text-secondary);
}

.cart-item__preorder-tag {
  font-size: var(--text-caption);
  color: var(--color-info, #2196f3);
  font-weight: 600;
}

/* ── Cart section labels (grouped items) ── */

.cart-section-label {
  font-weight: 700;
  font-size: var(--text-body-sm);
  color: var(--color-text-secondary);
  margin: var(--space-sm) 0 var(--space-xs);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border);
}

.cart-section-label:first-child { margin-top: 0; }

.cart-section-label--preorder {
  color: var(--color-info, #1565c0);
  border-bottom-color: var(--color-info, #2196f3);
  margin-top: var(--space-lg);
}

.cart-section-sub {
  font-weight: 400;
  opacity: 0.7;
}

/* ── Checkout deposit summary ── */

.checkout-deposit {
  background: var(--color-info-bg, #e3f2fd);
  border: 1px solid var(--color-info, #2196f3);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-top: var(--space-md);
}

.checkout-deposit[hidden] { display: none; }

.checkout-deposit__heading {
  font-weight: 700;
  font-size: var(--text-body-sm);
  color: var(--color-info, #1565c0);
  margin: 0 0 var(--space-sm);
}

.checkout-deposit__row {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-body-sm);
  color: var(--color-info, #1565c0);
  margin-bottom: var(--space-xs);
}

.checkout-deposit__row:last-child { margin-bottom: 0; }

.checkout-deposit__row--bold {
  font-weight: 700;
}

.checkout-deposit__note {
  font-size: var(--text-caption);
  color: var(--color-info, #1565c0);
  margin: var(--space-sm) 0 0;
  opacity: 0.85;
}

.cart-item__controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.cart-item__remove {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  width: 2rem;
  height: 2rem;
  font-size: 1.2rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.cart-item__remove:hover {
  border-color: var(--color-error);
  color: var(--color-error);
  background: var(--color-error-bg);
}

.checkout-total {
  padding: var(--space-lg) 0;
  font-family: var(--font-body);
}

.checkout-total[hidden] {
  display: none;
}

.checkout-total__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-h4);
  font-weight: 600;
  color: var(--color-text-primary);
}

.checkout-total__row--secondary {
  font-size: var(--text-body-sm);
  font-weight: 400;
  color: var(--color-text-secondary);
  margin-top: var(--space-xs);
}

.checkout-total__tbc {
  font-weight: 600;
  color: var(--color-text-primary);
}

.pay-notice {
  margin-top: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  border: 2px solid #d4a017;
  border-left-width: 6px;
  border-radius: var(--radius-md);
  background: #fff8e1;
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

.pay-notice p {
  margin: 0 0 var(--space-xs);
}

.pay-notice p:last-child {
  margin-bottom: 0;
}

.pay-notice__title {
  font-size: var(--text-h4);
  font-weight: 700;
}

.pay-notice--compact {
  margin: 0 0 var(--space-md);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-body-sm);
  line-height: var(--leading-body-sm);
}

.checkout-total__note {
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
  margin-top: var(--space-sm);
}

.checkout-total__note--highlight {
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--color-text-primary);
  background: var(--color-info-bg, #e3f2fd);
  border-radius: var(--radius-sm, 4px);
  padding: var(--space-xs) var(--space-sm);
  margin-top: var(--space-md);
}

@media (max-width: 640px) {
  .cart-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-item__controls {
    width: 100%;
    justify-content: space-between;
  }

  .catalogue-groups {
    gap: var(--space-md);
  }

  .catalogue-refine__field {
    flex: 1 1 9rem;
    min-width: 0;
  }
}

/* -- Product pages -- */
.product-pager {
  margin: var(--space-2xl) 0 0;
  text-align: center;
}

.product-pager[hidden] {
  display: none;
}

.product-pager__count {
  margin: 0 0 var(--space-sm);
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-size: var(--text-body-sm);
}

.product-pager__controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-xs);
}

.product-pager__btn {
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-body-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.product-pager__btn:hover:not(:disabled) {
  border-color: var(--color-primary);
}

.product-pager__btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.product-pager__num--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-secondary);
}

.product-pager__gap {
  padding: 0 var(--space-2xs);
  color: var(--color-text-secondary);
}
