/* Autoexperten storefront theme.
   Loaded after shared customer CSS and scoped to the channel body class. */

body.theme-autoexperten {
  --brand-primary: #000C9F;
  --brand-primary-hover: #0845F4;
  --brand-primary-soft: rgba(8, 69, 244, 0.10);
  --brand-primary-ring: rgba(8, 69, 244, 0.24);
  /* Themed storefronts follow their own brand colour and keep their old corner sizes. */
  --brand-primary-text: var(--brand-primary);
  --radius-md: 8px;
  --radius-lg: 12px;
  --status-danger: #F71249;
  --status-danger-soft: rgba(247, 18, 73, 0.12);
  --status-warning: #F71249;
  --status-warning-soft: rgba(247, 18, 73, 0.14);
  --status-success: #000C9F;
  --status-success-soft: rgba(0, 12, 159, 0.12);
  --status-info: #0845F4;
  --status-info-soft: rgba(8, 69, 244, 0.12);
  --bg-page: #F5F6F7;
  --bg-surface: #FFFFFF;
  --bg-surface-muted: #F5F6F7;
  --bg-surface-hover: #EEF1F4;
  --border-default: rgba(55, 71, 79, 0.18);
  --border-strong: rgba(55, 71, 79, 0.48);
  --border-subtle: #DCE1E5;
  --text-primary: #37474F;
  --text-secondary: #54656E;
  /* Solid, not the old see-through rgba(55,71,79,.72): that measured 4.20:1 on
     --bg-page and 4.00:1 on the logo dropzone's blue tint, under the 4.5:1 floor
     for small text. This grey is 5.2:1 on the page and 5.6:1 on white. */
  --text-muted: #5A6A72;
  --text-on-brand: #FFFFFF;
  /* The action red for filled buttons. #F71249 is 4.09:1 under white text (AA
     needs 4.5:1 below large size); this is 5.2:1, its hover shade 6.7:1. The
     brighter #F71249 stays as --status-danger / badges' old tone elsewhere. */
  --ae-accent: #D80D3D;
  --ae-accent-hover: #B80B34;
  --font-sans: 'Autoexperten Text', Arial, sans-serif;
  --font-mono: Arial, sans-serif;
}

body.theme-autoexperten,
body.theme-autoexperten .product-card,
body.theme-autoexperten .product-info,
body.theme-autoexperten .toolbar-content,
body.theme-autoexperten .basket-order-modal,
body.theme-autoexperten .modal-content {
  font-family: 'Autoexperten Text', Arial, sans-serif;
  text-align: left;
}

body.theme-autoexperten h1,
body.theme-autoexperten h2,
body.theme-autoexperten h3,
body.theme-autoexperten h4,
body.theme-autoexperten h5,
body.theme-autoexperten .product-card__title,
body.theme-autoexperten .category-title,
body.theme-autoexperten .product-info__title,
body.theme-autoexperten .product-sizes__heading {
  font-family: 'Autoexperten Headline', Arial, sans-serif;
  text-align: left;
}

body.theme-autoexperten .navbar {
  background: #FFFFFF;
  border-bottom-color: var(--border-subtle);
  min-height: 100px;
}

body.theme-autoexperten .navbar .w-100 {
  justify-content: center !important;
}

body.theme-autoexperten .navbar-brand {
  margin: 0 !important;
  padding: 0.75rem 0;
}

body.theme-autoexperten .navbar-brand img {
  height: 44px;
  max-width: 260px;
  object-fit: contain;
}

body.theme-autoexperten [data-bs-target="#howItWorksModal"] {
  display: none !important;
}

body.theme-autoexperten .toolbar {
  background: var(--bg-page);
  border-bottom-color: var(--border-subtle);
}

body.theme-autoexperten .toolbar-cart-btn,
body.theme-autoexperten .product-cta__btn,
body.theme-autoexperten #sizeSelectionModal #addToOrderBtn,
body.theme-autoexperten #submitOrderBtn {
  background: var(--ae-accent);
  border-color: var(--ae-accent);
  color: var(--text-on-brand);
}

body.theme-autoexperten .toolbar-cart-btn:hover,
body.theme-autoexperten .product-cta__btn:hover,
body.theme-autoexperten #sizeSelectionModal #addToOrderBtn:hover,
body.theme-autoexperten #submitOrderBtn:hover {
  background: var(--ae-accent-hover);
  border-color: var(--ae-accent-hover);
  color: var(--text-on-brand);
}

body.theme-autoexperten .toolbar-cart-badge,
body.theme-autoexperten .product-card-badge {
  background: var(--ae-accent) !important;
  color: var(--text-on-brand) !important;
}

body.theme-autoexperten .product-card:hover,
body.theme-autoexperten .category-card:hover,
body.theme-autoexperten .product-gallery__thumb.is-active {
  border-color: #0845F4;
}

