/* KiaGostar landing — navy luxury shop */

body:has(.lp-page) .mobile-bottom-nav,
body:has(.lp-page) .floating-contact,
body:has(.lp-page) #kf-back-to-top {
  display: none !important;
}

body:has(.lp-page) {
  padding-bottom: 0 !important;
  background: #f4f6f9;
}

.lp-page {
  --navy: #0b1c33;
  --navy-mid: #14304f;
  --navy-soft: #1e4570;
  --gold: #c9a227;
  --gold-soft: #e6c968;
  --paper: #ffffff;
  --mist: #eef1f6;
  --ink: #122033;
  --muted: #6b7a8d;
  --line: rgba(11, 28, 51, 0.1);
  --ok: #2a7a5c;
  --radius: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: vazir-fd-wl, Tahoma, sans-serif;
  --font-bold: vazir-bold-fd-wl, vazir-fd-wl, Tahoma, sans-serif;
  font-family: var(--font);
  color: var(--ink);
  padding-bottom: calc(100px + var(--safe-b));
}

.lp-page,
.lp-page button,
.lp-page input,
.lp-page a,
.lp-page span,
.lp-page p,
.lp-page h1,
.lp-page h2,
.lp-page h3 {
  font-family: var(--font);
}

.lp-intro__title,
.lp-cat.is-active,
.lp-card__title,
.lp-card__now,
.lp-sticky__total,
.lp-sticky__btn {
  font-family: var(--font-bold);
}

.lp-page * {
  box-sizing: border-box;
}

.lp-page button {
  font-family: var(--font);
  cursor: pointer;
  border: 0;
}

.lp-card__actions {
  margin-top: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
}

.lp-oos {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--mist);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
}

.lp-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  background: var(--mist);
  border-radius: 999px;
  padding: 0.2rem;
  border: 1px solid var(--line);
}

.lp-page .lp-qty__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(11, 28, 51, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.lp-page .lp-qty__btn:active {
  transform: scale(0.94);
}

.lp-page .lp-qty__btn--plus {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 4px 12px rgba(11, 28, 51, 0.22);
}

.lp-page .lp-qty__btn:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}

.lp-qty__val {
  min-width: 1.6rem;
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--navy);
  font-family: var(--font-bold);
}

.lp-toast {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  left: 50%;
  transform: translate(-50%, -140%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: min(92vw, 360px);
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1.15rem;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: var(--font);
  box-shadow: 0 14px 36px rgba(11, 28, 51, 0.32);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
  pointer-events: none;
  border: 1px solid rgba(201, 162, 39, 0.35);
}

.lp-toast.is-show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.lp-toast.is-error {
  border-color: rgba(220, 80, 80, 0.45);
}

.lp-toast__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.lp-page img {
  max-width: 100%;
  display: block;
}

/* Compact intro — no photo background */
.lp-intro {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 55%, var(--navy-soft) 100%);
  color: #fff;
  padding: 1.1rem clamp(1rem, 4vw, 1.75rem) 1.25rem;
}

.lp-intro__inner {
  max-width: 920px;
  margin: 0 auto;
}

.lp-intro__brand {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-soft);
  text-transform: uppercase;
}

.lp-intro__title {
  margin: 0.2rem 0 0;
  font-size: clamp(1.15rem, 3.6vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.lp-intro__sub {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.78);
}

/* Shop shell */
.lp-shop {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 clamp(0.75rem, 3vw, 1.25rem) 1.5rem;
}

.lp-shop__sticky {
  position: sticky;
  top: 0;
  z-index: 25;
  background: rgba(244, 246, 249, 0.94);
  backdrop-filter: blur(12px);
  padding: 0.75rem 0 0.65rem;
  margin: 0 -0.15rem;
  border-bottom: 1px solid transparent;
}

.lp-shop__sticky.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(11, 28, 51, 0.06);
}

/* Categories */
.lp-cats__scroll,
.lp-brands__scroll {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0.15rem 0.15rem 0.35rem;
}

.lp-cats__scroll::-webkit-scrollbar,
.lp-brands__scroll::-webkit-scrollbar {
  display: none;
}

