/* ==========================================================================
   OSTOV — front-end base of the plugin (ostov-core).

   Scope
     Only the plugin classes that the approved Stage 1.5 stylesheet does not
     cover. The plugin prints every element twice: once with its own
     `ostov-` name and once with the prototype name, so the prototype twins
     (.rail, .plates, .buy, .spec, .toolbar, .buybar, .drawing) are already
     styled by prototypes/assets/stage15.css and are NOT repeated here.

   Split of duties with assets/css/blocks.css
     This file carries appearance: colour, type, hairlines, states, focus.
     The layout file carries the grid: containers, columns, gaps, rhythm.

   House rules
     Radius is 3px everywhere, hairlines instead of depth, no shadows, no
     gradients, no blur, no emoji. Prussian blue marks what is measured,
     burnt clay marks what is sold — never the other way round.
   ========================================================================== */

:root {
  --sheet:#F4F1E9;
  --sheet-2:#EAE6DA;
  --sheet-3:#DED9CA;
  --paper:#FBF9F4;
  --ink:#191712;
  --ink-2:#55503F;
  --ink-3:#6B6554;
  --draft:#1F4B99;
  --draft-soft:#E3E8F2;
  --clay:#9C4A22;
  --clay-soft:#F2E4DB;
  --rule:#CBC5B6;
  --rule-2:#DDD8C9;
  --ok:#3F6B3A;
  --warn:#8A6A1F;
  --radius:3px;
  --gap:28px;
  --page-pad:72px;
  --page-pad-compact:28px;
  --max-width:1560px;
}

/* ---- empty states -------------------------------------------------------- */
/* A block without a product says so plainly and takes no room. */

.ostov-plate--empty,
.ostov-buy-panel--empty,
.ostov-configurator--empty,
.ostov-gallery--empty {
  border:1px solid var(--rule);
  border-radius:var(--radius);
  background:var(--sheet-2);
  color:var(--ink-2);
  padding:26px;
  font-size:14px;
}

.ostov-plate--empty p,
.ostov-buy-panel--empty p,
.ostov-configurator--empty p,
.ostov-gallery--empty p {
  max-width:66ch;
}

/* An empty purchase bar is no bar at all: it must not stick to the edge. */
.ostov-buybar--empty {
  display:none;
}

/* ---- catalogue tile: the parts the prototype did not style ---------------- */

.ostov-plate__variants {
  margin:6px 0 0;
  font-size:12px;
  color:var(--ink-3);
  font-variant-numeric:tabular-nums;
}

.ostov-plate__demo {
  margin:4px 0 0;
  font-size:12px;
  color:var(--ink-3);
}

/* A dimension is a measurement: it belongs to the drawing register. */
.ostov-plate__dims {
  font-size:12px;
  color:var(--draft);
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}

/* ---- drawing caption ----------------------------------------------------- */

.ostov-drawing__cap {
  font-size:12.5px;
  color:var(--ink-2);
}

.ostov-drawing__note {
  color:var(--draft);
  font-size:12px;
}

/* ---- commercial conditions strip ------------------------------------------ */

.ostov-conditions {
  font-size:13px;
  line-height:1.45;
  color:var(--ink-2);
}

.ostov-conditions__item {
  max-width:66ch;
}

.ostov-conditions__item b {
  color:var(--ink);
  font-weight:600;
  font-variant-numeric:tabular-nums;
}

/* ---- facet rail ---------------------------------------------------------- */
/* The plugin builds the facets as links, so the checkbox of the prototype
   needs a state of its own: a link that carries the current selection. */

.ostov-filters__opt {
  color:var(--ink-2);
  text-decoration:none;
  transition:color .16s ease;
}

.ostov-filters__opt:hover {
  color:var(--ink);
}

.ostov-filters__opt.is-active {
  color:var(--ink);
  font-weight:600;
}

.ostov-filters__name {
  color:inherit;
}

.ostov-filters__count {
  font-variant-numeric:tabular-nums;
}

.ostov-filters__opt.is-active .ostov-filters__box {
  background:var(--clay);
  border-color:var(--clay);
}

.ostov-filters__opt.is-active .ostov-filters__box::after {
  content:'';
  position:absolute;
  left:4px;
  top:1px;
  width:5px;
  height:9px;
  border:solid #fff;
  border-width:0 1.6px 1.6px 0;
  transform:rotate(42deg);
}