body.theme-autoexperten .product-size-row__hint--existing {
  color: var(--brand-primary);
}

/* Autoexperten customers do not need raw product codes surfaced; the storefront
   keeps them for the default/joulutalo stores. */
body.theme-autoexperten .product-card__sku,
body.theme-autoexperten .product-info__code {
  display: none;
}

/* Product photos ship on a pure-white background, so keep the card media frame
   white instead of the muted page surface to avoid a grey halo. */
body.theme-autoexperten .product-card__media {
  background: #FFFFFF;
}

body.theme-autoexperten .product-color-switcher__swatch.is-active {
  border-color: #000C9F;
  background: rgba(0, 12, 159, 0.08);
}

body.theme-autoexperten .product-color-switcher__swatch:focus-visible {
  border-color: #0845F4;
  box-shadow: 0 0 0 calc(var(--space-1) / 2) rgba(8, 69, 244, 0.24);
}

/* Stable detail-page gallery frame: Autoexperten catalog photos vary in
   dimensions and aspect ratio, so the shared image-hugging gallery box (and
   the info column beside it) resized from product to product on desktop.
   Lock the frame to a 1:1 square — the look mobile already has, where the
   photos fill the full width — and letterbox each photo inside it. The
   shared 60svh/50svh viewport caps from product.css still bound the frame
   on short viewports; the image simply stays contained within it. */
body.theme-autoexperten .product-gallery__main {
  aspect-ratio: 1 / 1;
  width: 100%;
}

body.theme-autoexperten .product-gallery__img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* --------------------------------------------------------------------------
   Multi-step checkout (autoexperten only). The basket modal markup is shared
   across stores; these styles only apply when the autoexperten theme is active,
   which is also the only channel where the multi-step flow is enabled.
   -------------------------------------------------------------------------- */

/* "Siirry kassalle" is the primary CTA on step 1 — match the brand action red. */
body.theme-autoexperten #checkoutNextBtn {
  background: var(--ae-accent);
  border-color: var(--ae-accent);
  color: var(--text-on-brand);
}

body.theme-autoexperten #checkoutNextBtn:hover {
  background: var(--ae-accent-hover);
  border-color: var(--ae-accent-hover);
  color: var(--text-on-brand);
}

/* Step indicator. :not(.d-none) so the flex display doesn't override the
   .d-none class that gates the single-step (non-autoexperten) flow. */
body.theme-autoexperten .checkout-stepper:not(.d-none) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-3) var(--space-4);
  list-style: none;
  border-bottom: 1px solid var(--border-default);
}

body.theme-autoexperten .checkout-stepper__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-muted);
}

body.theme-autoexperten .checkout-stepper__item:not(:last-child)::after {
  content: '';
  width: var(--space-6);
  height: 2px;
  margin-left: var(--space-2);
  background: var(--border-default);
}

body.theme-autoexperten .checkout-stepper__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-muted);
  border: 1px solid var(--border-default);
  font-size: var(--font-size-xs);
  font-weight: 700;
}

body.theme-autoexperten .checkout-stepper__item.is-active {
  color: var(--text-primary);
}

body.theme-autoexperten .checkout-stepper__item.is-active .checkout-stepper__num {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--text-on-brand);
}

/* Step 2: orderer contact + shipping */
body.theme-autoexperten .basket-contact-panel {
  padding: var(--space-4);
}

/* Keep the form a comfortable reading width: on a laptop the three fields ran
   the full 1,166px and the company name sat over 1,000px from its label. */
body.theme-autoexperten .basket-contact-fields {
  max-width: calc(var(--space-10) * 14);
}

body.theme-autoexperten .basket-contact-panel .basket-section-heading {
  padding-inline: 0;
  padding-top: 0;
}

body.theme-autoexperten .checkout-readonly-card {
  margin-bottom: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface-muted);
}

/* Label and value read as a pair: label in a fixed column, value right beside. */
body.theme-autoexperten .checkout-readonly-row {
  display: grid;
  grid-template-columns: calc(var(--space-10) * 3) minmax(0, 1fr);
  gap: var(--space-3);
  font-size: var(--font-size-sm);
}

body.theme-autoexperten .checkout-readonly-row + .checkout-readonly-row {
  margin-top: var(--space-1);
}

body.theme-autoexperten .checkout-readonly-label {
  color: var(--text-muted);
  font-weight: 600;
}

body.theme-autoexperten .checkout-readonly-value {
  color: var(--text-primary);
  font-weight: 600;
  text-align: left;
}

body.theme-autoexperten .checkout-ship-toggle {
  margin-bottom: var(--space-3);
}

body.theme-autoexperten .checkout-shipping-fields {
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--border-default);
}
