/* home.css — стили главной страницы (home.php) */

/* Optional fallbacks (если общий CSS не задаёт переменные) */
:root{
  --bg:#0E1114;
  --card:#181C22;
  --main:#EAECEF;
  --muted-foreground:#98A2AE;
  --muted-dark:#2b3a50;
  --accent:#F5C400;
  --accent-2:#EAECEF;
}

.home-page{color:var(--main);}

/* Container fallback (если нет общего .container) */
.container{max-width:1200px;margin:0 auto;padding:0 1rem;}

/* HERO */
.hero{position:relative;overflow:hidden;}
.hero--sm{min-height:38svh;}
.hero--home{min-height:68vh;}
.hero__media{position:absolute;inset:0;}
.hero__img{width:100%;height:100%;object-fit:cover;object-position:center;display:block;}
.hero__overlay{
  position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(0,0,0,.40),rgba(0,0,0,.72));
}
.hero__content{position:relative;z-index:1;padding:4rem 0 4.5rem;max-width:960px;}
.hero__content--center{margin:0 auto;text-align:center;}
.hero__kicker{
  font-size:.78rem;letter-spacing:.28em;text-transform:uppercase;font-weight:600;
  color:rgba(255,255,255,.85);
}
.hero__title{
  margin:.75rem 0 .75rem;
  font-size:clamp(2.3rem,4vw,3.8rem);
  font-weight:900;letter-spacing:.08em;text-transform:uppercase;line-height:1.03;
  color:#fff;text-shadow:0 3px 26px rgba(0,0,0,.45);
}
.hero__subtitle{
  max-width:40rem;margin:0 auto 1.8rem;
  font-size:clamp(1rem,1.4vw,1.2rem);
  color:rgba(255,255,255,.9);
}

/* Buttons (fallback если нет общего) */
.btn-primary{
  background:var(--accent);
  color:#000;
  border:1px solid rgba(245,196,0,.55);
  padding:.65rem 1.15rem;border-radius:9999px;
  font-weight:800;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;
}
.btn-primary:hover{filter:brightness(1.03);}
.btn-ghost{
  background:transparent;color:#fff;
  border:1.5px solid rgba(255,255,255,.6);
  padding:.65rem 1.15rem;border-radius:9999px;
  font-weight:800;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;
}
.btn-ghost:hover{border-color:#fff;}

.actions{display:flex;gap:.6rem;flex-wrap:wrap;margin-top:.75rem;}
.actions--center{justify-content:center;}

/* Animations */
.fade-up{opacity:0;transform:translateY(25px);animation:fadeUp .8s ease forwards;}
@keyframes fadeUp{to{opacity:1;transform:translateY(0);}}
.fade-zoom{animation:heroZoom 18s ease forwards;}
@keyframes heroZoom{0%{transform:scale(1);}100%{transform:scale(1.12);}}

/* HOME: CATEGORY GRID */
.home-categories{
  position:relative;z-index:6;
  padding:0 0 3rem;
  margin-top:-28px;
}
@media (min-width:768px){.home-categories{margin-top:-70px;}}
@media (min-width:1024px){.home-categories{margin-top:-110px;}}

.home-categories .section-title{
  margin:0 0 1.25rem;
  font-size:.8rem;
  letter-spacing:.28em;
  text-transform:uppercase;
  opacity:.85;
}

.home-categories-inner{
  max-width:1200px;margin:0 auto;
  padding:1.75rem 1.25rem 2.25rem;
  border-radius:26px 26px 0 0;
  background:var(--bg);
  box-shadow:0 -18px 40px rgba(0,0,0,.65);
}
@media (min-width:1024px){.home-categories-inner{padding-inline:1.75rem;}}

.category-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:1.25rem;
  list-style:none;
  padding:0;margin:0;
}
.category-grid>li{
  opacity:0;
  transform:translateY(16px);
  animation:catFadeUp .6s ease forwards;
}
.category-grid>li:nth-child(1){animation-delay:.03s;}
.category-grid>li:nth-child(2){animation-delay:.06s;}
.category-grid>li:nth-child(3){animation-delay:.09s;}
.category-grid>li:nth-child(4){animation-delay:.12s;}
.category-grid>li:nth-child(5){animation-delay:.15s;}
.category-grid>li:nth-child(6){animation-delay:.18s;}
.category-grid>li:nth-child(7){animation-delay:.21s;}
.category-grid>li:nth-child(8){animation-delay:.24s;}
@keyframes catFadeUp{to{opacity:1;transform:translateY(0);}}