/* The price facet is a small form of its own. */
.ostov-filters__price-label {
  font-size:13px;
  color:var(--ink-2);
}

.ostov-filters__price-input {
  font-family:inherit;
  font-size:14px;
  width:96px;
  padding:9px 12px;
  border:1px solid var(--rule);
  border-radius:var(--radius);
  background:var(--sheet);
  color:var(--ink);
}

.ostov-filters__price-input:hover {
  border-color:var(--ink-3);
}

.ostov-filters__price-submit {
  font-family:inherit;
  font-size:13px;
  font-weight:600;
  padding:9px 16px;
  border:1px solid var(--rule);
  border-radius:var(--radius);
  background:var(--paper);
  color:var(--ink);
  cursor:pointer;
  transition:border-color .16s ease;
}

.ostov-filters__price-submit:hover {
  border-color:var(--ink-3);
}

.ostov-filters__price-note {
  max-width:66ch;
}

/* ---- toolbar ------------------------------------------------------------- */

.ostov-toolbar__count {
  font-size:14px;
  color:var(--ink-2);
}

.ostov-toolbar__count b {
  color:var(--ink);
  font-weight:600;
  font-variant-numeric:tabular-nums;
}

.ostov-toolbar__label {
  font-size:13px;
}

.ostov-toolbar__submit {
  font-family:inherit;
  font-size:13px;
  font-weight:600;
  padding:9px 16px;
  border:1px solid var(--rule);
  border-radius:var(--radius);
  background:var(--paper);
  color:var(--ink);
  cursor:pointer;
  transition:border-color .16s ease;
}

.ostov-toolbar__submit:hover {
  border-color:var(--ink-3);
}

/* ---- buy panel ----------------------------------------------------------- */

.ostov-buy-panel__vat {
  font-size:12px;
  color:var(--ink-2);
  max-width:66ch;
}

.ostov-buy-panel__row dd {
  font-variant-numeric:tabular-nums;
}

.ostov-buy-panel__colours {
  margin-top:26px;
}

