/* Компактная главная. Остальные страницы используют общий style.css. */
.home-page { background: var(--bg); }
.home-page .header { background: var(--bg); border-bottom: 1px solid var(--border); }
.home-page .header__inner { min-height: 76px; gap: 24px; }
.home-page .logo img { width: 56px; height: 56px; }
.home-page .header-search { max-width: 580px; }
.home-page .header__actions { gap: 16px; }
.home-phone { display: grid; gap: 2px; font-size: .95rem; font-weight: 600; white-space: nowrap; }
.home-phone a { color: var(--black); }
.home-page .nav { background: transparent; border: 0; }
.home-page .nav__inner { gap: 28px; }
.home-page .nav__link { padding: 10px 0 14px; font-size: .85rem; color: var(--muted); }
.home-page .nav__link:hover { color: var(--black); background: transparent; }
.home-intro {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 80px 0;
  background: linear-gradient(90deg, rgba(10, 11, 14, .97) 0%, rgba(10, 11, 14, .9) 38%, rgba(10, 11, 14, .3) 100%), url('../images/backgrounds/hero-car-hd.jpg') center / cover no-repeat;
}
.home-intro::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 43%, rgba(255, 255, 255, .055) 50%, transparent 57%);
  transform: translateX(-100%);
}
.home-intro::before { animation: home-glint 14s ease-in-out 2s infinite; }
@keyframes home-glint {
  0%, 78% { transform: translateX(-100%); }
  95%, 100% { transform: translateX(100%); }
}
.home-intro h1 { color: #fff; }
.home-intro .home-kicker { color: #ff9a9e; }
.home-intro .home-intro__lead { color: #e1e3e6; max-width: 520px; }
.home-kicker { color: var(--red-text); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 14px; }
.home-intro h1 { max-width: 850px; font-size: clamp(1.85rem, 3.4vw, 2.8rem); line-height: 1.14; letter-spacing: -.035em; margin: 0 0 14px; }
.home-intro__lead { color: var(--muted); margin: 0 0 28px; max-width: 640px; }
.home-picker { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.home-picker__fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 14px; align-items: end; }
.home-picker label { min-width: 0; display: grid; gap: 8px; font-size: .8rem; color: var(--muted); }
.home-picker select, .home-picker input { width: 100%; min-width: 0; height: 48px; margin: 0; font-size: .95rem; }
.home-picker__fields > .btn { min-height: 48px; padding: 0 24px; }
.home-picker__more { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-top: 16px; font-size: .8rem; }
.home-picker__more > a { flex: none; padding: 6px 0; }
.home-picker__details { flex: 1; min-width: 0; }
.home-picker__details summary { cursor: pointer; color: var(--muted); width: fit-content; padding: 6px 0; }
.home-picker__details summary:hover { color: var(--black); }
.home-picker__extras { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; max-width: 600px; }
.home-section { padding: 28px 0; }
.home-section .section-head { margin-bottom: 18px; align-items: baseline; gap: 16px; }
.home-section h2 { font-size: 1.4rem; letter-spacing: -.025em; }
.home-section .link-more { font-size: .85rem; }
.home-section__note { margin: -6px 0 20px; color: var(--muted); font-size: .85rem; }
.home-products .product-card__img { aspect-ratio: 4 / 3; }
.home-products .product-card__body { padding: 14px; gap: 10px; }
.home-products .product-card__price { margin-top: auto; font-size: 1.1rem; }
.home-products .product-card__actions { margin: 0; }
.home-products .product-card__actions .btn { min-height: 44px; }
.home-contact { margin-top: 28px; padding: 36px 0; border-top: 1px solid var(--border); background: var(--surface); }
.home-contact__inner { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 36px; }
.home-contact h2 { margin-bottom: 14px; }
.home-contact p { color: var(--muted); font-size: .85rem; }
.home-contact__details { display: grid; align-content: start; gap: 16px; }
.home-contact .contact-item { margin: 0; gap: 10px; }
.home-contact .contact-item strong { font-size: .8rem; color: var(--muted); font-weight: 500; }
.home-contact .contact-item p { margin: 3px 0 0; }
.home-contact .contact-item__icon { width: 28px; height: 28px; background: transparent; }
.home-contact__request h3 { font-size: 1rem; margin-bottom: 10px; }
.home-contact__request .btn { min-height: 44px; }
@media (max-width: 1100px) {
  .home-page .header__inner { gap: 16px; }
  .home-page .header__actions { gap: 10px; }
  .home-picker__fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-picker__fields > .btn { grid-column: 1 / -1; }
  .home-contact__inner { gap: 24px; }
}
@media (max-width: 800px) {
  .home-page .header__inner { min-height: 64px; }
  .home-page .logo img { width: 44px; height: 44px; }
  .home-phone { font-size: .8rem; }
  .home-page .theme-toggle { width: 36px; height: 36px; }
  .home-page .header-search--mobile { margin-bottom: 12px; }
  .home-intro { padding: 28px 0 16px; }
  .home-intro__lead { font-size: .9rem; margin-bottom: 20px; }
  .home-picker { padding: 16px; }
  .home-section { padding: 22px 0; }
  .home-contact__inner { grid-template-columns: 1fr 1fr; }
  .home-contact__request { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--border); }
}
@media (max-width: 540px) {
  .home-page .header__inner { gap: 8px; }
  .home-page .header__actions { gap: 8px; }
  .home-page .theme-toggle { display: none; }
  .home-picker__fields { grid-template-columns: 1fr; gap: 12px; }
  .home-picker__fields label { gap: 4px; }
  .home-picker__more { flex-direction: column; gap: 4px; }
  .home-picker__details { width: 100%; }
  .home-picker__extras { grid-template-columns: 1fr; }
  .home-section .section-head { flex-wrap: wrap; gap: 8px; }
  .home-section h2 { font-size: 1.2rem; margin: 0; }
  .home-products .product-card__body { padding: 10px; }
  .home-products .product-card__price { font-size: 1rem; }
  .home-contact__inner { grid-template-columns: 1fr; }
}

/* Спокойная заглушка вместо чёрного изображения; реальные фото сохраняются. */
.home-empty-photo { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: var(--grey); color: var(--muted); font-size: .8rem; }
.home-empty-photo svg { opacity: .65; }
.home-products .product-card__img { text-decoration: none; }
.home-products .product-card__img img { object-fit: contain; }
.home-page :is(a, button, summary, select, input):focus-visible { outline: 2px solid var(--red-text); outline-offset: 4px; }
.home-menu-theme { margin-top: 20px; width: 100%; }
@media (max-width: 540px) {
  .home-picker__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .home-picker__fields label:nth-child(3) { grid-column: 1 / -1; }
  .home-picker select, .home-picker input { font-size: 1rem; }
  .home-products .product-card__img { aspect-ratio: 1.2; }
}

/* Один ряд запчастей: свайп на телефоне, стрелки и клавиатура на компьютере. */
.home-products { display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--field-border) transparent; padding: 4px 0 16px; }
.home-products .product-card { flex: 0 0 calc((100% - 42px) / 4); min-width: 0; height: auto; scroll-snap-align: start; border-radius: 12px; }
.home-products .product-card:hover { transform: none; }
.home-carousel__footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; }
.home-carousel__controls { display: flex; gap: 8px; }
.home-carousel__controls[hidden] { display: none; }
.home-carousel__arrow { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--black); cursor: pointer; }
.home-carousel__arrow:disabled { opacity: .35; cursor: default; }
.home-carousel__arrow:hover:not(:disabled) { background: var(--surface-hover); border-color: var(--muted); }
.home-carousel__arrow[data-carousel-prev] svg { transform: rotate(180deg); }
.home-carousel__catalog { margin-left: auto; min-height: 46px; }
.home-carousel__empty { color: var(--muted); margin: 0; }
@media (max-width: 1100px) {
  .home-products .product-card { flex-basis: calc((100% - 28px) / 3); }
}
@media (max-width: 800px) {
  .home-products .product-card { flex-basis: calc((100% - 14px) / 2); }
}
@media (max-width: 540px) {
  .home-products .product-card { flex-basis: 78%; }
  .home-carousel__footer { gap: 10px; }
  .home-carousel__catalog { padding: 0 16px; font-size: .85rem; }
}

