/* Korna Otomotiv — V4 precision layer
   Official Lucide UI icons + Simple Icons brand marks. */

:root {
  --v4-blue: #365cff;
  --v4-blue-soft: #8fa7ff;
  --v4-orange: #ff542f;
  --v4-paper: #ebe8df;
  --v4-ink: #090a0c;
}

.lucide {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  stroke: currentColor;
  vector-effect: non-scaling-stroke;
}

.brand-icon {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  object-fit: contain;
}

.btn--outline .brand-icon { filter: invert(1); }
.btn--whatsapp .brand-icon { filter: none; }
.btn--light .brand-icon { filter: none; }

.btn {
  gap: 10px;
  isolation: isolate;
}

.btn .lucide { transition: transform .25s ease; }
.btn:hover .lucide-arrow-up-right,
.btn:hover .lucide-external-link { transform: translate(2px, -2px); }
.btn:hover .lucide-car-front { transform: translateX(3px); }
.btn:hover .lucide-rotate-ccw { transform: rotate(-35deg); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.icon-btn .lucide { width: 20px; height: 20px; }

/* Header icon system */
.topbar-item,
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.topbar-item .lucide {
  width: 13px;
  height: 13px;
  color: var(--v4-blue-soft);
}

.social-link img {
  width: 12px;
  height: 12px;
  filter: invert(1);
  opacity: .58;
  transition: opacity .2s;
}

.social-link:hover img { opacity: 1; }

.header-call {
  width: 45px;
  height: 45px;
  color: #fff;
}

.header-call:hover {
  color: #fff;
  border-color: var(--v4-blue-soft);
  background: rgba(54,92,255,.16);
}

.header__actions > .btn--primary .lucide { width: 17px; height: 17px; }

.site-header.is-scrolled::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: var(--scroll-progress, 0%);
  height: 2px;
  background: var(--v4-blue);
  transition: width .08s linear;
}

/* Hero refinements */
.page-home .hero__content .display {
  perspective: 800px;
}

.page-home .hero__content .display > * {
  transform-origin: left center;
  animation: v4TitleIn .72s cubic-bezier(.2,.75,.2,1) both;
}

.page-home .hero__content .display > :nth-child(2) { animation-delay: .08s; }
.page-home .hero__content .display > :nth-child(3) { animation-delay: .16s; }

@keyframes v4TitleIn {
  from { opacity: 0; transform: translateY(28px) rotateX(-8deg); }
  to { opacity: 1; transform: none; }
}

.page-home .hero__media::before {
  background:
    linear-gradient(90deg, rgba(8,9,11,.92), transparent 23%),
    linear-gradient(0deg, rgba(8,9,11,.72), transparent 35%),
    repeating-linear-gradient(90deg, transparent 0 159px, rgba(255,255,255,.035) 160px);
}

.page-home .hero__media::after {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 5% 100%, 0 90%);
}

.hero-proof span {
  position: relative;
  overflow: hidden;
}

.hero-proof span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 2px;
  background: var(--v4-orange);
  transition: width .3s ease;
}

.hero-proof span:hover::after { width: 100%; }

.hero-search { position: relative; }

.hero-search::before {
  content: "HIZLI ARAMA / QUICK SELECT";
  position: absolute;
  z-index: 2;
  left: max(22px, calc((100vw - 1440px) / 2 + 18px));
  top: -24px;
  padding: 5px 9px;
  color: #fff;
  background: var(--v4-ink);
  font-family: var(--font-heading);
  font-size: .57rem;
  font-weight: 650;
  letter-spacing: .15em;
}

.search-panel .btn .lucide { width: 18px; height: 18px; }

/* Trust icons */
.trust-item b {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--v4-orange);
  font-style: normal;
}

.trust-item b .lucide { width: 24px; height: 24px; stroke-width: 1.5; }

.trust-item:hover b {
  color: #fff;
  background: var(--v4-blue);
}

/* Vehicle inventory */
.vehicle-grid { counter-reset: v4-vehicle; }
.vehicle-card { counter-increment: v4-vehicle; }

.vehicle-card__image::before {
  content: "0" counter(v4-vehicle);
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 12px;
  color: rgba(255,255,255,.76);
  font-family: var(--font-heading);
  font-size: .61rem;
  font-weight: 650;
  letter-spacing: .12em;
}

.vehicle-card__image::after { z-index: 1; }

.vehicle-card__meta span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.vehicle-card__meta .lucide {
  width: 13px;
  height: 13px;
  color: var(--v4-blue-soft);
}

.favorite-btn {
  color: #fff;
  transition: color .2s, background .2s, transform .2s;
}

