/*
Theme Name: Уралпроволока
Theme URI: https://uralprovoloka.ru
Author: Artemiy V Diakov
Author URI: https://modesign.site
Description: Готовая тема для сайта оптовых поставок проволоки. Каталог, заявки, новости, адаптивная вёрстка, SEO.
Version: 1.5.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: uralprovoloka
Tags: business, e-commerce, custom-menu, featured-images, translation-ready
*/

/* Base — industrial dark/light palette matching React site */
:root {
  --ink: #121416;
  --ink-2: #1a1d21;
  --paper: #f4f1ea;
  --paper-2: #ebe6dc;
  --surface: #ffffff;
  --fg: #121416;
  --muted: #6b6e73;
  --line: rgba(18, 20, 22, 0.12);
  --accent: #c45c26;
  --accent-hover: #a84a1c;
  --shadow-border: 0 0 0 1px rgba(18, 20, 22, 0.08);
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-sans: "Manrope", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --max: 72rem;
  --radius: 0.75rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--fg);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 0.95;
  margin: 0;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: var(--paper);
}

.header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.8125rem;
  border-bottom: 1px solid rgba(244, 241, 234, 0.1);
  color: rgba(244, 241, 234, 0.7);
}

.header-top a:hover {
  color: var(--paper);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem 0;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--paper);
}

.site-logo:hover {
  color: var(--paper);
}

.site-logo svg {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
}

.logo-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  display: block;
  line-height: 1;
}

.logo-sub {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(244, 241, 234, 0.55);
}

.nav-menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.25rem;
  font-size: 0.9rem;
}

