/* =====================================================
   ТД Стройка — дизайн-система (landing-page-design)
   Manrope · flat surfaces · orange accent · motion
   ===================================================== */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/manrope-cyr.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #FAFAF9;
  --surface: #FFFFFF;
  --surface-2: #F5F5F4;
  --ink: #101216;
  --ink-2: #3F4650;
  --muted: #6B7280;
  --line: #E7E5E4;
  --line-2: #D6D3D1;
  --accent: #F97316;
  --accent-hover: #EA580C;
  --accent-soft: #FFF1E6;
  --accent-ink: #C2410C;
  --dark: #000000;
  --dark-2: #181818;
  --dark-3: #1F1F1F;
  --ok: #16A34A;
  --err: #DC2626;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 999px;
  --curve: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-1: 0 1px 2px rgba(16, 18, 22, .05);
  --shadow-2: 0 8px 24px rgba(16, 18, 22, .08);
  --shadow-3: 0 16px 48px rgba(16, 18, 22, .12);
  --w: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-ink); }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
p { text-wrap: pretty; }

::selection { background: var(--accent-soft); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 0 0 var(--r-md) 0; z-index: 200;
}
.skip-link:focus { left: 0; }

.wrap { max-width: var(--w); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ============ NAV (floating glass) ============ */
.nav-shell { position: sticky; top: 12px; z-index: 100; padding: 0 12px; }

/* breadcrumbs stick right below the floating nav, never hide under it */
.breadcrumbs { position: sticky; top: 74px; z-index: 95; background: var(--bg); padding: 10px 0 6px; margin: -10px 0 6px; }
@media (prefers-reduced-motion: reduce) { .breadcrumbs { transition: none; } }

.nav {
  max-width: var(--w); margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 12px 10px 20px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(16, 18, 22, 0.06);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-2);
  transition: box-shadow .5s var(--curve), background .3s var(--curve);
}

.nav__brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.nav__brand img { width: 36px; height: 36px; }
.nav__brand-name { font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.nav__brand-name span { color: var(--accent); }

.nav__menu { display: flex; align-items: center; gap: 4px; margin: 0 auto; padding: 0; list-style: none; }
.nav__menu a {
  display: block; padding: 8px 12px; border-radius: var(--r-full);
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  transition: background .3s var(--curve), color .3s var(--curve);
}
.nav__menu a:hover { background: var(--surface-2); color: var(--ink); }
.nav__menu a.active { background: var(--ink); color: #fff; }

.nav__actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--r-md); border: 0;
  font-family: inherit; font-size: 16px; font-weight: 600; line-height: 1;
  cursor: pointer; transition: transform .5s var(--curve), background .3s var(--curve), box-shadow .5s var(--curve);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98) translateY(1px); }
.btn svg { flex: 0 0 auto; }

.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(249, 115, 22, .35); }
.btn--primary:hover { background: var(--accent-hover); color: #fff; }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #000; color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--surface-2); color: var(--ink); }

.nav__cart {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r-full); background: var(--ink); color: #fff;
  transition: background .3s var(--curve), transform .5s var(--curve);
}
.nav__cart:hover { background: #000; color: #fff; transform: translateY(-1px); }
.nav__cart svg { width: 20px; height: 20px; }
.nav__cart .cart-count {
  position: absolute; top: -4px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: var(--r-full); display: inline-flex; align-items: center; justify-content: center;
}

.nav__burger { display: none; width: 40px; height: 40px; border: 0; background: transparent; border-radius: var(--r-full); cursor: pointer; position: relative; }
.nav__burger span {
  position: absolute; left: 10px; width: 20px; height: 2px; border-radius: 2px; background: var(--ink);
  transition: transform .5s var(--curve), opacity .3s var(--curve), top .5s var(--curve);
}
.nav__burger span:nth-child(1) { top: 14px; }
.nav__burger span:nth-child(2) { top: 19px; }
.nav__burger span:nth-child(3) { top: 24px; }
body.menu-open .nav__burger span:nth-child(1) { top: 19px; transform: rotate(45deg); }
body.menu-open .nav__burger span:nth-child(2) { opacity: 0; }
body.menu-open .nav__burger span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

.mmenu {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(250, 250, 249, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: none; padding: 96px 24px 24px;
}
body.menu-open .mmenu { display: block; }
.mmenu ul { list-style: none; margin: 0; padding: 0; }
.mmenu li { opacity: 0; transform: translateY(24px); transition: transform .5s var(--curve), opacity .5s var(--curve); }
body.menu-open .mmenu li { opacity: 1; transform: none; }
.mmenu li:nth-child(1) { transition-delay: 60ms; }
.mmenu li:nth-child(2) { transition-delay: 120ms; }
.mmenu li:nth-child(3) { transition-delay: 180ms; }
.mmenu li:nth-child(4) { transition-delay: 240ms; }
.mmenu li:nth-child(5) { transition-delay: 300ms; }
.mmenu a {
  display: block; padding: 16px 0; font-size: 24px; font-weight: 700; letter-spacing: -0.02em;
  border-bottom: 1px solid var(--line);
}
.mmenu .mmenu__cta { margin-top: 24px; display: flex; gap: 8px; }

@media (max-width: 960px) {
  .nav__menu, .nav__actions .btn--ghost { display: none; }
  .nav__burger { display: block; margin-left: auto; }
  .nav { padding: 8px 8px 8px 16px; }
}

/* ============ HERO ============ */
.hero { padding: 64px 0 0; position: relative; overflow: clip; }
.hero__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center; }
@media (max-width: 960px) { .hero__grid { grid-template-columns: 1fr; } }

.hero__tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--line);
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  margin-bottom: 24px;
}
.hero__tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }

.hero__title {
  font-size: 48px; line-height: 1.05; letter-spacing: -0.03em;
  max-width: 680px;
  background: linear-gradient(90deg, #000000 0%, #666666 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero__title .accent { background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%); -webkit-background-clip: text; background-clip: text; }
.hero__sub { font-size: 20px; line-height: 28px; color: var(--muted); max-width: 680px; margin: 16px 0 0; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.hero__cta .btn { padding: 12px 20px; font-size: 16px; border-radius: var(--r-md); }

.hero__proof { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 40px; }
.hero__proof div b { display: block; font-size: 24px; line-height: 28px; }
.hero__proof div span { font-size: 14px; color: var(--muted); }

.hero__art { position: relative; min-height: 380px; }
.hero__art svg { width: 100%; height: auto; }
.hero__chip {
  position: absolute; display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.9); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 8px 12px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-2);
  animation: floaty 6s var(--curve) infinite alternate;
}
.hero__chip svg { width: 18px; height: 18px; color: var(--accent); }
.hero__chip--1 { top: 12%; right: 6%; }
.hero__chip--2 { bottom: 18%; left: 2%; animation-delay: 2s; }
@keyframes floaty { from { transform: translateY(-4px); } to { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .hero__chip { animation: none; } }
@media (max-width: 960px) { .hero__art { display: none; } }

.marquee { overflow: hidden; margin-top: 48px; border-block: 1px solid var(--line); padding: 12px 0; background: var(--surface); }
.marquee__track { display: flex; gap: 32px; width: max-content; animation: marquee 30s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span { font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.marquee__track span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ============ sections ============ */
.section { padding: 64px 0; }
.section--dark { background: var(--dark); color: #fff; }
.section--dark .muted { color: #9B9B9B; }
.section__head { max-width: 680px; margin-bottom: 40px; }
.section__head .kicker {
  display: inline-block; font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.section__head h2 { font-size: 36px; line-height: 40px; letter-spacing: -0.02em; }
.section__head p { color: var(--muted); font-size: 18px; line-height: 28px; margin: 12px 0 0; }
.section--dark .section__head h2 {
  background: linear-gradient(90deg, #FFFFFF 0%, #9B9B9B 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}

/* tagline reveal */
.reveal-words { font-size: 60px; line-height: 1; letter-spacing: -0.03em; font-weight: 700; max-width: 680px; }
.reveal-words .w { color: rgba(250, 250, 249, 0.28); transition: color .8s var(--curve); }
.reveal-words .w.on { color: #FFFFFF; }
.reveal-words .w.accent.on { color: var(--accent); }
@media (max-width: 960px) { .reveal-words { font-size: 36px; line-height: 40px; } }
@media (max-width: 640px) { .reveal-words { font-size: 30px; line-height: 36px; } }

/* category cards */
.cats { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
@media (max-width: 1160px) { .cats { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 960px) { .cats { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .cats { grid-template-columns: repeat(2, 1fr); } }

.cat-card {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  transition: transform .5s var(--curve), box-shadow .5s var(--curve), border-color .3s var(--curve);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.cat-card__img { aspect-ratio: 1 / 1; overflow: hidden; background: var(--surface-2); }
.cat-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--curve); }
.cat-card:hover .cat-card__img img { transform: scale(1.04); }
.cat-card__body { padding: 10px 12px 12px; }
.cat-card__body h3 { font-size: 13px; line-height: 18px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-card__body p { display: none; }
.cat-card__count {
  position: absolute; top: 8px; right: 8px; padding: 2px 8px;
  background: rgba(16,18,22,.75); color: #fff; border-radius: var(--r-full);
  font-size: 11px; font-weight: 700; backdrop-filter: blur(4px);
}

/* news cards */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 960px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .news-grid { grid-template-columns: 1fr; } }

.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform .5s var(--curve), box-shadow .5s var(--curve);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.card__img { display: block; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--curve); }
.card:hover .card__img img { transform: scale(1.03); }
.card__body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.card__meta .chip { background: var(--accent-soft); color: var(--accent-ink); padding: 2px 8px; border-radius: var(--r-full); font-weight: 700; }
.card__title { font-size: 18px; line-height: 28px; font-weight: 700; }
.card__title a:hover { color: var(--accent-ink); }
.card__text { font-size: 14px; line-height: 20px; color: var(--muted); }
.card__more { margin-top: auto; font-size: 14px; font-weight: 700; color: var(--accent-ink); display: inline-flex; align-items: center; gap: 6px; }

/* product card */
.pcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: transform .5s var(--curve), box-shadow .5s var(--curve); }
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.pcard__img { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: var(--surface); padding: 16px; }
.pcard__img img { max-height: 100%; object-fit: contain; }
.pcard__title { padding: 0 16px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink-2); }
.pcard__price { padding: 8px 16px 16px; font-size: 18px; font-weight: 700; color: var(--ink); display: flex; align-items: baseline; gap: 6px; }
.pcard__price .u { font-size: 12px; font-weight: 600; color: var(--muted); }
.pcard__buy { padding: 0 16px 16px; margin-top: auto; }
.pcard__buy form { margin: 0; }
.btn--buy { width: 100%; padding: 8px 12px; font-size: 14px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-ink); }
.btn--buy:hover { background: var(--accent); color: #fff; }

/* products grid in categories */
.goods-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 1080px) { .goods-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 960px) { .goods-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .goods-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }
.goods-grid .pcard__img { padding: 8px; }

/* ============ article page ============ */
.page-head { padding: 48px 0 24px; }
.breadcrumbs { font-size: 14px; color: var(--muted); display: block; }
.breadcrumbs .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.breadcrumbs a:hover { color: var(--accent-ink); }
.breadcrumbs .sep { color: var(--line-2); }

.article { max-width: 760px; }
.article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.article__meta .chip { background: var(--accent-soft); color: var(--accent-ink); padding: 2px 10px; border-radius: var(--r-full); font-size: 12px; font-weight: 700; }
.article__title { font-size: 36px; line-height: 40px; letter-spacing: -0.02em; margin: 0 0 24px; }
@media (max-width: 640px) { .article__title { font-size: 30px; line-height: 36px; } }

.article-body { font-size: 18px; line-height: 28px; color: var(--ink-2); }
.article-body p { margin: 0 0 16px; }
.article-body h2, .article-body h3 { color: var(--ink); margin: 24px 0 12px; }
.article-body img { border-radius: var(--r-lg); margin: 16px 0; }
.article-body img[align="left"] { margin: 4px 20px 12px 0; float: left; max-width: 45%; }
.article-body img[align="right"] { margin: 4px 0 12px 20px; float: right; max-width: 45%; }
.article-body::after { content: ""; display: block; clear: both; }
.article-body ul, .article-body ol { padding-left: 24px; }
.article-body table { border-collapse: collapse; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.article-body table td { padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }

/* product page (legacy markup restyle) */
.goods { max-width: 900px; }
.goods .top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px 24px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.goods .images .main img { width: 100%; height: auto; }
.goods .images .add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.goods .images .add a { width: 72px; height: 72px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); }
.goods .images .add img { width: 100%; height: 100%; object-fit: cover; display: block; }
.goods .price { font-size: 28px; line-height: 34px; }
.goods .top h2, .goods .top table.table1 { grid-column: 1 / -1; }
@media (max-width: 800px) { .goods .top { grid-template-columns: 1fr; } }
.goods .images .main img { border-radius: var(--r-md); border: 1px solid var(--line); }
.goods .order form { margin: 0; }
.goods .order label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin: 8px 0; }
.goods .order input[type=text], .goods .order input[type=number] { width: 72px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--r-md); font-family: inherit; }
.goods .order .btn { margin-top: 8px; }
.goods h2 { font-size: 24px; line-height: 32px; margin: 24px 0 12px; }
.goods table.table1 { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.goods table.table1 td { padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }

/* share */
.share { display: flex; align-items: center; gap: 8px; margin: 32px 0; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); flex-wrap: wrap; }
.share span.label { font-size: 14px; font-weight: 700; margin-right: 4px; }
.share a, .share button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 12px; border-radius: var(--r-full); border: 1px solid var(--line);
  background: var(--surface); font-family: inherit; font-size: 14px; font-weight: 600; color: var(--ink-2);
  cursor: pointer; transition: background .3s var(--curve), color .3s var(--curve), border-color .3s var(--curve);
}
.share a svg { width: 18px; height: 18px; }
.share a:hover, .share button:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.share .share-tg:hover { background: #229ED9; border-color: #229ED9; }
.share .share-vk:hover { background: #0077FF; border-color: #0077FF; }
.share .share-wa:hover { background: #25D366; border-color: #25D366; }
.share .copy-link:hover { background: var(--accent); border-color: var(--accent); }

/* related */
.related { margin: 32px 0 0; }
.related h3 { font-size: 24px; line-height: 32px; margin-bottom: 16px; }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (max-width: 640px) { .related ul { grid-template-columns: 1fr; } }
.related li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 16px; }
.related li a { font-weight: 600; font-size: 14px; line-height: 20px; }
.related li span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* "Читайте также" grid of compact cards */
.rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 960px) { .rel-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .rel-grid { grid-template-columns: 1fr; } }
.rcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; transition: transform .5s var(--curve), box-shadow .5s var(--curve); }
.rcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.rcard__img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.rcard__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rcard__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.rcard__title { font-weight: 600; font-size: 15px; line-height: 1.35; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rcard:hover .rcard__title { color: var(--accent-ink); }
.rcard__date { font-size: 12px; color: var(--muted); }

/* ============ footer ============ */
.footer { background: var(--dark); color: #fff; margin-top: 64px; }
.footer a:hover { color: var(--accent); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding: 48px 0; }
@media (max-width: 800px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__brand img { width: 40px; height: 40px; }
.footer__brand .name { font-weight: 700; font-size: 18px; }
.footer p { color: #9B9B9B; font-size: 14px; line-height: 20px; max-width: 320px; }
.footer h4 { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 12px; letter-spacing: .04em; text-transform: uppercase; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: #9B9B9B; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: #9B9B9B; }

/* jcart widget */
.jcart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.jcart table { width: 100%; border-collapse: collapse; }
.jcart td { padding: 6px 4px; font-size: 14px; border-bottom: 1px solid var(--line); }
.jcart input[type=text] { width: 56px; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 8px; font-family: inherit; text-align: center; }
.jcart .subtotal td { font-weight: 700; font-size: 16px; border-bottom: 0; }
.jcart button { font-family: inherit; font-size: 12px; font-weight: 600; border: 1px solid var(--line-2); background: var(--surface); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.jcart button:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.jcart .jcart-hint, .jcart .jcart-checkout { display: inline-block; margin-top: 8px; }
.jcart .jcart-checkout a { background: var(--accent); color: #fff; padding: 8px 12px; border-radius: var(--r-md); font-weight: 700; font-size: 14px; }

/* pagination */
.dle-navigation { display: flex; gap: 4px; flex-wrap: wrap; margin: 32px 0; grid-column: 1 / -1; }
.dle-navigation a, .dle-navigation span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface);
  font-size: 14px; font-weight: 600;
  transition: background .3s var(--curve);
}
.dle-navigation a:hover { background: var(--surface-2); }
.dle-navigation span.nav_ext { border: 0; background: transparent; }
.dle-navigation span:not(.nav_ext) { background: var(--ink); color: #fff; border-color: var(--ink); }

/* msgbox */
.berrors, .binfo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; margin: 24px 0; }
.berrors .title, .binfo .title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.berrors { border-left: 4px solid var(--err); }
.binfo { border-left: 4px solid var(--ok); }

/* ============ reveal on scroll ============ */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s var(--curve), transform .7s var(--curve); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* forms */
.form-field { display: block; margin-bottom: 16px; }
.form-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.form-field input[type=text], .form-field input[type=email], .form-field textarea, .form-field select {
  width: 100%; padding: 12px 16px; font-family: inherit; font-size: 16px;
  border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); color: var(--ink);
  transition: border-color .3s var(--curve), box-shadow .3s var(--curve);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-field input.error, .form-field textarea.error { border-color: var(--err); }
.form-error { color: var(--err); font-size: 12px; margin-top: 4px; display: none; }
.form-error.show { display: block; }

/* admin quick edit */
.admin-bar {
  position: fixed; right: 16px; bottom: 16px; z-index: 80;
  display: flex; flex-direction: column; gap: 8px; opacity: 0; pointer-events: none;
  transition: opacity .5s var(--curve);
}
.admin-bar.on { opacity: 1; pointer-events: auto; }
.admin-bar a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: var(--ink); color: #fff; border-radius: var(--r-full);
  font-size: 13px; font-weight: 600; box-shadow: var(--shadow-2);
  transition: background .3s var(--curve);
}
.admin-bar a:hover { background: var(--accent); color: #fff; }
.admin-bar svg { width: 16px; height: 16px; }

/* 404 */
.e404 { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; }
.e404 .code { font-size: 96px; line-height: 1; font-weight: 700; background: linear-gradient(90deg, #000 0%, #666 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.e404 p { color: var(--muted); max-width: 480px; }

/* checkout */
.checkout { max-width: 720px; }
.checkout .orderbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; margin: 24px 0; }
.checkout h2 { font-size: 30px; line-height: 36px; margin-bottom: 8px; }
.checkout .note { font-size: 14px; color: var(--muted); }
.checkout textarea { min-height: 160px; }
.checkout .thanks { background: var(--accent-soft); border: 1px solid #FED7AA; border-radius: var(--r-lg); padding: 24px; }

/* misc */
.muted { color: var(--muted); }
.lead { font-size: 18px; line-height: 28px; color: var(--muted); }
.gap-16 { gap: 16px; }
.stack-8 > * + * { margin-top: 8px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }
.flex { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.center { text-align: center; }
.mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }

input[name=search] { width: 100%; }

/* ============ comments ============ */
.comment-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin-bottom: 8px; }
.comment-head { font-size: 14px; margin-bottom: 8px; }
.comment-text { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.comment-reply { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--accent-ink); }
.comment-reply a { color: var(--accent-ink); }
.comments-add h3 { font-size: 24px; line-height: 32px; margin: 32px 0 16px; }
#dle-comments-form textarea { width: 100%; min-height: 140px; padding: 12px 16px; font-family: inherit; font-size: 16px; border: 1px solid var(--line-2); border-radius: var(--r-md); }
#dle-comments-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#dle-comments-form .bb-editor, #dle-comments-form .bb-pane { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 8px; overflow: hidden; }
#dle-comments-form label.form-check-label { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 12px 0; }

/* search in nav */
.nav__search { display: flex; align-items: center; }
.nav__search input {
  width: 160px; padding: 8px 12px; font-family: inherit; font-size: 14px;
  border: 1px solid var(--line-2); border-radius: var(--r-full); background: var(--surface-2);
  transition: width .5s var(--curve), border-color .3s var(--curve);
}
.nav__search input:focus { width: 220px; outline: none; border-color: var(--accent); background: var(--surface); }
@media (max-width: 1080px) { .nav__search { display: none; } }

/* product add button (legacy markup) */
input.cartbutton, input[name="my-add-button"] {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 12px; border: 0; border-radius: var(--r-md);
  background: var(--accent); color: #fff; font-family: inherit; font-size: 16px; font-weight: 600;
  cursor: pointer; transition: background .3s var(--curve), transform .5s var(--curve);
}
input.cartbutton:hover, input[name="my-add-button"]:hover { background: var(--accent-hover); }
input.cartbutton:active, input[name="my-add-button"]:active { transform: scale(0.98) translateY(1px); }
.goods .order input[name="my-item-qty"] { width: 72px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--r-md); font-family: inherit; text-align: center; }


/* ============ article with sidebar ============ */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
@media (max-width: 1024px) { .article-layout { grid-template-columns: 1fr; } }

.aside-goods { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin-bottom: 16px; }
.aside-goods h3 { font-size: 16px; line-height: 24px; margin-bottom: 12px; }
.aside-goods .agoods-item { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.aside-goods .agoods-item:last-child { border-bottom: 0; }
.aside-goods .agoods-item img { width: 64px; height: 64px; object-fit: contain; background: var(--surface-2); border-radius: var(--r-sm); }
.aside-goods .agoods-item .t { font-size: 13px; line-height: 18px; font-weight: 600; }
.aside-goods .agoods-item .p { font-size: 14px; font-weight: 700; margin-top: 2px; }
.aside-links { background: var(--surface-2); border-radius: var(--r-lg); padding: 16px; }
.aside-links h3 { font-size: 16px; margin-bottom: 8px; }
.aside-links ul { list-style: none; margin: 0; padding: 0; }
.aside-links li a { display: block; padding: 6px 0; font-size: 14px; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.aside-links li:last-child a { border-bottom: 0; }
.aside-links li a:hover { color: var(--accent-ink); }
.aside-cta { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 16px; margin-bottom: 16px; }
.aside-cta .t { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.aside-cta .n { font-size: 14px; color: #9B9B9B; margin-bottom: 12px; }
.aside-cta a.btn { width: 100%; }
.article-layout .article { max-width: none; }
.article-layout .article-body { padding-right: 8px; }

/* static tables in text pages */
.article-body table.simple-table { margin: 8px 0 16px; }
.article-body h2 { font-size: 24px; line-height: 32px; margin: 24px 0 8px; }

/* comment form width normalisation (appended after fullstory wrap) */
#dle-comments-form, #dle-ajax-comments { max-width: var(--w); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { #dle-comments-form, #dle-ajax-comments { padding: 0 16px; } }

/* tinymce inside our theme */
.dleaddcomments-editor .tox-tinymce { border: 1px solid var(--line-2); border-radius: var(--r-md); overflow: hidden; }
.dleaddcomments-editor .tox .tox-menubar, .dleaddcomments-editor .tox .tox-toolbar { background: var(--surface-2); }

/* checkout cart table */
.cart-table { width: 100%; border-collapse: collapse; margin: 8px 0 4px; }
.cart-table th { font-size: 13px; color: var(--muted); text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.cart-table td { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cart-table tfoot td { border-bottom: 0; padding: 12px 0 4px; }
.cart-table a { font-weight: 600; color: var(--ink); }
.cart-table a:hover { color: var(--accent-ink); }
.cart-table input[type=text] { width: 64px; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: var(--r-sm); font-family: inherit; text-align: center; }
.cart-remove { font-size: 13px; color: var(--err); }
.cart-actions { display: flex; gap: 8px; margin-top: 8px; }

/* DLE searchtable normalization */
.searchtable table, .stack-16 > table { width: 100%; }
.searchtable div[style*="margin"], .stack-16 div[style*="margin"] { margin: 0 !important; }
.searchtable input.textin, .stack-16 input.textin { width: 100% !important; max-width: 420px; padding: 12px 16px; border: 1px solid var(--line-2); border-radius: var(--r-md); font-family: inherit; font-size: 16px; margin-bottom: 12px; }
.searchtable .bbcodes, .stack-16 .bbcodes { display: inline-flex; align-items: center; padding: 8px 16px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; margin-right: 8px; }
.searchtable .bbcodes:hover, .stack-16 .bbcodes:hover { border-color: var(--accent); color: var(--accent-ink); }
.searchtable br, .stack-16 > table br { display: none; }
.dle-info { margin: 16px 0 0; }
.dle-info:empty { display: none; }
@media (max-width: 640px) {
  .cart-table thead { display: none; }
  .cart-table tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .cart-table td { display: block; border-bottom: 0; padding: 2px 0; }
  .cart-table td::before { content: attr(data-th) ": "; color: var(--muted); font-size: 12px; }
  .cart-table td:empty { display: none; }
  .cart-table tfoot tr { border-bottom: 0; }
}
/* search results rows */
.srow { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 20px; }
.srow__meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.srow__title { font-size: 19px; line-height: 26px; font-weight: 700; }
.srow__title a { color: var(--ink); }
.srow__title a:hover { color: var(--accent-ink); }
.srow__text { font-size: 15px; line-height: 24px; color: var(--ink-2); margin-top: 4px; }
#searchtable .srow, .stack-16 .srow { margin-bottom: 12px; }
/* fast search dropdown */
.fs-heading, .fs-heading + span { display: block; }

/* search rows & pagination are appended outside .wrap by DLE - constrain them */
main > article.srow { max-width: var(--w); margin: 0 auto 12px; }
@media (max-width: 640px) { main > article.srow { margin: 0 16px 12px; } }
main > .dle-navigation { max-width: var(--w); margin: 8px auto 0; padding: 0 24px; }
@media (max-width: 640px) { main > .dle-navigation { padding: 0 16px; } }
