/* ============================================
   Nissan คุณเล็ก — Blue Technology Theme
   ============================================ */

:root {
  --primary: #0A3D91;
  --secondary: #1565C0;
  --accent: #1E88E5;
  --bg: #F5F8FC;
  --dark: #071F47;
  --text: #21324e;
  --muted: #6b7c99;
  --radius: 16px;
  --shadow-sm: 0 2px 12px rgba(10, 61, 145, .08);
  --shadow-md: 0 10px 30px rgba(10, 61, 145, .14);
  --shadow-lg: 0 24px 60px rgba(7, 31, 71, .22);
  --grad: linear-gradient(135deg, var(--primary), var(--accent));
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Prompt', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

::selection { background: var(--accent); color: #fff; }

/* ---------- Top Bar ---------- */
.topbar {
  background: var(--dark);
  color: #cfe0f7;
  font-size: .85rem;
  padding: .45rem 0;
}
.topbar-link { color: #cfe0f7; text-decoration: none; transition: color .2s; }
.topbar-link:hover { color: #fff; }
.topbar-social {
  color: #cfe0f7; width: 26px; height: 26px; display: inline-flex;
  align-items: center; justify-content: center; border-radius: 50%;
  transition: all .25s;
}
.topbar-social:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }

/* ---------- Navbar ---------- */
.main-nav {
  background: rgba(10, 61, 145, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 24px rgba(7, 31, 71, .25);
  padding: .7rem 0;
}
.brand-badge {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, #fff, #dbeafe);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.5rem;
  box-shadow: inset 0 0 0 2px rgba(10,61,145,.15);
}
.brand-text { color: #fff; font-weight: 700; font-size: 1.15rem; }
.main-nav .nav-link {
  color: rgba(255,255,255,.82); font-weight: 500;
  padding: .55rem 1.05rem !important; border-radius: 10px;
  transition: all .25s;
}
.main-nav .nav-link:hover,
.main-nav .nav-link.active { color: #fff; background: rgba(255,255,255,.12); }
.btn-call {
  background: linear-gradient(135deg, #1E88E5, #42a5f5);
  color: #fff; font-weight: 600; border-radius: 50px;
  padding: .55rem 1.4rem; border: 0;
  box-shadow: 0 6px 18px rgba(30,136,229,.45);
  transition: all .25s;
}
.btn-call:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(30,136,229,.6); }

/* ---------- Buttons ---------- */
.btn-accent {
  background: var(--grad); color: #fff; border: 0; border-radius: 50px;
  font-weight: 600; padding: .7rem 1.8rem;
  box-shadow: 0 8px 22px rgba(10,61,145,.35);
  transition: all .3s;
}
.btn-accent:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 14px 32px rgba(10,61,145,.45); }
.btn-ghost {
  background: rgba(255,255,255,.12); color: #fff;
  border: 1.5px solid rgba(255,255,255,.55); border-radius: 50px;
  font-weight: 600; padding: .7rem 1.8rem;
  backdrop-filter: blur(8px);
  transition: all .3s;
}
.btn-ghost:hover { background: #fff; color: var(--primary); }
.btn-outline-blue {
  border: 1.5px solid var(--secondary); color: var(--secondary);
  border-radius: 50px; font-weight: 500; transition: all .25s;
}
.btn-outline-blue:hover { background: var(--secondary); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    linear-gradient(100deg, rgba(7,31,71,.93) 30%, rgba(10,61,145,.72) 60%, rgba(30,136,229,.42)),
    url('../img/hero-bg.webp') center/cover no-repeat;
  padding: 7rem 0 8.5rem;
}
.hero::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 140px;
  background: radial-gradient(70% 120px at 50% 100%, rgba(30,136,229,.35), transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3);
  backdrop-filter: blur(8px); border-radius: 50px;
  padding: .4rem 1.1rem; font-size: .9rem; margin-bottom: 1.2rem;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; line-height: 1.15; }
.hero .highlight {
  background: linear-gradient(90deg, #FFDF00, #FFB700);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: #d5e5fb; font-size: 1.15rem; font-weight: 300; }
.hero-check { color: #e3f0ff; font-weight: 400; }
.hero-check .bi { color: #4fc3f7; }

/* ---------- Search Box (glass) ---------- */
.search-box {
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.4rem;
  margin-top: -4.5rem;
  position: relative; z-index: 5;
}
.search-box .form-select, .search-box .form-control {
  border-radius: 10px; border-color: #dde7f5; padding: .65rem .9rem;
}
.search-box .form-select:focus, .search-box .form-control:focus {
  border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(30,136,229,.15);
}

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
.section-head { margin-bottom: 2.5rem; }
.section-head .eyebrow {
  color: var(--accent); font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; font-size: .8rem;
}
.section-head h2 { font-weight: 700; color: var(--dark); font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-head .line {
  width: 64px; height: 4px; border-radius: 4px; background: var(--grad); margin-top: .8rem;
}

/* ---------- Car Card ---------- */
.car-card {
  background: #fff; border: 0; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .35s ease, box-shadow .35s ease;
  height: 100%;
}
.car-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.car-card .img-wrap { position: relative; overflow: hidden; aspect-ratio: 16/10; background: #e8eff9; }
.car-card .img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease;
}
.car-card:hover .img-wrap img { transform: scale(1.07); }
.car-card .badge-cat {
  position: absolute; top: 12px; left: 12px;
  background: rgba(7,31,71,.75); backdrop-filter: blur(6px);
  color: #fff; font-size: .75rem; font-weight: 500;
  border-radius: 50px; padding: .3rem .8rem;
}
.car-card .card-body { padding: 1.25rem; }
.car-card h3 { font-size: 1.1rem; font-weight: 600; color: var(--dark); margin-bottom: .3rem; }
.car-card .price-label { font-size: .78rem; color: var(--muted); }
.car-card .price { color: var(--secondary); font-weight: 800; font-size: 1.35rem; }
.car-card .specs { font-size: .8rem; color: var(--muted); display: flex; gap: 1rem; margin: .5rem 0 1rem; }

/* ---------- Promo Banner ---------- */
.promo-banner {
  background:
    radial-gradient(600px 300px at 85% 20%, rgba(30,136,229,.4), transparent),
    linear-gradient(120deg, var(--dark), var(--primary));
  border-radius: 24px; color: #fff; overflow: hidden;
  padding: 3rem; position: relative;
  box-shadow: var(--shadow-lg);
}
.promo-banner .display-zero {
  font-size: clamp(3.5rem, 8vw, 6rem); font-weight: 800; line-height: 1;
  background: linear-gradient(90deg, #4fc3f7, #90caf9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.promo-chip {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(6px); border-radius: 50px;
  padding: .5rem 1.2rem; display: inline-flex; align-items: center; gap: .5rem;
}

/* ---------- Why Us ---------- */
.why-card {
  background: #fff; border-radius: var(--radius); padding: 1.8rem 1.4rem;
  text-align: center; height: 100%;
  box-shadow: var(--shadow-sm);
  transition: transform .3s, box-shadow .3s;
}
.why-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.why-icon {
  width: 64px; height: 64px; margin: 0 auto 1rem;
  border-radius: 18px; background: linear-gradient(135deg, #e3f0ff, #f0f7ff);
  display: flex; align-items: center; justify-content: center;
  color: var(--secondary); font-size: 1.7rem;
  transition: all .3s;
}
.why-card:hover .why-icon { background: var(--grad); color: #fff; transform: rotate(-6deg) scale(1.05); }
.why-card h3 { font-size: 1rem; font-weight: 600; color: var(--dark); }
.why-card p { font-size: .85rem; color: var(--muted); margin: 0; }

/* ---------- Finance Calculator ---------- */
.calc-card {
  background: #fff; border-radius: 24px; box-shadow: var(--shadow-md);
  overflow: hidden;
}
.calc-side {
  background: linear-gradient(160deg, var(--primary), var(--dark));
  color: #fff; padding: 2.5rem; height: 100%;
}
.calc-result {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(8px); border-radius: 16px; padding: 1.5rem; text-align: center;
}
.calc-result .amount { font-size: 2.6rem; font-weight: 800; color: #4fc3f7; }

/* ---------- Contact ---------- */
.contact-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 1.5rem; height: 100%;
  transition: transform .3s, box-shadow .3s;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.map-wrap {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  min-height: 320px;
}
.map-wrap iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }

/* ---------- Detail page ---------- */
.gallery-main {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  aspect-ratio: 16/10; background: #e8eff9;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb {
  border-radius: 10px; overflow: hidden; cursor: pointer; aspect-ratio: 16/10;
  border: 2px solid transparent; transition: all .2s; background: #e8eff9;
}
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.spec-table td { padding: .6rem .4rem; border-bottom: 1px dashed #e2eaf6; }

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(180deg, var(--dark), #04122b);
  color: #b9cbe8; padding: 3.5rem 0 0; margin-top: 4rem;
}
.footer-heading { color: #fff; font-weight: 600; margin-bottom: 1rem; }
.footer-text { font-size: .9rem; color: #9db4d8; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .55rem; font-size: .9rem; }
.footer-links a { color: #9db4d8; text-decoration: none; transition: color .2s, padding-left .2s; }
.footer-links a:hover { color: #4fc3f7; padding-left: 4px; }
.footer-social {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,.08); color: #cfe0f7;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .25s;
}
.footer-social:hover { background: var(--accent); color: #fff; transform: translateY(-3px); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 2.5rem; padding: 1.2rem 0; font-size: .82rem; color: #7d94ba;
}
.footer-bottom a { color: #7d94ba; text-decoration: none; }
.footer-bottom a:hover { color: #4fc3f7; }

/* ---------- Floating Call & LINE ---------- */
.floating-contact-wrap {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.floating-line {
  width: 56px; height: 56px; border-radius: 50%;
  background: #06C755; color: #fff; font-size: 1.6rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(6, 199, 85, .45);
  text-decoration: none;
  transition: transform 0.25s ease;
  animation: pulse-line 2.2s infinite;
}
.floating-line:hover { color: #fff; transform: scale(1.1); }

.floating-call {
  position: relative;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(10,61,145,.5);
  animation: pulse 2.2s infinite;
}
.floating-call:hover { color: #fff; }

@keyframes pulse-line {
  0%, 100% { box-shadow: 0 8px 22px rgba(6, 199, 85, .45), 0 0 0 0 rgba(6, 199, 85, .4); }
  50% { box-shadow: 0 8px 22px rgba(6, 199, 85, .45), 0 0 0 12px rgba(6, 199, 85, 0); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 10px 26px rgba(10,61,145,.5), 0 0 0 0 rgba(30,136,229,.5); }
  50% { box-shadow: 0 10px 26px rgba(10,61,145,.5), 0 0 0 14px rgba(30,136,229,0); }
}

/* ---------- Cookie consent ---------- */
.cookie-consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1060;
  background: rgba(7,31,71,.95); backdrop-filter: blur(10px);
  color: #dbe7fa; padding: 1rem 0; font-size: .9rem;
  box-shadow: 0 -8px 30px rgba(0,0,0,.25);
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(120deg, var(--dark), var(--primary) 70%, var(--secondary));
  color: #fff; padding: 4rem 0 3rem;
}
.page-hero h1 { font-weight: 700; }
.breadcrumb-item a { color: #9cc4f5; text-decoration: none; }
.breadcrumb-item.active { color: #dbe7fa; }
.breadcrumb-item + .breadcrumb-item::before { color: #6d90c4; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .main-nav .navbar-collapse { padding: 1rem 0; }
  .btn-call { margin-top: .5rem; display: inline-flex; }
  .hero { padding: 4.5rem 0 7rem; }
  .promo-banner { padding: 2rem; }
}
@media (max-width: 575px) {
  .search-box { margin-top: -3.2rem; }
  .section { padding: 3rem 0; }
}

/* ---------- Hero Carousel / Banners ---------- */
/* ---------- Hero Carousel / Banners ---------- */
.hero-side-carousel {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid rgba(255, 255, 255, 0.15);
  background-color: rgba(7, 31, 71, 0.5);
  backdrop-filter: blur(4px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-side-carousel:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 70px rgba(7, 31, 71, 0.4);
}

.hero-banner-img {
  width: 100%;
  height: auto;
  display: block;
}

#heroCarousel .carousel-indicators [data-bs-target] {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  border: 2px solid transparent;
  transition: all 0.3s ease;
  margin: 0 4px;
}

#heroCarousel .carousel-indicators .active {
  width: 20px;
  border-radius: 4px;
  background-color: var(--accent);
}

.carousel-control-prev-icon-custom,
.carousel-control-next-icon-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(7, 31, 71, 0.4);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.25rem;
  transition: all 0.25s ease;
}

.carousel-control-prev:hover .carousel-control-prev-icon-custom,
.carousel-control-next:hover .carousel-control-next-icon-custom {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: scale(1.1);
}
