:root {
  --accent: #FF6B00;
  --accent-hover: #FF6B00;
  --accent-light: rgba(255, 107, 0, 0.08);
  --accent-border: rgba(255, 107, 0, 0.4);
  --text: #1a1a1a;
  --text-secondary: #666666;
  --bg: #ffffff;
  --border: #e5e5e5;
  --shadow: rgba(0, 0, 0, 0.08) 0 4px 20px;
  --font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  --bg-gradient: radial-gradient(ellipse 40% 35% at 10% 15%, rgba(255,107,0,0.12) 0%, transparent 60%),
  radial-gradient(ellipse 35% 40% at 30% 10%, rgba(255,140,30,0.09) 0%, transparent 55%),
  radial-gradient(ellipse 30% 35% at 55% 5%, rgba(255,107,0,0.10) 0%, transparent 50%),
  radial-gradient(ellipse 35% 30% at 80% 20%, rgba(255,120,20,0.08) 0%, transparent 55%),
  radial-gradient(ellipse 40% 35% at 15% 50%, rgba(255,107,0,0.07) 0%, transparent 50%),
  radial-gradient(ellipse 30% 40% at 45% 45%, rgba(255,140,30,0.11) 0%, transparent 55%),
  radial-gradient(ellipse 35% 35% at 70% 55%, rgba(255,107,0,0.09) 0%, transparent 50%),
  radial-gradient(ellipse 40% 30% at 90% 45%, rgba(255,120,20,0.06) 0%, transparent 60%),
  radial-gradient(ellipse 30% 40% at 25% 75%, rgba(255,107,0,0.10) 0%, transparent 50%),
  radial-gradient(ellipse 35% 35% at 55% 80%, rgba(255,140,30,0.08) 0%, transparent 55%),
  radial-gradient(ellipse 30% 30% at 80% 75%, rgba(255,107,0,0.11) 0%, transparent 50%),
  radial-gradient(ellipse 40% 35% at 40% 95%, rgba(255,120,20,0.07) 0%, transparent 60%),
  #ffffff;
}

::selection {
  background: #FF6B00;
  color: #ffffff;
}

::-moz-selection {
  background: #FF6B00;
  color: #ffffff;
}

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

html {
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
}

img {
  -webkit-user-drag: none;
  user-select: none;
}

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

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



/* ================= HEADER ================= */

.header {
  width: 100%;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1100;
}

.header-glass {
  width: 100%;
  max-width: 1200px;
  margin: 0 2px;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: 0 0 8px 8px;
  display: flex;
  flex-direction: column;
  padding: 10px 16px;
  gap: 10px;
  position: relative;
  z-index: 10;
}

.header-glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 0 0 8px 8px;
  pointer-events: none;
  box-shadow: 0 2px 5px rgba(0,0,0,0.06), 0 6px 14px rgba(0,0,0,0.08);
  z-index: 20;
}

.header-row {
  width: 100%;
  display: flex;
}

/* ========== ДЕСКТОП ========== */
.header-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.location-button {
  flex-shrink: 0;
  max-width: 300px;
}

.header-bottom {
  min-height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Десктопное меню */
.nav-desktop {
  display: flex;
  gap: 20px;
}

/* Кнопка меню скрыта на десктопе */
.menu-toggle {
  display: none;
}

/* ========== МОБИЛЬНАЯ ВЕРСИЯ (947px и меньше) ========== */
@media (max-width: 946px) {
  /* Скрываем десктопное меню */
  .nav-desktop {
    display: none;
  }

  /* Показываем кнопку меню по центру */
  .menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    font-weight: 700;
    font-size: 14px;
    color: #FF6B00;
    cursor: pointer;
    padding: 8px 12px;
    margin: 0 auto; /* Центрируем кнопку */
  }

  .header-bottom {
    justify-content: center; /* Центрируем содержимое */
  }
}

/* ========== ПЕРЕНОС ЛОКАЦИИ И КОРЗИНЫ (560px и меньше) ========== */
@media (max-width: 640px) {
  .header-top {
    flex-wrap: wrap;
    gap: 12px;
  }

  /* Логотип на всю ширину первой строки */
  .logo-link {
    width: 100%;
  }

  /* Блок с локацией - слева на второй строке */
  .location-button {
    max-width: 250px;
    margin-right: auto; /* Прижимаем к левому краю */
    justify-content: flex-start !important;
    text-align: left;
  }

  /* Кнопка меню на мобильных остается по центру */
  .menu-toggle {
    margin: 0 auto; /* Центрирование */
  }
}

