:root {
  color-scheme: light;
  --ink: #192a24;
  --deep: #14231e;
  --muted: #52635a;
  --line: #dce4de;
  --paper: #f6f8f5;
  --orange: #f28a48;
  --orange-hover: #ffa269;
  --font: Inter, 'Segoe UI', Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.5 var(--font); }
body:has(dialog[open]) { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
a, button { color: inherit; }
a { text-decoration: none; }
button { background: none; border: 0; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 3px solid #b84912; outline-offset: 3px; }
[hidden] { display: none !important; }
.shell { width: min(100% - 96px, 1240px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
[data-icon] { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; }
.icon { display: block; width: 20px; height: 20px; }

.header { background: var(--deep); color: #f8faf6; }
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 0; justify-self: start; white-space: nowrap; font-size: 1.57rem; font-weight: 850; line-height: 1; letter-spacing: -.075em; }
.brand > span:last-child { color: var(--orange); }
.brand-mark { width: 38px; height: 38px; margin-right: 9px; border-radius: 10px; background: var(--orange); color: var(--deep); }
.brand-mark .icon { width: 23px; height: 23px; stroke-width: 1.8; }
.navigation, .header-actions { display: flex; align-items: center; }
.navigation { gap: clamp(19px, 2.6vw, 40px); }
.navigation a, .navigation button { padding: 7px 0; white-space: nowrap; color: #e6ebe7; font-size: .9rem; font-weight: 550; }
.navigation :is(a,button):hover, .footer button:hover { color: var(--orange); }
.header-actions { justify-content: end; gap: 13px; }
.language-switch { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 2px; padding: 2px; border: 1px solid #52665b; border-radius: 8px; }
.language-switch button { min-width: 32px; min-height: 33px; padding: 3px; border-radius: 5px; color: #f8faf6; font-size: .82rem; font-weight: 750; }
.language-switch button:hover { background: #263b31; }
.language-switch button[aria-pressed='true'] { background: var(--orange); color: var(--deep); }
.language-switch button:focus-visible { outline-color: white; outline-offset: 1px; }
.icon-button { display: inline-grid; min-width: 42px; min-height: 42px; padding: 0; place-items: center; border-radius: 9px; }
.icon-button:hover { background: #77887c26; }
.cart-button { display: flex; align-items: center; gap: 9px; min-height: 43px; padding: 0 11px; border: 1px solid #52665b; border-radius: 9px; color: #f8faf6; font-size: .9rem; font-weight: 650; }
.cart-button:hover { background: #263b31; }
.cart-count { display: grid; place-items: center; min-width: 23px; height: 23px; padding-inline: 5px; border-radius: 30px; background: var(--orange); color: #202a22; font-size: .75rem; font-weight: 800; }

.hero { position: relative; isolation: isolate; background: #23362d; color: #fff; }
.hero::before { position: absolute; z-index: -1; inset: 0; content: ''; background: linear-gradient(90deg, #13241dee 0%, #16271ed0 21%, #182a2080 46%, #172b2120 74%), url('images/hero.jpg') center 53% / cover no-repeat; }
.hero-content { display: flex; min-height: clamp(440px, 39vw, 545px); flex-direction: column; align-items: start; justify-content: center; padding-block: 62px 69px; }
.hero-tag { display: inline-flex; align-items: center; gap: 9px; padding: 6px 12px; border-radius: 6px; border: 1px solid #b6c8b767; background: #20392dc9; color: #f1f6ef; font-size: .85rem; font-weight: 610; }
.hero-tag span { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.hero-tag b { font-weight: inherit; }
.hero h1 { max-width: 690px; margin: 19px 0 16px; font-size: clamp(3.15rem, 6.1vw, 5.5rem); font-weight: 850; line-height: .99; letter-spacing: -.07em; }
.hero h1 em { color: var(--orange); font-style: normal; }
.hero p { max-width: 385px; margin: 0 0 26px; color: #ebf1ec; font-size: clamp(1rem, 1.32vw, 1.17rem); }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px; border-radius: 8px; font-size: .95rem; font-weight: 750; text-align: center; }
.primary-button { background: var(--orange); color: #16231c; }
.primary-button:hover { background: var(--orange-hover); }
.secondary-button { border: 1px solid #b8c7bc; background: white; }
.secondary-button:hover { background: #edf2ed; }

.perks { background: #fff; border-bottom: 1px solid var(--line); }
.perks-inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-block: 20px; }
.perk { display: flex; align-items: center; gap: 13px; min-height: 51px; padding: 0 clamp(10px, 3.1vw, 44px); }
.perk:first-child { padding-left: 0; }
.perk + .perk { border-left: 1px solid var(--line); }
.perk-icon { width: 43px; height: 43px; border-radius: 10px; background: #eef3ed; color: #2f5945; }
.perk strong, .perk small { display: block; }
.perk strong { font-size: .94rem; letter-spacing: -.015em; }
.perk small { margin-top: 2px; color: var(--muted); font-size: .85rem; }

.catalog { min-height: 42vh; padding-block: 55px 80px; scroll-margin-top: 26px; }
.catalog-heading, .catalog-tools { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.catalog h2 { margin: 0; font-size: clamp(2rem, 4.1vw, 3.25rem); line-height: 1.08; font-weight: 820; letter-spacing: -.06em; }
.catalog-heading p { margin: 8px 0 0; color: var(--muted); }
.search, .sort { position: relative; display: flex; align-items: center; color: var(--muted); }
.search { width: min(100%, 255px); }
.search > span { position: absolute; left: 12px; pointer-events: none; }
.search input, .sort select { width: 100%; min-height: 43px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font-size: .88rem; }
.search input { padding: 8px 12px 8px 40px; }
.sort select { appearance: none; padding: 8px 37px 8px 12px; }
.sort > span { position: absolute; right: 10px; pointer-events: none; }
.sort .icon { width: 16px; height: 16px; }
.catalog-tools { margin-block: 25px 18px; align-items: center; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { padding: 8px 14px; min-height: 39px; border: 1px solid var(--line); border-radius: 7px; background: white; color: #35483d; font-size: .87rem; font-weight: 650; white-space: nowrap; }
.filter:hover { border-color: #829989; }
.filter[aria-pressed='true'] { background: #224333; color: white; border-color: #224333; }

.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.product { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 11px; transition: box-shadow .2s, transform .2s; }
.product:hover { box-shadow: 0 11px 24px #182f2012; transform: translateY(-2px); }
.product-photo { display: block; width: 100%; padding: 0; background: #e9eeea; }
.product-photo img { display: block; width: 100%; aspect-ratio: 1.24; object-fit: cover; }
.product-body { display: flex; flex: 1; flex-direction: column; gap: 5px; padding: 13px 14px 14px; }
.product-category { color: #526958; font-size: .8rem; font-weight: 650; }
.product h3 { margin: 0; font-size: 1.03rem; line-height: 1.35; letter-spacing: -.02em; }
.product h3 button { display: inline; padding: 0; text-align: left; font-weight: 750; }
.product h3 button:hover { color: #33674e; }
.product-spec { margin: 1px 0 6px; color: var(--muted); font-size: .845rem; }
.product-buy { display: flex; gap: 7px; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 6px; }
.price { color: var(--ink); font-size: 1.22rem; font-weight: 850; white-space: nowrap; letter-spacing: -.035em; }
.add-button { display: inline-flex; gap: 5px; align-items: center; justify-content: center; min-height: 37px; padding: 5px 9px; border-radius: 7px; background: #ebf1eb; color: #203e2e; font-size: .78rem; white-space: nowrap; font-weight: 760; }
.add-button:hover { background: var(--orange); color: var(--ink); }
.add-button .icon { width: 15px; height: 15px; }
.empty-state { padding: 40px 15px; text-align: center; }
.empty-state h3 { margin: 8px 0; }
.empty-state p { color: var(--muted); }

.footer { background: var(--deep); color: #e7ede8; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 111px; padding-block: 22px; }
.footer-inner > span { color: #bfcac1; font-size: .875rem; }
.footer-inner > div { display: flex; gap: 16px; }
.footer button { padding: 6px 0; font-size: .875rem; }

dialog { width: min(100% - 28px, 518px); max-height: min(90dvh, 900px); padding: 0; border: 0; border-radius: 13px; background: var(--paper); color: var(--ink); box-shadow: 0 25px 100px #10191263; }
dialog::backdrop { background: #07150fc4; }
.drawer { margin: 0 0 0 auto; width: min(100%, 480px); height: 100%; max-width: none; max-height: 100%; border-radius: 0; }
.drawer[open] { display: flex; flex-direction: column; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 17px 22px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: clamp(1.35rem, 4vw, 1.8rem); line-height: 1.13; letter-spacing: -.04em; }
.close-button { margin-right: -6px; flex: 0 0 auto; }
.drawer-body { flex: 1; overflow: auto; padding: 0 22px; }
.drawer-footer { padding: 20px 22px; border-top: 1px solid var(--line); }
.total { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 1.1rem; }
.total strong { font-size: 1.42rem; }
.full-width { width: 100%; }
.cart-row { display: grid; grid-template-columns: 76px 1fr auto; align-items: start; gap: 12px; padding-block: 15px; border-bottom: 1px solid var(--line); }
.cart-row img { width: 76px; height: 68px; object-fit: cover; background: #e9eeea; border-radius: 7px; }
.cart-row h3, .cart-row p { margin: 0 0 4px; font-size: .93rem; }
.cart-row p { color: var(--muted); }
.stepper { display: inline-flex; align-items: center; gap: 8px; }
.stepper button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 7px; border: 1px solid var(--line); background: white; }
.stepper button:hover { background: #edf2ed; }
.stepper .icon { width: 16px; height: 16px; }
.remove { min-height: 36px; min-width: 36px; color: var(--muted); margin-right: -7px; }
.remove .icon { width: 18px; height: 18px; }
.modal-body { padding: 19px 22px 24px; }
.modal-body > :first-child { margin-top: 0; }
.modal-body p { color: var(--muted); }
.detail-photo { display: block; width: 100%; max-height: 300px; object-fit: contain; border-radius: 8px; background: #e9eeea; }
.detail-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.form { display: grid; gap: 11px; }
.form label { display: grid; gap: 4px; font-weight: 650; }
.form input, .form textarea { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #b8c7bc; border-radius: 7px; background: white; color: var(--ink); }
.form textarea { resize: vertical; min-height: 70px; }
.receipt { display: block; width: 100%; min-height: 150px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; resize: vertical; color: var(--ink); }
.receipt-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 13px; }
.toast { position: fixed; z-index: 4; bottom: 22px; right: 22px; max-width: calc(100% - 44px); padding: 10px 15px; border-radius: 8px; background: #203e2e; color: white; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .18s, transform .18s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast:empty { padding: 0; }

@media (max-width: 1000px) {
  .shell { width: min(100% - 56px, 1240px); }
  .products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .perk { padding-inline: 16px; }
}
@media (max-width: 760px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { height: auto; min-height: 66px; grid-template-columns: 1fr auto; gap: 0 10px; }
  .navigation { grid-column: 1 / -1; grid-row: 2; gap: 19px; padding: 2px 0 9px; }
  .header-actions { min-height: 61px; gap: 4px; }
  .hero-content { min-height: 426px; padding-block: 48px; }
  .hero::before { background-position: center, 57% center; }
  .perks-inner { grid-template-columns: repeat(3, 1fr); padding-block: 14px; }
  .perk { flex-direction: column; align-items: start; gap: 6px; padding-inline: 10px; }
  .perk:last-child { padding-right: 0; }
  .perk-icon { width: 34px; height: 34px; }
  .perk-icon .icon { width: 17px; height: 17px; }
  .perk strong { font-size: .82rem; }
  .perk small { display: none; }
  .catalog { padding-block: 38px 52px; }
  .catalog-heading { align-items: start; flex-direction: column; gap: 13px; }
  .search { width: 100%; }
  .catalog-tools { align-items: start; flex-direction: column; gap: 10px; margin-block: 14px; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .footer-inner { flex-wrap: wrap; justify-content: start; }
}
@media (max-width: 420px) {
  .header-search, .cart-label { display: none; }
  .brand { font-size: 1.44rem; }
  .hero h1 { font-size: clamp(2.55rem, 11vw, 3.6rem); }
  .hero::before { background-image: linear-gradient(90deg, #13241ded 0%, #16271eaa 48%, #172b2133 100%), url('images/hero.jpg'); }
  .product-body { padding: 10px; }
  .product-buy { flex-wrap: wrap; }
  .add-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