.category-card{
  position:relative;
  border-radius:22px;
  overflow:hidden;
  background:#000;
  aspect-ratio:4/3;
  cursor:pointer;
  box-shadow:0 18px 40px rgba(0,0,0,.55);
  text-decoration:none;
}
.category-card::before{
  content:"";
  position:absolute;inset:0;
  background:linear-gradient(135deg,rgba(0,0,0,.7) 0%,rgba(0,0,0,.35) 35%,rgba(0,0,0,.15) 100%);
  opacity:.9;
  pointer-events:none;
  transition:opacity .3s ease;
}
.category-card:hover::before{opacity:.7;}
.category-card__img{
  width:100%;height:100%;
  object-fit:cover;
  transform:scale(1);
  transition:transform .35s ease;
  display:block;
}
.category-card:hover .category-card__img{transform:scale(1.07);}
.category-card__label{
  position:absolute;
  top:1rem;left:1.1rem;
  color:#fff;
  font-weight:800;
  font-size:.95rem;
  letter-spacing:.04em;
  text-shadow:0 2px 10px rgba(0,0,0,.7);
}

/* Section head (Latest + Reviews) */
.home-section-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:1rem;
  margin:0 0 1rem;
}
.home-section-title{margin:0;font-weight:900;letter-spacing:.08em;text-transform:uppercase;}
.home-section-link{color:rgba(255,255,255,.85);text-decoration:none;font-weight:700;}
.home-section-link:hover{text-decoration:underline;}

/* LATEST ARRIVALS */
.home-latest{padding:1rem 0 2.25rem;}
.home-slider{position:relative;}

#car-track{
  overflow:auto;
  scroll-snap-type:x mandatory;
  -ms-overflow-style:none;
  scrollbar-width:none;
}
#car-track::-webkit-scrollbar{display:none;height:0;}
#cars-ul{
  display:grid;
  grid-auto-flow:column;
  gap:16px;
  grid-auto-columns:calc((100% - 3*16px)/4);
  list-style:none;
  padding:0;margin:0;
}
#cars-ul>li{scroll-snap-align:start;}
@media (max-width:1024px){
  #cars-ul{grid-auto-columns:calc((100% - 16px)/2);}
}
@media (max-width:640px){
  #cars-ul{grid-auto-columns:100%;}
}

.media{position:relative;aspect-ratio:4/3;overflow:hidden;background:var(--bg);}
.media>img{width:100%;height:100%;object-fit:cover;display:block;}

.card-outer{
  border-radius:1.2rem;
  background:var(--card);
  box-shadow:0 18px 45px rgba(0,0,0,.55);
  overflow:hidden;
  border:1px solid rgba(15,23,42,.8);
}
.card-outer a{color:inherit;text-decoration:none;display:block;}
.card-inner{padding:.9rem .9rem 1.05rem;display:flex;flex-direction:column;gap:.4rem;}

.card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem;}
.car-title{font-weight:700;line-height:1.2;}
.car-sub{color:var(--muted-foreground);font-size:.92rem;}

.badge-new{
  font-size:.7rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  padding:.1rem .45rem;
  border-radius:999px;
  background:rgba(245,196,0,.08);
  color:var(--accent);
  border:1px solid rgba(245,196,0,.4);
  white-space:nowrap;
}

.card-bottom{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-top:.2rem;}
.price{font-weight:800;color:var(--accent);}

.pill{
  border-radius:999px;
  padding:.25rem .75rem;
  font-size:.75rem;
  border:1px solid rgba(148,163,184,.5);
  display:inline-flex;
  align-items:center;
  gap:.35rem;
}
.pill-dot{
  width:.4rem;height:.4rem;border-radius:999px;background:#22c55e;
}

.no-equip{
  padding:2.5rem 1.5rem;
  border-radius:1rem;
  background:var(--card);
  text-align:center;
  color:var(--main);
}
.no-equip__muted{margin:0;color:var(--muted-foreground);}

