/* Тема «Базова» — вітрина крамниці. Акцентний колір задає власник. */

:root {
  --accent: #1E63F0;
  --ink: #16181C;
  --ink-2: #4C5058;
  --ink-3: #8A8F98;
  --line: #E6E7EA;
  --paper: #FFFFFF;
  --bg: #F5F6F8;

  --r-xs: 8px;
  --r-sm: 12px;
  --r: 16px;
  --r-lg: 20px;
  --pill: 999px;
  --shadow: 0 1px 2px rgba(22, 24, 28, .05), 0 8px 24px rgba(22, 24, 28, .07);
  --shadow-lift: 0 2px 8px rgba(22, 24, 28, .08), 0 20px 40px rgba(22, 24, 28, .12);
  --e-ui: cubic-bezier(.4, 0, .2, 1);
  --e-body: cubic-bezier(.25, .46, .45, .94);
  --gut: clamp(14px, 3.5vw, 48px);
  --max: 1240px;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--bg); letter-spacing: -.01em; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -.025em; margin: 0 0 .4em; font-weight: 800; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-3); }
.hint { color: var(--ink-3); font-size: 14px; }
.empty { color: var(--ink-3); padding: 24px 0; }
.lede { color: var(--ink-2); font-size: 18px; max-width: 70ch; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 0; border-radius: var(--pill); font: 700 15px/1 Manrope, sans-serif; text-decoration: none; cursor: pointer; transition: transform .18s var(--e-ui), box-shadow .18s var(--e-ui), filter .18s var(--e-ui); }
.btn--solid { background: var(--accent); color: #fff; }
.btn--solid:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); filter: saturate(1.1); }
.btn--ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--big { min-height: 54px; padding: 0 28px; font-size: 16px; }
.btn--small { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn--wide { width: 100%; margin-top: 8px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.linkbtn { border: 0; background: none; cursor: pointer; color: var(--ink-3); font-size: 18px; }

/* шапка */
.shead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 14px var(--gut); background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 80; }
.shead__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18px; }
.shead__mark { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 19px; }
.shead__search { display: flex; gap: 6px; max-width: 520px; width: 100%; }
.shead__search input { flex: 1; min-height: 44px; padding: 10px 16px; border: 1.5px solid var(--line); border-radius: var(--pill); font: 500 15px Manrope, sans-serif; }
.shead__search input:focus { outline: 0; border-color: var(--accent); }
.shead__search button { min-height: 44px; padding: 0 18px; border: 0; border-radius: var(--pill); background: var(--ink); color: #fff; cursor: pointer; font-size: 16px; }
.shead__side { display: flex; align-items: center; gap: 16px; }
.shead__phone { text-decoration: none; font-weight: 700; white-space: nowrap; }
.shead__cart { text-decoration: none; font-weight: 700; padding: 11px 18px; border-radius: var(--pill); background: var(--bg); white-space: nowrap; }
.shead__cart b { background: var(--accent); color: #fff; border-radius: var(--pill); padding: 1px 8px; margin-left: 4px; font-size: 13px; }

.snav { display: flex; gap: 18px; overflow-x: auto; padding: 12px var(--gut); background: var(--paper); border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; }
.snav a { text-decoration: none; color: var(--ink-2); white-space: nowrap; }
.snav a:hover { color: var(--accent); }

.swrap { max-width: var(--max); margin: 0 auto; padding: clamp(20px, 3vw, 40px) var(--gut) 72px; }
.page-title { font-size: clamp(26px, 3.6vw, 40px); margin-bottom: 20px; }
.block { margin: clamp(32px, 5vw, 56px) 0 0; }
.block__title { font-size: clamp(20px, 2.4vw, 28px); margin-bottom: 18px; }
.crumbs { font-size: 14px; color: var(--ink-3); margin-bottom: 16px; }
.crumbs a { text-decoration: none; }

/* герой */
.hero { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--paper); box-shadow: var(--shadow); margin-bottom: 8px; }
.hero__cover { width: 100%; max-height: 380px; object-fit: cover; }
.hero__text { padding: clamp(22px, 4vw, 44px); }
.hero__text h1 { font-size: clamp(28px, 4vw, 44px); }
.hero__tagline { color: var(--ink-2); font-size: 18px; max-width: 60ch; }

.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cat { background: var(--paper); border-radius: var(--r); padding: 16px; text-decoration: none; box-shadow: var(--shadow); display: grid; gap: 4px; transition: transform .18s var(--e-ui); }
.cat:hover { transform: translateY(-2px); }
.cat img { height: 90px; object-fit: cover; border-radius: var(--r-sm); }
.cat span { font-weight: 700; }
.cat small { color: var(--ink-3); }

/* картки товарів */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.card-p { background: var(--paper); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s var(--e-ui), box-shadow .2s var(--e-ui); }
.card-p:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card-p__img { position: relative; display: block; aspect-ratio: 1; background: #EEF0F3; }
.card-p__img img { width: 100%; height: 100%; object-fit: cover; }
.card-p__noimg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #E8EAEE, #F5F6F8); }
.card-p__sale { position: absolute; left: 10px; top: 10px; background: var(--accent); color: #fff; font-size: 13px; padding: 4px 10px; border-radius: var(--pill); }
.card-p__body { padding: 14px; display: grid; gap: 8px; align-content: start; flex: 1; }
.card-p__title { text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.3; }
.card-p__price { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.card-p__price b { font-size: 19px; letter-spacing: -.02em; }
.card-p__price s { color: var(--ink-3); font-size: 14px; }
.card-p form { margin-top: auto; }

/* каталог */
.catalog { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; align-items: start; }
.filter { background: var(--paper); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); position: sticky; top: 92px; }
.filter h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 16px 0 8px; }
.filter h3:first-child { margin-top: 0; }
.filter__range { display: flex; gap: 8px; }
.filter input[type=number], .filter select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font: 500 15px Manrope, sans-serif; }
.filter .check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 12px 0; }
.filter__cats { display: grid; gap: 4px; margin-top: 16px; }
.filter__cats a { text-decoration: none; padding: 8px 10px; border-radius: var(--r-xs); font-size: 15px; color: var(--ink-2); }
.filter__cats a.is-on, .filter__cats a:hover { background: var(--bg); color: var(--ink); }

