/* Four opt-in storefronts share layout rhythm, keeping their merchant colors and type. */
body:is([data-theme="teknik"], [data-theme="butik"], [data-theme="moda"], [data-theme="yuva"]) {
  .product, .gallery, .buybox, .card, .card-body { min-width: 0; }
  .buybox h1, .card-name, .card-price, .home-category-grid a { overflow-wrap: anywhere; }
  .gallery-picks { position: static; display: flex; flex-wrap: wrap; gap: 0; width: auto; height: auto; clip: auto; overflow: visible; margin-bottom: .5rem; }
  .gallery-pick { appearance: none; width: 44px; height: 44px; margin: 0; border: 0; border-radius: 50%; background: radial-gradient(circle, var(--line) 5px, transparent 6px); cursor: pointer; }
  .gallery-pick:checked { background: radial-gradient(circle, var(--accent) 6px, transparent 7px); }
  .gallery-stage { aspect-ratio: 1; background: var(--card); }
  .gallery-stage img { height: 100%; aspect-ratio: auto; object-fit: var(--product-fit, cover); padding: 0; }
  .gallery:has(.gallery-pick:focus-visible) .gallery-stage { outline: 3px solid var(--accent); outline-offset: 3px; }
  .gallery-thumbs { gap: .6rem; scroll-snap-type: x proximity; }
  .gallery-thumbs label, .gallery-thumbs img { flex: 0 0 64px; width: 64px; height: auto; aspect-ratio: var(--product-frame, 1 / 1); object-fit: var(--product-fit, cover); }
  .buybox { padding: clamp(1rem, 3vw, 1.5rem); }
  .buybox h1 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); line-height: 1.3; font-weight: 600; }
  .buy-price { font-size: clamp(1.5rem, 3.2vw, 2.05rem); font-weight: 650; font-variant-numeric: tabular-nums; }
  .buy-vat { font-size: .875rem; }
  .buybox form[data-help-id="store.product.add"] { margin: 1rem 0 1.25rem; padding: 1rem; }
  .buybox form[data-help-id="store.product.add"] :is(select, input) { font-size: 1rem; min-height: 48px; width: 100%; max-width: 100%; }
  .buybox form[data-help-id="store.product.add"] button { width: 100%; min-height: 48px; font-size: 1rem; }
  .buy-copy { line-height: 1.7; }
  .banner, .hero, .technical-hero { overflow-wrap: anywhere; }
  .banner :is(h1, h2), .hero :is(h1, h2) { line-height: 1.15; }
  .home-category-grid > li { padding: 0; }
  .home-category-grid > li > a { width: 100%; min-height: 80px; padding: 1rem; gap: .5rem; }
  .home-product-grid .card-name, .card-name { display: block; -webkit-line-clamp: unset; overflow: visible; line-height: 1.45; min-height: 2.9em; }
  .card-media img { object-fit: var(--product-fit, cover); }
  .card-vat, .card-rating { font-size: .875rem; }
  .home-product-grid .card-go, .card-go, .card-add button { display: flex; justify-content: center; align-items: center; min-height: 44px; font-size: .875rem; }
}
body:is([data-theme="butik"], [data-theme="moda"]) {
  .gallery-stage, .card-media { aspect-ratio: 3 / 4; }
  .gallery-stage img { aspect-ratio: auto; }
}
@media (max-width: 840px) {
  body:is([data-theme="teknik"], [data-theme="butik"], [data-theme="moda"], [data-theme="yuva"]) {
    main { padding: 1.25rem 1rem 3rem; }
    .product { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
    .gallery, .buybox { position: static; }
    .gallery-stage { max-height: min(65svh, 34rem); }
    .gallery-stage img { max-height: min(65svh, 34rem); }
    .banner, .hero, .technical-hero { min-height: 0; margin-bottom: 1.5rem; padding: 1.5rem; border-radius: 16px; }
    .banner :is(h1, h2), .hero :is(h1, h2), .technical-hero h1 { font-size: clamp(1.4rem, 4.2vw, 2.1rem); }
    .technical-hero { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .technical-motif { display: none; }
    .slides { gap: 1rem; }
    .slide { flex-basis: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); }
    .slide img { min-height: 0; height: 190px; object-fit: contain; background: var(--card); }
    .slide div { padding: 1.25rem; }
    .slide h2 { font-size: 1.25rem; }
    .slide a { display: inline-flex; align-items: center; min-height: 44px; }
    .home-cats, .home-products, .rail { margin: 1.75rem 0; }
    .home-cats h2, .home-products h2, .rail h2 { font-size: 1.25rem; font-weight: 600; margin: 0 0 1rem; }
    main ul.home-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
    main ul.home-category-grid > li { min-width: 0; min-height: 80px; }
    main ul.grid:not(.list) { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    main ul.grid > .card { min-width: 0; }
    .home-product-grid > .card { padding: .75rem; }
    .home-product-grid .card-name, .card-name { font-size: 1rem; margin-top: .5rem; }
    .home-product-grid .card-price, .card-price { font-size: 1.02rem; font-weight: 650; letter-spacing: 0; }
    .home-product-grid .card-media { aspect-ratio: 1; }
    .card-go, .card-add button { width: 100%; }
    main ul.grid.list { grid-template-columns: minmax(0, 1fr); }
    main ul.grid.list > .card { grid-template-columns: minmax(0, 100px) minmax(0, 1fr); gap: .5rem; }
  }
  body:is([data-theme="butik"], [data-theme="moda"]) .home-product-grid .card-media { aspect-ratio: 3 / 4; }
  body[data-theme="yuva"] .home-product-grid > .card { padding: 0; }
}
@media (min-width: 360px) and (max-width: 840px) {
  body:is([data-theme="teknik"], [data-theme="butik"], [data-theme="moda"], [data-theme="yuva"]) main ul.grid:not(.list) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
}
@media (min-width: 640px) and (max-width: 840px) {
  body:is([data-theme="teknik"], [data-theme="butik"], [data-theme="moda"], [data-theme="yuva"]) {
    main { padding-inline: 1.5rem; }
    main ul.grid:not(.list), main ul.home-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
    .slide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
    .slide img { height: 240px; }
  }
}
@media (prefers-reduced-motion: reduce) {
  body:is([data-theme="teknik"], [data-theme="butik"], [data-theme="moda"], [data-theme="yuva"]) {
    .card, .home-category-grid > li, .gallery-thumbs img { transition: none; }
    .card:hover, .card:hover img, .home-category-grid > li:hover { transform: none; }
    .gallery-thumbs { scroll-snap-type: none; }
  }
}
@media (forced-colors: active) {
  body:is([data-theme="teknik"], [data-theme="butik"], [data-theme="moda"], [data-theme="yuva"]) .gallery-pick { appearance: auto; background: none; }
}
/* Sector card text is #777 on white (4.47:1). Small print needs 4.5:1. */
body.sector-shell:is([data-theme="teknik"], [data-theme="butik"], [data-theme="moda"], [data-theme="yuva"]) :is(.card-vat, .card-compare) { color: #5e646a; }
/* Yuva fills a lone detail link with the accent. Inside the purchase form it stays a text link. */
body.sector-shell[data-theme="yuva"] .card-go { color: var(--accent-ink, #fff); }
body.sector-shell[data-theme] .card-add .card-go {
  background: transparent;
  color: var(--ink);
  border: 0;
  box-shadow: none;
}
/* The light footer note belonged to the previous dark footer. */
body.sector-shell[data-theme="yuva"] .rich-footer :is(.foot-note, .foot-links a, .foot-social a) { color: inherit; }