.lp-cat {
  flex: 0 0 auto;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--navy-mid);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.lp-cat.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  box-shadow: 0 6px 16px rgba(11, 28, 51, 0.22);
}

.lp-cat:active {
  transform: scale(0.97);
}

/* Brands under category */
.lp-brands {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--line);
  animation: lp-fade 0.28s ease;
}

.lp-brands[hidden] {
  display: none !important;
}

.lp-brand {
  flex: 0 0 auto;
  min-width: 4.5rem;
  max-width: 7.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  padding: 0.55rem 0.5rem;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.lp-brand img {
  height: 28px;
  width: auto;
  max-width: 64px;
  object-fit: contain;
}

.lp-brand span {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lp-brand.is-active {
  border-color: var(--navy-soft);
  box-shadow: 0 0 0 2px rgba(30, 69, 112, 0.18);
  background: #fff;
}

.lp-brand.is-active span {
  color: var(--navy);
}

.lp-brand:active {
  transform: scale(0.97);
}

.lp-brand[data-brand=""] {
  min-width: auto;
  max-width: none;
  flex-direction: row;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: var(--mist);
}

.lp-brand[data-brand=""].is-active {
  background: var(--navy-mid);
  border-color: var(--navy-mid);
}

.lp-brand[data-brand=""].is-active span {
  color: #fff;
}

.lp-search {
  margin-top: 0.55rem;
  padding: 0 0.15rem;
}

.lp-search input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 12px;
  padding: 0.7rem 0.95rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--ink);
  outline: none;
}

.lp-search input:focus {
  border-color: rgba(30, 69, 112, 0.45);
  box-shadow: 0 0 0 3px rgba(30, 69, 112, 0.12);
}

/* Products */
.lp-products {
  margin-top: 0.85rem;
  min-height: 40vh;
}

.lp-grid {
  display: grid;
  gap: 0.7rem;
}

@media (min-width: 640px) {
  .lp-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.lp-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 0.7rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.65rem;
  box-shadow: 0 4px 18px rgba(11, 28, 51, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lp-card.is-busy {
  pointer-events: none;
  opacity: 0.72;
}

.lp-card.is-busy .lp-qty {
  opacity: 0.85;
}

.lp-card__media {
  border-radius: 12px;
  overflow: hidden;
  background: var(--mist);
  aspect-ratio: 1;
}

.lp-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lp-card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lp-card__brand {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--navy-soft);
  margin-bottom: 0.1rem;
}

.lp-card__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lp-card__price {
  margin-top: auto;
  padding-top: 0.4rem;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.lp-card__now {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--navy);
}

.lp-card__now small {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
}

.lp-card__was {
  font-size: 0.75rem;
  color: var(--muted);
}

.lp-section-loader {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0.85rem;
}

.lp-section-sentinel {
  height: 1px;
}

.lp-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  grid-column: 1 / -1;
}

/* Sticky cart */
.lp-sticky {
  position: fixed;
  right: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
  padding: 0.7rem clamp(0.75rem, 3vw, 1.15rem) calc(0.7rem + var(--safe-b));
  background: linear-gradient(180deg, transparent, rgba(11, 28, 51, 0.12));
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.lp-sticky.is-visible {
  transform: none;
  pointer-events: auto;
}

.lp-sticky__inner {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--navy);
  color: #fff;
  border-radius: 16px;
  padding: 0.8rem 0.9rem;
  box-shadow: 0 14px 36px rgba(11, 28, 51, 0.35);
}

.lp-sticky__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lp-sticky__label {
  font-size: 0.72rem;
  opacity: 0.72;
}

.lp-sticky__total {
  font-size: 1rem;
  font-weight: 800;
}

.lp-sticky__qty {
  font-size: 0.76rem;
  opacity: 0.8;
}

.lp-sticky__btn {
  margin-right: auto;
  background: var(--gold);
  color: var(--navy);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0.7rem 1.05rem;
  border-radius: 999px;
  white-space: nowrap;
  text-decoration: none;
}

.lp-products.is-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

@keyframes lp-fade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes lp-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.015); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .lp-brands,
  .lp-card.is-pulse {
    animation: none !important;
  }
}