/* Round nav buttons (Latest + Reviews) */
.home-slider-controls{display:flex;gap:.6rem;margin-top:.75rem;}
.home-circle-btn{
  width:40px;height:40px;
  border-radius:999px;
  background:var(--card);
  border:1px solid rgba(255,255,255,.12);
  color:var(--main);
  font-size:18px;
  font-weight:900;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.home-circle-btn:hover{filter:brightness(1.08);}

/* WHY CHOOSE */
.home-why{padding:2.25rem 0 2.5rem;border-top:1px solid rgba(255,255,255,.08);}
.home-why__head{max-width:46rem;margin:0 auto 1.4rem;text-align:center;}
.home-kicker{
  margin:0 0 .6rem;
  font-size:.78rem;
  letter-spacing:.28em;
  text-transform:uppercase;
  color:var(--muted-foreground);
}
.home-h2{margin:0 0 .65rem;font-size:clamp(1.6rem,2.6vw,2.2rem);font-weight:900;}
.home-lead{margin:0;color:var(--muted-foreground);}

.home-why__grid{
  display:grid;
  gap:1rem;
  grid-template-columns:repeat(4,minmax(0,1fr));
}
@media (max-width:1024px){.home-why__grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:640px){.home-why__grid{grid-template-columns:1fr;}}

.home-why__card{
  border-radius:1.2rem;
  background:var(--card);
  border:1px solid rgba(255,255,255,.08);
  padding:1.15rem 1.1rem;
}
.home-why__card h3{margin:.1rem 0 .35rem;font-size:1.05rem;font-weight:900;}
.home-why__card p{margin:0;color:var(--muted-foreground);line-height:1.5;}

/* REVIEWS slider */
.home-reviews{padding:2.25rem 0 2.5rem;border-top:1px solid rgba(255,255,255,.08);}
#reviews-viewport{overflow:hidden;position:relative;}
#reviews-track{display:flex;will-change:transform;transition:transform .4s ease;padding:0;margin:0;list-style:none;}
.review-slide{flex:0 0 100%;padding:0 .75rem;box-sizing:border-box;}
@media (min-width:768px){.review-slide{padding:0 2rem;}}
.review-card{
  border-radius:1.25rem;
  background:var(--card);
  border:1px solid rgba(15,23,42,.8);
  padding:1.5rem 1.6rem;
  display:flex;
  flex-direction:column;
  gap:.75rem;
  box-shadow:0 18px 45px rgba(0,0,0,.55);
  min-height:220px;
  max-width:640px;
  margin:0 auto;
}
.review-quote{font-size:2.3rem;line-height:1;color:var(--accent);}
.review-text{font-size:.95rem;color:var(--main);margin:0;}
.review-footer{display:flex;align-items:center;gap:.75rem;margin-top:1.1rem;}
.review-footer-link{display:flex;align-items:center;gap:.75rem;text-decoration:none;color:inherit;}
.review-avatar{
  width:40px;height:40px;border-radius:999px;overflow:hidden;
  border:2px solid rgba(248,250,252,.2);
  flex-shrink:0;
}
.review-avatar img{width:100%;height:100%;object-fit:cover;display:block;}
.review-meta{
  margin-top:auto;
  display:flex;
  flex-direction:column;
  gap:.15rem;
  font-size:.85rem;
  color:var(--muted-foreground);
}
.review-name{font-weight:800;color:var(--main);}

/* BOTTOM CTA */
.home-bottom-cta{padding:1.75rem 0 2.5rem;}
.home-bottom-cta__box{
  border-radius:1.25rem;
  background:var(--card);
  border:1px solid rgba(255,255,255,.08);
  padding:1.35rem 1.25rem;
  text-align:center;
}
.home-bottom-cta__title{
  font-size:clamp(1.25rem,2.2vw,1.85rem);
  font-weight:900;
  margin:0 0 1rem;
}
.home-bottom-cta__actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:.8rem;
}
.home-cta-btn{
  padding:.75rem 1.25rem;
  border-radius:999px;
  font-weight:900;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.home-cta-btn--accent{background:var(--accent);color:#000;}
.home-cta-btn--accent:hover{filter:brightness(1.03);}
.home-cta-btn--light{
  background:var(--main);
  color:var(--bg);
  border:1px solid rgba(0,0,0,.12);
}
.home-cta-btn--light:hover{filter:brightness(1.02);}

@media (prefers-reduced-motion:reduce){
  .fade-up,.fade-zoom{animation:none !important;}
}
