/* Savolino's configurator and cart pages: a bar (Назад, the product, the
   name, the cart) and under it the configurator in a frame, the whole
   screen and no more (js/stranica.js keeps it so while a phone's keyboard
   is open). The look of the home page (css/savolino.css): ivory, cocoa,
   the product's name in Playfair Display. The configurator's own look:
   css/konfigurator.css. */

@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/playfair-display-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/playfair-display-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@font-face { font-family: "Nunito"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/nunito-cyrillic-800-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/nunito-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/golos-text-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/golos-text-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/golos-text-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/golos-text-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --linen: #faf5ed;
  --oat: #f4ebdf;
  --ink: #3b2a20;
  --muted: #7a6455;
  --line: #e8ddcf;
  --rose: #a35d58;
  --white: #fffdf9;
  --round: "Nunito", "Arial Rounded MT Bold", system-ui, sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --text: "Golos Text", system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body { background: var(--linen); color: var(--ink); font-family: var(--text); font-size: 16px; line-height: 1.5; }
[hidden] { display: none !important; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* The whole screen: the bar, then the frame. */
.shell { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--linen); }

.bar {
  flex: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding-block: 10px;
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  padding-left: max(32px, env(safe-area-inset-left, 0px));
  padding-right: max(32px, env(safe-area-inset-right, 0px));
  border-bottom: 1px solid var(--line);
  background: var(--linen);
}
.bar-side { display: flex; align-items: center; gap: 20px; min-width: 0; }
.bar-side.r { justify-content: flex-end; }
.back {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  min-height: 44px; padding: 0 18px 0 14px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line); background: rgba(255, 253, 249, 0.7);
  color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; letter-spacing: 0.01em;
}
.back:hover { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.bar-title { font-family: var(--serif); font-size: 20px; line-height: 1.2; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mark { font-family: var(--round); font-weight: 800; font-size: 26px; line-height: 26px; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.mark:hover { color: var(--ink); }
.mark img { display: block; width: auto; height: 40px; }
.cart {
  position: relative; flex: none; width: 44px; height: 44px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px var(--line); background: rgba(255, 253, 249, 0.7); color: var(--ink);
}
.cart:hover { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.cart[aria-current="page"] { box-shadow: inset 0 0 0 1px var(--ink); }
.count {
  position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--ink); color: var(--linen);
  font-size: 12px; line-height: 20px; font-weight: 600; text-align: center;
}

.frame { position: relative; flex: 1; min-height: 0; background: var(--linen); }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--linen); }
.loading {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 14px;
  color: var(--muted); font-size: 15px; pointer-events: none; transition: opacity 0.3s;
}
.loading.done { opacity: 0; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--rose); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* Phones: the name gives its place to the product. */
@media (max-width: 700px) {
  .bar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding-block: 8px; padding-top: max(8px, env(safe-area-inset-top, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .bar-side { display: contents; }
  .back { padding: 0 16px 0 12px; }
  .bar-title { font-size: 18px; }
  .mark { display: none; }
}