/* ================= LOGO ================= */

.logo {
  height: 60px;
  width: auto;
  display: block;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.location-button {
  color: #111 !important;
  font-weight: 800 !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  min-width: 0 !important;
}

.cart-button {
  margin-left: auto !important;
  color: #111 !important;
}

.modal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.location-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 8px;
}

.location-option {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.82);
  padding: 12px;
  cursor: pointer;
}

.location-option.active {
  border-color: var(--accent);
  background: var(--accent-light);
}

/* ================= MENU ================= */

.nav-desktop {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-link {
  font-family: Roboto, system-ui, sans-serif;
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 0.4px;

  color: #111;
  text-decoration: none;

  display: inline-block;

  transition: transform 0.18s ease, text-shadow 0.18s ease, color 0.18s ease;
  transform-origin: center;
  will-change: transform;
}

.nav-link:hover {
  transform: scale(1.18);
  text-shadow: 0 12px 22px rgba(0,0,0,0.35);
}

.nav-link.active {
  color: var(--accent);
}

/* ================= BUTTON ================= */

.menu-toggle {
  display: none;

  font-weight: 900;
  font-size: 17px;

  background: none;
  border: none;
  cursor: pointer;

  color: #111;

  transition: transform 0.18s ease, color 0.18s ease;

  position: relative;
  z-index: 200;
}

.menu-toggle:hover {
  color: var(--accent);
  transform: scale(1.12);
}

.menu-toggle.active:hover {
  color: var(--accent);
  transform: scale(1.12);
}

.menu-toggle.active {
  color: var(--accent);
}

.arrow-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 18px;
  height: 18px;

  margin-left: 8px;
}

.arrow {
  display: inline-block;

  width: 9px;
  height: 9px;

  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;

  transform: rotate(-135deg) translateY(0px) translateX(5px);

  transition: transform 0.0s ease;
}

.arrow.open {
  transform: rotate(45deg) translateY(3px) translateX(-2px);
}

/* ================= DESKTOP ================= */

.nav-desktop {
  display: flex;
  gap: 22px;
}

/* active пункт */
.nav-link.active {
  color: var(--accent);
}

/* ================= MOBILE ================= */

@media (max-width: 947px) {
  .nav-desktop {
    display: none;
  }

  .menu-toggle {
    display: block;
  }
}

/* ================= DROPDOWN ================= */

.menu-backdrop {
  position: fixed;
  inset: 0;

  z-index: 5;

  background: transparent;
}

.menu-dropdown-wrap {
  position: absolute;

  top: 100%;
  left: 50%;

  transform: translateX(-50%);

  z-index: 6;

  pointer-events: none;
}

.menu-dropdown {
  pointer-events: auto;

  width: max-content;
  min-width: 240px;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 12px;
  padding: 16px 20px;

  background: rgba(255,255,255,0.85);

  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);

  border-radius: 0 0 14px 14px;

  box-shadow:
    0 8px 18px rgba(0,0,0,0.08),
    0 2px 6px rgba(0,0,0,0.05);

  position: relative;
  z-index: 6;

  animation: menuSlideDown 0.22s ease;

  overflow: hidden;
}

/* animation */
@keyframes menuSlideDown {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= HEADER PHONE ================= */

.header-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #FF6B00;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.header-phone:hover {
  background-color: rgba(255, 107, 0, 0.08);
}

/* ================= МОБИЛКА: ЛОКАЦИЯ + ТЕЛЕФОН СЛЕВА, КОРЗИНА СПРАВА ================= */

@media (max-width: 835px) {
  .header-top {
    flex-wrap: wrap;
    gap: 6px;
  }

  .logo-link {
    width: 100%;
  }

  .location-button {
    flex-shrink: 0;
    min-width: 0;
    justify-content: flex-start !important;
    text-align: left;
  }

  .header-phone {
    flex-shrink: 0;
    min-width: 0;
  }

  .cart-button {
    margin-left: auto !important;
  }
}

