/* Self-hosted Inter Variable */
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-Variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
}

/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    font-variation-settings: 'wght' 400;
    line-height: 1.6;
    background-color: #ffffff;
}

/* Sticky footer layout */
html, body { height: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }

/* Вставной заголовок через #site-header */
#site-header { display: block; }

/* Общий чёрный подвал */
.footer { 
    background: #000; 
    color: #ccc; 
    padding: 48px 0 24px; 
    margin-top: 32px; 
}

.footer a { 
    color: #ccc; 
    text-decoration: none; 
    transition: color 0.2s ease;
}

.footer a:hover { 
    color: #fff; 
    text-decoration: none; 
}

.footer-content { 
    display: grid; 
    grid-template-columns: minmax(130px, 0.9fr) minmax(360px, 1.8fr) minmax(130px, 0.9fr) minmax(220px, 1.2fr); 
    gap: 32px; 
    margin-bottom: 32px; 
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-popular-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 0;
    align-items: start;
}

.footer-popular-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.footer-links a {
    font-size: 14px;
    color: #ccc;
}

.footer-popular-links a {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.footer-phone {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.footer-hours {
    font-size: 14px;
    color: #999;
}

.footer-address {
    font-size: 14px;
    color: #ccc;
    line-height: 1.5;
}

.footer-address-secondary {
    color: #999;
}

.footer-map-link {
    font-size: 14px;
    color: #d1d5db;
    text-decoration: none;
}

.footer-map-link:hover {
    text-decoration: underline;
}

.footer-empty {
    font-size: 14px;
    color: #999;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid #333;
}

.footer-copy { 
    font-size: 12px; 
    color: #777; 
}

.footer-social {
    display: flex;
    gap: 16px;
}

.social-link {
    font-size: 14px;
    color: #ccc;
}

@media (max-width: 1024px) {
    .footer-content { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 24px; 
    }
}

@media (max-width: 768px) { 
    .footer-content { 
        grid-template-columns: 1fr; 
        gap: 24px; 
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Черная полоска сверху */
.top-bar { background-color: #000; color: #ccc; padding: 8px 0; font-size: 12px; }
.top-bar-content { display: flex; justify-content: flex-start; align-items: center; gap: 40px; }
.top-bar a { color: #ccc; text-decoration: none; margin-left: 0px; }
.location { color: #fff; position: relative; }
.location-btn { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: none; color: #fff; font: inherit; cursor: pointer; }
.location-icon {
  flex-shrink: 0;
}

.location-arrow {
  flex-shrink: 0;
}
.location-dropdown { position: absolute; top: 110%; left: 0; background: #111; border: 1px solid #2a2a2a; border-radius: 8px; padding: 6px; display: none; min-width: 140px; z-index: 50; }
.location-dropdown.open { display: block; }
.location-option { width: 100%; text-align: left; padding: 8px 10px; background: transparent; border: none; color: #ccc; border-radius: 6px; cursor: pointer; }
.location-option:hover { background: #1e1e1e; color: #fff; }

.top-bar a:hover { text-decoration: underline; }
.nav-links a { margin-left: 20px; }
.nav-links a:first-child { margin-left: 0; }
.cities-question { margin-left: 20px; }

/* Блок контактов справа в чёрной полосе */
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.top-call-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #2d5a3d;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 18px rgba(45, 90, 61, 0.28);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.top-call-button:hover {
  background: #356a49;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(45, 90, 61, 0.34);
}
.top-call-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 768px) {
  /* Скрываем только навигационные ссылки */
  .top-bar .nav-links, 
  .top-bar .cities-question { 
    display: none; 
  }
  
  /* Показываем top-actions на мобиле */
  .top-actions { 
    display: flex;
    align-items: center;
    gap: 4px;
  }
  
  /* Компактная кнопка звонка */
  .top-call-button {
    min-height: 28px;
    padding: 7px 12px;
    font-size: 10px;
    letter-spacing: 0.03em;
  }
  
  /* Упрощаем отступы для компактности */
  .top-bar-content {
    gap: 12px;
  }
}

/* Sticky header на мобиле */
@media (max-width: 768px) {
  .header-main.sticky-mobile {
    position: fixed;
    top: 8px;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: opacity 0.3s ease, background 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 16px 16px 16px 16px;
    overflow: hidden;
  }
  
  /* Когда кликнули на шапку - становится полностью видимой */
  .header-main.sticky-mobile.sticky-mobile-active {
    background: rgba(255, 255, 255, 1);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  
  /* Добавляем отступ сверху для body, чтобы контент не прыгал */
  body.has-sticky-header {
    padding-top: 69px;
  }
}

/* Белая полоска с логотипом и поиском */
.header-main { background-color: #fff; height: 61px; border-bottom: 1px solid #e5e7eb; }
.header-main .container { height: 100%; }
.header-main-content { display: flex; align-items: center; height: 100%; flex-wrap: nowrap; }
.logo { display: flex; align-items: center; height: 100%; min-width: 0; }
.logo-img { height: 45px; width: auto; display: block; max-width: 100%; }
.search { flex: 1; /* margin-left убран, отступы задаём через сетку на мобиле и через gap на контейнере при необходимости */ min-width: 0; }
.search-wrap { position: relative; width: 100%; min-width: 0; }
.search-icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }

.search-input { width: 100%; padding: 12px 16px; border: 2px solid #e5e7eb; border-radius: 8px; font-size: 14px; outline: none; background-color: #f9fafb; color: #374151; }
.search-input::placeholder { color: #9ca3af; }
.search-input:focus { border-color: #10b981; background-color: #fff; }

/* Search dropdown */
.search-dropdown { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.08); z-index: 60; overflow: hidden; }
.search-dropdown:empty { display: none; }
.search-suggest-head { display: flex; justify-content: space-between; padding: 12px 14px; font-weight: 700; color: #111827; border-bottom: 1px solid #f1f5f9; }
.search-suggest-head .right { color: #10b981; text-decoration: none; }
.search-suggest-list { list-style: none; }
.search-suggest-item { border-bottom: 1px solid #f1f5f9; }
.search-suggest-item:last-child { border-bottom: none; }
.suggest-link { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 10px; padding: 10px 12px; text-decoration: none; color: inherit; }
.suggest-link:hover { background: #f9fafb; }
.suggest-link .thumb { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; background: #f3f4f6; }
.suggest-link .title { font-weight: 600; line-height: 1.2; }
.suggest-link .price { font-weight: 800; color: #16a34a; }
.search-suggest.empty { padding: 14px; color: #6b7280; }
.search-suggest-more { display: inline-block; margin-top: 8px; color: #10b981; text-decoration: none; font-weight: 700; }

/* Full-bleed обложка */
.hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 72vh;
  background: #111 url('image/covers/home-hero/slide-2-desktop.png') center/cover no-repeat;
}
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-image: var(--hero-desktop);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transition: opacity .9s ease;
  will-change: opacity;
}
.hero-slide.is-active {
  opacity: 1;
}
/* responsive источники через CSS на брейкпоинтах */
@media (max-width: 1200px) {
  .hero { background-image: url('image/covers/home-hero/slide-2-tablet.png'); min-height: 60vh; }
  .hero-slide { background-image: var(--hero-tablet); }
}
@media (max-width: 768px) {
  .hero { background-image: url('image/covers/home-hero/slide-2-mobile.png'); min-height: 48vh; }
  .hero-slide { background-image: var(--hero-mobile); }
}

/* затемняющий градиент слева для читаемости текста */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.30) 35%, rgba(0,0,0,0.05) 65%, rgba(0,0,0,0) 100%);
}

.hero-inner { position: relative; z-index: 2; display: flex; align-items: center; min-height: inherit; }
.hero-copy { max-width: 560px; color: #fff; padding: 48px 0; }
.hero-title { font-size: 44px; line-height: 1.1; font-weight: 800; margin-bottom: 12px; }
.hero-subtitle { font-size: 22px; line-height: 1.4; opacity: 0.95; margin-bottom: 20px; }
.hero-btn { display: inline-block; padding: 12px 20px; background: #fff; color: #111; text-decoration: none; border-radius: 6px; font-weight: 700; border: 1px solid rgba(0,0,0,0.12); }
.hero-btn:hover { background: #f3f4f6; }
.hero-dots {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  background: rgba(255,255,255,.34);
  cursor: pointer;
  transition: width .2s ease, background .2s ease, border-color .2s ease;
}
.hero-dot.is-active {
  width: 28px;
  background: #fff;
  border-color: #fff;
}
.hero-dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

@media (max-width: 768px) {
  .hero-copy { max-width: 90%; padding: 24px 0; }
  .hero-title { font-size: 28px; }
  .hero-subtitle { font-size: 16px; }
  .hero-btn { padding: 10px 16px; border-radius: 6px; }
  .hero-dots { bottom: 16px; }
}

/* Блок иконок категорий под обложкой */
.category-icons { background: #fff; padding: 20px 0; }
.category-icons-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.category-icon-item { text-align: center; text-decoration: none; color: inherit; min-width: 0; }
.category-icon { width: 100%; aspect-ratio: 19/13; border-radius: 8px; margin: 0 auto 8px; background-color: transparent; background-position: center; background-repeat: no-repeat; background-size: 70% auto; }
.category-label { font-size: 16px; font-weight: 700; }
.category-label.iphone { color: #2d5a3d; }

/* Бренды */
.brands { background: #fff; padding: 24px 0; }
.brands-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 32px; }
.brand-logo { height: 40px; width: auto; max-width: 100%; object-fit: contain; justify-self: center; filter: grayscale(100%); }

/* Секции товаров (рестайлинг) */
.section-title { font-size: 28px; font-weight: 700; margin: 24px 0; color: #111827; }
.page-title { font-size: 32px; font-weight: 800; margin: 24px 0; color: #111827; text-align: center; }
.container > .breadcrumbs { font-size: 14px; color: #9ca3af; display: flex; align-items: center; gap: 8px; margin: 12px 0 8px; }
.container > .breadcrumbs a { color: #9ca3af; text-decoration: none; }
.container > .breadcrumbs a:hover { text-decoration: underline; }
.products { background: #fff; padding: 8px 0 24px; }
.catalog-home-link {
  margin: 18px 0 0;
  font-size: 16px;
  color: #4b5563;
}
.catalog-home-link a {
  color: #111827;
  font-weight: 700;
}
#catalogSeoContent {
  margin-top: 32px;
  padding: 20px 22px;
  max-width: none;
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: #f9fafb;
}
#catalogSeoContent .service-page-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  color: #374151;
}
#catalogSeoContent .service-page-text {
  font-size: 14px;
  line-height: 1.7;
  color: #6b7280;
}
#catalogSeoContent .service-page-text a {
  color: #4b5563;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#catalogSeoContent .service-page-text p {
  margin: 0 0 10px;
}
#catalogSeoContent .service-page-text p:last-child {
  margin-bottom: 0;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 0;
  background: #fff;
}

.product-card {
  position: relative;
  background: #fff;
  border: 1px solid transparent;
  box-shadow: inset 0 0 0 1px #e5e7eb;
  border-radius: 40px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.products-grid .product-card {
  margin: 0;
}
.product-card:hover {
  z-index: 1;
  border-color: #cbd5e1;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}
.product-card .product-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; z-index: 2; }
.badge { font-size: 11px; font-weight: 600; border-radius: 6px; padding: 4px 8px; line-height: 1; background: rgba(255,255,255,0.92); color: #111; border: 1px solid #e5e7eb; backdrop-filter: blur(2px); }
.badge-warranty { background: rgba(255,255,255,0.92); color: #111; border-color: #e5e7eb; }
.badge-sale { background: rgba(255,255,255,0.92); color: #111; border-color: #e5e7eb; }
.badge-color { background: rgba(59, 130, 246, 0.9); color: white; border-color: rgba(59, 130, 246, 0.3); }
.badge-memory { background: rgba(16, 185, 129, 0.9); color: white; border-color: rgba(16, 185, 129, 0.3); }

/* Кнопка добавления в карточке */
.product-actions { margin-top: auto; display: block; width: 100%; }
.add-btn { width: 100%; display: block; text-align: center; border-radius: 8px; padding: 12px; cursor: pointer; font-weight: 700; background: #2d5a3d; color: #fff; border: 1px solid #2d5a3d; }
.add-btn:hover { filter: brightness(1.05); }

/* Стабильные миниатюры каталога */
.product-thumb {
  width: 100%;
  aspect-ratio: 3/4;
  min-height: clamp(53px, 6.4vw, 83px);
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  overflow: hidden;
  position: relative;
}
.product-thumb img {
  width: auto;
  height: auto;
  max-width: 70%;
  max-height: 70%;
  object-fit: contain; /* картинка попадает по размеру */
  display: block;
  transform: none; /* убираем зум */
}
@media (max-width: 768px) {
  .product-thumb img { transform: none; }
}

.product-main-image { position: relative; }
.status-badge {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1.5px solid #111111;
  background: #ffffff;
  color: #111111;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}
.product-main-image .status-badge,
.product-thumb .status-badge {
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 6px 16px;
}
.status-badge--new,
.status-badge--instock,
.status-badge--preorder,
.status-badge--showcase,
.status-badge--soon,
.status-badge--used {
  background: #ffffff;
  color: #111111;
}

.product-state-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.product-state-row .status-badge {
  position: static;
  display: inline-flex;
}
.product-state-text,
.product-stock-text,
.product-availability-note,
.product-preorder-note {
  font-size: 14px;
  color: #4b5563;
}
.product-availability-note,
.product-preorder-note {
  margin-top: 4px;
}

.product-body { padding: 12px 8px 14px; display: flex; flex-direction: column; gap: 6px; align-items: stretch; text-align: center; flex: 1; }
.product-title {
  max-width: 100%;
  padding: 0 4px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 50px;
}
.product-title-main {
  font-size: 28px;
  font-weight: 600;
  color: #111827;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.product-title-meta {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  line-height: 1.15;
}
.product-price-row {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin: 6px auto 0;
  padding: 10px 22px;
  justify-content: center;
  width: fit-content;
  min-width: 0;
  background: #000;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}
.price-from { color: rgba(255,255,255,0.72); font-weight: 600; }
.product-price { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.price-discount { font-size: 12px; color: #b91c1c; font-weight: 600; }

.catalog-toolbar { display: block; margin: 16px 0; }
.catalog-filter { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #4b5563; }
.catalog-filter-panel { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; width: 100%; min-width: 0; }
.catalog-filter-group { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; flex: 1 1 auto; justify-content: flex-start; min-width: 0; }
.catalog-filter-group .catalog-filter { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #111827; min-width: 0; max-width: 100%; }
.catalog-select-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; width: 100%; }
.catalog-model-filters { margin: 12px 0 8px; }
.catalog-model-filters .filter-chip-row { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; scrollbar-width: none; }
.catalog-model-filters .filter-chip-row::-webkit-scrollbar { display: none; }
.catalog-model-filters .filter-chip { white-space: nowrap; }
.catalog-sort-control { width: auto; max-width: 100%; }
.catalog-sort-select {
  appearance: none;
  -webkit-appearance: none;
  width: auto;
  border: 1px solid #e5e7eb;
  border-radius: 15px;
  background:
    linear-gradient(45deg, transparent 50%, #9ca3af 50%),
    linear-gradient(135deg, #9ca3af 50%, transparent 50%);
  background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: #111827;
  font-size: 20px;
  font-weight: 300;
  line-height: 1.2;
  padding: 8px 34px 8px 14px;
  cursor: pointer;
}
.catalog-sort-select:focus { outline: none; color: #2d5a3d; }
.catalog-filter-clear { border: 1px solid #d1d5db; background: #fff; color: #111827; border-radius: 10px; padding: 6px 12px; font-weight: 700; cursor: pointer; }
.catalog-filter-clear:hover { filter: brightness(0.98); }
@media (max-width: 768px) {
  .catalog-filter-panel { align-items: stretch; }
  .catalog-filter-group { flex-direction: column; align-items: stretch; width: 100%; }
  .catalog-filter-group .catalog-filter { justify-content: flex-start; width: 100%; max-width: 100%; overflow: hidden; }
  .catalog-select-row { flex-direction: column; align-items: stretch; width: 100%; }
  .catalog-sort-control { width: 100%; }
  .catalog-sort-select { width: 100%; max-width: 100%; font-size: 16px; padding-right: 30px; }
  .catalog-toolbar .filter-chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .catalog-toolbar .filter-chip-row::-webkit-scrollbar { display: none; }
}
.catalog-filter-label { font-weight: 700; color: #111827; }
.filter-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip { border: 1px solid #d8dbe7; background: #fff; color: #111827; border-radius: 28px; padding: 16px 28px; font-weight: 300; font-size: 16px; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.filter-chip:hover { border-color: #bfc6d9; }
.filter-chip.is-active { background: #fff; border-color: #2d5a3d; color: #2d5a3d; }
.filter-chip-swatch { width: 16px; height: 16px; border-radius: 999px; background: var(--swatch, #d1d5db); border: 1px solid rgba(17, 24, 39, 0.12); flex: 0 0 16px; }
.filter-chip-swatch-all { background: linear-gradient(135deg, #f3f4f6 0%, #d1d5db 100%); }
.filter-chip-label { display: inline-block; }
.catalog-color-dropdown { position: relative; }
.catalog-color-trigger { display: inline-flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 220px; }
.catalog-color-trigger::after { content: ''; width: 8px; height: 8px; border-right: 2px solid #6b7280; border-bottom: 2px solid #6b7280; transform: rotate(45deg); margin-top: -4px; flex: 0 0 8px; }
.catalog-color-trigger-value { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.catalog-color-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 20; min-width: 260px; max-height: 320px; overflow-y: auto; padding: 8px; border: 1px solid #d8dbe7; border-radius: 18px; background: #fff; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12); }
.catalog-color-option { width: 100%; display: inline-flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid transparent; border-radius: 14px; background: #fff; color: #111827; cursor: pointer; text-align: left; }
.catalog-color-option:hover { background: #f8fafc; }
.catalog-color-option.is-active { border-color: #2d5a3d; color: #2d5a3d; background: #fff; }
.catalog-color-option-label { min-width: 0; }
@media (max-width: 768px) { .filter-chip-row { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; } .filter-chip { white-space: nowrap; } .catalog-model-filters { margin-top: 8px; } }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip-path: inset(50%);
}

.product-meta { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.product-meta--inline { justify-content: flex-start; }
.stock-pill { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #F3F4F6; color: #1F2937; }
.empty-products { text-align: center; padding: 32px 0; font-weight: 600; color: #6b7280; }

.add-btn.preorder { background: #92400e; border-color: #92400e; }
.add-btn.preorder:hover { filter: brightness(1.05); }
.add-btn[disabled], .add-btn.disabled { background: #e5e7eb; border-color: #e5e7eb; color: #9ca3af; cursor: not-allowed; }
.add-btn-large.preorder { background: #92400e; border-color: #92400e; }
.add-btn-large[aria-disabled="true"], .add-btn-large.disabled, .add-btn-large.is-disabled { background: #e5e7eb; border-color: #e5e7eb; color: #9ca3af; cursor: not-allowed; pointer-events: none; }

@media (max-width: 1024px) { .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 768px)  {
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .popular-products-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 22px; margin: 16px 0; }
  .product-card { border-radius: 40px; padding: 10px; }
  .product-title { font-size: 13px; line-height: 1.15; -webkit-line-clamp: 2; min-height: 30px; padding: 0 4px; max-width: 100%; }
  .product-price { font-size: 18px; }
  #catalogSeoContent {
    margin-top: 24px;
    padding: 18px 16px;
    border-radius: 20px;
  }
  #catalogSeoContent .service-page-title {
    font-size: 16px;
  }
  #catalogSeoContent .service-page-text {
    font-size: 13px;
    line-height: 1.6;
  }
}

@media (max-width: 768px) {
  .product-title,
  body[data-category] .product-title {
    font-size: 13px;
    line-height: 1.15;
    -webkit-line-clamp: 2;
    min-height: 30px;
    padding: 0 4px;
    max-width: 100%;
  }
}

/* Адаптив: мобильный вид */
@media (max-width: 768px) {
  .top-bar .nav-links, .top-bar .cities-question { display: none; }
  .container { padding-left: 16px; padding-right: 16px; }

  /* 20% / 80% через flex + gap, без переполнения */
  .header-main-content { display: flex; align-items: center; gap: 6px; }
  .logo { flex: 0 0 40%; min-width: 0; }
  .logo-img { height: auto; max-height: 45px; max-width: 100%; }
  .search { flex: 1 1 60%; margin-left: 0; min-width: 0; }
  .search-wrap { width: 100%; min-width: 0; }
  .search-input { width: 100%; padding: 12px 44px 12px 16px; font-size: 16px; }

  .category-icons-grid { gap: 12px; }
  .category-label { font-size: clamp(12px, 3.8vw, 16px); }
  .category-icon { background-size: 60% auto; }

  .brands { padding: 16px 0; }
  .brands-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .brand-logo { height: 28px; }
}

/* Запас под плавающую кнопку корзины на мобильных */
@media (max-width: 768px) {
  body { padding-bottom: 84px; }
}

/* Категорийные страницы: более компактные карточки и свободнее сетка */
body[data-category] .products { padding: 8px 0 32px; background: transparent; }
body[data-category] .products-grid { gap: 18px; grid-template-columns: repeat(4, 250px); justify-content: center; }
@media (min-width: 1025px) { body[data-category] .products-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (min-width: 1360px) { body[data-category] .products-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
body[data-category] .product-card { padding: 0; border-radius: 40px; width: 100%; }
body[data-category] .product-thumb { height: auto; min-height: clamp(53px, 6.4vw, 83px); aspect-ratio: 3/4; }
  body[data-category] .product-body { padding: 0 0 8px; margin-top: -12px; }
body[data-category] .product-title { height: 88px; min-height: 88px; margin-top: -10px; overflow: hidden; }
body[data-category] .product-title-main { font-size: 28px; line-height: 1.02; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
body[data-category] .product-title-meta { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body[data-category] .product-price { font-size: 20px; }
body[data-category] .product-price-row { margin-top: auto; margin-bottom: 18px; }
body[data-category] .price-from { font-size: 12px; }
body[data-category] .add-btn { padding: 8px; font-size: 13px; border-radius: 8px; }

.popular-products-grid { gap: 18px; }
.popular-products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.popular-products-grid .product-card { padding: 0; border-radius: 40px; width: 100%; }
.popular-products-grid .product-thumb { height: auto; min-height: clamp(53px, 6.4vw, 83px); aspect-ratio: 3/4; }
.popular-products-grid .product-body { padding: 0 0 8px; margin-top: -12px; }
.popular-products-grid .product-title { height: 88px; min-height: 88px; margin-top: -10px; overflow: hidden; }
.popular-products-grid .product-title-main { font-size: 24px; line-height: 1.08; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.popular-products-grid .product-price { font-size: 20px; }
.popular-products-grid .product-price-row { margin-top: auto; margin-bottom: 18px; }
.popular-products-grid .product-title-meta { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.popular-products-grid .price-from { font-size: 12px; }
.popular-products-grid .add-btn { padding: 8px; font-size: 13px; border-radius: 8px; }
@media (max-width: 1024px) { .popular-products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Категории — адаптив колонок при меньшей ширине */
@media (max-width: 1200px) {
  body[data-category] .products-grid { grid-template-columns: repeat(3, 250px); }
}
@media (max-width: 900px) {
  body[data-category] .products-grid { grid-template-columns: repeat(2, 250px); }
}

/* Мобильная адаптация для всех страниц категорий товаров */
@media (max-width: 768px) {
  /* Сетка — две эластичные колонки, без горизонтального скролла */
  body[data-category] .products-grid {
    grid-template-columns: 1fr;
    justify-content: stretch;
    gap: 20px;
  }
  .popular-products-grid {
    grid-template-columns: 1fr;
    justify-content: stretch;
    gap: 20px;
  }
  /* Карточка растягивается по колонке, без фиксированной ширины */
  body[data-category] .product-card {
    width: auto;
    padding: 8px;
    border-radius: 40px;
  }
  .popular-products-grid .product-card {
    width: auto;
    padding: 8px;
    border-radius: 40px;
  }
  /* Превью масштабируется пропорционально экрану */
  body[data-category] .product-thumb {
    height: auto;
    min-height: 0;
    aspect-ratio: 1 / 1.08;
  }
  .popular-products-grid .product-thumb {
    height: auto;
    min-height: 0;
    aspect-ratio: 1 / 1.08;
  }
  body[data-category] .product-title { min-height: 50px; padding: 0 4px; max-width: 100%; margin-top: -6px; }
  body[data-category] .product-title-main { font-size: 28px; line-height: 1; }
  body[data-category] .product-title-meta { font-size: 13px; }
  body[data-category] .product-price { font-size: 18px; }
  body[data-category] .product-price-row { margin-bottom: 18px; }
  body[data-category] .add-btn { padding: 10px; font-size: 14px; }
  .popular-products-grid .product-title { height: auto; min-height: 50px; padding: 0 4px; max-width: 100%; margin-top: -6px; }
  .popular-products-grid .product-title-main { font-size: 28px; line-height: 1; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .popular-products-grid .product-title-meta { font-size: 13px; }
  .popular-products-grid .product-price { font-size: 18px; }
  .popular-products-grid .product-price-row { margin-top: auto; margin-bottom: 18px; }
  .popular-products-grid .add-btn { padding: 10px; font-size: 14px; }
}

/* Очень узкие экраны — одна колонка */
@media (max-width: 420px) {
  body[data-category] .products-grid { grid-template-columns: 1fr; }
}

body[data-category="samsung"] .products-grid .product-title {
  height: 58px;
  min-height: 58px;
}

body[data-category="samsung"] .products-grid .product-title-main {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(18px, 1.65vw, 22px);
  line-height: 1.08;
}

body[data-category="samsung"] .products-grid .product-title-meta {
  font-size: 12px;
}

@media (max-width: 768px) {
  body[data-category="samsung"] .products-grid .product-title {
    height: auto;
    min-height: 44px;
  }

  body[data-category="samsung"] .products-grid .product-title-main {
    font-size: clamp(17px, 5.2vw, 21px);
    line-height: 1.08;
  }
}

/* Альтернативные категории 2×2 */
.category-tiles { background: #fff; padding: 12px 0 24px; }
.category-tiles-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); }
.category-tile { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: inherit; padding: 24px 16px; position: relative; background: #fff; }
.category-tile { border-right: 1px solid #eef0f4; }
.category-tile:nth-child(4n) { border-right: none; }
.category-tile-thumb { width: 100%; height: 160px; display: flex; align-items: center; justify-content: center; }
.category-tile-thumb img { max-width: 80%; max-height: 140px; width: auto; height: auto; object-fit: contain; display: block; }
.category-tile-title { margin-top: 12px; font-weight: 800; font-size: 20px; text-align: center; }
.category-tile-label { margin-top: 12px; font-weight: 800; font-size: 20px; text-align: center; }

/* Skeleton loader для категорий */
.category-tiles-grid:empty::before {
  content: "Загрузка категорий...";
  display: block;
  text-align: center;
  padding: 40px;
  color: #999;
  font-size: 16px;
}
@media (max-width: 1024px) { .category-tile-thumb { height: 140px; } .category-tile-thumb img { max-height: 120px; } }
@media (max-width: 768px)  { 
  .category-tiles-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .category-tile { padding: 20px 12px; border-right: 1px solid #eef0f4; border-bottom: 1px solid #eef0f4; } 
  .category-tile:nth-child(2n) { border-right: none; }
  .category-tile-title { font-size: 18px; }
  .category-tile-label { font-size: 18px; } 
  .category-tile-thumb { height: 120px; } 
  .category-tile-thumb img { max-height: 100px; } 
}

/* Десктоп: 4 карточки в ряд (ровная сетка 4+4 при 8 категориях) */
@media (min-width: 1025px) {
  .category-tiles-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .category-tile { border-bottom: none !important; border-right: 1px solid #eef0f4; }
  .category-tile:nth-child(4n) { border-right: none; }
  .category-tile:nth-child(-n+4) { border-bottom: 1px solid #eef0f4 !important; }
}

/* Информационные секции */
.info-section {
  padding: 80px 0;
  background: white;
}

.info-section-alt {
  background: #f9fafb;
}

/* Hero блок "О компании" */
.about-hero {
  background: #f5f5f7;
  padding: 40px 0;
  min-height: 200px;
  display: flex;
  align-items: center;
}

.about-hero-content {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-hero-text {
  text-align: center;
  max-width: 600px;
}

.about-hero-label {
  display: block;
  font-size: 48px;
  font-weight: 800;
  color: #000;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.about-hero-years {
  font-size: 96px;
  font-weight: 900;
  color: #2d5a3d;
  line-height: 1;
  margin: 0;
  letter-spacing: -3px;
}

.about-hero-description {
  font-size: 18px;
  line-height: 1.8;
  color: #374151;
}

.about-hero-description p {
  margin-bottom: 20px;
}

.about-hero-description strong {
  color: #2d5a3d;
  font-weight: 700;
}

.about-media-section[hidden] {
  display: none;
}

.about-media-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.about-media-subtitle {
  margin: 0;
  color: #6b7280;
  font-size: 15px;
  line-height: 1.6;
}

.about-media-grid {
  column-count: 2;
  column-gap: 18px;
}

.about-media-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  overflow: hidden;
  break-inside: avoid;
  margin-bottom: 18px;
}

.about-media-card img,
.about-media-card video {
  display: block;
  width: 100%;
  height: auto;
  background: #f3f4f6;
}

.about-media-card video {
  height: auto;
}

.about-media-caption {
  margin: 0;
  padding: 14px 16px 16px;
  color: #374151;
  font-size: 14px;
  line-height: 1.6;
}

.info-section .section-title {
  text-align: center;
  font-size: 36px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 40px;
}

.info-content {
  max-width: 800px;
  margin: 0 auto;
}

.info-text-large {
  font-size: 18px;
  line-height: 1.8;
  color: #374151;
}

.info-text-large p {
  margin-bottom: 20px;
}

.info-text-large strong {
  color: #2d5a3d;
  font-weight: 700;
}

/* Сетка карточек */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.info-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.info-section-alt .info-card {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.info-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 12px;
}

.info-card p {
  font-size: 15px;
  line-height: 1.6;
  color: #6b7280;
  margin: 0;
}

.info-card a {
  color: #2d5a3d;
  text-decoration: none;
  font-weight: 600;
}

.info-card a:hover {
  text-decoration: underline;
}

/* Карточки локаций */
.location-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.location-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: all 0.3s ease;
}

.location-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.location-card h3 {
  font-size: 24px;
  font-weight: 800;
  color: #2d5a3d;
  margin-bottom: 16px;
}

.location-card p {
  font-size: 15px;
  line-height: 1.8;
  color: #374151;
  margin: 0 0 12px 0;
}

.location-hours {
  font-weight: 600;
  color: #6b7280;
  margin-top: 12px !important;
}

/* Компактные сервисные страницы */
.service-page {
  padding: 0 0 28px;
  background: #fff;
}

.service-page-hero {
  padding-top: 12px;
}

.service-page-intro,
.service-page-block {
  max-width: 760px;
  margin: 0 auto;
}

.service-page-intro {
  background: #f5f5f7;
  border-radius: 24px;
  padding: 28px 32px;
}

.service-page-label {
  display: block;
  margin-bottom: 14px;
  font-size: 40px;
  line-height: 1.05;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
}

.service-page-lead,
.service-page-text {
  color: #4b5563;
  font-size: 17px;
  line-height: 1.7;
}

.service-page-lead p,
.service-page-text p {
  margin: 0 0 12px;
}

.service-page-lead p:last-child,
.service-page-text p:last-child {
  margin-bottom: 0;
}

.service-page-block {
  padding: 4px 0 0;
}

.service-page-title {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
  color: #111827;
}

.service-page-list {
  margin: 0;
  padding-left: 22px;
  color: #374151;
  font-size: 17px;
  line-height: 1.7;
}

.service-page-list li {
  margin-bottom: 8px;
}

.service-page-list li:last-child {
  margin-bottom: 0;
}

.service-page-list-numbered {
  padding-left: 24px;
}

.service-page-map-card {
  max-width: 980px;
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
  background: #f5f5f7;
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.08);
}

.service-page-map {
  display: block;
  width: 100%;
  height: 520px;
  border: 0;
}

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

.contact-social-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 18px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.contact-social-item:hover {
  border-color: #d1d5db;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
  transform: translateY(-1px);
}

.contact-social-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contact-social-icon--telegram {
  color: #fff;
  background: linear-gradient(180deg, #37aee2 0%, #1f8ecb 100%);
}

.contact-social-icon--whatsapp {
  color: #25d366;
  background: rgba(37, 211, 102, 0.12);
}

.contact-social-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.contact-social-name {
  font-size: 14px;
  line-height: 1.2;
  color: #6b7280;
}

.contact-social-handle {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
  color: #111827;
}

/* Адаптивность */
@media (min-width: 1025px) {
  .info-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .info-section {
    padding: 60px 0;
  }
  
  .info-section .section-title {
    font-size: 32px;
  }
  
  .location-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .info-section {
    padding: 40px 0;
  }
  
  .info-section .section-title {
    font-size: 28px;
    margin-bottom: 24px;
  }
  
  .info-text-large {
    font-size: 16px;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .info-card {
    padding: 24px;
  }
  
  .location-card {
    padding: 24px;
  }
  
  /* Hero блок адаптив */
  .about-hero {
    padding: 30px 0;
    min-height: auto;
  }
  
  .about-hero-content {
    padding: 0 20px;
  }
  
  .about-hero-label {
    font-size: 32px;
    margin-bottom: 12px;
  }
  
  .about-hero-years {
    font-size: 56px;
    letter-spacing: -2px;
  }
  
  .about-hero-description {
    font-size: 16px;
  }

  .about-media-header {
    display: block;
    margin-bottom: 18px;
  }

  .about-media-subtitle {
    margin-top: 10px;
    font-size: 14px;
  }

  .about-media-grid {
    column-count: 1;
    column-gap: 0;
  }

  .about-media-card {
    margin-bottom: 14px;
  }

  .service-page {
    padding-bottom: 22px;
  }

  .service-page-hero {
    padding-top: 8px;
  }

  .service-page-intro {
    border-radius: 18px;
    padding: 22px 20px;
  }

  .service-page-label {
    font-size: 30px;
    margin-bottom: 10px;
  }

  .service-page-title {
    font-size: 23px;
    margin-bottom: 12px;
  }

  .service-page-lead,
  .service-page-text,
  .service-page-list {
    font-size: 16px;
  }

  .service-page-map-card {
    border-radius: 18px;
  }

  .service-page-map {
    height: 380px;
  }

  .contact-social-grid {
    grid-template-columns: 1fr;
  }

  .contact-social-item {
    min-height: 76px;
    padding: 16px 18px;
    border-radius: 20px;
  }

  .contact-social-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .contact-social-handle {
    font-size: 18px;
  }
}

@media (min-width: 769px) {
  /* Отступ между логотипом и поиском на десктопе */
  .header-main-content { gap: 20px; }
}

/* Фоны для карточек категорий (переведены на storage, либо используем <img>) */
.category-icon-item.iphone .category-icon { background-image: url('/storage/image/Категории/iphone.png'); }
.category-icon-item.mac .category-icon { background-image: url('/image/mba13-m4-skyblue-gallery1-202503.png'); }
.category-icon-item.watch .category-icon { background-image: url('/image/watch.png'); }
.category-icon-item.airpods .category-icon { background-image: url('/image/airpods.png'); }

@media (max-width: 768px) {
  .category-icon-item.iphone .category-icon,
  .category-icon-item.mac .category-icon { background-size: 70% auto; }
}

/* Индивидуальная подстройка размера для AirPods */
.category-icon-item.airpods .category-icon { background-size: 60% auto; }
@media (max-width: 768px) {
  .category-icon-item.airpods .category-icon { background-size: 50% auto; }
}

@media (max-width: 768px) {
  .hero-copy { max-width: 90%; padding: 24px 0; }
  .hero-title { font-size: 28px; }
  .hero-subtitle { font-size: 16px; }
  .hero-btn { padding: 10px 16px; border-radius: 6px; }
  /* Новые правила для позиционирования */
  .hero-inner { align-items: center; justify-content: center; }
  .hero-copy { margin: 0 auto; text-align: center; padding: 24px 0 56px; }
}

/* Категории справа от поиска (десктоп/планшет) */
.categories { display: none; gap: 10px; margin-left: 20px; white-space: nowrap; }
.category-btn { color: #000; text-decoration: none; font-weight: 500; font-size: 14px; }
.category-btn.iphone { color: #2d5a3d; }
.category-btn:hover { text-decoration: underline; }
.header-cart { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: 7px; border-radius: 0; background: transparent; text-decoration: none; flex: 0 0 auto; padding: 0; line-height: 0; font-size: 0; position: relative; }
.header-cart svg { display: block; width: 22px; height: 22px; }
.header-cart-badge { position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; display: none; }
.header-cart:hover { filter: brightness(0.95); }

@media (min-width: 769px) {
  .categories { display: flex; }
}

@media (max-width: 768px) {
  .header-cart { width: 40px; height: 40px; margin-left: 4px; }
}

/* Социальные сети / подписки */
.social-follow { background: #fff; padding: 40px 0 56px; }
.social-head { display: flex; align-items: center; }
.social-title { font-size: 28px; font-weight: 700; color: #111827; }

.social-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 24px; margin-top: 24px; }
.social-item { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; padding: 12px; border-radius: 12px; transition: background .2s ease; }
.social-item:hover { background: #f9fafb; }
.social-icon { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #f3f4f6; }
.social-icon--whatsapp { color: #25d366; background: rgba(37, 211, 102, 0.12); }
.social-text { display: flex; flex-direction: column; }
.social-name { font-size: 14px; color: #6b7280; }
.social-handle { font-size: 18px; font-weight: 700; color: #4b5563; }

@media (max-width: 1024px) {
  .social-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 768px) {
  .social-title { font-size: 22px; }
  .social-grid { grid-template-columns: 1fr; }
}

/* Карта и контакты */
.map-section { background: #fff; padding: 40px 0 56px; }
.map-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.map-embed { border-radius: 16px; overflow: hidden; border: 1px solid #e5e7eb; background: #f9fafb; }
.map-embed iframe { display: block; border: 0; width: 100%; height: 360px; }
.map-card { border: 1px solid #e5e7eb; border-radius: 16px; padding: 20px; background: #fafafa; display: grid; gap: 16px; align-content: start; }
.map-card-title { font-size: 14px; color: #6b7280; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.map-card-text { font-size: 18px; font-weight: 700; color: #111827; }
.map-card-subtext { margin-top: 6px; font-size: 15px; font-weight: 500; color: #4b5563; }
[data-city-ufa-only][hidden] { display: none !important; }
.map-card-link { display: block; width: fit-content; font-size: 18px; font-weight: 700; color: #2d5a3d; text-decoration: none; }
.map-card-link + .map-card-link { margin-top: 4px; }
.map-card-link:hover { text-decoration: underline; }
.map-card-hours { margin-top: 6px; font-size: 15px; color: #4b5563; }
.map-card-secondary-link { display: inline-block; margin-top: 10px; font-size: 14px; color: #2d5a3d; text-decoration: none; }
.map-card-secondary-link:hover { text-decoration: underline; }

@media (max-width: 1024px) {
  .map-grid { grid-template-columns: 1fr; }
  .map-embed iframe { height: 320px; }
}
@media (max-width: 600px) {
  .map-embed iframe { height: 260px; }
}

/* FAB корзины */
.cart-fab { position: fixed; right: 16px; bottom: 16px; z-index: 1000; background: #2d5a3d; color: #fff; border: none; border-radius: 999px; padding: 12px 16px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; box-shadow: 0 8px 20px rgba(0,0,0,0.2); }
.cart-fab-icon img { width: 20px; height: 20px; display: block; }
.cart-fab-count { background: #fff; color: #111827; border-radius: 999px; padding: 2px 8px; font-weight: 700; font-size: 12px; }
.cart-fab:hover { filter: brightness(1.05); }

/* Модальное окно добавления */
.cart-modal { position: fixed; inset: 0; display: none; z-index: 1200; }
.cart-modal.open { display: block; }
.cart-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.cart-modal-dialog { position: relative; margin: 10vh auto 0; width: min(760px, 92%); background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.2); padding: 16px; }
.cart-modal-close { position: absolute; top: 8px; right: 12px; background: transparent; border: none; font-size: 24px; color: #6b7280; cursor: pointer; }
.cart-modal-header { font-weight: 800; font-size: 20px; color: #111827; margin-bottom: 12px; }
.cart-modal-body { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; }
.cart-modal-thumb { width: 120px; height: 140px; background: #f3f4f6; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.cart-modal-thumb img { width: 100%; height: 100%; object-fit: contain; }
.cart-modal-title { font-weight: 700; margin-bottom: 6px; }
.cart-modal-price { font-weight: 800; }
.cart-modal-actions { margin-top: 16px; display: grid; grid-auto-flow: column; gap: 12px; justify-content: start; }
.cart-modal-primary { display: inline-block; background: #2d5a3d; color: #fff; text-decoration: none; border-radius: 10px; padding: 12px 18px; font-weight: 700; }
.cart-modal-secondary { background: #f3f4f6; color: #111827; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 18px; font-weight: 700; cursor: pointer; }

@media (max-width: 600px) {
  .cart-modal-body { grid-template-columns: 80px 1fr; }
  .cart-modal-thumb { width: 80px; height: 96px; }
  .cart-modal-info { min-width: 0; }
  .cart-modal-title { overflow-wrap: anywhere; word-break: break-word; }
}

/* Модалка обратного звонка */
.cb-modal { position: fixed; inset: 0; display: none; z-index: 1300; }
.cb-modal.open { display: block; }
.cb-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.cb-dialog { position: relative; margin: 14vh auto 0; width: min(460px, 92%); background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.25); padding: 18px; }
.cb-close { position: absolute; top: 8px; right: 12px; background: transparent; border: none; font-size: 24px; color: #6b7280; cursor: pointer; }
.cb-title { font-size: 20px; font-weight: 800; color: #111827; margin-bottom: 6px; }
.cb-sub { color: #4b5563; margin-bottom: 12px; }
.cb-form { display: grid; gap: 10px; }
.cb-input { width: 100%; padding: 12px 14px; border: 1px solid #e5e7eb; border-radius: 10px; background: #f9fafb; }
.cb-actions { display: grid; grid-auto-flow: column; gap: 12px; justify-content: start; margin-top: 6px; }
.cb-send { background: #2d5a3d; color: #fff; border: 1px solid #2d5a3d; border-radius: 10px; padding: 12px 16px; font-weight: 700; cursor: pointer; }
.cb-cancel { background: #f3f4f6; color: #111827; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 16px; font-weight: 700; cursor: pointer; }
.cb-hint { font-size: 12px; color: #6b7280; }
.cb-success { color: #10b981; font-weight: 700; display: none; }
.cb-success.show { display: block; }

/* Order page */
.order-title { font-size: 32px; font-weight: 800; margin: 24px 0; color: #111827; }
.order-toolbar { display: flex; align-items: center; gap: 12px; margin: 8px 0 16px; }
.order-selectall { display: inline-flex; align-items: center; gap: 8px; color: #4b5563; font-weight: 600; }
.order-clear { background: #f3f4f6; color: #111827; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 12px; font-weight: 700; cursor: pointer; }
.order-grid { display: grid; grid-template-columns: 1.6fr 0.8fr; gap: 24px; }
.order-list { display: grid; gap: 12px; }
.order-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; align-items: center; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px; }
.order-item-thumb { width: 96px; height: 120px; background: #f3f4f6; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.order-item-thumb img { width: 100%; height: 100%; object-fit: contain; }
.order-item-title { font-weight: 700; margin-bottom: 6px; }
.order-item-meta { color: #6b7280; font-size: 14px; }
.order-item-actions { display: flex; align-items: center; gap: 8px; }
.order-check-input { width: 16px; height: 16px; }
.order-qty { display: inline-grid; grid-auto-flow: column; gap: 8px; align-items: center; }
.order-btn { width: 28px; height: 28px; border-radius: 6px; background: #f3f4f6; border: 1px solid #e5e7eb; cursor: pointer; }
.order-remove { background: transparent; border: none; color: #b91c1c; cursor: pointer; }
.order-price { font-weight: 800; }

.order-summary .order-box { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; display: grid; gap: 12px; position: sticky; top: 24px; }
.order-row { display: flex; justify-content: space-between; }
.order-checkout { 
    width: 100%; 
    background: #2d5a3d; 
    color: #fff; 
    border: none; 
    border-radius: 10px; 
    padding: 14px 20px; 
    font-weight: 700; 
    cursor: pointer; 
    font-size: 16px;
}
.order-continue { text-align: center; color: #6b7280; text-decoration: none; font-weight: 600; }

.order-empty { padding: 24px; color: #6b7280; }
.hidden { display: none; }

@media (max-width: 1024px) { .order-grid { grid-template-columns: 1fr; } .order-summary .order-box { position: static; } }

/* Двойной промо-блок */
.promo-duo { background: #fff; padding: 32px 0 40px; }
.promo-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }
.promo-card { background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 16px; padding: 24px; position: relative; overflow: hidden; }
.promo-head { text-align: center; color: #6b7280; font-weight: 700; margin-bottom: 8px; }
.promo-title { text-align: center; font-size: 36px; font-weight: 800; color: #111827; margin-bottom: 12px; }
.promo-btn { display: block; width: fit-content; margin: 0 auto 12px; background: #2d5a3d; color: #fff; text-decoration: none; border-radius: 8px; padding: 10px 16px; font-weight: 700; border: 1px solid #2d5a3d; }
.promo-btn:hover { filter: brightness(1.05); }
.promo-thumb { display: flex; justify-content: center; align-items: flex-end; min-height: 240px; }
.promo-thumb img { width: 100%; height: auto; max-height: 280px; object-fit: contain; }

@media (max-width: 1024px) { .promo-grid { grid-template-columns: 1fr; } .promo-title { font-size: 28px; } .promo-thumb { min-height: 200px; } .promo-thumb img { max-height: 220px; } }

/* Специальные стили для блока "Как нас найти" */
#location .promo-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
@media (max-width: 1024px) { #location .promo-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 768px) { #location .promo-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; } #location .promo-card { padding: 16px; } #location .promo-title { font-size: 24px; } }

/* Trade‑In */
.tradein { background: #fff; padding: 24px 0 40px; }
.tradein-card { background: #f6f7fb; border: 1px solid #eef0f4; border-radius: 16px; padding: 28px 28px 0 28px; display: grid; grid-template-columns: 1.2fr 1fr; align-items: stretch; gap: 16px; }
.tradein-copy { display: flex; flex-direction: column; justify-content: center; }
.tradein-title { font-size: 40px; font-weight: 800; color: #111827; margin-bottom: 8px; }
.tradein-sub { font-size: 18px; color: #4b5563; margin-bottom: 20px; }
.tradein-btn { display: inline-block; background: #2d5a3d; color: #fff; text-decoration: none; border-radius: 8px; padding: 10px 16px; font-weight: 700; align-self: flex-start; width: fit-content; }
.tradein-btn:hover { filter: brightness(1.05); }
.tradein-thumb { display: flex; justify-content: flex-end; align-items: flex-end; align-self: stretch; height: 100%; }
.tradein-thumb img { width: 100%; max-width: 560px; height: auto; object-fit: contain; display: block; }
@media (max-width: 1024px) { .tradein-card { grid-template-columns: 1fr; text-align: center; } .tradein-btn { align-self: center; margin-left: auto; margin-right: auto; } .tradein-thumb { justify-content: center; align-items: flex-end; } .tradein-title { font-size: 28px; } .tradein-thumb img { max-height: 260px; max-width: 100%; } }

/* Полезные статьи */
.articles { background: #fff; padding: 32px 0 40px; }
.articles-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.articles-title { font-size: 28px; font-weight: 800; color: #111827; }
.articles-actions { display: flex; align-items: center; gap: 10px; }
.articles-nav { width: 38px; height: 38px; border: 1px solid #e5e7eb; border-radius: 50%; background: #fff; color: #111827; font-size: 28px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .18s ease, color .18s ease, border-color .18s ease; }
.articles-nav:hover:not(:disabled) { background: #111827; border-color: #111827; color: #fff; }
.articles-nav:disabled { opacity: .35; cursor: default; }
.articles-more { color: #6b7280; text-decoration: none; font-weight: 600; }
.articles-more:hover { text-decoration: underline; }
.articles-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.articles-carousel { margin-top: 16px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.articles-carousel::-webkit-scrollbar { display: none; }
.articles-track { display: flex; gap: 24px; align-items: stretch; }
.article-card { background: #f7f7fb; border: 1px solid #eef0f4; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.articles-track .article-card { flex: 0 0 calc((100% - 48px) / 3); scroll-snap-align: start; }
.article-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.article-badge { display: inline-flex; align-items: center; min-height: 28px; padding: 6px 10px; border-radius: 999px; background: #111827; color: #fff; font-size: 11px; line-height: 1; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; }
.article-card-date { display: inline-flex; align-items: center; min-height: 28px; padding: 6px 10px; border-radius: 999px; background: #fff; border: 1px solid #e5e7eb; color: #6b7280; font-size: 12px; line-height: 1; font-weight: 700; }
.article-title { font-size: 20px; line-height: 1.35; color: #111827; font-weight: 800; }
.article-read { color: #111827; text-decoration: none; font-weight: 700; }
.article-read:hover { text-decoration: underline; }
.article-thumb { margin-top: 8px; background: #fff; border-radius: 12px; overflow: hidden; }
.article-thumb img { width: 100%; height: 220px; object-fit: cover; display: block; }
@media (max-width: 1024px) { .articles-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } .articles-track .article-card { flex-basis: calc((100% - 24px) / 2); } }
@media (max-width: 768px)  { .articles-head { align-items: flex-start; flex-direction: column; } .articles-title { font-size: 22px; } .articles-grid { grid-template-columns: 1fr; } .articles-track .article-card { flex-basis: 86%; } .article-thumb img { height: 180px; } }

/* Отзывы */
.reviews {
    flex: 0 0 auto;
    background: #fff;
    padding: 32px 0 46px;
    overflow: hidden;
}

.reviews-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.reviews-source-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    flex: 0 0 auto;
}

.reviews-source-btn {
    min-height: 34px;
    padding: 8px 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #6b7280;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.reviews-source-btn.is-active {
    background: #111827;
    color: #fff;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.14);
}

.reviews-source-btn:focus-visible {
    outline: 3px solid rgba(17, 24, 39, 0.18);
    outline-offset: 3px;
}

.reviews-title {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    margin: 0;
}

.reviews-subtitle {
    color: #6b7280;
    font-size: 14px;
    margin-top: 6px;
}

.reviews-carousel {
    position: relative;
    isolation: isolate;
    width: calc(100% + 96px);
    margin: 20px -48px 0;
    overflow: hidden;
}

.reviews-carousel::before,
.reviews-carousel::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 96px;
    pointer-events: none;
}

.reviews-carousel::before {
    left: 0;
    background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,0) 100%);
}

.reviews-carousel::after {
    right: 0;
    background: linear-gradient(270deg, #fff 0%, rgba(255,255,255,0) 100%);
}

.reviews-track {
    display: flex;
    align-items: stretch;
    gap: 24px;
    width: max-content;
    padding: 4px 48px;
    animation: reviewsMarquee 224s linear infinite;
    will-change: transform;
}

.reviews-carousel:hover .reviews-track,
.reviews-carousel:focus-within .reviews-track {
    animation-play-state: paused;
}

.reviews--placeholder .reviews-carousel {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.reviews--placeholder .reviews-carousel::before,
.reviews--placeholder .reviews-carousel::after {
    display: none;
}

.reviews--placeholder .reviews-track {
    width: 100%;
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
    animation: none;
}

.review-card {
    flex: 0 0 360px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    padding: 18px;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    background: linear-gradient(180deg, #f9fafb 0%, #fff 100%);
    border: 1px solid #eef0f4;
    border-radius: 20px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.review-card:hover,
.review-card:focus-visible {
    transform: translateY(-2px);
    border-color: #dfe4ec;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.review-card:focus-visible {
    outline: 3px solid rgba(17, 24, 39, 0.18);
    outline-offset: 4px;
}

.review-card--placeholder {
    cursor: default;
}

.review-card--placeholder:hover,
.review-card--placeholder:focus-visible {
    transform: none;
}

.review-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #111827;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    flex: 0 0 auto;
}

.review-person {
    min-width: 0;
}

.review-name {
    font-size: 16px;
    font-weight: 800;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.review-meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.review-facts {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.review-date,
.review-source {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
}

.review-date {
    background: #111827;
    color: #fff;
}

.review-source {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #6b7280;
}

.review-stars {
    color: #f59e0b;
    font-size: 17px;
    letter-spacing: 1px;
    white-space: nowrap;
    margin-top: 14px;
}

.review-text {
    margin: 12px 0 0;
    color: #374151;
    font-size: 15px;
    line-height: 1.62;
}

@keyframes reviewsMarquee {
    from { transform: translate3d(0,0,0); }
    to { transform: translate3d(calc(-50% - 12px),0,0); }
}

@media (max-width: 1024px) {
    .review-card { flex-basis: 340px; }
    .reviews-track { animation-duration: 248s; }
}

@media (max-width: 768px) {
    .reviews-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .reviews-title { font-size: 22px; }
    .reviews-source-switch {
        width: 100%;
    }
    .reviews-source-btn {
        flex: 1;
        padding-left: 10px;
        padding-right: 10px;
    }
    .reviews-carousel {
        width: calc(100% + 32px);
        margin-left: -16px;
        margin-right: -16px;
    }
    .reviews-carousel::before,
    .reviews-carousel::after { width: 42px; }
    .reviews-track {
        padding-left: 16px;
        padding-right: 16px;
        animation-duration: 288s;
    }
    .review-card {
        flex-basis: 86vw;
        min-height: 240px;
    }
}

/* Страница отдельной статьи */
.article-page {
    padding: 40px 0;
    background: #fff;
}

.article-full {
    max-width: 800px;
    margin: 0 auto;
}

.article-page .breadcrumbs-nav + .article-full {
    margin-top: 28px;
}

.article-hero-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.article-date-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #374151;
    font-size: 13px;
    line-height: 1;
    font-weight: 800;
}

.article-full .article-title {
    font-size: 36px;
    line-height: 1.2;
    color: #111827;
    font-weight: 800;
    margin-bottom: 22px;
}

.article-meta {
    margin-bottom: 24px;
    color: #6b7280;
    font-size: 14px;
}

.article-image {
    margin: 32px 0;
    border-radius: 16px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
}

.article-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 32px 0 16px 0;
}

.article-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 24px 0 12px 0;
}

.article-content p {
    margin-bottom: 16px;
}

.article-content ul {
    margin: 16px 0;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content strong {
    font-weight: 600;
    color: #111827;
}

/* Prevent inline article media from overflowing on desktop */
.article-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 20px auto;
    float: none !important;
}

.article-seo-block {
    margin-top: 44px;
    padding: 28px;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
}

.article-seo-section + .article-seo-section {
    margin-top: 26px;
}

.article-seo-section h2 {
    margin: 0 0 14px;
    color: #111827;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 800;
}

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

.article-seo-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease;
}

.article-seo-link:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1;
}

.article-seo-link span {
    color: #111827;
    font-size: 15px;
    font-weight: 800;
}

.article-seo-link small {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.45;
}

.article-related-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.article-related-list a {
    color: #111827;
    font-weight: 700;
    text-decoration: none;
}

.article-related-list a:hover {
    text-decoration: underline;
}

.article-faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.article-faq-list details {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    padding: 13px 15px;
}

.article-faq-list summary {
    cursor: pointer;
    color: #111827;
    font-weight: 800;
}

.article-faq-list p {
    margin: 10px 0 0;
    color: #4b5563;
    line-height: 1.6;
}

.article-query-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.article-query-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
}

.article-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.btn-back {
    color: #2d5a3d;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
}

.btn-back:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .article-full .article-title {
        font-size: 28px;
    }

    .article-page .breadcrumbs-nav + .article-full {
        margin-top: 22px;
    }
    
    .article-content {
        font-size: 15px;
    }
    
    .article-content h2 {
        font-size: 22px;
    }
    
    .article-content h3 {
        font-size: 18px;
    }

    .article-seo-block {
        padding: 20px;
        border-radius: 20px;
    }

    .article-seo-links {
        grid-template-columns: 1fr;
    }
}

/* Страница товара */
.breadcrumbs {
    background: #ffffff;
    padding: 16px 0;
    border-bottom: 1px solid #e9ecef;
    display: block;
}

.breadcrumbs-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

.breadcrumb-item {
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
}

.breadcrumb-item:hover {
    color: #2d5a3d;
}

.breadcrumb-item.current {
    color: #333;
    font-weight: 500;
}

.breadcrumb-separator {
    color: #6c757d;
    font-size: 14px;
}

.product-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 40px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.product-gallery {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #ffffff;
    border-radius: 16px;
    padding: 0;
}

.product-main-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.product-main-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    display: block;
    padding: 104px 24px 24px;
}

.product-main-image img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(430px, calc(100vh - 260px));
    object-fit: contain;
    margin: 0 auto;
}

.gallery-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
}

.indicator.active {
    background: #2d5a3d;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

/* Product badges */
.product-badges {
    display: flex;
    gap: 12px;
    margin: 16px 0;
}

.product-badge {
    background: #f3f4f6;
    color: #6b7280;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.product-page .product-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0;
    line-height: 1.2;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.price-current {
    font-size: 32px;
    font-weight: 700;
    color: #2d5a3d;
}

.product-option {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.color-options {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.color-options::-webkit-scrollbar {
    height: 4px;
}

.color-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.color-options::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    transition: all 0.2s ease;
    min-width: 100px;
    max-width: 120px;
    flex-shrink: 0;
}

.color-option:hover {
    background: #f8f9fa;
}

.color-option.active {
    background: #f8f9fa;
    border: 2px solid #2d5a3d;
}

.color-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ddd;
    transition: border-color 0.2s;
}

.color-option.active .color-circle {
    border-color: #2d5a3d;
}

.color-option-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 6px;
}

.color-name {
    font-size: 13px;
    color: #333;
    text-align: center;
    font-weight: 500;
    line-height: 1.2;
}

.color-sim-text {
    font-size: 11px;
    color: #999;
    text-align: center;
}

.memory-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.memory-option {
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    color: #333;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    min-width: 80px;
    text-align: center;
    font-size: 14px;
}

.memory-option:hover {
    border-color: #2d5a3d;
    background: #f8f9fa;
}

.memory-option.active {
    border-color: #2d5a3d;
    background: #2d5a3d;
    color: white;
}

.product-actions {
    margin-top: 16px;
}

/* Product price section */
.product-price-section {
    margin: 0;
    padding: 20px 0;
    border-top: 1px solid #e5e7eb;
}

.product-price-main {
    font-size: 40px;
    font-weight: 800;
    color: #047857;
    margin-bottom: 8px;
}

.product-price-installment,
.product-price-tradein {
    font-size: 14px;
    color: #10b981;
    font-weight: 600;
    background: #f0fdf4;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.product-price-states {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-price-state-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 14px;
    background: #f9fafb;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.product-price-state-card:hover {
    border-color: #d1d5db;
    background: #fff;
}

.product-price-state-card.active {
    border-color: #10b981;
    background: #ecfdf5;
}

.product-price-state-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.product-price-state-card .state-card-info {
    font-weight: 600;
    color: #1f2937;
    text-align: left;
}

.product-price-state-card .state-price {
    font-weight: 700;
    font-size: 16px;
    color: #111827;
}

.product-price-bonus {
    color: #10b981;
    font-weight: 500;
}

/* Large add to cart button */
.add-btn-large {
    width: 100%;
    padding: 18px 24px;
    font-size: 18px;
    font-weight: 700;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-btn-large:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.product-actions .add-btn {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    font-weight: 700;
}

/* Product description collapsible */
.product-description {
    margin-top: 24px;
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.product-description-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 8px 0;
}

.product-description-content {
    color: #4b5563;
    font-size: 16px;
    line-height: 1.7;
    margin-top: 12px;
    overflow: visible;
    position: relative;
}

.product-description-content p {
    color: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
}


.product-details-grid {
    display: grid;
    grid-template-columns: 0.4fr 0.6fr;
    gap: 40px;
    margin-top: 40px;
}

.recommended-products {
    margin-top: 40px;
}

.recommended-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.recommended-swiper {
    position: relative;
    overflow: hidden;
    padding: 4px 4px 28px;
}

.recommended-swiper .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.recommended-swiper .swiper-slide {
    height: auto;
    flex-shrink: 0;
}

.recommended-swiper .swiper-button-next,
.recommended-swiper .swiper-button-prev {
    color: var(--brand-green, #16a34a);
}

.recommended-swiper .swiper-pagination-bullet {
    background: #cbd5e1;
    opacity: 1;
}

.recommended-swiper .swiper-pagination-bullet-active {
    background: var(--brand-green, #16a34a);
}

.recommended-products .product-card {
    border: 0;
    box-shadow: none;
}

/* Product specs */
.product-specs {
    margin-top: 24px;
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.spec-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: var(--specs-max-height, 220px);
    overflow: hidden;
    position: relative;
}

.spec-list.is-expanded {
    max-height: none;
}

.spec-list.is-collapsed::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 48px;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #ffffff 100%);
}

.specs-toggle {
    margin-top: 12px;
    background: transparent;
    border: 1px solid #2d5a3d;
    color: #2d5a3d;
    border-radius: 12px;
    padding: 8px 14px;
    font-weight: 500;
    cursor: pointer;
}

.specs-toggle:hover {
    filter: brightness(0.98);
}

.product-description-content {
    max-height: var(--specs-max-height, 220px);
    overflow: hidden;
    position: relative;
}

.product-description-content.is-expanded {
    max-height: none;
}

.product-description-content.is-collapsed::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 48px;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #ffffff 100%);
}

.description-toggle {
    margin-top: 12px;
    background: transparent;
    border: 1px solid #2d5a3d;
    color: #2d5a3d;
    border-radius: 12px;
    padding: 8px 14px;
    font-weight: 500;
    cursor: pointer;
}

.description-toggle:hover {
    filter: brightness(0.98);
}

.spec-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    column-gap: 16px;
    align-items: start;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.spec-row:last-child {
    border-bottom: none;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .product-page {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 16px 0;
        max-width: 100%;
    }
    
    .product-gallery {
        padding: 0;
        margin-bottom: 16px;
    }

    .product-main-image {
        padding: 60px 18px 18px;
    }

    .spec-row {
        grid-template-columns: 1fr;
        row-gap: 4px;
    }

    .product-details-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 24px;
    }
    
    .product-page .product-title {
        font-size: 24px;
        margin-bottom: 12px;
    }
    
    .product-badges {
        margin: 12px 0 20px;
        gap: 8px;
    }
    
    .product-badge {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .product-option {
        margin-bottom: 20px;
    }
    
    .option-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .color-options {
        gap: 8px;
        justify-content: flex-start;
        overflow-x: auto;
    }
    
    .color-option {
        padding: 6px;
        min-width: 90px;
        max-width: 100px;
    }
    
    .color-option-image {
        width: 50px;
        height: 50px;
    }
    
    .color-circle {
        width: 28px;
        height: 28px;
    }
    
    .memory-options {
        gap: 6px;
        justify-content: flex-start;
    }
    
    .memory-option {
        padding: 10px 16px;
        font-size: 14px;
        min-width: 70px;
    }
    
    .product-price-main {
        font-size: 28px;
        color: #047857;
    }
    
    .product-price-installment,
    .product-price-tradein {
        font-size: 13px;
    }
    
    .add-btn-large {
        padding: 16px 20px;
        font-size: 16px;
        margin-top: 16px;
    }
    
    .product-specs,
    .product-description {
        margin-top: 24px;
    }
    
    .breadcrumbs-nav {
        font-size: 12px;
    }
}

/* Legacy article partial styles kept for /h/article compatibility */
.article-badge-lg { display: inline-block; background: #111827; color: #fff; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 800; margin-bottom: 16px; }
.article-title-main { font-size: 36px; font-weight: 800; color: #111827; margin-bottom: 12px; line-height: 1.2; }
.article-image-main { margin-bottom: 32px; border-radius: 12px; overflow: hidden; }
.article-image-main img { width: 100%; height: auto; display: block; }
.article-body { font-size: 16px; line-height: 1.8; color: #374151; margin-bottom: 40px; }
.article-body h2 { font-size: 28px; font-weight: 700; margin: 32px 0 16px; color: #111827; }
.article-body h3 { font-size: 22px; font-weight: 600; margin: 24px 0 12px; color: #111827; }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 16px 0; padding-left: 24px; }
.article-body li { margin-bottom: 8px; }
.article-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 20px 0; }
.article-body a { color: #10b981; text-decoration: underline; }
.article-body a:hover { color: #059669; }
.page-title { font-size: 32px; font-weight: 700; color: #111827; margin-bottom: 32px; }

@media (max-width: 768px) {
    .article-title-main { font-size: 28px; }
    .article-body { font-size: 15px; }
    .article-body h2 { font-size: 24px; }
    .article-body h3 { font-size: 20px; }
}

/* Уведомление об автоопределении города */
.city-auto-notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 10000;
  animation: slideUp 0.3s ease;
  max-width: 90%;
  font-size: 14px;
}

.city-auto-notification .change-city {
  color: #007aff;
  text-decoration: none;
  font-weight: 500;
}

.city-auto-notification .change-city:hover {
  text-decoration: underline;
}

.city-auto-notification button {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  padding: 0;
  line-height: 1;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.city-auto-notification button:hover {
  color: #333;
}

@keyframes slideUp {
  from { 
    transform: translateX(-50%) translateY(100px); 
    opacity: 0; 
  }
  to { 
    transform: translateX(-50%) translateY(0); 
    opacity: 1; 
  }
}

@media (max-width: 768px) {
  .city-auto-notification {
    bottom: 10px;
    padding: 12px 16px;
    font-size: 13px;
  }
}
.section-heading,
.product-specs .option-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #0f172a;
}