.nav-menu a {
  color: rgba(244, 241, 234, 0.85);
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a {
  color: var(--paper);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border-radius: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-paper {
  background: var(--paper);
  color: var(--ink);
}

.btn-paper:hover {
  background: #fff;
  color: var(--ink);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(244, 241, 234, 0.3);
  color: var(--paper);
}

.btn-outline:hover {
  background: rgba(244, 241, 234, 0.1);
  color: var(--paper);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}

.menu-toggle {
  display: flex;
  background: transparent;
  border: 1px solid rgba(244, 241, 234, 0.25);
  color: var(--paper);
  padding: 0.5rem;
  border-radius: 0.35rem;
  cursor: pointer;
}

@media (min-width: 900px) {
  .nav-menu {
    display: flex;
  }
  .menu-toggle {
    display: none;
  }
}

/* Mobile nav — slide-down panel */
.menu-toggle {
  position: relative;
  z-index: 60;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
}

.menu-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle-icon[hidden] {
  display: none !important;
}

.mobile-nav {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 55;
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.28s ease, opacity 0.2s ease, visibility 0.2s;
  background: transparent;
}

.mobile-nav.is-open {
  max-height: min(85vh, 32rem);
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-panel {
  background: var(--ink-2);
  border-top: 1px solid rgba(244, 241, 234, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  padding: 0.5rem 0 1.25rem;
  max-height: min(85vh, 32rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Critical: .nav-menu is display:none on mobile — force show inside drawer */
.mobile-nav ul,
.mobile-nav .mobile-menu,
.mobile-nav .nav-menu {
  display: flex !important;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.mobile-nav li {
  margin: 0;
  border-bottom: 1px solid rgba(244, 241, 234, 0.08);
}

.mobile-nav li:last-child {
  border-bottom: none;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.85rem 0;
  color: var(--paper);
  font-size: 1.05rem;
  font-weight: 500;
  border-bottom: none;
}

.mobile-nav a:hover,
.mobile-nav .current-menu-item > a {
  color: var(--accent);
}

.mobile-nav .sub-menu {
  padding-left: 0.75rem;
}

.mobile-nav .sub-menu a {
  font-size: 0.95rem;
  font-weight: 400;
  color: rgba(244, 241, 234, 0.75);
  min-height: 2.5rem;
}

.mobile-nav-cta {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(244, 241, 234, 0.1);
}

.mobile-nav-contacts {
  margin: 0.85rem 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(244, 241, 234, 0.65);
}

.mobile-nav-contacts a {
  display: inline;
  min-height: auto;
  padding: 0;
  color: rgba(244, 241, 234, 0.85);
  font-size: inherit;
  font-weight: 400;
}

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  cursor: pointer;
}

.mobile-nav-backdrop[hidden] {
  display: none !important;
}

body.menu-open {
  overflow: hidden;
  touch-action: none;
}

@media (min-width: 900px) {
  .mobile-nav,
  .mobile-nav-backdrop {
    display: none !important;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  color: var(--paper);
  background: var(--ink);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--ink) 0%, rgba(18, 20, 22, 0.78) 50%, rgba(18, 20, 22, 0.25) 100%);
}

.hero-content {
  position: relative;
  padding: 6rem 0 4rem;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  max-width: 18ch;
  margin-top: 1rem;
}

.hero p.lead {
  max-width: 36rem;
  margin-top: 1.25rem;
  font-size: 1.05rem;
  color: rgba(244, 241, 234, 0.78);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-block: 1px solid var(--line);
  background: var(--paper-2);
}

.stat {
  padding: 1.5rem 1rem;
  border-left: 1px solid var(--line);
}

.stat:nth-child(odd) {
  border-left: none;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
}

.stat-unit {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: 0.25rem;
}

.stat-label {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (min-width: 768px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
  .stat {
    border-left: 1px solid var(--line);
    padding: 1.75rem 1.5rem;
  }
  .stat:first-child {
    border-left: none;
  }
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-top: 0.35rem;
}

/* Cards grid */
.grid-3 {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-4 {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 900px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  background: var(--ink-2);
}

.card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.card-body h3 {
  font-size: 1.15rem;
  line-height: 1.2;
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 0.25rem;
  background: var(--paper-2);
  color: var(--muted);
}

.price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-top: auto;
}

.price span {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
}

.cat-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-border);
  transition: background 0.15s;
}

.cat-card:hover {
  background: var(--paper-2);
  color: inherit;
}

.cat-card img {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.4rem;
  object-fit: cover;
}

/* Dark band */
.band-dark {
  position: relative;
  color: var(--paper);
  background: var(--ink);
  overflow: hidden;
}

.band-dark .bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  opacity: 0.35;
  width: 100%;
  height: 100%;
}

.band-dark .overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 20, 22, 0.6);
}

.band-dark .inner {
  position: relative;
  padding: 4rem 0;
}

/* Forms */
.form-grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .form-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: none;
  border-radius: 0.4rem;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(18, 20, 22, 0.12);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--fg);
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Page header */
.page-hero {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  padding: 3.5rem 0;
  overflow: hidden;
}

.page-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.page-hero .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--ink), rgba(18, 20, 22, 0.7) 60%, transparent);
}

.page-hero .inner {
  position: relative;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-top: 0.5rem;
}

/* Breadcrumbs */
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.breadcrumbs a:hover {
  color: var(--fg);
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

.site-footer .kicker {
  color: rgba(244, 241, 234, 0.45);
}

.site-footer ul {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.4rem;
}

.site-footer a {
  color: rgba(244, 241, 234, 0.75);
  font-size: 0.9rem;
}

.site-footer a:hover {
  color: var(--paper);
}

.footer-copy {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(244, 241, 234, 0.1);
  font-size: 0.8rem;
  color: rgba(244, 241, 234, 0.45);
}

/* Content typography */
.entry-content {
  max-width: 42rem;
}

.entry-content p,
.entry-content ul,
.entry-content ol {
  margin: 0 0 1rem;
  color: var(--muted);
}

.entry-content h2 {
  font-size: 1.75rem;
  margin: 1.75rem 0 0.75rem;
  color: var(--fg);
}

/* Product single */
.product-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .product-layout {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.product-gallery {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink-2);
}

.product-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Utility */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 0.875rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.screen-reader-response {
  display: none;
}

/* —— Inquiry cart —— */
.cart-link {
  position: relative;
}
.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}
.cart-link.has-items {
  border-color: var(--accent);
}