/* ================= CONTACTS PAGE ================= */
.contact-card {
  padding: 18px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.contact-card-label {
  opacity: 0.6;
  font-size: 14px;
  margin-bottom: 4px;
}

.contact-card-value {
  font-size: 18px;
  font-weight: 700;
}

/* ================= FOOTER ================= */

.footer-contact-link {
  color: #FF6B00;
  text-decoration: none;
  font-size: 0.98rem;
}

.footer-contact-link strong {
  color: #FF6B00;
  font-size: 0.98rem;
}

.footer-copied {
  font-size: 0.75rem;
  color: #FF6B00;
  font-weight: 400;
}

.footer {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: auto;
  position: relative;
  z-index: 900;
}

.footer-glass {
  width: 100%;
  max-width: 1200px;

  margin: 0 2px;

  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);

  border-radius: 8px 8px 0 0;

  display: flex;
  flex-direction: column;

  padding: 16px;
  gap: 10px;

  position: relative;
  z-index: 10;
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

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

.footer-logo-link {
  display: inline-flex;
}

.footer-logo {
  max-width: 140px;
  height: auto;
}

.footer-contacts {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
}

.footer-contacts div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-contacts span {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.footer-contacts strong {
  font-size: 0.98rem;
}

.footer-map {
  min-width: 0;
}

.footer-map > div {
  height: 220px !important;
  border-radius: 8px !important;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(0,0,0,0.08);
  padding-top: 10px;
  font-weight: 700;
}

.footer-bottom-logo {
  height: 24px;
  width: auto;
}

.footer-glass::after {
  content: '';

  position: absolute;
  inset: 0;

  border-radius: 8px 8px 0 0;

  pointer-events: none;

  box-shadow:
    0 -2px 5px rgba(0,0,0,0.06),
    0 -6px 14px rgba(0,0,0,0.08);

  z-index: 20;
}


/* ========== СТРАНИЦА КОНТАКТОВ - УБИРАЕМ РАЗДЕЛИТЕЛЬНУЮ ЛИНИЮ В ФУТЕРЕ ========== */
.footer-contacts-page .footer-bottom {
  border-top: none;
}

/* ========== СТРАНИЦА КОНТАКТОВ - УБИРАЕМ ОТСТУПЫ У ФУТЕРА ========== */
.footer-contacts-page .footer-glass {
  padding-top: 16px;
  padding-bottom: 16px;
}

.footer-contacts-page .footer-bottom {
  border-top: none;
  padding-top: 0;
}

/* ================= PAGE CONTAINER ================= */
.page-container {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 20px 0;
  flex: 1;
}

.page-glass {
  width: 100%;
  max-width: 1200px;
  margin: 0 2px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 20px;
  position: relative;
  z-index: 10;
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.06),
    0 6px 14px rgba(0, 0, 0, 0.08);
}

.page-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 100%;        /* ← убедиться */
  box-sizing: border-box;
}

.page-breadcrumbs {
  font-size: 0.92rem;
}

.catalog-loader {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.catalog-loader .MuiCircularProgress-root {
  color: var(--accent);
}

.catalog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.catalog-pagination .MuiPaginationItem-root.Mui-selected {
  background: var(--accent) !important;
  color: #fff !important;
}

.home-page h1 {
  text-align: left;
}

.home-actions,
.home-catalog-links,
.phone-modal-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.home-catalog-links a,
.home-catalog-links button {
  border: 1px solid var(--accent-border);
  background: rgba(255,255,255,0.72);
  color: var(--text);
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.phone-modal-content {
  flex-direction: column;
  padding: 12px 0 18px;
}

/* ================= BRANDS CAROUSEL ================= */
.brands-carousel-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* Маска применяется только к содержимому карусели */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
}

.brands-carousel {
  overflow: hidden;
  width: 100%;
}

.brands-track {
  display: flex;
  gap: 32px;
  align-items: center;
  width: max-content;
  will-change: transform;
}

.brand-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 60px;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.brand-logo:hover {
  opacity: 1;
}







/* ================= ОБЩИЕ КНОПКИ ================= */

.common-button {
  height: 40px !important;

  border-radius: 10px !important;

  padding: 0 18px !important;

  font-size: 0.98rem !important;
  font-weight: 600 !important;

  text-transform: none !important;

  box-shadow: none !important;

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease !important;
}

/* contained */
.common-button.MuiButton-contained {
  background-color: #FF6B00 !important;
  color: #fff !important;
}

.common-button.MuiButton-contained:hover {
  background-color: #FF6B00 !important;

  transform: scale(1.035);

  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.22),
    0 4px 8px rgba(0, 0, 0, 0.14) !important;
}