/* товар */
.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); align-items: start; }
.product__media { background: var(--paper); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow); }
.product__main { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: var(--r); background: #F7F8FA; }
.product__noimg { aspect-ratio: 1; border-radius: var(--r); background: linear-gradient(135deg, #E8EAEE, #F5F6F8); }
.product__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.product__thumbs button { border: 1.5px solid transparent; border-radius: var(--r-sm); padding: 0; background: none; cursor: pointer; }
.product__thumbs button img { width: 74px; height: 74px; object-fit: cover; border-radius: var(--r-sm); }
.product__thumbs button:hover, .product__thumbs button[aria-current=true] { border-color: var(--accent); }
.product__info h1 { font-size: clamp(24px, 3vw, 34px); }
.product__price { display: flex; align-items: baseline; gap: 12px; margin: 16px 0; }
.product__price b { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.03em; }
.product__price s { color: var(--ink-3); font-size: 18px; }
.product__price .sale { background: var(--accent); color: #fff; padding: 4px 10px; border-radius: var(--pill); font-size: 14px; font-weight: 700; }
.product__avail { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); display: inline-block; }
.dot--on { background: #16A34A; }
.product__buy { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 10px; }
.product__buy label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.product__buy select { min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font: 500 15px Manrope, sans-serif; }
.qty { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--pill); overflow: hidden; }
.qty button { width: 44px; height: 46px; border: 0; background: none; font-size: 20px; cursor: pointer; }
.qty input { width: 54px; height: 46px; border: 0; text-align: center; font: 700 16px Manrope, sans-serif; }
.qty input:focus { outline: 0; }
.product__facts { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; font-size: 15px; color: var(--ink-2); }
.product__facts li { padding-left: 24px; position: relative; }
.product__facts li::before { content: "•"; position: absolute; left: 6px; color: var(--accent); font-weight: 800; }
.product__lede { color: var(--ink-2); margin-top: 18px; }
.specs { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.specs th { text-align: left; font-weight: 600; color: var(--ink-3); padding: 12px 16px; width: 40%; font-size: 15px; }
.specs td { padding: 12px 16px; font-size: 15px; }
.specs tr + tr th, .specs tr + tr td { border-top: 1px solid var(--line); }
.prose { background: var(--paper); border-radius: var(--r-lg); padding: clamp(18px, 2.4vw, 30px); box-shadow: var(--shadow); }
.prose--page { max-width: 780px; }
.review { background: var(--paper); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); margin: 0 0 10px; }

/* кошик і оформлення */
.cart { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.cart__table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.cart__table td { padding: 14px; border-top: 1px solid var(--line); }
.cart__table tr:first-child td { border-top: 0; }
.cart__img img { border-radius: var(--r-sm); object-fit: cover; }
.cart__qty input { width: 76px; min-height: 42px; text-align: center; border: 1.5px solid var(--line); border-radius: var(--r-sm); font: 600 15px Manrope, sans-serif; }
.cart__sum { font-weight: 700; white-space: nowrap; }
.cart__total { background: var(--paper); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); position: sticky; top: 92px; }
.cart__total b { font-size: 22px; }

.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.checkout .card { background: var(--paper); border-radius: var(--r-lg); padding: clamp(18px, 2.4vw, 26px); box-shadow: var(--shadow); margin-bottom: 16px; }
.checkout h2 { font-size: 18px; margin-bottom: 14px; }
.checkout label { display: block; font-weight: 700; font-size: 14px; margin: 12px 0 6px; }
.checkout input, .checkout select, .checkout textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font: 500 16px Manrope, sans-serif; }
.checkout textarea { min-height: 96px; }
.checkout input:focus, .checkout select:focus, .checkout textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.choices { display: grid; gap: 8px; }
.choice { display: flex !important; align-items: center; gap: 10px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r); cursor: pointer; margin: 0 !important; font-weight: 600; }
.choice input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, #fff); }
.np { margin-top: 14px; }
.suggest { list-style: none; margin: 4px 0 0; padding: 6px; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow); max-height: 280px; overflow: auto; }
.suggest li { padding: 10px 12px; border-radius: var(--r-xs); cursor: pointer; font-size: 15px; }
.suggest li:hover { background: var(--bg); }
.checkout__side .card { position: sticky; top: 92px; }
.checkout__items { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.checkout__items li { display: flex; justify-content: space-between; gap: 10px; }
.checkout__row { display: flex; justify-content: space-between; margin: 6px 0; color: var(--ink-2); }
.checkout__total { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 18px; }
.checkout__total b { font-size: 24px; letter-spacing: -.02em; }

.orderpage { background: var(--paper); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 36px); box-shadow: var(--shadow); max-width: 820px; }
.orderpage__state { display: flex; gap: 8px; margin-bottom: 20px; }
.orderpage__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 20px 0; }
.grid { width: 100%; border-collapse: collapse; font-size: 15px; }
.grid td { padding: 10px 8px; border-top: 1px solid var(--line); }
.grid tr.total td { font-size: 17px; }
.pill { display: inline-block; padding: 5px 11px; border-radius: var(--pill); background: var(--bg); font-size: 13px; font-weight: 700; }
.pill--paid, .pill--delivered, .pill--done { background: #DFF3E4; color: #17683A; }
.pill--new, .pill--pending { background: #FFF2CC; color: #7A5B00; }
.pill--canceled, .pill--failed { background: #FDECEC; color: #C02626; }
.pill--shipped, .pill--confirmed { background: #E3ECFD; color: #1B47A8; }

.quick { border: 0; border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-lift); max-width: 420px; width: calc(100% - 32px); }
.quick::backdrop { background: rgba(22, 24, 28, .45); }
.quick h2 { font-size: 22px; }
.quick input { width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font: 500 16px Manrope, sans-serif; margin-bottom: 10px; }
.quick__close { position: absolute; top: 12px; right: 12px; border: 0; background: none; font-size: 22px; cursor: pointer; }
.quick__result { font-size: 14px; margin: 8px 0 0; }

.flash { max-width: var(--max); margin: 12px auto 0; padding: 0 var(--gut); }
.flash__item { background: color-mix(in srgb, var(--accent) 12%, #fff); border-radius: var(--r-sm); padding: 12px 16px; font-weight: 600; }

.sfoot { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; max-width: var(--max); margin: 0 auto; padding: 40px var(--gut) 56px; border-top: 1px solid var(--line); background: var(--paper); }
.sfoot__col { display: grid; gap: 6px; align-content: start; font-size: 14px; }
.sfoot__col a { color: var(--ink-2); text-decoration: none; }
.sfoot__col a:hover { color: var(--accent); }
.sfoot__made { grid-column: 1 / -1; color: var(--ink-3); font-size: 13px; margin: 0; }

.pager { display: flex; gap: 14px; justify-content: center; padding: 24px 0; font-weight: 600; }

@media (max-width: 960px) {
  .catalog, .product, .cart, .checkout { grid-template-columns: minmax(0, 1fr); }
  .filter, .cart__total, .checkout__side .card { position: static; }
  .shead { grid-template-columns: auto auto; row-gap: 10px; }
  .shead__search { grid-column: 1 / -1; order: 3; max-width: none; }
  .shead__phone { display: none; }
  .sfoot { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-p__body { padding: 10px; }
  .card-p__price b { font-size: 17px; }
  .btn--wide, .product__buy .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
