:root {
  --ink: #1f2426;
  --muted: #6d7477;
  --paper: #fffdfa;
  --surface: #f3f0ea;
  --card: #ffffff;
  --input: #ffffff;
  --soft-text: #52595c;
  --header-bg: rgba(255, 253, 250, .96);
  --topbar-bg: #1f2426;
  --dark-surface: #1f2426;
  --line: #ddd8cf;
  --brand: #b9382f;
  --brand-dark: #84251f;
  --accent: #e7a82e;
  --green: #34735b;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(31, 36, 38, .1);
  --container: calc(100% - clamp(28px, 4vw, 84px));
  --hero-overlay: linear-gradient(90deg, rgba(255, 253, 250, .94) 0%, rgba(255, 253, 250, .84) 36%, rgba(255, 253, 250, .35) 59%, rgba(16, 19, 21, .18) 100%);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f3f1ec;
  --muted: #a9b0b2;
  --paper: #101315;
  --surface: #1a1f22;
  --card: #171b1d;
  --input: #202629;
  --soft-text: #c2c8ca;
  --header-bg: rgba(16, 19, 21, .96);
  --topbar-bg: #080a0b;
  --dark-surface: #080a0b;
  --line: #343b3e;
  --brand: #e15a50;
  --brand-dark: #f17a70;
  --accent: #f1b840;
  --green: #67ad8e;
  --shadow: 0 18px 50px rgba(0, 0, 0, .32);
  --hero-overlay: linear-gradient(90deg, rgba(16, 19, 21, .94) 0%, rgba(16, 19, 21, .84) 36%, rgba(16, 19, 21, .48) 59%, rgba(8, 10, 11, .28) 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: rgba(185, 56, 47, .35); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0 0 .65em; line-height: 1.12; letter-spacing: -.025em; }
h1 { font-size: clamp(2.2rem, 5vw, 4.9rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.45rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1rem; }
.container { width: var(--container); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1000; left: 16px; top: -80px; padding: 12px 18px; color: white; background: var(--dark-surface); border-radius: 8px; }
.skip-link:focus { top: 16px; }
.muted { color: var(--muted); }
.hp { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; }

.topbar { color: #fff; background: var(--topbar-bg); font-size: .88rem; }
.topbar__inner { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar a { color: #fff; text-decoration: none; font-weight: 700; }
.header { position: sticky; z-index: 50; top: 0; background: var(--header-bg); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.header__inner { min-height: 86px; display: grid; grid-template-columns: 220px minmax(300px, 1fr) auto; gap: clamp(16px, 2vw, 32px); align-items: center; }
.brand { display: inline-flex; gap: 11px; align-items: center; text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand img { object-fit: contain; }
.brand span { display: flex; flex-direction: column; line-height: 1; }
.brand strong { color: var(--brand); font-size: 1.45rem; letter-spacing: .08em; }
.brand small { margin-top: 5px; color: var(--muted); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; }
.search { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--input); box-shadow: 0 4px 18px rgba(31, 36, 38, .04); }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(185, 56, 47, .1); }
.search input { min-width: 0; flex: 1; padding: 12px 18px; border: 0; outline: 0; background: transparent; }
.search button { padding: 9px 20px; border: 0; color: #fff; background: var(--brand); font-weight: 750; }
.header__actions { display: flex; gap: 18px; align-items: center; white-space: nowrap; font-weight: 680; }
.header__actions a { text-decoration: none; }
.language-switch { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.language-switch a { display: grid; min-width: 35px; height: 30px; padding: 0 8px; place-items: center; color: var(--muted); border-radius: 999px; font-size: .76rem; font-weight: 850; }
.language-switch a.active { color: #fff; background: var(--brand); }
.theme-toggle { display: grid; width: 38px; height: 38px; padding: 0; place-items: center; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: 1.05rem; }
.theme-toggle:hover { color: #fff; background: var(--brand); border-color: var(--brand); }
.cart-link span { display: inline-grid; min-width: 24px; height: 24px; margin-left: 4px; place-items: center; color: #fff; background: var(--brand); border-radius: 999px; font-size: .78rem; }
.menu-button { display: none; padding: 8px 13px; border: 1px solid var(--line); border-radius: 9px; background: transparent; }
.nav { border-top: 1px solid var(--line); }
.nav__inner { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: clamp(15px, 2.2vw, 34px); overflow-x: auto; }
.nav a { padding: 14px 0; text-decoration: none; font-size: .9rem; font-weight: 700; white-space: nowrap; }

.button { display: inline-flex; min-height: 48px; padding: 11px 22px; align-items: center; justify-content: center; border: 1px solid var(--brand); border-radius: 12px; color: #fff; background: var(--brand); text-decoration: none; font-weight: 780; transition: .2s ease; }
.button:hover { color: #fff; background: var(--brand-dark); border-color: var(--brand-dark); transform: translateY(-1px); }
.button--ghost { color: var(--ink); background: transparent; border-color: var(--line); }
.button--ghost:hover { color: var(--brand); background: var(--card); border-color: var(--brand); }
.button--light { color: #1f2426; background: #fff; border-color: #fff; }
.button--light:hover { color: var(--brand); background: var(--surface); border-color: var(--surface); }
.button-row { display: flex; gap: 12px; flex-wrap: wrap; }
.icon-button { padding: 9px 12px; border: 0; border-radius: 9px; color: #fff; background: var(--dark-surface); font-weight: 750; font-size: .88rem; }
.icon-button:hover { background: var(--brand); }
.link-button { padding: 0; border: 0; color: inherit; background: transparent; text-decoration: underline; }

.hero { position: relative; overflow: hidden; padding: clamp(45px, 7vw, 100px) 0; background: var(--surface); isolation: isolate; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--hero-overlay); pointer-events: none; }
.hero__slides { position: absolute; z-index: -2; inset: 0; background: #d8d2c7; }
.hero__slide { position: absolute; inset: -2%; opacity: 0; background-position: center 48%; background-repeat: no-repeat; background-size: cover; transform: scale(1.025); animation: hero-slideshow 16s infinite ease-in-out; }
.hero__slide--morning { background-image: url('/assets/images/hero/etalon-yard-morning.webp'); }
.hero__slide--sunset { background-image: url('/assets/images/hero/etalon-yard-sunset.webp'); animation-delay: -8s; }
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.hero__content h1 { max-width: 900px; }
.hero__content > p { max-width: 920px; color: var(--soft-text); font-size: clamp(1.05rem, 1.8vw, 1.28rem); }
.hero__panel { padding: clamp(24px, 4vw, 38px); color: #fff; background: var(--dark-surface); border-radius: 24px; box-shadow: var(--shadow); }
.hero__panel > strong { display: block; margin-bottom: 8px; font-size: 1.45rem; }
.hero__panel > p { color: #cbd0d2; }
.hero-form, .form-grid, .compact-form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 680; font-size: .9rem; }
input, select, textarea { width: 100%; padding: 12px 14px; color: var(--ink); background: var(--input); border: 1px solid var(--line); border-radius: 10px; outline: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(185,56,47,.1); }
textarea { resize: vertical; }
.eyebrow { display: block; margin-bottom: 12px; color: var(--brand); font-size: .78rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.hero .eyebrow { color: var(--brand-dark); }

@keyframes hero-slideshow {
  0%, 43% { opacity: 1; transform: scale(1.025); }
  50%, 93% { opacity: 0; transform: scale(1.055); }
  100% { opacity: 1; transform: scale(1.025); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__slide { animation: none; transform: none; }
  .hero__slide--morning { opacity: 1; }
  .hero__slide--sunset { display: none; }
}

.section { padding: clamp(55px, 7vw, 96px) 0; }
.section--muted { background: var(--surface); }
.section--dark { color: #fff; background: var(--dark-surface); }
.section-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 32px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading > a { color: var(--brand); font-weight: 780; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.category-card { display: flex; min-height: 96px; padding: 22px; align-items: center; justify-content: space-between; gap: 15px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-weight: 780; transition: .2s ease; }
.category-card b { color: var(--brand); font-size: 1.4rem; }
.category-card:hover { color: var(--ink); border-color: var(--brand); box-shadow: 0 10px 25px rgba(31,36,38,.07); transform: translateY(-2px); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.product-card { min-width: 0; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: .22s ease; }
.product-card:hover { border-color: #c4bdb2; box-shadow: var(--shadow); transform: translateY(-3px); }
.product-card__image { position: relative; display: block; aspect-ratio: 4/3; overflow: hidden; background: var(--surface); }
.product-card__image img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s ease; }
.product-card:hover .product-card__image img { transform: scale(1.035); }
.badge { position: absolute; top: 12px; left: 12px; padding: 6px 9px; color: #fff; background: var(--brand); border-radius: 8px; font-size: .72rem; font-weight: 800; }
.product-card__body { padding: 18px; }
.product-card h3 { min-height: 2.35em; }
.product-card h3 a { text-decoration: none; }
.product-card__description { min-height: 42px; color: var(--muted); font-size: .88rem; }
.product-card__bottom { display: flex; gap: 10px; align-items: end; justify-content: space-between; margin-top: 18px; }
.price { color: var(--brand-dark); font-size: 1.16rem; font-weight: 850; white-space: nowrap; }
.price del { display: block; color: var(--muted); font-size: .76rem; font-weight: 500; }
.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.benefits div { display: grid; gap: 6px; }
.benefits b { color: var(--accent); font-size: 1.45rem; }
.benefits span { color: #cbd0d2; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card { padding: 26px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.post-card time { color: var(--brand); font-size: .8rem; font-weight: 750; }
.post-card h2, .post-card h3 { margin-top: 10px; }

.page-hero { padding: clamp(45px, 6vw, 84px) 0; background: var(--surface); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 1450px; font-size: clamp(2.2rem, 4vw, 4rem); }
.page-hero p, .lead { max-width: 1180px; color: var(--soft-text); font-size: 1.12rem; }
.breadcrumbs { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 28px; color: var(--muted); font-size: .9rem; }
.catalog-layout { display: grid; grid-template-columns: 270px 1fr; gap: clamp(26px, 3vw, 52px); align-items: start; }
.sidebar { position: sticky; top: 160px; padding: 22px; background: var(--surface); border-radius: var(--radius); }
.sidebar h2 { font-size: 1.25rem; }
.category-tree, .category-tree ul { margin: 0; padding: 0; list-style: none; }
.category-tree ul { padding-left: 13px; border-left: 1px solid var(--line); }
.category-tree a { display: block; padding: 6px 0; text-decoration: none; font-size: .9rem; }
.catalog-toolbar { display: flex; min-height: 50px; margin-bottom: 22px; align-items: center; justify-content: space-between; gap: 20px; }
.catalog-toolbar label { display: flex; align-items: center; gap: 10px; }
.catalog-toolbar select { padding: 8px 35px 8px 10px; }
.pagination { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.pagination a { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; }
.pagination a.active { color: #fff; background: var(--brand); border-color: var(--brand); }
.empty-state { max-width: 700px; margin: 20px auto; padding: 50px 28px; text-align: center; background: var(--surface); border-radius: var(--radius); }

.product-detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(350px, .9fr); gap: clamp(35px, 6vw, 80px); align-items: start; }
.gallery__main { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 10px; }
.gallery__thumbs img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.product-summary { position: sticky; top: 165px; }
.product-summary h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
.product-price { margin: 24px 0 15px; color: var(--brand-dark); font-size: 2rem; font-weight: 900; }
.buy-box { display: grid; grid-template-columns: minmax(140px, 1fr) 110px auto; gap: 12px; align-items: end; padding: 20px; background: var(--surface); border-radius: var(--radius); }
.product-notes { margin: 25px 0 0; padding-left: 22px; color: var(--muted); }
.product-description, .specs, .related { max-width: 1400px; margin: 70px auto 0; }
.richtext { overflow-wrap: anywhere; }
.richtext img { height: auto !important; }
.richtext table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.richtext td, .richtext th { padding: 8px 10px; border: 1px solid var(--line); }
.richtext a { color: var(--brand-dark); }
.specs dl { margin: 0; border-top: 1px solid var(--line); }
.specs dl div { display: grid; grid-template-columns: 1fr 1.4fr; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 650; }
.article { max-width: 1400px; font-size: 1.05rem; }

.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); gap: 35px; align-items: start; }
.cart-table { display: grid; gap: 12px; }
.cart-item { display: grid; grid-template-columns: 130px 1fr 100px 130px; gap: 18px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.cart-item img { width: 130px; height: 95px; object-fit: contain; background: var(--surface); border-radius: 9px; }
.cart-item h2 { margin-bottom: 5px; font-size: 1.08rem; }
.cart-item p { margin: 0; font-size: .85rem; }
.cart-item > strong { text-align: right; }
.cart-total { display: flex; justify-content: space-between; padding: 18px 5px; font-size: 1.25rem; }
.checkout-card, .panel { padding: clamp(22px, 3vw, 34px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 35px rgba(31,36,38,.06); }
.checkout-card { position: sticky; top: 165px; }
.checkout-card small { color: var(--muted); }
.order-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: start; }
.order-lines { display: grid; gap: 0; }
.order-lines > div { display: flex; gap: 20px; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--line); }
.order-total { font-size: 1.25rem; }
.details { display: grid; grid-template-columns: 100px 1fr; gap: 8px 14px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(35px, 7vw, 100px); }
.contact-list { display: grid; grid-template-columns: 130px 1fr; gap: 10px 20px; }
.contact-list dt { color: var(--muted); }
.contact-list dd { margin: 0; font-weight: 700; }
.auth-section { min-height: 65vh; display: grid; align-items: center; background: var(--surface); }
.auth-card { max-width: 560px; padding: clamp(28px, 5vw, 55px); background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.account-orders { display: grid; gap: 10px; }
.account-orders a { display: flex; padding: 18px 20px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
.account-orders span { display: grid; }
.account-orders small { color: var(--muted); }
.notice { margin-top: 20px; padding: 14px 18px; background: #e9f4ef; border: 1px solid #b9d9cb; border-radius: 10px; }
.notice--error { background: #fff0ed; border-color: #e7b9b2; }

html[data-theme="dark"] .notice { color: #dff5ea; background: #173529; border-color: #2e6650; }
html[data-theme="dark"] .notice--error { color: #ffd8d3; background: #3b1d1a; border-color: #7a3932; }
html[data-theme="dark"] .hero__panel input,
html[data-theme="dark"] .hero__panel textarea,
html[data-theme="dark"] .footer input { color: #f3f1ec; background: #202629; border-color: #465054; }

.footer { padding-top: 62px; color: #f5f5f3; background: #171b1d; }
.footer__grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr 1.1fr; gap: 45px; }
.brand--footer strong { color: var(--accent); }
.brand--footer small { color: #a9b0b2; }
.footer h2 { font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; }
.footer p, .footer li { color: #c5c9ca; }
.footer a { color: #fff; }
.footer__links { margin: 0; padding: 0; list-style: none; }
.footer__links li { margin: 6px 0; }
.compact-form input { padding: 9px 11px; }
.footer__bottom { margin-top: 45px; padding: 22px 0; color: #9da4a6; border-top: 1px solid #343a3d; font-size: .84rem; }

@media (max-width: 1050px) {
  .header__inner { grid-template-columns: 210px 1fr auto; }
  .account-link { display: none; }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .hero__grid { grid-template-columns: 1fr .85fr; gap: 40px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .cart-item { grid-template-columns: 100px 1fr 90px; }
  .cart-item > strong { grid-column: 2 / -1; }
}

@media (max-width: 780px) {
  :root { --container: min(100% - 26px, 720px); --radius: 14px; }
  .topbar__inner span { display: none; }
  .topbar__inner { justify-content: center; }
  .header { position: relative; }
  .header__inner { min-height: 74px; grid-template-columns: 1fr auto; gap: 10px; }
  .brand img { width: 60px; height: 40px; }
  .brand strong { font-size: 1.15rem; }
  .search { grid-column: 1 / -1; grid-row: 2; margin-bottom: 12px; }
  .header__actions { gap: 9px; }
  .header__actions .account-link { display: none; }
  .header__actions .cart-link { display: inline-flex; }
  .language-switch a { min-width: 31px; padding: 0 6px; }
  .theme-toggle { width: 34px; height: 34px; }
  .menu-button { display: block; }
  .nav { display: none; border-top: 1px solid var(--line); }
  .nav.open { display: block; }
  .nav__inner { display: grid; padding: 10px 0 18px; gap: 0; }
  .nav a { padding: 9px 0; }
  .hero__grid, .product-detail, .checkout-grid, .order-layout, .contact-grid { grid-template-columns: 1fr; }
  .hero__content h1 { font-size: clamp(2.5rem, 12vw, 4.2rem); }
  .product-summary, .checkout-card, .sidebar { position: static; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-card__body { padding: 13px; }
  .product-card__description { display: none; }
  .product-card__bottom { display: grid; align-items: stretch; }
  .product-card .icon-button { width: 100%; }
  .benefits { grid-template-columns: 1fr 1fr; }
  .post-grid { grid-template-columns: 1fr; }
  .catalog-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .buy-box { grid-template-columns: 1fr 100px; }
  .buy-box .button { grid-column: 1 / -1; }
  .cart-item { grid-template-columns: 80px 1fr; gap: 12px; }
  .cart-item img { width: 80px; height: 70px; }
  .cart-item label, .cart-item > strong { grid-column: 2; }
  .footer__grid { grid-template-columns: 1fr; gap: 25px; }
}

@media (max-width: 450px) {
  .brand small { display: none; }
  .category-grid { grid-template-columns: 1fr; }
  .category-card { min-height: 75px; }
  .product-grid { grid-template-columns: 1fr; }
  .benefits { grid-template-columns: 1fr; }
  .catalog-toolbar { align-items: stretch; flex-direction: column; }
  .catalog-toolbar label { justify-content: space-between; }
  .gallery__thumbs { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
