:root {
  color-scheme: light;
  --paper: #fcfaf7;
  --white: #fffdfa;
  --ink: #282328;
  --muted: #645d60;
  --berry: #651e38;
  --berry-dark: #4e142a;
  --rose: #f1e4e5;
  --stroke: #ded4d4;
  --display: Georgia, "Times New Roman", serif;
  font: 100%/1.5 "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
body:has(dialog[open]) { overflow: hidden; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd { margin: 0; }
button:disabled { cursor: default; opacity: .48; }
:focus-visible { outline: 2px solid var(--berry); outline-offset: 3px; }
.wrap { width: min(1280px, calc(100% - 100px)); margin-inline: auto; }
.muted, .hint { color: var(--muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.site-header { border-bottom: 1px solid #ece3e0; background: var(--paper); }
.header-row { min-height: 75px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.wordmark {
  justify-self: start; display: inline-block; color: var(--berry);
  font: 700 1.85rem/.95 var(--display); letter-spacing: -.07em;
  text-decoration: none; white-space: nowrap;
}
.wordmark i { margin-left: .12em; font-weight: 400; letter-spacing: -.055em; }
.location { display: inline-flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .9375rem; }
.pin { position: relative; width: .78rem; height: .78rem; border: 1.5px solid var(--berry); border-radius: 50% 50% 50% 0; transform: translateY(-1px) rotate(-45deg); }
.pin::after { content: ""; position: absolute; inset: 32%; border-radius: 50%; background: var(--berry); }
.cart-button {
  justify-self: end; min-height: 44px; display: inline-flex; align-items: center; gap: .55rem;
  background: transparent; color: var(--berry); border: 1px solid #cbafb9;
  border-radius: 8px; padding: .42rem .72rem; font-size: .9375rem; font-weight: 650;
}
.cart-button:hover { background: var(--rose); }
.bag { display: inline-block; width: 16px; height: 14px; border: 1.5px solid currentColor; border-radius: 2px 2px 4px 4px; position: relative; }
.bag::before { content: ""; position: absolute; width: 8px; height: 7px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 6px 6px 0 0; top: -6px; left: 2.5px; }
.count { display: grid; place-items: center; min-width: 23px; height: 23px; padding: 0 5px; border-radius: 999px; background: var(--berry); color: white; font-size: .8rem; }
#back-shop { justify-self: end; }

.hero {
  position: relative; isolation: isolate; display: grid; grid-template-columns: 1fr 1.15fr;
  min-height: 355px; margin-top: 31px; border-radius: 12px; overflow: hidden; background: #f1e6e5;
}
.hero-copy {
  position: relative; z-index: 1; padding: 42px clamp(28px, 4.4vw, 68px) 43px;
  align-self: center;
}
.hero h1 {
  color: var(--berry); font: 400 clamp(3.9rem, 6.3vw, 6.45rem)/.85 var(--display);
  letter-spacing: -.075em;
}
.hero h1 span { display: block; white-space: nowrap; }
.hero p { max-width: 370px; margin: 24px 0 23px; font-size: clamp(1rem, 1.55vw, 1.125rem); line-height: 1.45; }
.hero-photos { position: absolute; inset: 0 0 0 auto; width: 53.5%; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.hero-shot { min-width: 0; overflow: hidden; background: #efe9e1; }
.hero-shot img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 27%; }
.hero-shot:nth-child(2) img { object-position: 49% 5%; }
.hero-photos > :only-child { grid-column: 1 / -1; }
.button, .link, .filter { min-height: 44px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border: 1px solid transparent; border-radius: 8px; padding: .62rem 1.15rem;
  line-height: 1.25; font-weight: 650; text-decoration: none;
}
.primary { background: var(--berry); color: white; border-color: var(--berry); }
.primary:hover:not(:disabled) { background: var(--berry-dark); }
.outline { background: transparent; color: var(--berry); border-color: #c5a9b2; }
.outline:hover:not(:disabled) { background: var(--rose); }
.link {
  display: inline-flex; align-items: center; color: var(--berry);
  background: transparent; border: 0; padding: 0; font-weight: 650;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.link:hover { color: var(--berry-dark); }
.full { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.catalog { padding: 34px 0 58px; }
.catalog-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.catalog-heading h2, .staff-heading h1 {
  font: 400 clamp(2.25rem, 4vw, 3.1rem)/1.05 var(--display); letter-spacing: -.057em;
}
.catalog-heading p { color: var(--muted); font-size: .9375rem; }
.filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding-bottom: 17px; }
.filter-row { display: grid; grid-template-columns: 93px minmax(0, 1fr); align-items: start; }
.filter-label { min-height: 44px; display: flex; align-items: center; font-size: .9375rem; font-weight: 650; }
.filter-options { display: flex; flex-wrap: wrap; gap: 6px; }
.extra-categories { margin-top: 6px; }
.filter {
  flex: 0 0 auto; border: 1px solid var(--stroke); background: var(--white);
  border-radius: 8px; padding: .44rem .78rem; color: var(--ink); font-size: .9375rem; font-weight: 550;
}
.filter:hover { background: #f5ebed; }
.filter[aria-pressed="true"] { border-color: var(--berry); background: var(--berry); color: white; }
.filter[aria-pressed="true"]:hover { background: var(--berry-dark); }
.size-control { position: relative; width: min(100%, 12rem); color: var(--ink); }
.size-control::after {
  content: ""; position: absolute; right: 16px; top: calc(50% - 6px);
  width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0;
  transform: rotate(45deg); pointer-events: none;
}
.size-control select {
  appearance: none; width: 100%; padding: .44rem 2.25rem .44rem .78rem;
  color: inherit; font-size: 1rem; cursor: pointer;
}
.size-control[data-active="true"] { color: var(--berry); }
.size-control[data-active="true"] select { border-color: var(--berry); background: var(--rose); padding-left: 2rem; font-weight: 650; }
.size-control[data-active="true"]::before {
  content: "✓"; position: absolute; left: .78rem; top: 50%;
  transform: translateY(-50%); font-weight: 650; pointer-events: none;
}
.size-control option { color: var(--ink); background: var(--white); }
.category-toggle { color: var(--berry); border-color: #c5a9b2; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 18px; row-gap: 31px; }
.product { min-width: 0; }
.product-open { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 0; border: 0; text-align: left; color: inherit; background: transparent; }
.product-open:hover .tile-name { color: var(--berry); text-decoration: underline; text-underline-offset: .24em; }
.tile-photo { display: grid; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 8px; background: #eeebe7; }
.tile-photo img, .gallery-main img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.photo-empty { color: var(--muted); font-size: .875rem; display: grid; place-items: center; min-height: 100%; padding: .5rem; }
.tile-name { display: block; font-size: 1.0625rem; font-weight: 650; line-height: 1.3; margin: 11px 0 2px; overflow-wrap: anywhere; }
.tile-color, .tile-sizes { display: block; color: var(--muted); font-size: .875rem; line-height: 1.4; }
.tile-sizes { margin-top: 6px; }
.tile-sizes b { color: var(--ink); margin-left: .3em; font-weight: 650; }
.price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px; margin-top: 6px; }
.price strong { color: var(--berry); font-size: 1.5rem; line-height: 1.2; letter-spacing: -.035em; white-space: nowrap; }
.price del { color: #71696c; font-size: .9375rem; font-weight: 500; white-space: nowrap; }
.empty { grid-column: 1 / -1; padding: 34px 24px; background: #f5eeec; border-radius: 10px; }
.empty h3 { margin-bottom: 14px; }
.more { text-align: center; }
.more:not(:empty) { padding-top: 28px; }
.site-footer { margin-top: auto; border-top: 1px solid var(--stroke); }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 89px; }
.footer-row .wordmark { font-size: 1.46rem; }
.footer-row > span { color: var(--muted); font-size: .875rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.checkout-privacy { color: var(--muted); font-size: .875rem; margin-bottom: .75rem; }
.checkout-privacy a { color: var(--berry); }
.privacy { max-width: 740px; padding-block: 2rem 3rem; }
.privacy h1 { font: 400 clamp(2rem, 5vw, 3.15rem)/1.08 var(--display); margin-block: 1rem; }
.privacy h2 { margin-block: 1.5rem .45rem; font-size: 1.2rem; }
.privacy p + p { margin-top: .65rem; }

.overlay {
  padding: 0; border: 1px solid var(--stroke); border-radius: 15px;
  width: min(600px, calc(100% - 28px)); max-height: calc(100dvh - 28px); color: var(--ink);
  background: var(--white); box-shadow: 0 16px 80px #30162333; overscroll-behavior: contain;
}
.overlay.product-panel { width: min(915px, calc(100% - 28px)); }
.overlay::backdrop { background: #29152279; }
.panel-header {
  display: flex; min-height: 63px; align-items: center; justify-content: space-between;
  gap: 12px; padding: 8px 22px; border-bottom: 1px solid var(--stroke); background: var(--white);
  position: sticky; top: 0; z-index: 2;
}
.panel-header h2, .login-card h2 { font: 400 1.95rem/1.12 var(--display); letter-spacing: -.04em; }
.close {
  display: grid; place-items: center; color: var(--berry); background: var(--rose);
  border: 0; border-radius: 50%; width: 44px; height: 44px; flex: 0 0 44px;
  font-size: 1.75rem; line-height: 1; padding: 0 0 2px;
}
.close:hover { background: #e9d6dc; }
.panel-content { padding: 21px 22px 26px; }
.conditions, .confirmation { display: grid; gap: 14px; }
.conditions .button, .confirmation > .button { justify-self: start; }
.details { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); gap: 27px; }
.gallery, .product-info { min-width: 0; }
.gallery-main { aspect-ratio: 3 / 4; position: relative; background: #efeae6; border-radius: 8px; overflow: hidden; }
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px;
  display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--stroke);
  background: var(--white); color: var(--berry); font: 1.85rem/1 var(--display);
}
.gallery-arrow.prev { left: 7px; }
.gallery-arrow.next { right: 7px; }
.gallery-thumbs { display: flex; gap: 7px; margin-top: 8px; overflow: auto; padding: 3px; scrollbar-width: thin; }
.gallery-thumb { flex: 0 0 52px; aspect-ratio: 3 / 4; padding: 0; border: 2px solid transparent; border-radius: 5px; overflow: hidden; background: #efeae6; }
.gallery-thumb[aria-pressed="true"] { border-color: var(--berry); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }
.product-brand { color: var(--muted); font-size: .875rem; padding-bottom: 5px; }
.product-info h3 { font: 400 clamp(1.8rem, 4vw, 2.6rem)/1.02 var(--display); letter-spacing: -.04em; overflow-wrap: anywhere; }
.product-info .price { margin-top: 12px; }
.product-info .price strong { font-size: 1.9rem; }
.item-color { margin-top: 4px; }
.product-fitting { margin: 10px 0 16px; color: var(--muted); }
.fieldset-label { font-weight: 650; margin-bottom: 6px; }
.product-info > .button { margin: 15px 0 12px; }
.composition { padding: 10px 0; border-top: 1px solid var(--stroke); }
.composition strong { margin-right: .35rem; }
.description { border-top: 1px solid var(--stroke); }
.description summary { cursor: pointer; display: list-item; padding: 10px 0; font-weight: 650; }
.description p { white-space: pre-line; color: var(--muted); }

.cart-lines, .summary-lines, .order-units { list-style: none; margin: 0; padding: 0; }
.cart-line, .order-unit { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--stroke); }
.line-photo { aspect-ratio: 3 / 4; background: #eee7e4; border-radius: 5px; overflow: hidden; }
.line-photo img { width: 100%; height: 100%; object-fit: contain; }
.line-main, .line-right { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.line-right { text-align: right; align-items: flex-end; }
.line-right b { white-space: nowrap; }
.line-main .muted, .line-main small { font-size: .875rem; overflow-wrap: anywhere; }
.conflict { background: #fae9e9; box-shadow: 6px 0 #fae9e9, -6px 0 #fae9e9; }
.quantity { display: flex; align-items: center; gap: 7px; }
.quantity button {
  min-width: 44px; min-height: 44px; border: 1px solid var(--stroke);
  border-radius: 6px; color: var(--berry); background: var(--paper);
}
.remove { font-size: .875rem; }
#checkout { display: grid; gap: 13px; margin-top: 19px; }
.field { display: flex; flex-direction: column; gap: 5px; font-weight: 650; }
.field input { width: 100%; min-height: 44px; border: 1px solid #b9a8ae; border-radius: 7px; padding: .55rem .68rem; background: white; color: var(--ink); font-weight: 400; }
.field small, .field .hint { color: var(--muted); font-size: .875rem; font-weight: 450; }
.methods { display: flex; flex-wrap: wrap; gap: 7px; border: 0; padding: 0; margin: 0; }
.methods legend { padding: 0; margin-bottom: 5px; font-weight: 650; }
.method { min-height: 44px; display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--stroke); border-radius: 7px; padding: 6px 9px; cursor: pointer; }
.method:has(input:checked) { color: var(--berry); border-color: var(--berry); background: #f7edf0; }
.method input { accent-color: var(--berry); margin: 0; }
.checkout-totals, .order-facts { border-radius: 8px; background: var(--rose); font-size: .9375rem; padding: 12px 14px; }
.checkout-totals div, .order-facts div, .summary-lines li { display: flex; justify-content: space-between; gap: 9px 14px; align-items: baseline; }
.checkout-totals strong { font-size: 1.5rem; color: var(--berry); white-space: nowrap; }
.checkout-totals b { white-space: nowrap; }
.checkout-totals p { color: var(--muted); font-size: .875rem; margin-top: 5px; }
.field-error { color: #94192f; font-size: .875rem; font-weight: 650; }
.order-number { font-size: 1.45rem; color: var(--berry); }
.summary-lines li { padding: 6px 0; border-bottom: 1px solid var(--stroke); }
.summary-lines b { white-space: nowrap; }
.order-facts { display: grid; gap: 7px; }
.order-facts dd { text-align: right; font-weight: 650; }
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 32px); z-index: 5; padding: .65rem 1rem;
  border-radius: 7px; background: var(--berry-dark); color: white; box-shadow: 0 6px 24px #23141a44;
}

.staff { padding-top: 36px; padding-bottom: 52px; max-width: 1020px; }
.staff-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.staff-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.login-card, .order-card { border: 1px solid var(--stroke); border-radius: 12px; background: var(--white); }
.login-card { max-width: 400px; padding: 21px; display: grid; gap: 15px; }
.login-card .button { justify-self: start; }
.order-card { margin-bottom: 16px; }
.order-head { display: flex; justify-content: space-between; gap: 12px; padding: 16px 18px 10px; }
.order-head strong { color: var(--berry); font-size: 1.3rem; white-space: nowrap; }
.order-head h2 { font-size: 1.2rem; }
.order-head p { font-size: .875rem; color: var(--muted); }
.order-contact { display: flex; flex-wrap: wrap; gap: 5px 17px; align-items: center; padding: 0 18px 8px; border-bottom: 1px solid var(--stroke); }
.order-contact .muted { font-size: .875rem; }
.order-units { padding: 0 18px; }
.order-unit { padding-block: 13px; }
.order-unit:last-child { border-bottom: 0; }
.unit-controls { display: grid; gap: 6px; justify-items: end; }
.unit-controls .button { font-size: .875rem; padding-inline: .7rem; }
.status { display: inline-block; width: fit-content; background: #f0ebe9; border-radius: 5px; padding: 3px 8px; font-size: .875rem; font-weight: 650; }
.status-reserved { color: var(--berry); background: var(--rose); }
.status-issued { color: #724516; background: #f6ebd9; }
.status-returned { color: #345743; background: #e8efe8; }

@media (max-width: 1000px) {
  .wrap { width: calc(100% - 52px); }
  .hero { min-height: 330px; }
  .hero-copy { padding-inline: 32px; }
  .hero-photos { width: 51%; }
}

@media (max-width: 710px) {
  .wrap { width: calc(100% - 32px); }
  .header-row { min-height: 66px; grid-template-columns: 1fr auto; gap: 9px; }
  .header-row .location { display: none; }
  .wordmark { font-size: 1.65rem; }
  .hero { min-height: 286px; grid-template-columns: 1fr; margin-top: 17px; }
  .hero-copy { padding: 23px 16px; width: 67%; }
  .hero h1 { font-size: clamp(3rem, 8.8vw, 4.3rem); }
  .hero p { margin: 14px 0 15px; font-size: 1rem; line-height: 1.35; }
  .hero-copy .button { padding-inline: .62rem; text-align: center; font-size: .875rem; }
  .hero-photos { width: 32%; display: block; }
  .hero-shot { height: 100%; }
  .hero-shot:nth-child(2) { display: none; }
  .hero-shot img { object-position: 52% 50%; }
  .catalog { padding-top: 23px; }
  .catalog-heading { margin-bottom: 10px; }
  .catalog-heading p { font-size: .875rem; }
  .filter-row { display: block; }
  .filter-label { min-height: auto; margin-bottom: 3px; }
  .sizes-row { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 12px; }
  .sizes-row .filter-label { margin-bottom: 0; }
  .filter { padding-inline: .68rem; }
  .filters { gap: 9px; padding-bottom: 13px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; row-gap: 23px; }
  .tile-name { font-size: .95rem; }
  .price strong { font-size: 1.5rem; }
  .price del { font-size: .875rem; }
  .footer-row { display: grid; grid-template-columns: 1fr auto; align-content: center; row-gap: 1px; }
  .footer-row > span { grid-column: 1; }
  .footer-links { grid-column: 1 / -1; }
  .details { grid-template-columns: 1fr; gap: 16px; }
  .gallery-main { max-height: 52dvh; margin-inline: auto; }
  .panel-header { padding-inline: 13px; }
  .panel-content { padding-inline: 13px; }
  .order-unit { grid-template-columns: 45px minmax(0, 1fr); }
  .unit-controls { grid-column: 2; justify-items: start; }
}

@media (max-width: 360px) {
  .cart-button { font-size: .875rem; padding-inline: .52rem; }
  .wordmark { font-size: 1.53rem; }
  .catalog-heading h2 { font-size: 2.2rem; }
  .cart-line { grid-template-columns: 43px minmax(0, 1fr) auto; gap: 7px; }
  .staff-controls .button { padding-inline: .48rem; font-size: .875rem; }
}
