/*
Theme Name: AVTO86 Independent
Theme URI: https://avto86.shop/
Author: AVTO86
Description: Mobile-first WooCommerce theme for the AVTO86 auto parts store in Surgut.
Version: 1.2.4
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: avto86
*/

.av-product-request {
  clear: both;
  margin-block: 24px;
  padding: 20px;
  border: 1px solid #d9e0e6;
  border-radius: 8px;
  background: #f3f5f7;
}

.av-product-request h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.av-product-request p {
  margin: 0 0 16px;
}

.av-product-request .button {
  white-space: normal;
  text-align: center;
}

.avto86-request-price {
  color: var(--av-text);
  font-weight: 700;
}

.product_meta > span {
  display: block;
  margin-block: 4px;
}

:root {
  --av-bg: #f3f5f7;
  --av-surface: #ffffff;
  --av-text: #17202a;
  --av-muted: #677482;
  --av-line: #d9e0e6;
  --av-dark: #0c1727;
  --av-blue: #1769aa;
  --av-blue-dark: #0d4e83;
  --av-red: #be1e2d;
  --av-green: #1f6a3b;
  --av-green-soft: #e7f5ec;
  --av-warn: #8a5a00;
  --av-warn-soft: #fff2ce;
  --av-max: 1180px;
  --av-radius: 8px;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--av-bg);
  color: var(--av-text);
  font-size: 16px;
  line-height: 1.5;
}

body.admin-bar .site-header {
  top: 32px;
}

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

a {
  color: var(--av-blue-dark);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.button,
.wp-element-button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: var(--av-red);
  color: #fff;
  padding: 10px 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button:hover,
.wp-element-button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  background: #9f1724;
  color: #fff;
}

.button-secondary {
  background: var(--av-blue);
}

.button-secondary:hover {
  background: var(--av-blue-dark);
}

.button-ghost {
  border: 1px solid var(--av-line);
  background: #fff;
  color: var(--av-text);
}

.button-ghost:hover {
  background: #eef2f5;
  color: var(--av-text);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.service-alert {
  width: min(680px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--av-text);
  overflow: visible;
  box-shadow: 0 24px 80px rgba(2, 9, 18, 0.38);
}

.service-alert::backdrop {
  background: rgba(4, 12, 23, 0.76);
  backdrop-filter: blur(3px);
}

.service-alert[open] {
  animation: service-alert-in 180ms ease-out;
}

.service-alert__content {
  position: relative;
  max-height: calc(100dvh - 32px);
  padding: 34px clamp(22px, 5vw, 42px) 28px;
  border-top: 5px solid var(--av-red);
  border-radius: 12px;
  background: #fff;
  overflow: auto;
}

.service-alert__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: #eef2f5;
  color: var(--av-dark);
  padding: 0;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
}

.service-alert__close:hover {
  background: #dfe6ec;
  color: var(--av-dark);
}