/* outlined */
.common-button.MuiButton-outlined {
  border: 1px solid #FF6B00 !important;

  color: #FF6B00 !important;

  background: transparent !important;
}

.common-button.MuiButton-outlined:hover {
  background: transparent !important;

  border-color: #FF6B00 !important;

  color: #FF6B00 !important;

  transform: scale(1.03);

  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.10) !important;
}













/* ================= TIRE FILTERS ================= */
.tire-filters {
  background: transparent;

  padding: 16px 0;

  border-radius: 8px;
  margin-bottom: 20px;

  display: flex;
  flex-wrap: wrap;
  gap: 12px;

  align-items: flex-end;
  justify-content: space-between;
}

/* ================= TIRE LIST (сетка) ================= */
.tire-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* ================= TIRE CARD ================= */
.tire-card {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(1px);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
  width: 100%;
  max-width: 280px;
  justify-self: start;
}

.tire-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.tire-card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.tire-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tire-card-image-placeholder {
  font-size: 1rem;
  opacity: 0.55;
  font-weight: 700;
}

.tire-card-info {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tire-card-title {
  font-weight: 600 !important;
  line-height: 1.3 !important;
  min-height: calc(1.3em * 3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tire-card-size {
  font-family: monospace;
  font-size: 0.95rem !important;
  letter-spacing: 1px;
}

/* ================= CHIPS ================= */

.tire-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;

  /* резерв ровно под 2 строки */
  min-height: 52px;
  max-height: 52px;

  overflow: hidden;
  align-content: flex-start;
}

.tire-card-chips .MuiChip-root {
  background-color: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(255, 107, 0, 0.3);
  font-weight: 500;
  font-size: 0.75rem;
  height: 24px;

  flex-shrink: 0;
}



/* ================= ЦЕНА ================= */
.tire-card-price {
  font-weight: 700 !important;
  color: var(--accent) !important;
  margin-top: 4px !important;
}

.catalog-thumb-button {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 107, 0, 0.25);
  border-radius: 8px;
  background: rgba(255,255,255,0.78);
  overflow: hidden;
  cursor: pointer;
  padding: 4px;
}

.catalog-thumb-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ================= ADMIN ================= */

.admin-shell {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.admin-layout {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.admin-header-top {
  gap: 16px;
}

.admin-panel-title {
  font-weight: 900;
  font-size: 22px;
  color: var(--accent);
}

.admin-nav {
  gap: 28px;
}

.admin-footer-text {
  font-weight: 700;
  color: rgba(0,0,0,0.65);
}

.admin-login-card {
  max-width: 460px;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-page-heading,
.admin-toolbar,
.admin-inline-form,
.admin-photo-heading,
.admin-switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-page-heading {
  justify-content: space-between;
}

.admin-toolbar {
  padding: 10px 0;
}

.admin-directory-grid,
.admin-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.admin-panel-card,
.admin-home-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(0,0,0,0.06);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.admin-home-card {
  min-height: 130px;
  justify-content: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.admin-home-card:hover {
  color: var(--text);
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.1);
}

.admin-table {
  background: rgba(255,255,255,0.55);
  border-radius: 8px;
  overflow: hidden;
}

.admin-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  padding-top: 6px;
}

.admin-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.admin-logo-thumb,
.admin-cover-preview {
  width: 120px;
  height: 70px;
  object-fit: contain;
  border-radius: 8px;
  background: #f5f5f5;
  border: 1px solid rgba(0,0,0,0.08);
}

.admin-cover-preview {
  width: 220px;
  height: 130px;
}

.rich-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.rich-editor-surface {
  min-height: 260px;
  padding: 14px;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 8px;
  background: rgba(255,255,255,0.85);
  outline: none;
  line-height: 1.7;
}

.rich-content {
  line-height: 1.8;
  font-size: 1rem;
  word-break: break-word;
  overflow-wrap: break-word;
  width: 100% !important;
  max-width: 100% !important;
}

.rich-content * {
  max-width: 100% !important;
  box-sizing: border-box;
}

.rich-content p,
.rich-content div {
  width: 100% !important;
  max-width: 100% !important;
}

/* НА ЭТО */
.rich-content a,
.rich-editor-surface a {
  color: #FF6B00;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s, text-decoration-color 0.2s;
  word-break: break-word;
}

.rich-content a:hover,
.rich-editor-surface a:hover {
  color: #FF6B00;
  text-decoration-color: #FF6B00;
  text-decoration-thickness: 2px;
}

.rich-content h1 a,
.rich-content h2 a,
.rich-content h3 a {
  text-decoration-thickness: 2px;
}

.rich-content p,
.rich-editor-surface p {
  margin-bottom: 12px;
}

.rich-content ul,
.rich-content ol,
.rich-editor-surface ul,
.rich-editor-surface ol {
  padding-left: 24px;
  margin-bottom: 12px;
}

.rich-image,
.rich-content img,
.rich-editor-surface img {
  max-width: 100%;
  border-radius: 8px;
  height: auto;
}

.rich-image--full {
  width: 100%;
  display: block;
  margin: 12px 0;
}

.rich-image--left {
  float: left;
  width: min(42%, 320px);
  margin: 6px 18px 12px 0;
}

.rich-image--right {
  float: right;
  width: min(42%, 320px);
  margin: 6px 0 12px 18px;
}

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

.blog-card {
  display: grid;
  grid-template-columns: 42% 1fr;
  min-height: 220px;
  border-radius: 8px;
  background: rgba(255,255,255,0.8);
  overflow: hidden;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.blog-card:hover {
  color: var(--text);
}

.blog-card-image {
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-body {
  padding: 14px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blog-card-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card time {
  margin-top: auto;
  align-self: flex-end;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.article-date {
  color: var(--text-secondary);
}

.cart-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 14px;
  align-items: center;
  border-radius: 8px;
  background: rgba(255, 107, 0, 0.08);
  padding: 10px;
}

.cart-item-image {
  width: 96px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-summary {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  background: transparent;
}

.dynamic-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 36px;
  align-items: start;
}

.product-detail-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f5f5f5;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}

.product-detail-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.product-attributes {
  margin: 12px 0 0;
  padding-left: 20px;
  line-height: 1.8;
}

.admin-photo-editor {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.admin-photo-heading {
  justify-content: space-between;
}

.admin-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.admin-photo-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-photo-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #f5f5f5;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.08);
}

.admin-crop-grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 22px;
  align-items: start;
}

.admin-crop-canvas {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: #f5f5f5;
  border: 1px solid rgba(0,0,0,0.08);
}

.admin-crop-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 947px) {
  .admin-nav {
    display: flex;
    gap: 14px;
  }
}

@media (max-width: 760px) {
  .footer-main,
  .blog-card,
  .product-detail-grid {
    grid-template-columns: 1fr;
  }

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

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

  .cart-item {
    grid-template-columns: 74px 1fr auto;
  }

  .cart-item-image {
    width: 74px;
  }

  .rich-image--left,
  .rich-image--right {
    float: none;
    width: 100%;
    margin: 12px 0;
  }

  .admin-crop-grid {
    grid-template-columns: 1fr;
  }

  .admin-panel-title {
    font-size: 18px;
  }
}



/* Популярные товары — карусель */
.popular-products {
  position: relative;
  margin-bottom: 32px;
}

.popular-scroll-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.popular-scroll {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  padding-bottom: 8px;
}

.popular-scroll::-webkit-scrollbar {
  display: none;
}

.popular-scroll {
  scrollbar-width: none;
}

.popular-scroll-btn {
  position: absolute !important;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: #FF6B00 !important;
  color: #fff !important;
  width: 40px;
  height: 40px;
  border-radius: 50% !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.popular-scroll-btn:hover {
  background: #E55D00 !important;
}

.popular-scroll-left {
  left: -4px;
}

.popular-scroll-right {
  right: -4px;
}

.popular-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
}







/* ============================================= */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}




@media (max-width: 520px) {
  .tire-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .tire-card {
    max-width: 100%;
  }
}



/* ===========кнопки количества в корзине================= */
.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.2);
  background: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.qty-btn:hover {
  border-color: #FF6B00;
  color: #FF6B00;
}


/* =========== банер ================= */
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}