/* Разделы о магазине и заказе дополняют каталог и подбор. */
.home-selection {
  padding: 48px 0;
  background: linear-gradient(90deg, rgba(10, 11, 14, .96), rgba(10, 11, 14, .78)), url('../images/backgrounds/parts-hd.jpg') center / cover no-repeat;
}
.home-selection h2 { color: #fff; }
.home-selection .home-section__note { color: #e1e3e6; }
.home-about { background: var(--surface); border-block: 1px solid var(--border); padding: 48px 0; margin-top: 24px; }
.home-about__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.home-about__photo { overflow: hidden; border-radius: 16px; background: var(--grey); }
.home-about__photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.home-about__text h2 { font-size: clamp(1.4rem, 2.3vw, 2rem); line-height: 1.2; margin-bottom: 20px; }
.home-about__text > p:not(.home-kicker) { color: var(--muted); font-size: .95rem; line-height: 1.7; }
.home-about__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-block: 8px 24px; }
.home-about__facts strong { display: block; font-size: .85rem; margin-bottom: 6px; }
.home-about__facts span { color: var(--muted); font-size: .8rem; line-height: 1.6; }
.home-order { padding: 52px 0; }
.home-order__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 0; margin: 24px 0 0; list-style: none; }
.home-order__steps li { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px; }
.home-order__number { display: block; color: var(--red-text); font-size: 1.5rem; font-weight: 600; margin-bottom: 24px; }
.home-order__steps h3 { font-size: 1.05rem; margin-bottom: 12px; }
.home-order__steps p { color: var(--muted); font-size: .9rem; line-height: 1.7; margin: 0; }
.home-questions { padding: 40px 0 52px; }
.home-questions__inner { display: grid; grid-template-columns: 1fr 1.6fr; gap: 64px; }
.home-questions__inner > div > p:not(.home-kicker) { color: var(--muted); font-size: .9rem; margin-top: 14px; }
.home-questions__list details { border-bottom: 1px solid var(--border); }
.home-questions__list details:first-child { border-top: 1px solid var(--border); }
.home-questions__list summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; cursor: pointer; padding: 22px 0; list-style: none; color: var(--black); font-weight: 500; font-size: .95rem; }
.home-questions__list summary::-webkit-details-marker { display: none; }
.home-questions__list summary::after { content: '+'; font-size: 1.4rem; font-weight: 400; color: var(--muted); flex: none; }
.home-questions__list details[open] summary::after { content: '−'; }
.home-questions__list details p { margin: 0; padding-bottom: 22px; color: var(--muted); font-size: .9rem; line-height: 1.7; }
@media (max-width: 1024px) {
  .home-about__inner { gap: 28px; }
  .home-about__facts { grid-template-columns: 1fr; gap: 14px; }
  .home-order__steps { gap: 14px; }
  .home-order__steps li { padding: 20px; }
  .home-questions__inner { gap: 32px; }
}
@media (max-width: 800px) {
  .home-intro { padding: 48px 0; background-position: 65% center; }
  .home-selection { padding: 36px 0; }
  .home-about { padding: 32px 0; }
  .home-about__inner { grid-template-columns: 1fr; gap: 24px; }
  .home-about__photo img { max-height: 340px; }
  .home-about__facts { grid-template-columns: 1fr 1fr; }
  .home-order { padding: 32px 0; }
  .home-order__steps { grid-template-columns: 1fr; }
  .home-order__steps li { display: grid; grid-template-columns: 40px 1fr; gap: 8px 14px; }
  .home-order__number { grid-row: 1 / 3; margin: 0; font-size: 1.2rem; }
  .home-order__steps h3 { margin: 0; }
  .home-order__steps p { grid-column: 2; }
  .home-questions__inner { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 540px) {
  .home-about__facts { grid-template-columns: 1fr; }
  .home-about__text > p:not(.home-kicker) { font-size: .9rem; }
  .home-order__steps li { padding: 18px; }
  .home-questions__list summary { padding: 18px 0; font-size: .9rem; }
}