.service-alert__eyebrow {
  margin: 0 54px 8px 0;
  color: var(--av-red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.service-alert h2 {
  max-width: 560px;
  margin: 0;
  color: var(--av-dark);
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
}

.service-alert__description {
  max-width: 580px;
  margin: 16px 0 22px;
  color: var(--av-muted);
  font-size: 17px;
}

.service-alert__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service-alert__button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
  padding: 12px 16px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.service-alert__button:hover {
  color: #fff;
  filter: brightness(0.9);
}

.service-alert__button--whatsapp {
  background: var(--av-green);
}

.service-alert__button--telegram {
  background: var(--av-blue);
}

.service-alert__button--max {
  background: var(--av-dark);
}

.service-alert__button--phone {
  background: var(--av-red);
}

.service-alert__close:focus-visible,
.service-alert__button:focus-visible {
  outline: 3px solid #ffcf4a;
  outline-offset: 3px;
}

.service-alert__apology {
  display: block;
  margin-top: 16px;
  color: var(--av-muted);
  font-size: 12px;
  text-align: center;
}

@keyframes service-alert-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-alert[open] {
    animation: none;
  }
}

.container {
  width: min(100% - 28px, var(--av-max));
  margin-inline: auto;
}

.site-notice {
  background: #07111f;
  color: #dbe6f2;
  font-size: 13px;
}

.site-notice .container {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-notice a {
  color: #fff;
  text-decoration: none;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid var(--av-line);
  background: rgba(255, 255, 255, 0.98);
}

.header-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  min-height: 72px;
  align-items: center;
  gap: 18px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--av-dark);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 6px;
  background: var(--av-dark);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.brand-copy strong,
.brand-copy span {
  display: block;
}

.brand-copy strong {
  font-size: 23px;
  line-height: 1;
  letter-spacing: 0;
}

.brand-copy span {
  margin-top: 4px;
  color: var(--av-muted);
  font-size: 12px;
}

.primary-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-menu a {
  display: block;
  border-radius: 6px;
  color: var(--av-text);
  padding: 9px 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
  background: #edf3f8;
  color: var(--av-blue-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-phone {
  color: var(--av-dark);
  font-weight: 800;
  text-decoration: none;
}

.menu-toggle {
  display: none;
  width: 42px;
  min-height: 42px;
  padding: 0;
  background: var(--av-dark);
  font-size: 22px;
}

.site-main {
  min-height: 60vh;
}

.hero {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background: var(--av-dark);
  color: #fff;
}

.hero::after {
  position: absolute;
  inset: 0;
  background: rgba(6, 15, 27, 0.62);
  content: "";
}

.hero-car {
  position: absolute;
  z-index: 0;
  right: clamp(-120px, 2vw, 40px);
  bottom: 22px;
  width: min(53vw, 680px);
  object-fit: contain;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 420px;
  max-width: 680px;
  flex-direction: column;
  justify-content: center;
  padding-block: 46px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #c6d9ea;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 660px;
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 610px;
  margin: 16px 0 22px;
  color: #d7e0ea;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.part-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: min(100%, 680px);
  gap: 8px;
  margin-top: 20px;
}

.av-catalog-search {
  margin-block: 12px 28px;
}

.av-search-identification {
  display: grid;
  gap: 4px;
  margin-block: 8px;
  color: var(--av-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.av-search-empty {
  overflow-wrap: anywhere;
}

.part-search input,
.av-form input,
.av-form select,
.av-form textarea,
.woocommerce input.input-text,
.woocommerce select,
.woocommerce textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--av-line);
  border-radius: 6px;
  background: #fff;
  color: var(--av-text);
  padding: 10px 12px;
}

.trust-strip {
  border-bottom: 1px solid var(--av-line);
  background: #fff;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.trust-item {
  min-width: 0;
  border-right: 1px solid var(--av-line);
  padding: 16px;
}

.trust-item:last-child {
  border-right: 0;
}

.trust-item strong,
.trust-item span {
  display: block;
}

.trust-item strong {
  font-size: 15px;
}

.trust-item span {
  margin-top: 3px;
  color: var(--av-muted);
  font-size: 13px;
}

.section {
  padding-block: 40px;
}

.section-white {
  background: #fff;
}

.section-dark {
  background: var(--av-dark);
  color: #fff;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

.section-head p {
  max-width: 650px;
  margin: 6px 0 0;
  color: var(--av-muted);
}

.section-dark .section-head p {
  color: #c7d4e0;
}

.text-link {
  flex: 0 0 auto;
  font-weight: 700;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.category-card {
  display: grid;
  grid-template-rows: 126px auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--av-line);
  border-radius: var(--av-radius);
  background: #fff;
  color: var(--av-text);
  text-decoration: none;
}

.category-card:hover {
  border-color: #9eb8cd;
  box-shadow: 0 8px 22px rgba(23, 32, 42, 0.08);
}

.category-card img {
  width: 100%;
  height: 126px;
  object-fit: cover;
}

.category-card-copy {
  padding: 12px;
}

.category-card strong {
  display: block;
  overflow-wrap: anywhere;
}

.category-card span {
  color: var(--av-muted);
  font-size: 13px;
}

.feature-band {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: center;
  gap: 28px;
}

.feature-band h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0;
}

.feature-band p {
  max-width: 650px;
  color: #ced9e4;
}

.feature-band img {
  width: 100%;
  max-height: 270px;
  object-fit: contain;
}

.promo-grid,
.article-grid,
.products.columns-4 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.promo-card,
.article-card,
.woocommerce ul.products li.product {
  min-width: 0;
  border: 1px solid var(--av-line);
  border-radius: var(--av-radius);
  background: #fff;
  padding: 16px;
}

.promo-card h3,
.article-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: 0;
}

.promo-card p,
.article-card p {
  color: var(--av-muted);
}

.promo-label {
  display: inline-block;
  margin-bottom: 8px;
  border-radius: 5px;
  background: var(--av-warn-soft);
  color: var(--av-warn);
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 700;
}

.stock-label {
  display: inline-block;
  border-radius: 5px;
  background: var(--av-green-soft);
  color: var(--av-green);
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 700;
}

.content-wrap {
  width: min(100% - 28px, 880px);
  margin-inline: auto;
  padding-block: 34px 54px;
}

.content-wrap h1 {
  margin-top: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: 0;
}

.entry-content {
  border: 1px solid var(--av-line);
  border-radius: var(--av-radius);
  background: #fff;
  padding: clamp(18px, 3vw, 34px);
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content > *:last-child {
  margin-bottom: 0;
}

.av-form {
  display: grid;
  gap: 12px;
  scroll-margin-top: 140px;
}

.av-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.av-form label {
  display: grid;
  gap: 5px;
  color: var(--av-muted);
  font-size: 13px;
}

.av-form textarea {
  min-height: 120px;
  resize: vertical;
}

.av-form label.checkline {
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-height: 44px;
  padding-block: 10px;
}

.av-form .checkline input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
}

.av-form input.screen-reader-text {
  width: 1px;
  height: 1px;
  min-height: 1px;
  padding: 0;
  border: 0;
}

.av-form-message {
  border-radius: 6px;
  padding: 11px 12px;
}

.av-form-message.success {
  background: var(--av-green-soft);
  color: var(--av-green);
}

.av-form-message.error {
  background: #fdebee;
  color: #8c1924;
}

.site-footer {
  background: #07111f;
  color: #d1dce7;
  padding: 34px 0 92px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 28px;
}

.site-footer h2,
.site-footer h3 {
  margin-top: 0;
  color: #fff;
  letter-spacing: 0;
}

.site-footer a {
  color: #fff;
}

.footer-links {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-quickbar {
  position: fixed;
  z-index: 70;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--av-line);
  background: #fff;
  box-shadow: 0 -8px 24px rgba(9, 20, 34, 0.12);
}

.mobile-quickbar a {
  display: grid;
  min-width: 0;
  min-height: 58px;
  place-items: center;
  color: var(--av-text);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.woocommerce ul.products {
  margin: 0;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
  content: none;
}

.woocommerce .site-main ul.products[class*="columns-"] li.product {
  float: none;
  width: auto;
  margin: 0;
}

.woocommerce ul.products li.product .price {
  color: var(--av-text);
  font-weight: 800;
}

.woocommerce div.product,
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce,
.woocommerce-account .woocommerce {
  border: 1px solid var(--av-line);
  border-radius: var(--av-radius);
  background: #fff;
  padding: clamp(16px, 3vw, 28px);
}

@media (max-width: 980px) {
  .header-main {
    grid-template-columns: 1fr auto;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .header-actions .header-phone,
  .header-actions .button {
    display: none;
  }

  .primary-navigation {
    grid-column: 1 / -1;
    display: none;
    padding-bottom: 12px;
  }

  .primary-navigation.is-open {
    display: block;
  }

  .primary-menu {
    display: grid;
    justify-content: stretch;
  }

  .hero-car {
    right: -150px;
    width: 650px;
    opacity: 0.54;
  }

  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .promo-grid,
  .article-grid,
  .products.columns-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  body.admin-bar .site-header {
    top: 46px;
  }

  .site-notice .container {
    min-height: 38px;
    justify-content: center;
    text-align: center;
  }

  .site-notice span:last-child {
    display: none;
  }

  .service-alert {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
  }

  .service-alert__content {
    max-height: calc(100dvh - 24px);
    padding: 30px 18px 22px;
  }

  .service-alert__actions {
    grid-template-columns: 1fr;
  }

  .service-alert__button {
    min-height: 48px;
  }

  .header-main {
    min-height: 62px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  .brand-copy strong {
    font-size: 20px;
  }

  .hero,
  .hero-inner {
    min-height: 480px;
  }

  .hero-car {
    right: -90px;
    bottom: -12px;
    width: 500px;
    opacity: 0.42;
  }

  .hero-inner {
    justify-content: flex-start;
    padding-top: 42px;
  }

  .hero h1 {
    font-size: 39px;
  }

  .hero-copy {
    font-size: 16px;
  }

  .part-search {
    grid-template-columns: 1fr;
  }

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

  .trust-item:nth-child(2) {
    border-right: 0;
  }

  .trust-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--av-line);
  }

  .section {
    padding-block: 30px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-head h2 {
    font-size: 25px;
  }

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

  .category-card {
    grid-template-rows: 104px auto;
  }

  .category-card img {
    height: 104px;
  }

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

  .feature-band img {
    max-height: 210px;
  }

  .promo-grid,
  .article-grid,
  .products.columns-4 {
    grid-template-columns: 1fr;
  }

  .av-form-grid {
    grid-template-columns: 1fr;
  }

  .mobile-quickbar {
    display: grid;
  }
}

@media (max-width: 380px) {
  .brand-copy span {
    display: none;
  }

  .hero h1 {
    font-size: 34px;
  }

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