/*
Theme Name: WP Dealer Modern
Theme URI: https://www.troyarya.my.id
Author: Troyarya
Description: Tema WordPress Dealer Otomotif (Rebuild Modern & Ringan)
Version: 1.0
Text Domain: wpdealer
*/

:root {
  --primary: #cc0000;
  --primary-dark: #990000;
  --dark: #1a1a1a;
  --light: #f5f5f5;
  --text: #333333;
  --border: #e0e0e0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--text); line-height: 1.6; background: #fff; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.site-logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.main-nav ul { display: flex; list-style: none; gap: 25px; font-weight: 600; }
.main-nav a:hover { color: var(--primary); }

/* Grid Katalog */
.section-padding { padding: 50px 0; }
.section-title { font-size: 1.8rem; margin-bottom: 25px; border-left: 4px solid var(--primary); padding-left: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }
.card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; transition: transform 0.2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 6px 18px rgba(0,0,0,0.08); }
.card-body { padding: 20px; }
.card-title { font-size: 1.2rem; margin-bottom: 8px; }
.card-price { color: var(--primary); font-weight: 700; font-size: 1.1rem; margin-bottom: 15px; }
.btn { display: inline-block; background: var(--primary); color: #fff; padding: 10px 18px; border-radius: 5px; font-weight: 600; text-align: center; }
.btn:hover { background: var(--primary-dark); }
.btn-wa { background: #25D366; }
.btn-wa:hover { background: #1ebe5d; }

/* Footer */
.site-footer { background: var(--dark); color: #ccc; padding: 40px 0 20px; margin-top: 60px; }

/* Floating WhatsApp Button */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #fff;
  padding: 12px 18px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s, background 0.2s;
}
.wa-float:hover {
  background: #1ebe5d;
  transform: translateY(-3px);
}
.wa-float svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .wa-float { bottom: 16px; right: 16px; padding: 11px 15px; font-size: 0.88rem; }
}

/* Warna Link Global & Konten */
a {
  color: var(--primary);
  transition: color 0.2s ease;
}
a:hover,
a:focus {
  color: var(--primary-dark);
}

/* Pertahankan warna khusus untuk tombol, logo, dan navigasi */
.btn,
.btn:hover,
.wa-float,
.wa-float:hover {
  color: #ffffff;
}
.site-logo,
.main-nav a,
.card-title a,
.pl-unit-cell a {
  color: inherit;
}
.main-nav a:hover,
.card-title a:hover,
.pl-unit-cell a:hover {
  color: var(--primary);
}
.entry-content a {
  text-decoration: underline;
  font-weight: 600;
}

/* Penyesuaian Sticky Header saat Admin Bar WordPress aktif */
body.admin-bar .site-header {
  top: 32px;
}
@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

/* Tombol Hamburger Mobile (Default tersembunyi di desktop) */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  padding: 8px;
}
.hamburger-bar {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-toggle.is-active .hamburger-bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.menu-toggle.is-active .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-active .hamburger-bar:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Submenu Desktop */
.main-nav ul li {
  position: relative;
}
.main-nav ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  padding: 8px 0;
  flex-direction: column;
  gap: 0;
  z-index: 150;
}
.main-nav ul li:hover > ul {
  display: flex;
}
.main-nav ul ul a {
  display: block;
  padding: 10px 16px;
  font-size: 0.92rem;
}
.main-nav ul ul a:hover {
  background: var(--light);
}

/* =========================================================
   RESPONSIVE BREAKPOINTS (Tablet & Ponsel)
   ========================================================= */
@media (max-width: 768px) {
  .header-inner {
    height: 64px;
    position: relative;
  }
  .site-logo {
    font-size: 1.15rem;
    max-width: calc(100% - 55px);
    line-height: 1.25;
  }
  .menu-toggle {
    display: flex;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid var(--border);
    border-bottom: 2px solid var(--primary);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    padding: 10px 20px 18px;
    z-index: 200;
  }
  .main-nav.is-open {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }
  .main-nav ul li {
    border-bottom: 1px solid var(--light);
  }
  .main-nav ul li:last-child {
    border-bottom: none;
  }
  .main-nav a {
    display: block;
    padding: 12px 4px;
    font-size: 1rem;
  }
  .main-nav ul ul {
    position: static;
    display: flex;
    box-shadow: none;
    border: none;
    padding: 0 0 8px 16px;
    background: transparent;
  }

  /* Penyesuaian Section, Hero & Grid di Layar Kecil */
  .section-padding {
    padding: 35px 0;
  }
  .section-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
  }
  .site-main > section:first-child {
    padding: 45px 0 !important;
  }
  .site-main > section:first-child h1 {
    font-size: 1.7rem !important;
    line-height: 1.3;
  }
  .site-main > section:first-child p {
    font-size: 0.98rem !important;
  }
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================================================
   MODERN HERO BANNER SECTION
   ========================================================= */
.hero-banner {
  background: radial-gradient(circle at top right, #4a0000 0%, #1a1a1a 55%, #111111 100%);
  color: #ffffff;
  padding: 64px 0;
  border-bottom: 3px solid var(--primary);
}
.hero-grid {
  display: grid;
  gap: 36px;
  align-items: center;
}
.hero-grid.has-image {
  grid-template-columns: 1.1fr 0.9fr;
}
.hero-grid.no-image {
  grid-template-columns: 1fr;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  background: rgba(204, 0, 0, 0.25);
  border: 1px solid rgba(255, 80, 80, 0.45);
  color: #ffcccc;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 5px 12px;
  border-radius: 50px;
  margin-bottom: 14px;
}
.hero-title {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
  color: #ffffff;
}
.hero-subtitle {
  font-size: 1.05rem;
  color: #d8d8d8;
  line-height: 1.65;
  margin-bottom: 26px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-grid.no-image .hero-actions {
  justify-content: center;
}
.hero-actions .btn {
  padding: 12px 22px;
  font-size: 0.95rem;
}
.hero-media {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  background: #222222;
}
.hero-media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

@media (max-width: 768px) {
  .hero-banner {
    padding: 36px 0 42px;
  }
  .hero-grid.has-image {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .hero-media {
    order: -1;
  }
  .hero-title {
    font-size: 1.65rem;
  }
  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
  }
}

/* =========================================================
   TIPOGRAFI GLOBAL: GOOGLE FONT RUBIK
   ========================================================= */
body,
button,
input,
select,
textarea,
h1, h2, h3, h4, h5, h6 {
  font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* =========================================================
   FULL-WIDTH IMAGE BANNER SLIDER
   ========================================================= */
.hero-slider-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #111111;
}
.hero-slider-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
}
.hero-slide {
  min-width: 100%;
  width: 100%;
  flex-shrink: 0;
}
.hero-slide img {
  width: 100%;
  height: auto;
  max-height: 620px;
  object-fit: cover;
  display: block;
}
.hero-slide-placeholder {
  padding: 90px 20px;
  text-align: center;
  color: #ffffff;
  background: linear-gradient(135deg, #1a1a1a 0%, #3a0000 100%);
}
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: #222222;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  transition: background 0.2s, transform 0.2s;
}
.slider-arrow:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.06);
}
.slider-prev { left: 18px; }
.slider-next { right: 18px; }
.slider-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 20px;
}
.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.slider-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.2);
}
@media (max-width: 768px) {
  .slider-arrow {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  .slider-prev { left: 10px; }
  .slider-next { right: 10px; }
  .slider-dots { bottom: 10px; gap: 6px; padding: 4px 10px; }
  .slider-dot { width: 8px; height: 8px; }
}

/* Single-Slide Fade Transition */
.hero-slides-stage {
  position: relative;
  width: 100%;
}
.hero-single-slide {
  display: none;
  width: 100%;
  animation: fadeSlide 0.5s ease;
}
.hero-single-slide.is-active {
  display: block;
}
.hero-single-slide img {
  width: 100%;
  height: auto;
  max-height: 620px;
  object-fit: cover;
  display: block;
}
@keyframes fadeSlide {
  from { opacity: 0.35; }
  to   { opacity: 1; }
}
