@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/open-sans-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+20BD, U+2116;
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/open-sans-latin.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 {
  --green: #48a216;
  --green-dark: #285a0c;
  --green-bright: #75d000;
  --ink: #222;
  --muted: #666;
  --paper: #fff;
  --background: #f6f6f7;
  --line: #dedede;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--ink); font: 16px/1.6 "Open Sans", Arial, sans-serif; }
button, input, select { font: inherit; }
a { color: var(--green-dark); }
a:hover { color: var(--green); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

.site-header { background: var(--paper); border-bottom: 1px solid #e9e9e9; }
.header-inner { max-width: 1440px; min-height: 104px; margin: auto; padding: 12px 36px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.header-label { color: #555; font-size: 12px; font-weight: 800; letter-spacing: 2px; }
.brand { display: inline-flex; align-items: center; justify-content: center; width: 154px; }
.brand img { display: block; width: 148px; height: 75px; object-fit: contain; }
.staff-link { justify-self: end; border: 1px dashed var(--green); padding: 9px 15px; color: var(--ink); font-size: 12px; font-weight: 800; letter-spacing: .4px; text-decoration: none; text-transform: uppercase; }
.staff-link:hover { background: var(--green); color: white; }
.brand-bar { min-height: 44px; padding: 9px 36px; display: flex; align-items: center; justify-content: center; gap: 18px; background: #327710; color: white; font-size: 12px; font-weight: 700; letter-spacing: 1.8px; text-align: center; text-transform: uppercase; }
.brand-bar span + span { padding-left: 18px; border-left: 1px solid #ffffffa6; }
main { width: min(100%, 1440px); min-height: 70vh; margin: auto; padding: 34px 36px 70px; }
footer { display: flex; justify-content: center; align-items: center; gap: 22px; padding: 28px 24px; background: #262626; color: #cfcfcf; font-size: 13px; }
footer strong { color: #9ee463; font-size: 14px; letter-spacing: 1.6px; }

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 15px; font-size: clamp(32px, 4vw, 50px); font-weight: 800; line-height: 1.13; letter-spacing: -1.3px; }
h2 { margin-bottom: 16px; font-size: 23px; font-weight: 800; line-height: 1.25; }
.eyebrow { margin-bottom: 9px; color: var(--green-dark); font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
.muted { color: var(--muted); }
.lead { max-width: 720px; margin-bottom: 0; color: #535353; font-size: 16px; }
.page-heading { margin-bottom: 23px; padding: 26px 32px 27px; border-top: 5px solid var(--green); background: var(--paper); box-shadow: 0 2px 14px #2222220a; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; color: #555; font-size: 13px; }
.meta span { padding: 6px 10px; border: 1px dashed #a5d78e; background: #f8fdf4; }
.notice { margin: 0 0 24px; padding: 12px 16px; border-left: 4px solid #e5a92b; background: #fff6df; color: #654b17; font-size: 14px; }
.error { color: #a82923; font-size: 14px; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 28px; }
.photo-section { min-width: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 10px; margin: 3px 0 16px; }
.section-heading h2 { margin: 0; }
.section-heading > span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.photo-card { overflow: hidden; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); box-shadow: 0 2px 8px #22222209; }
.photo-card img { display: block; width: 100%; height: 290px; object-fit: contain; background: #ececec; }
.photo-card > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 60px; padding: 10px 14px; font-size: 14px; font-weight: 700; }
.choose { flex-shrink: 0; border: 1px dashed var(--green); padding: 7px 10px; background: white; color: var(--green-dark); cursor: pointer; font-size: 13px; font-weight: 800; }
.choose:hover { background: var(--green); color: white; }
.basket, .panel { padding: 25px; border: 1px solid var(--line); background: var(--paper); box-shadow: 0 2px 10px #22222209; }
.basket { position: sticky; top: 16px; border-top: 5px solid var(--green); }
.basket h2 span { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; padding: 1px 7px; border-radius: 50%; background: #e4f5dc; color: var(--green-dark); font-size: 15px; }
.basket .muted { margin-bottom: 0; }
.total { display: flex; justify-content: space-between; gap: 16px; margin: 20px 0 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.total strong { color: var(--green-dark); white-space: nowrap; }
label { display: block; margin: 14px 0; font-size: 14px; font-weight: 700; }
input:not([type="checkbox"]), select { display: block; width: 100%; min-height: 44px; margin-top: 6px; padding: 10px 12px; border: 1px solid #c9c9c9; border-radius: 2px; background: white; color: var(--ink); }
input[type="range"] { min-height: auto; padding: 0; border: 0; accent-color: var(--green); }
.button { display: inline-block; border: 1px solid var(--green-dark); border-radius: 2px; padding: 12px 19px; background: var(--green-dark); color: white; cursor: pointer; font-weight: 800; text-align: center; text-decoration: none; }
.button:hover { border-color: var(--green); background: var(--green); color: white; }
.button.secondary { border: 1px dashed var(--green); background: white; color: var(--green-dark); }
.button.secondary:hover { background: #eff9e9; }
button:disabled { opacity: .55; cursor: wait; }
.basket .button, .order-next .button, #editor .button { width: 100%; }
.cart-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13px; }
.cart-row button { order: 3; border: 0; background: none; color: #a82923; cursor: pointer; font-size: 22px; }
.cart-row > div { margin-left: auto; font-weight: 700; }

.order-history { margin-bottom: 24px; border-left: 4px solid var(--green); }
.order-history h2 { font-size: 19px; }
.order-history-list { display: grid; gap: 8px; }
.order-history-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border: 1px dashed #a5d78e; color: var(--ink); font-size: 13px; text-decoration: none; }
.order-history-list a:hover { background: #f4faef; }
.order-history-list a span:nth-child(2) { color: var(--muted); }

dialog { width: min(660px, calc(100vw - 24px)); max-height: min(94vh, 900px); overflow: auto; padding: 25px; border: 0; border-top: 6px solid var(--green); border-radius: 3px; background: white; color: var(--ink); box-shadow: 0 20px 70px #0005; }
dialog::backdrop { background: #101b10b8; }
.close { float: right; border: 0; padding: 0 5px; background: none; color: #444; cursor: pointer; font-size: 30px; line-height: 1; }
canvas { display: block; width: 100%; height: auto; margin: 16px 0 10px; background: #eee; }
.check { display: flex; align-items: center; gap: 10px; }
.check input { accent-color: var(--green); }

.order-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); align-items: start; gap: 24px; }
.order-summary { border-top: 5px solid var(--green); }
.order-summary h2 { margin-bottom: 8px; }
.payment-state { display: inline-block; padding: 5px 10px; border: 1px dashed var(--green); color: var(--green-dark); font-size: 13px; font-weight: 700; }
.order-next { border-top: 5px solid #b8df9e; }
.order-next .button { margin: 8px 0; }
.order-next .back-link { display: inline-block; margin-top: 18px; font-size: 14px; font-weight: 700; }
.order-table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 7px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: #555; font-size: 12px; }

.hero { position: relative; max-width: 850px; min-height: 300px; padding: 55px 52px; border-top: 6px solid var(--green); background: white; box-shadow: 0 2px 16px #2222220a; }
.hero::after { position: absolute; top: 23px; right: 23px; width: 64px; height: 64px; border: 2px dashed #a8d98f; border-radius: 50%; content: ""; }
.hero > p:not(.eyebrow) { max-width: 600px; color: #555; }
.hero-actions { margin-top: 24px; }
.error-hero { min-height: 0; }

@media (max-width: 1100px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .site-header { background: var(--green); }
  .header-inner { min-height: 88px; display: flex; justify-content: center; padding: 6px 16px; }
  .header-label, .staff-link { display: none; }
  .brand { width: auto; padding: 2px 7px; border-radius: 5px; background: white; }
  .brand img { width: 112px; height: 70px; }
  .brand-bar { min-height: 32px; padding: 6px 12px; background: var(--green-bright); color: #142b0a; font-size: 10px; }
  .brand-bar span + span { display: none; }
  main { padding: 20px 16px 46px; }
  .page-heading { padding: 20px 18px; }
  .meta { margin-top: 17px; }
  .workspace, .order-layout { grid-template-columns: 1fr; }
  .basket { position: static; }
  .grid { gap: 10px; }
  .photo-card img { height: 205px; }
  .photo-card > div { min-height: 0; display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 9px; font-size: 13px; }
  .choose { width: 100%; padding: 7px 5px; }
  .order-history-list a { flex-wrap: wrap; }
  .order-history-list a span:nth-child(2) { flex: 1 1 100%; }
  .hero { min-height: 0; padding: 35px 24px; }
  .hero::after { width: 42px; height: 42px; }
  footer { flex-direction: column; gap: 5px; text-align: center; }
}
@media (max-width: 420px) {
  h1 { font-size: 32px; }
  .section-heading > span { display: none; }
  .photo-card img { height: 190px; }
  .basket, .panel { padding: 18px; }
  dialog { padding: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
