/*
Theme Name: MW2 Shop
Description: Витрина заказа стройматериалов — без цен, без оплаты.
Version: 1.0.0
*/
:root {
  --bg: #F4F0E6;
  --bg-alt: #EAE3D3;
  --card: #FFFFFF;
  --ink: #1C1712;
  --ink-soft: #5B564C;
  --maroon: #7A1811;
  --red: #C6281B;
  --red-soft: #E0523F;
  --line: #D8D0BC;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171310;
    --bg-alt: #211A15;
    --card: #241D17;
    --ink: #F1EBDF;
    --ink-soft: #B8AF9F;
    --maroon: #E0523F;
    --red: #E2432E;
    --red-soft: #F16A54;
    --line: #3A3128;
  }
}
:root[data-theme="dark"] {
  --bg: #171310;
  --bg-alt: #211A15;
  --card: #241D17;
  --ink: #F1EBDF;
  --ink-soft: #B8AF9F;
  --maroon: #E0523F;
  --red: #E2432E;
  --red-soft: #F16A54;
  --line: #3A3128;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'PT Sans', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
h1, h2, h3, .display {
  font-family: 'Oswald', Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---- top bar ---- */
.topbar { background: var(--maroon); color: #fff; }
.topbar .wrap {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 8px; padding-bottom: 8px; font-size: 14px; flex-wrap: wrap; gap: 6px;
}
.topbar a { text-decoration: none; opacity: 0.92; }
.topbar .email { opacity: 0.8; }

/* ---- header ---- */
header.main { background: var(--bg); border-bottom: 3px solid var(--ink); }
header.main .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 18px; padding-bottom: 18px; gap: 24px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  font-family: 'Oswald', Arial, sans-serif; font-weight: 700; font-size: 34px;
  letter-spacing: 0.02em; color: var(--maroon);
  clip-path: polygon(0 12%, 8% 0, 100% 0, 100% 88%, 92% 100%, 0 100%);
  background: var(--card); border: 3px solid var(--maroon);
  padding: 4px 14px 2px; line-height: 1;
}
.brand-sub { font-size: 12px; color: var(--ink-soft); letter-spacing: 0.08em; max-width: 180px; }
.primary {
  display: flex; flex-wrap: wrap; gap: 28px;
  font-family: 'Oswald', Arial, sans-serif; font-size: 15px;
  text-transform: uppercase; letter-spacing: 0.03em; list-style: none; margin: 0; padding: 0;
}
.primary a { text-decoration: none; padding-bottom: 4px; border-bottom: 2px solid transparent; }
.primary a:hover { border-bottom-color: var(--red); color: var(--red); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-phone { font-family: 'Oswald', Arial, sans-serif; font-size: 15px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.cart-btn {
  display: flex; align-items: center; gap: 8px; background: var(--red); color: #fff;
  text-decoration: none; padding: 10px 16px; font-family: 'Oswald', Arial, sans-serif;
  text-transform: uppercase; font-size: 14px; letter-spacing: 0.03em;
  clip-path: polygon(0 0, 92% 0, 100% 30%, 100% 100%, 8% 100%, 0 70%);
}
.cart-count { background: rgba(255,255,255,0.25); border-radius: 2px; padding: 1px 6px; font-size: 12px; }

/* ---- footer ---- */
footer.site {
  background: var(--ink); color: #C9C1B2;
}
footer.site .wrap {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 30px;
  padding-top: 44px; padding-bottom: 30px;
}
footer.site h4 {
  font-family: 'Oswald', Arial, sans-serif; text-transform: uppercase;
  font-size: 13.5px; letter-spacing: 0.05em; color: #F4F0E6; margin-bottom: 14px;
}
footer.site a { color: #C9C1B2; text-decoration: none; display: block; margin-bottom: 8px; font-size: 14.5px; }
footer.site a:hover { color: var(--red-soft); }
.footer-brand { font-family: 'Oswald', Arial, sans-serif; font-size: 22px; color: var(--red-soft); letter-spacing: 0.02em; margin-bottom: 10px; }
.footer-note { font-size: 13px; color: #8A8377; max-width: 44ch; }
.copyline { border-top: 1px solid #2E2820; padding: 16px 0; font-size: 12.5px; color: #8A8377; text-align: center; }

@media (max-width: 900px) {
  footer.site .wrap { grid-template-columns: 1fr 1fr; }
  .primary { order: 3; width: 100%; justify-content: center; }
}
@media (max-width: 560px) {
  footer.site .wrap { grid-template-columns: 1fr; }
}

/* ---- hero ---- */
.hero { background: var(--ink); color: #F4F0E6; position: relative; overflow: hidden; border-bottom: 6px solid var(--red); }
.hero .wrap { display: grid; grid-template-columns: 1.2fr 0.9fr; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.hero-eyebrow { color: var(--red-soft); font-family: 'Oswald', Arial, sans-serif; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }
.hero h1 { font-size: 52px; line-height: 1.02; font-weight: 700; }
.hero h1 span { color: var(--red-soft); }
.hero p.lead { font-family: 'PT Sans', Arial, sans-serif; font-size: 17px; color: #D9D2C3; max-width: 46ch; margin-top: 18px; }
.hero-cta { margin-top: 26px; display: inline-flex; gap: 14px; align-items: center; }
.btn-primary {
  background: var(--red); color: #fff; text-decoration: none; padding: 14px 26px;
  font-family: 'Oswald', Arial, sans-serif; text-transform: uppercase; letter-spacing: 0.03em; font-size: 15px;
  clip-path: polygon(0 0, 94% 0, 100% 35%, 100% 100%, 6% 100%, 0 65%);
}
.hero-phone { font-family: 'Oswald', Arial, sans-serif; font-size: 15px; color: #F4F0E6; text-decoration: none; border-bottom: 1px solid var(--ink-soft); }
.hero-panel { background: #221C15; border: 2px solid #3A3128; padding: 26px; position: relative; }
.hero-panel::before { content: ""; position: absolute; top: -3px; right: -3px; width: 46px; height: 46px; background: var(--red); clip-path: polygon(100% 0, 0 0, 100% 100%); }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.feature { display: flex; flex-direction: column; gap: 8px; }
.feature svg { width: 30px; height: 30px; stroke: var(--red-soft); }
.feature span { font-family: 'Oswald', Arial, sans-serif; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.02em; color: #D9D2C3; line-height: 1.25; }

/* ---- filters (реальные классы MW_Filter_Tabs::render(): <nav class="mw-tabs"><a class="mw-tab is-active">) ---- */
.filters { background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.filters .wrap { display: flex; align-items: center; gap: 12px; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap; }
.filters .label { font-family: 'Oswald', Arial, sans-serif; font-size: 13px; text-transform: uppercase; color: var(--ink-soft); letter-spacing: 0.04em; margin-right: 6px; }
.mw-tabs { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.mw-tab {
  font-family: 'Oswald', Arial, sans-serif; font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.02em;
  padding: 7px 16px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; text-decoration: none;
}
.mw-tab.is-active, .mw-tab:hover { background: var(--ink); color: var(--bg-alt); }

/* ---- trust strip ---- */
.trust { background: var(--maroon); color: #F4F0E6; }
.trust .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-top: 30px; padding-bottom: 30px; }
.trust-item .num { font-family: 'Oswald', Arial, sans-serif; font-size: 26px; color: var(--red-soft); }
.trust-item .txt { font-size: 13.5px; color: #E6DFCF; margin-top: 4px; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .trust .wrap { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .hero h1 { font-size: 36px; }
  .feature-grid { grid-template-columns: 1fr; }
}

/* ---- catalog head ---- */
.catalog-head { padding-top: 40px; padding-bottom: 6px; }
.catalog-head h2 { font-size: 26px; }
.catalog-head p { color: var(--ink-soft); margin-top: 6px; max-width: 60ch; }

/* ---- product grid & card (реальные классы MW_Product_Card::render()) ---- */
.mw-product-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
  padding-top: 26px; padding-bottom: 60px; list-style: none; margin: 0;
}
.mw-card { background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; }
.mw-card-img { height: 132px; overflow: hidden; border-bottom: 1px solid var(--line); }
.mw-card-img img { width: 100%; height: 100%; object-fit: cover; }
.mw-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.mw-card-title { font-size: 16.5px; line-height: 1.25; font-weight: 500; text-transform: none; margin: 0; }
.mw-card-sku {
  font-family: 'Oswald', Arial, sans-serif; font-size: 12px; color: var(--ink-soft);
  letter-spacing: 0.02em; margin: 0;
}
.mw-card-fraction, .mw-card-empty { font-size: 12.5px; color: var(--ink-soft); margin: 0; }
.mw-frakciya-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mw-frakciya-option {
  font-size: 12.5px; font-family: 'Oswald', Arial, sans-serif; border: 1px solid var(--line);
  padding: 4px 9px; color: var(--ink-soft); display: flex; align-items: center; gap: 5px; cursor: pointer;
}
.mw-frakciya-option:has(input:checked) { border-color: var(--red); color: var(--red); }
.mw-qty-row { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.mw-qty-field { flex: 1; }
.mw-qty-field span {
  display: block; font-size: 10px; font-weight: 800; color: var(--ink-soft); margin-bottom: 4px;
  text-transform: uppercase; letter-spacing: 0.03em; font-family: 'Oswald', Arial, sans-serif;
}
.mw-qty-field input {
  width: 100%; font: inherit; font-size: 15px; font-weight: 700; padding: 9px 8px;
  border: 1.5px solid var(--line); background: var(--bg-alt); color: var(--ink);
  font-variant-numeric: tabular-nums; text-align: center;
}
.mw-add-btn {
  width: 100%; margin-top: 10px; font-family: 'Oswald', Arial, sans-serif; font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.03em; padding: 9px 15px; cursor: pointer;
  background: var(--ink); color: var(--bg); border: none;
}
.mw-add-btn:hover, .mw-add-btn:active, .mw-add-btn.is-added { background: var(--red); color: #fff; }

@media (max-width: 900px) { .mw-product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .mw-product-grid { grid-template-columns: 1fr; } }