.request-layout {
  display: grid;
  gap: 1.5rem;
  max-width: 56rem;
}
@media (min-width: 900px) {
  .request-layout {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.cart-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  background: var(--paper-2);
}
.cart-item-img {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.4rem;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--ink-2);
}
.cart-item-img--placeholder {
  background: var(--line);
}
.cart-item-body {
  flex: 1;
  min-width: 0;
}
.cart-item-title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.25;
}
.cart-item-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.cart-qty-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}
.cart-qty {
  width: 5.5rem;
  padding: 0.4rem 0.5rem;
  border: none;
  border-radius: 0.35rem;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(18, 20, 22, 0.12);
  font-size: 0.9rem;
}
.cart-remove {
  margin-left: auto;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
}
.cart-remove:hover {
  color: var(--accent);
}
.cart-item-line {
  margin-top: 0.25rem;
  color: var(--muted);
}
.cart-summary {
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.ural-toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
  max-width: min(90vw, 22rem);
  text-align: center;
}
.ural-toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ============================================================
   Responsive fixes
   ============================================================ */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

/* Prevent long words from breaking layout */
h1, h2, h3, .display, .card-body a, .cart-item-title {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* —— Extra-small phones (< 380px) —— */
@media (max-width: 379px) {
  .container {
    width: min(100% - 1.25rem, var(--max));
  }

  .logo-title {
    font-size: 1.05rem;
  }

  .logo-sub {
    display: none;
  }

  .header-actions .btn-accent {
    display: none;
  }

  .btn {
    padding: 0.55rem 0.85rem;
    font-size: 0.85rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .hero h1 {
    font-size: clamp(2rem, 11vw, 2.6rem);
  }
}

/* —— Mobile (≤ 639px) —— */
@media (max-width: 639px) {
  .header-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    font-size: 0.75rem;
    padding: 0.4rem 0;
  }

  .header-main {
    gap: 0.75rem;
    padding: 0.65rem 0;
  }

  .site-logo {
    min-width: 0;
    flex: 1;
  }

  .header-actions {
    gap: 0.4rem;
    flex-shrink: 0;
  }

  .header-actions .btn-outline {
    padding: 0.5rem 0.7rem;
    font-size: 0.8rem;
  }

  .hero {
    min-height: min(100svh, 36rem);
    align-items: flex-end;
  }

  .hero-content {
    padding: 5.5rem 0 2.5rem;
  }

  .hero-overlay {
    background: linear-gradient(
      180deg,
      rgba(18, 20, 22, 0.35) 0%,
      rgba(18, 20, 22, 0.75) 45%,
      var(--ink) 100%
    );
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .stat {
    padding: 1.1rem 0.85rem;
    border-left: 1px solid var(--line);
  }

  .stat:nth-child(odd) {
    border-left: none;
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .section {
    padding: 2.25rem 0;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
  }

  .section-head h2 {
    font-size: clamp(1.65rem, 7vw, 2.25rem);
  }

  .grid-4 {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .cat-card {
    padding: 0.65rem;
  }

  .cat-card img {
    width: 2.75rem;
    height: 2.75rem;
  }

  .page-hero {
    padding: 2.5rem 0;
  }

  .page-hero h1 {
    font-size: clamp(1.85rem, 9vw, 2.75rem);
  }

  .page-hero .overlay {
    background: linear-gradient(
      180deg,
      rgba(18, 20, 22, 0.45) 0%,
      rgba(18, 20, 22, 0.85) 100%
    );
  }

  .band-dark .inner {
    padding: 2.75rem 0;
  }

  .product-layout {
    gap: 1.25rem;
  }

  .product-layout .btn,
  [data-product-block] .btn {
    width: 100%;
  }

  [data-product-block] > div {
    flex-direction: column;
    align-items: stretch !important;
  }

  [data-product-block] .cart-qty {
    max-width: none !important;
    width: 100%;
  }

  .request-layout {
    max-width: none;
  }

  .request-cart .btn {
    width: 100%;
    margin-top: 0.5rem;
  }

  .request-cart > div:first-child {
    flex-direction: column;
    align-items: stretch !important;
  }

  .cart-item {
    flex-wrap: wrap;
  }

  .cart-item-row {
    width: 100%;
  }

  .footer-grid {
    gap: 1.5rem;
  }

  .site-footer {
    padding: 2.5rem 0 1.5rem;
  }

  .footer-copy {
    margin-top: 1.5rem;
    font-size: 0.75rem;
  }

  .ural-toast {
    bottom: max(1rem, env(safe-area-inset-bottom));
    left: 1rem;
    right: 1rem;
    transform: translateY(120%);
    max-width: none;
  }

  .ural-toast.is-visible {
    transform: translateY(0);
  }
}

/* —— Tablet (640–899px) —— */
@media (min-width: 640px) and (max-width: 899px) {
  .header-actions .btn-accent {
    padding: 0.55rem 0.9rem;
    font-size: 0.85rem;
  }

  .hero {
    min-height: min(80vh, 40rem);
  }

  .hero-content {
    padding: 5rem 0 3rem;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 3rem 0;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* —— Desktop refinements —— */
@media (min-width: 900px) {
  .header-actions .btn-outline.cart-link {
    /* keep both buttons visible */
  }

  .mobile-nav {
    display: none !important;
  }
}

/* Safe areas (notched phones) */
@supports (padding: max(0px)) {
  .site-header {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* Touch-friendly targets */
@media (hover: none) and (pointer: coarse) {
  .btn,
  .menu-toggle,
  .cart-remove,
  .cat-card,
  .nav-menu a,
  .mobile-nav a {
    min-height: 2.75rem;
  }

  .mobile-nav a {
    padding: 0.85rem 0;
  }
}

/* Tables / wide content in entry */
.entry-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.entry-content pre {
  overflow-x: auto;
  max-width: 100%;
}

/* WP block alignment safety */
.alignwide,
.alignfull {
  max-width: 100%;
}

/* Pagination */
.navigation.pagination {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.navigation.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.navigation.pagination a,
.navigation.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.6rem;
  border-radius: 0.35rem;
  background: var(--surface);
  box-shadow: var(--shadow-border);
  font-size: 0.9rem;
}

.navigation.pagination .current {
  background: var(--ink);
  color: var(--paper);
}

/* Header refinements tied to markup */
.logo-text {
  min-width: 0;
}

.header-top-sep {
  margin: 0 0.35rem;
  opacity: 0.5;
}


@media (max-width: 379px) {
  .header-actions .header-cta {
    display: none;
  }
}

@media (max-width: 639px) {
  .header-actions .header-cta {
    display: none;
  }
}


/* Anti-spam honeypot — hidden from humans */
.ural-hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}


/* ——— GOST section ——— */
.gost-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.gost-list__item {
  margin: 0;
}
.gost-list__link {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  align-items: start;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(18, 20, 22, 0.12);
  border-radius: 6px;
  background: var(--paper, #f4f1ea);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gost-list__link:hover {
  border-color: #c45c26;
  box-shadow: 0 2px 12px rgba(18, 20, 22, 0.06);
}
.gost-list__title {
  grid-column: 1;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.35;
}
.gost-list__lead {
  grid-column: 1;
  font-size: 0.9rem;
  color: var(--muted, #5c5a55);
  line-height: 1.4;
}
.gost-list__arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: #c45c26;
  font-size: 1.25rem;
}
.gost-aside-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.gost-aside-links a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.gost-aside-links a:hover {
  border-bottom-color: #c45c26;
  color: #c45c26;
}
.page-hero--compact .inner {
  padding-top: 3.5rem;
  padding-bottom: 2.5rem;
}
@media (min-width: 900px) {
  .gost-doc {
    grid-template-columns: minmax(0, 1fr) 17rem !important;
  }
}