.ostov-buy-panel__swatches {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.ostov-buy-panel__swatch {
  width:20px;
  height:20px;
  padding:0;
  border:1px solid var(--rule);
  border-radius:50%;
  cursor:pointer;
}

/* The selected colour is a purchase decision: the commerce register. */
.ostov-buy-panel__swatches .ostov-buy-panel__swatch[aria-pressed="true"] {
  outline:2px solid var(--clay);
  outline-offset:2px;
}

.ostov-buy-panel__options {
  margin-top:22px;
}

.ostov-buy-panel__option-title {
  font-size:13px;
  color:var(--ink-2);
}

.ostov-buy-panel__select {
  min-width:180px;
}

.ostov-buy-panel__qty {
  margin-top:22px;
  font-size:14px;
}

.ostov-buy-panel__qty-label {
  color:var(--ink-2);
}

.ostov-buy-panel__qty-input {
  font-family:inherit;
  font-size:14px;
  width:84px;
  padding:9px 12px;
  border:1px solid var(--rule);
  border-radius:var(--radius);
  background:var(--sheet);
  color:var(--ink);
}

.ostov-buy-panel__qty-input:hover {
  border-color:var(--ink-3);
}

.ostov-buy-panel__add {
  margin-top:18px;
}

.ostov-buy-panel__passport {
  margin-top:28px;
}

.ostov-buy-panel__passport-head {
  font-size:13px;
  font-weight:600;
  margin-bottom:11px;
}

.ostov-buy-panel__spec-row dd {
  font-variant-numeric:tabular-nums;
}

/* ---- configurator -------------------------------------------------------- */

.ostov-configurator__price {
  font-size:30px;
  font-weight:600;
  letter-spacing:-.022em;
}

.ostov-configurator__lead {
  font-size:14px;
  color:var(--ink-2);
}

.ostov-configurator__dims {
  font-size:13px;
  color:var(--draft);
  font-variant-numeric:tabular-nums;
}

.ostov-configurator__option-title {
  font-size:13px;
  color:var(--ink-2);
}

.ostov-configurator__select {
  font-family:inherit;
  font-size:14px;
  color:var(--ink);
  background:var(--sheet);
  border:1px solid var(--rule);
  border-radius:var(--radius);
  padding:9px 12px;
  min-width:180px;
  max-width:100%;
  cursor:pointer;
}

.ostov-configurator__select:hover {
  border-color:var(--ink-3);
}

.ostov-configurator__qty {
  font-family:inherit;
  font-size:14px;
  width:84px;
  padding:9px 12px;
  border:1px solid var(--rule);
  border-radius:var(--radius);
  background:var(--sheet);
  color:var(--ink);
}

.ostov-configurator__quantity {
  font-size:14px;
}

.ostov-configurator__quantity label {
  color:var(--ink-2);
}

.ostov-configurator__add {
  margin-top:18px;
}

.ostov-configurator__noscript {
  font-size:13px;
  color:var(--ink-2);
  max-width:66ch;
}

.ostov-configurator__noscript ul {
  margin-top:8px;
}

.ostov-configurator__noscript li {
  padding:2px 0;
}

/* ---- wishlist ------------------------------------------------------------ */

.ostov-wishlist__count {
  font-size:14px;
  color:var(--ink-2);
  margin-bottom:4px;
}

.ostov-wishlist__count b {
  color:var(--ink);
  font-weight:600;
  font-variant-numeric:tabular-nums;
}

.ostov-wishlist__name {
  font-size:16px;
  font-weight:600;
}

.ostov-wishlist__dims {
  font-size:13px;
  color:var(--draft);
  font-variant-numeric:tabular-nums;
}

.ostov-wishlist__price {
  font-size:16px;
  font-weight:600;
  font-variant-numeric:tabular-nums;
}

.ostov-wishlist__lead {
  font-size:12.5px;
  color:var(--ink-2);
}

.ostov-wishlist__remove {
  font-size:13px;
  color:var(--ink-2);
  text-decoration:underline;
  text-decoration-color:var(--rule);
  text-decoration-thickness:1px;
  text-underline-offset:4px;
  transition:text-decoration-color .18s ease;
}

.ostov-wishlist__remove:hover {
  color:var(--ink);
  text-decoration-color:var(--ink);
}

.ostov-wishlist__empty {
  font-size:14px;
  color:var(--ink-2);
}

.ostov-wishlist__empty p {
  max-width:66ch;
}

/* ---- demonstration badge ------------------------------------------------- */
/* A marker of model values. It is information, not a call to buy, so it
   stays in ink. */

.ostov-demo-badge {
  display:inline-block;
  font-size:11px;
  font-weight:600;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--ink-2);
  border:1px solid var(--rule);
  border-radius:var(--radius);
  padding:3px 7px;
}

.ostov-demo-badge--inline {
  margin:0;
}

/* ---- section head -------------------------------------------------------- */
/* The block wrapper used above a catalogue section. */

.ostov-shop-head {
  border-top:1px solid var(--ink);
  padding-top:18px;
  margin:0 0 20px;
}

.ostov-shop-head h2,
.ostov-shop-head h3 {
  margin:0;
  font-size:clamp(24px, 2.7vw, 42px);
  font-weight:500;
  letter-spacing:-.022em;
}

.ostov-shop-head p {
  max-width:66ch;
  color:var(--ink-2);
  font-size:14px;
}

/* ---- focus --------------------------------------------------------------- */
/* The outline is always visible: 2px of ink, 3px of air. */

.ostov-filters__opt:focus-visible,
.ostov-filters__reset:focus-visible,
.ostov-filters__price-input:focus-visible,
.ostov-filters__price-submit:focus-visible,
.ostov-toolbar__select:focus-visible,
.ostov-toolbar__submit:focus-visible,
.ostov-buy-panel__select:focus-visible,
.ostov-buy-panel__qty-input:focus-visible,
.ostov-buy-panel__swatch:focus-visible,
.ostov-buy-panel__add:focus-visible,
.ostov-configurator__select:focus-visible,
.ostov-configurator__qty:focus-visible,
.ostov-configurator__add:focus-visible,
.ostov-wishlist__remove:focus-visible,
.ostov-wishlist__name:focus-visible {
  outline:2px solid var(--ink);
  outline-offset:3px;
}

/* ---- motion -------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce){
  .ostov-filters__opt,
  .ostov-filters__price-submit,
  .ostov-toolbar__submit,
  .ostov-wishlist__remove {
    transition:none;
  }
}
