:root {
  --nav: #ffffff;
  --nav-soft: #c41e12;
  --accent: #c41e12;
  --accent-dark: #9f160d;
  --red: #c41e12;
  --page: #f4f5f6;
  --surface: #ffffff;
  --text: #111827;
  --muted: #56616f;
  --border: #d5d9d9;
  --link: #b3130b;
  --success: #067d62;
  --shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
  --max: 1480px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: "Inter", "Cairo", sans-serif;
  line-height: 1.5;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes headerDrop {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes imageReveal {
  from {
    opacity: 0;
    transform: scale(1.035);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes introPulse {
  0%,
  100% {
    filter: drop-shadow(0 0 12px rgba(196, 30, 18, 0.25));
    transform: scale(1);
  }

  50% {
    filter: drop-shadow(0 0 28px rgba(196, 30, 18, 0.58));
    transform: scale(1.035);
  }
}

@keyframes introLine {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes introFadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

a {
  color: inherit;
  text-decoration: none;
}

.intro-lock {
  overflow: hidden;
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 62% 42%, rgba(196, 30, 18, 0.35), transparent 28%),
    linear-gradient(135deg, rgba(196, 30, 18, 0.1), transparent 42%),
    #050505;
  color: #fff;
}

.intro-overlay::before,
.intro-overlay::after {
  position: absolute;
  content: "";
  width: 58vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 42, 31, 0.78), transparent);
  transform: rotate(-22deg);
}

.intro-overlay::before {
  top: 24%;
  right: -8%;
}

.intro-overlay::after {
  bottom: 22%;
  left: -10%;
}

.intro-overlay.is-hiding {
  animation: introFadeOut 520ms ease forwards;
}

.intro-content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  max-width: min(760px, calc(100vw - 36px));
  text-align: center;
}

.intro-logo {
  width: clamp(180px, 24vw, 310px);
  height: auto;
  margin-bottom: 28px;
  animation: introPulse 1550ms ease-in-out infinite;
}

.intro-line {
  width: min(260px, 54vw);
  height: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
  transform-origin: left;
}

.intro-line::before {
  display: block;
  width: 100%;
  height: 100%;
  content: "";
  background: var(--red);
  transform-origin: left;
  animation: introLine 2450ms ease forwards;
}

.intro-skip {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.intro-skip:hover {
  border-color: var(--red);
  background: var(--red);
}

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

button,
input,
select {
  font: inherit;
}

.store-header {
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
  animation: headerDrop 520ms ease both;
}

.top-bar {
  display: grid;
  grid-template-columns: 270px minmax(260px, 1fr) 128px;
  gap: 10px;
  align-items: center;
  min-height: 68px;
  padding: 9px clamp(12px, 2vw, 24px);
  background: var(--nav);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.logo-box,
.header-link {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 2px;
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 3px 8px;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-logo-img {
  width: 86px;
  height: 44px;
  object-fit: contain;
  flex: 0 0 auto;
}

.header-link span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.1;
}

.header-link strong {
  font-size: 0.88rem;
  line-height: 1.2;
}

.logo-box:hover,
.header-link:hover {
  border-color: rgba(196, 30, 18, 0.55);
}

.search-form {
  display: grid;
  grid-template-columns: 88px minmax(120px, 1fr) 98px;
  align-items: stretch;
  min-height: 44px;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.search-form:focus-within {
  border-color: var(--accent);
}

.search-form select {
  min-width: 0;
  border: 0;
  border-right: 1px solid #c7c7c7;
  background: #f3f3f3;
  color: #111;
  padding: 0 8px;
}

.search-form input {
  min-width: 0;
  border: 0;
  color: #111;
  padding: 0 12px;
  outline: 0;
}

.search-form button {
  border: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.search-form button:hover {
  background: var(--accent-dark);
}

.header-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5px 8px;
}

.header-link.compact {
  align-items: center;
  text-align: center;
}

.category-nav {
  display: flex;
  gap: 2px;
  align-items: center;
  min-height: 40px;
  overflow-x: auto;
  padding: 0 clamp(12px, 2vw, 24px);
  background: var(--nav-soft);
  color: #fff;
  scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.category-nav a {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 0.88rem;
  white-space: nowrap;
}

.category-nav a:hover {
  border-color: rgba(255, 255, 255, 0.78);
}

main {
  max-width: var(--max);
  margin: 0 auto;
}

.hero-banner {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  background: #050505;
  border-bottom: 1px solid rgba(196, 30, 18, 0.28);
  animation: imageReveal 780ms ease both;
}

.hero-banner img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.hero-market {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
  gap: 20px;
  align-items: stretch;
  min-height: 420px;
  margin: 18px clamp(12px, 2vw, 24px) 0;
  padding: clamp(22px, 4vw, 44px);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.97) 56%, rgba(196, 30, 18, 0.12) 56%),
    #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.deal-badge,
.section-kicker,
.tag {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--red);
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  animation: fadeUp 680ms ease 120ms both;
}

.hero-copy h1 {
  margin: 0 0 14px;
  font-family: "Poppins", "Cairo", sans-serif;
  font-size: clamp(2.15rem, 5vw, 4.6rem);
  line-height: 1.03;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 670px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-action,
.secondary-action,
.inquiry-button,
.contact-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
}

.primary-action,
.inquiry-button,
.contact-actions a:first-child {
  background: var(--red);
  border: 1px solid var(--red);
  color: #fff;
}

.primary-action:hover,
.inquiry-button:hover,
.contact-actions a:first-child:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.secondary-action,
.contact-actions a {
  border: 1px solid rgba(196, 30, 18, 0.35);
  background: #fff;
  color: var(--red);
}

.secondary-action:hover,
.contact-actions a:hover {
  background: #f7fafa;
  transform: translateY(-1px);
}

.hero-product {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f7fafa;
  animation: imageReveal 780ms ease 220ms both;
}

.hero-product img {
  width: 100%;
  height: 100%;
  min-height: 330px;
  object-fit: cover;
}

.store-section,
.contact-section {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.store-section {
  margin: 18px clamp(12px, 2vw, 24px);
  padding: 18px;
}

.section-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-title-row h2,
.contact-section h2 {
  margin: 0;
  font-family: "Poppins", "Cairo", sans-serif;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  line-height: 1.1;
}

.section-title-row p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 14px;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.filter-chip.is-active,
.filter-chip:hover {
  border-color: var(--accent-dark);
  background: #fff1f0;
  color: var(--red);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.product-card:hover {
  border-color: rgba(196, 30, 18, 0.35);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.product-card.is-hidden {
  display: none;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1.22;
  object-fit: cover;
  background: #f3f3f3;
}

.product-image-link {
  display: block;
  overflow: hidden;
}

.product-image-link img {
  transition: transform 320ms ease;
}

.product-card:hover .product-image-link img {
  transform: scale(1.03);
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px;
}

.product-body h3 {
  margin: 0 0 7px;
  font-family: "Poppins", "Cairo", sans-serif;
  font-size: 1.08rem;
  line-height: 1.25;
}

.product-body p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.tag {
  width: fit-content;
  margin-bottom: 9px;
  padding: 4px 8px;
  background: #fef2f2;
  border: 1px solid #ffd2cc;
  border-radius: 2px;
  font-size: 0.7rem;
}

.rating {
  margin-top: auto;
  color: var(--red);
  font-size: 0.92rem;
  font-weight: 800;
}

.rating span {
  color: var(--link);
  font-weight: 700;
}

.price {
  display: block;
  margin: 8px 0 12px;
  font-size: 1.22rem;
}

.inquiry-button {
  width: 100%;
  min-height: 38px;
  border-radius: 18px;
  font-size: 0.92rem;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin: 18px clamp(12px, 2vw, 24px);
  padding: 24px;
}

.contact-section p {
  margin: 10px 0 0;
  color: var(--muted);
}

.phone-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.phone-list a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #ffd2cc;
  background: #fff7f6;
  color: var(--text);
  font-weight: 800;
}

.phone-list a:hover {
  border-color: var(--red);
  color: var(--red);
  transform: translateY(-1px);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.store-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 28px;
  margin-top: 28px;
  padding: 28px;
  background: #fff;
  color: var(--text);
  border-top: 1px solid var(--border);
}

.footer-brand,
.footer-credit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-brand {
  gap: 12px;
}

.footer-credit {
  gap: 12px;
  min-height: 48px;
  padding: 8px 14px;
  border: 1px solid rgba(196, 30, 18, 0.22);
  background: #0a0a0a;
  color: #fff;
  font-family: "Cairo", "Inter", sans-serif;
  font-weight: 800;
  transition: border-color 180ms ease, transform 180ms ease;
}

.footer-credit:hover {
  border-color: var(--red);
  transform: translateY(-1px);
}

.footer-credit img {
  width: 138px;
  height: 28px;
  object-fit: contain;
}

.footer-credit strong {
  color: #ff2a1f;
  font-size: 0.95rem;
}

.footer-credit > span:not(.footer-credit-text) {
  display: none;
}

.detail-top-bar {
  grid-template-columns: 270px 128px 128px;
  justify-content: space-between;
}

.detail-page {
  padding: 18px clamp(12px, 2vw, 24px) 0;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 14px;
  color: var(--muted);
  font-weight: 700;
}

.breadcrumb a {
  color: var(--link);
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.62fr);
  gap: 18px;
  align-items: start;
}

.gallery-panel,
.vehicle-panel,
.detail-info article {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.gallery-panel {
  padding: 16px;
}

.main-vehicle-image {
  width: 100%;
  aspect-ratio: 1.5;
  object-fit: cover;
  background: #f3f3f3;
  animation: imageReveal 520ms ease both;
}

.main-vehicle-image.is-switching {
  animation: imageReveal 360ms ease both;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.thumb-button {
  padding: 0;
  border: 2px solid transparent;
  background: #fff;
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease;
}

.thumb-button.is-active,
.thumb-button:hover {
  border-color: var(--red);
  transform: translateY(-1px);
}

.thumb-button img {
  width: 100%;
  aspect-ratio: 1.55;
  object-fit: cover;
}

.vehicle-panel {
  position: sticky;
  top: 128px;
  padding: 22px;
}

.vehicle-panel h1 {
  margin: 0 0 10px;
  font-family: "Poppins", "Cairo", sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
}

.vehicle-panel p {
  color: var(--muted);
  font-size: 1.04rem;
}

.detail-rating {
  margin: 18px 0 6px;
  color: var(--red);
  font-weight: 800;
}

.detail-price {
  display: block;
  margin-bottom: 18px;
  font-size: 1.6rem;
}

.spec-list {
  display: grid;
  gap: 9px;
  margin-bottom: 20px;
}

.spec-list span {
  padding: 11px 12px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-weight: 700;
}

.detail-actions {
  display: grid;
  gap: 10px;
}

.detail-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.detail-info article {
  padding: 20px;
}

.detail-info h2 {
  margin: 0 0 8px;
  font-family: "Poppins", "Cairo", sans-serif;
}

.detail-info p {
  margin: 0;
  color: var(--muted);
}

.full-details {
  margin: 0;
  white-space: pre-wrap;
  color: var(--muted);
  font-family: "Inter", "Cairo", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
}

@media (max-width: 1120px) {
  .top-bar {
    grid-template-columns: 230px minmax(260px, 1fr) 110px;
  }

  .header-link:not(.compact) {
    display: flex;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-market {
    grid-template-columns: 1fr;
  }
  .detail-shell,
  .detail-info {
    grid-template-columns: 1fr;
  }

  .vehicle-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .top-bar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .logo-box {
    width: fit-content;
  }

  .brand-logo-img {
    width: 76px;
    height: 38px;
  }

  .header-link {
    display: none;
  }

  .search-form {
    grid-template-columns: 76px minmax(0, 1fr) 78px;
  }

  .category-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    min-height: 0;
    overflow: visible;
    padding: 9px 12px;
    background: #fff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  }

  .category-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 34px;
    padding: 0 6px;
    border: 1px solid #ffd2cc;
    border-radius: 18px;
    background: #fff7f6;
    color: var(--red);
    font-size: 0.74rem;
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
  }

  .category-nav a:hover {
    border-color: var(--red);
    background: var(--red);
    color: #fff;
  }

  .hero-market {
    margin-top: 12px;
    padding: 18px;
  }

  .intro-overlay::before,
  .intro-overlay::after {
    width: 96vw;
  }

  .hero-copy h1 {
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  .hero-product,
  .hero-product img {
    min-height: 250px;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

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

  .store-section {
    padding: 12px;
  }

  .product-card img {
    aspect-ratio: 1.05;
  }

  .product-body {
    padding: 10px;
  }

  .product-body h3 {
    margin-bottom: 5px;
    font-size: 0.82rem;
    line-height: 1.22;
  }

  .product-body p {
    display: none;
  }

  .tag {
    margin-bottom: 6px;
    padding: 3px 6px;
    font-size: 0.56rem;
  }

  .rating {
    font-size: 0.68rem;
  }

  .price {
    margin: 6px 0 8px;
    font-size: 0.86rem;
  }

  .inquiry-button {
    min-height: 32px;
    padding: 0 8px;
    border-radius: 16px;
    font-size: 0.72rem;
  }

  .section-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-actions {
    justify-content: stretch;
  }

  .contact-actions a {
    width: 100%;
  }

  .store-footer {
    align-items: stretch;
    flex-direction: column;
    padding: 22px 14px;
  }

  .footer-brand {
    flex-wrap: wrap;
    text-align: center;
  }

  .footer-credit {
    flex-direction: column;
    gap: 7px;
    width: 100%;
    text-align: center;
  }

  .footer-credit img {
    width: min(220px, 100%);
    height: 34px;
  }

  .detail-top-bar {
    grid-template-columns: 1fr;
  }

  .thumb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
