:root {
  --ink: #241d1b;
  --muted: #746b68;
  --line: #e9e2df;
  --paper: #fbfaf9;
  --white: #fff;
  --accent: #df5572;
  --accent-dark: #b83957;
  --soft: #f8eef0;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-family: var(--sans); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.shell { width: min(1440px, calc(100% - 48px)); 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; }
.eyebrow { margin: 0 0 6px; color: var(--accent-dark); font-size: 9px; font-weight: 800; letter-spacing: .15em; }

.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.header-row { min-height: 72px; display: grid; grid-template-columns: auto minmax(260px, 560px) auto; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: white; font-family: var(--serif); font-size: 12px; font-weight: 700; }
.brand strong, .brand small { display: block; }
.brand strong { font-family: var(--serif); font-size: 20px; line-height: 1; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 8px; letter-spacing: .13em; }
.global-search { position: relative; height: 42px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: white; }
.global-search svg { width: 17px; margin-left: 15px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.global-search input { width: 100%; height: 100%; padding: 0 40px 0 10px; border: 0; outline: 0; background: transparent; font-size: 13px; }
.search-clear { position: absolute; right: 12px; border: 0; background: none; color: var(--muted); font-size: 19px; }
.header-links { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.header-links a, .cart-trigger { border: 0; background: none; color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 700; white-space: nowrap; }
.cart-trigger span { min-width: 20px; height: 20px; display: inline-grid; place-items: center; margin-left: 5px; border-radius: 999px; background: var(--accent); color: white; font-size: 10px; }

.shop-main { padding-block: 30px 58px; }
.catalog-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.catalog-head h1 { margin: 0; font-family: var(--serif); font-size: 42px; font-weight: 500; letter-spacing: -.03em; }
.catalog-actions { display: flex; gap: 10px; }
.sort-control select, .filter-toggle { height: 38px; border: 1px solid var(--line); border-radius: 9px; background: white; padding: 0 12px; color: var(--ink); font-size: 11px; }
.filter-toggle { display: none; }
.shop-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px; align-items: start; }
.filters { position: sticky; top: 94px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.filter-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.filter-header strong { font-size: 13px; }
.filter-header button { border: 0; background: none; color: var(--accent-dark); font-size: 10px; font-weight: 700; }
.filter-group { display: grid; gap: 8px; margin: 0; padding: 15px 0; border: 0; border-bottom: 1px solid var(--line); }
.filter-group legend { margin-bottom: 9px; padding: 0; font-size: 11px; font-weight: 800; }
.filter-group label { display: flex; align-items: center; gap: 8px; color: #554c49; font-size: 10px; cursor: pointer; }
.filter-group input[type="checkbox"], .filter-group input[type="radio"] { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); }
.filter-group input[type="range"] { width: 100%; accent-color: var(--accent); }
.range-value { margin-bottom: 3px; color: var(--muted); font-size: 10px; }
.apply-filters { display: none; }
.result-line { display: flex; align-items: baseline; gap: 6px; min-height: 25px; margin-bottom: 12px; color: var(--muted); font-size: 11px; }
.result-line strong { color: var(--ink); font-size: 12px; }
.product-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 13px; }
.product-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: white; }
.product-media { position: relative; background: #f1ece9; }
.product-image { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center; }
.product-badge { position: absolute; left: 8px; top: 8px; padding: 4px 7px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--accent-dark); font-size: 8px; font-weight: 800; }
.product-info { padding: 10px; }
.product-title { min-height: 34px; margin: 0; font-family: var(--serif); font-size: 14px; font-weight: 600; line-height: 1.2; }
.product-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 7px 0 9px; }
.product-meta strong { color: var(--accent-dark); font-size: 12px; }
.product-meta span { color: #a67b21; font-size: 9px; white-space: nowrap; }
.add-button { width: 100%; height: 33px; border: 1px solid var(--accent); border-radius: 8px; background: white; color: var(--accent-dark); font-size: 10px; font-weight: 800; }
.add-button:hover { background: var(--accent); color: white; }
.empty-state { padding: 70px 20px; text-align: center; }
.empty-state h2 { margin: 0; font-family: var(--serif); font-size: 26px; }
.empty-state p { color: var(--muted); font-size: 12px; }
.empty-state button { height: 38px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--accent); color: white; font-weight: 700; }
.site-footer { border-top: 1px solid var(--line); background: white; }
.site-footer .shell { min-height: 62px; display: flex; align-items: center; color: var(--muted); font-size: 10px; }

.backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(35,25,22,.34); }
.cart-drawer { position: fixed; top: 0; right: 0; z-index: 80; width: min(390px, 100%); height: 100dvh; display: flex; flex-direction: column; padding: 22px; background: white; box-shadow: -18px 0 50px rgba(40,25,20,.18); transform: translateX(104%); transition: transform .28s ease; }
.cart-drawer.is-open { transform: translateX(0); }
.drawer-header { display: flex; align-items: start; justify-content: space-between; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.drawer-header h2 { margin: 0; font-family: var(--serif); font-size: 28px; }
.drawer-header button { border: 0; background: none; font-size: 25px; }
.cart-items { flex: 1; overflow: auto; }
.cart-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 11px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.cart-item h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 14px; }
.cart-item p { margin: 0 0 7px; color: var(--accent-dark); font-size: 10px; font-weight: 700; }
.quantity { display: inline-flex; align-items: center; gap: 9px; }
.quantity button { width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.quantity span { font-size: 10px; }
.remove-item { border: 0; background: none; color: var(--muted); font-size: 18px; }
.cart-empty { display: grid; place-items: center; flex: 1; color: var(--muted); font-size: 12px; }
.cart-summary { padding-top: 15px; border-top: 1px solid var(--line); }
.cart-summary > div { display: flex; justify-content: space-between; margin: 8px 0; color: var(--muted); font-size: 11px; }
.cart-summary strong { color: var(--ink); }
.cart-total { padding-top: 11px; border-top: 1px solid var(--line); font-size: 14px !important; }
.checkout-button { width: 100%; height: 46px; margin-top: 12px; border: 0; border-radius: 9px; background: var(--accent); color: white; font-weight: 800; }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 100; padding: 10px 15px; border-radius: 999px; background: #27211f; color: white; font-size: 10px; opacity: 0; transform: translate(-50%, 14px); pointer-events: none; transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1280px) { .product-grid { grid-template-columns: repeat(6, minmax(0,1fr)); } }
@media (max-width: 1040px) {
  .header-row { grid-template-columns: auto 1fr auto; gap: 16px; }
  .shop-layout { grid-template-columns: 170px minmax(0,1fr); gap: 18px; }
  .product-grid { grid-template-columns: repeat(5, minmax(0,1fr)); }
}
@media (max-width: 780px) {
  .shell { width: min(100% - 28px, 720px); }
  .header-row { min-height: 66px; grid-template-columns: 1fr auto; }
  .brand small, .header-links a { display: none; }
  .global-search { grid-column: 1 / -1; grid-row: 2; margin-bottom: 12px; }
  .catalog-head { margin-top: 4px; }
  .catalog-head h1 { font-size: 34px; }
  .filter-toggle { display: inline-flex; align-items: center; gap: 5px; }
  .shop-layout { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: auto 0 0; z-index: 90; width: 100%; max-height: 82dvh; overflow: auto; border-radius: 18px 18px 0 0; padding: 20px max(18px, calc((100vw - 700px) / 2)); transform: translateY(105%); transition: transform .26s ease; }
  .filters.is-open { transform: translateY(0); }
  .apply-filters { width: 100%; height: 42px; display: block; margin-top: 16px; border: 0; border-radius: 8px; background: var(--accent); color: white; font-weight: 800; }
  .product-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 11px; }
}
@media (max-width: 560px) {
  .shop-main { padding-top: 23px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .product-title { min-height: 32px; font-size: 13px; }
  .product-info { padding: 8px; }
  .product-badge { font-size: 7px; }
}