.favorite-btn:hover { transform: scale(1.06); }
.favorite-btn.is-active { color: #fff; background: var(--v4-orange); border-color: var(--v4-orange); }
.favorite-btn.is-active .lucide-heart { fill: currentColor; }

.vehicle-card__footer .btn {
  min-width: 104px;
  justify-content: space-between;
}

.vehicle-card__actions .btn {
  min-width: 0;
  white-space: nowrap;
}

.vehicle-card__actions .btn.is-active {
  color: #fff;
  border-color: var(--v4-blue);
  background: var(--v4-blue);
}

[data-featured-vehicles] > .vehicle-card:first-child .vehicle-card__meta .lucide { color: #fff; }

/* Service index now uses official functional icons */
.service-card::after { display: none; }

.service-card__icon {
  position: absolute;
  top: 28px;
  right: 31px;
  width: 33px;
  height: 33px;
  color: #646b76;
  stroke-width: 1.25;
  transition: color .25s, transform .25s;
}

.service-card:hover .service-card__icon {
  color: var(--v4-blue-soft);
  transform: translateY(-4px) rotate(-4deg);
}

.service-card:hover h3 { color: #fff; }

/* Form affordances */
.field { position: relative; }

.field input,
.field select,
.field textarea {
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  background: rgba(54,92,255,.035);
}

.checkbox input {
  width: 17px;
  height: 17px;
  accent-color: var(--v4-blue);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color .2s, border-color .2s, background .2s;
}

.filter-chip .lucide { width: 13px; height: 13px; }
.filter-chip:hover { color: #fff; border-color: var(--v4-orange); background: rgba(255,84,47,.1); }

.toolbar__controls .icon-btn {
  color: #858c97;
}

.toolbar__controls .icon-btn:hover,
.toolbar__controls .icon-btn.is-active {
  color: #fff;
  border-color: var(--v4-blue);
  background: var(--v4-blue);
}

.filters__head .icon-btn { flex: 0 0 auto; }

/* Detail and gallery controls */
.gallery-nav button {
  width: 52px;
  height: 52px;
  color: #fff;
  border-color: rgba(255,255,255,.35);
  background: rgba(7,8,10,.68);
}

.gallery-nav button:hover { background: var(--v4-blue); border-color: var(--v4-blue); }
.gallery-nav button .lucide { width: 24px; height: 24px; }

.detail-actions .btn { justify-content: flex-start; }
.detail-actions .btn .lucide,
.detail-actions .btn .brand-icon { margin-right: 3px; }

.detail-actions [data-favorite].is-active {
  border-color: var(--v4-orange);
  color: #fff;
  background: var(--v4-orange);
}

.detail-actions [data-favorite].is-active .lucide-heart { fill: currentColor; }

.equipment-card li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.equipment-card li .lucide {
  width: 16px;
  height: 16px;
  margin-top: .28em;
  color: var(--v4-blue-soft);
}

.mobile-detail-bar .btn { gap: 6px; }

.lightbox > .icon-btn {
  width: 48px;
  height: 48px;
  z-index: 2;
  color: #fff;
}

/* Compare and status layers */
.compare-bar .btn { gap: 8px; }
.compare-dialog > div:first-child { align-items: center; }

.compare-modal .icon-btn:hover,
.mobile-drawer .icon-btn:hover {
  color: #fff;
  border-color: var(--v4-orange);
  background: var(--v4-orange);
}

/* Inner-page precision marks */
.page:not(.page-home) .page-hero .container::after {
  content: "KORNA / EST. 2009";
  position: absolute;
  right: 0;
  bottom: 2px;
  color: #737a85;
  font-family: var(--font-heading);
  font-size: .57rem;
  font-weight: 650;
  letter-spacing: .17em;
  writing-mode: vertical-rl;
}

.spec {
  position: relative;
  overflow: hidden;
}

.spec::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--v4-blue);
  transition: width .25s ease;
}

.spec:hover::after { width: 100%; }

/* Brand surfaces */
.floating-whatsapp img {
  width: 25px;
  height: 25px;
}

.floating-whatsapp:hover img { transform: scale(1.06); }

.site-footer .btn .lucide { width: 15px; height: 15px; }

@media (max-width: 1180px) {
  .header-call { display: none; }
}

@media (max-width: 900px) {
  .page:not(.page-home) .page-hero .container::after { display: none; }
  .hero-search::before { left: 18px; }
  .service-card__icon { right: 28px; }
  .vehicle-card__actions .btn { white-space: normal; }
}

@media (max-width: 640px) {
  .hero-search::before { top: -22px; left: 12px; }
  .service-card__icon { top: 25px; right: 4px; width: 28px; height: 28px; }
  .vehicle-card__meta span { gap: 4px; }
  .vehicle-card__meta .lucide { width: 12px; height: 12px; }
  .vehicle-card__actions .brand-icon { width: .95rem; height: .95rem; }
  .gallery-nav button { width: 44px; height: 44px; }
  .mobile-detail-bar .btn { font-size: .62rem; padding-inline: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .hero__content .display > * { animation: none; }
  .btn .lucide,
  .service-card__icon,
  .spec::after { transition: none; }
}
