/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
   GLOBAL (PREMIUM DARK)
========================= */

:root {
  --bg-dark: #0a0a0a;
  --bg-card: #141414;
  --text-main: #e0e0e0;
  --text-muted: #888;
  --accent-gold: #d4af37;
  /* Luxury Gold */
  --accent-silver: #c0c0c0;
  --border-color: rgba(255, 255, 255, 0.1);
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  letter-spacing: 0.5px;
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
.logo,
.nav a {
  text-transform: uppercase;
  letter-spacing: 2px;
}

.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

@media (max-width: 900px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }
}

/* =========================
   HEADER
========================= */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 60px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(10, 10, 10, 0.95);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 4px;
}

.logo-glow {
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
  transition: filter 0.3s ease;
}

.logo-glow:hover {
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.7));
}

.nav a {
  margin-left: 40px;
  text-decoration: none;
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.3s;
}

.nav a:hover {
  color: var(--accent-gold);
}

.lang-switch {
  display: inline-block;
  margin-left: 20px;
  font-size: 11px;
  color: #666;
}

.lang-switch span {
  cursor: pointer;
  padding: 0 5px;
  transition: color 0.3s;
}

.lang-switch span.active {
  color: var(--accent-gold);
  font-weight: bold;
}

.lang-switch span:hover {
  color: #fff;
}

/* Hamburger Icon */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: #fff;
  transition: all 0.3s ease;
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* WhatsApp Float */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: white;
  padding: 10px 20px;
  border-radius: 50px;
  display: none;
  /* Hidden on desktop */
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  transition: transform 0.3s, box-shadow 0.3s;
}

.whatsapp-float:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-float img {
  width: 24px;
  height: 24px;
}

/* =========================
   HERO
========================= */

.hero {
  height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: radial-gradient(circle at center, #1a1a1a 0%, #000 70%);
}

.hero-inner h1 {
  font-size: 72px;
  font-weight: 300;
  margin-bottom: 20px;
  background: -webkit-linear-gradient(#fff, #999);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-inner p {
  font-size: 14px;
  color: var(--accent-gold);
  letter-spacing: 3px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.hero-btn {
  display: inline-block;
  margin-top: 40px;
  padding: 15px 50px;
  border: 1px solid var(--accent-gold);
  background: rgba(0, 0, 0, 0.5);
  /* Make it slightly visible always */
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 2px;
  transition: all 0.3s;
}

.hero-btn:hover {
  background: var(--accent-gold);
  color: #000;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* =========================
   SHOWROOM & CARDS (Updated)
========================= */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  /* Smaller cards */
  gap: 30px;
  padding: 0 40px 80px;
}

.vehicle {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  /* For hover zoom constraint */
}

.vehicle:hover {
  transform: translateY(-5px);
  border-color: var(--accent-gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.vehicle-img {
  height: 220px;
  overflow: hidden;
}

.vehicle-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.vehicle:hover .vehicle-img img {
  transform: scale(1.05);
}

.vehicle-info {
  padding: 25px;
}

.vehicle-info h3 {
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 5px;
  color: #fff;
}

.vehicle-info .price {
  font-size: 16px;
  color: var(--accent-gold);
  font-weight: bold;
  margin-bottom: 15px;
}

.vehicle-info a {
  text-decoration: none;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.vehicle-info a:hover {
  color: #fff;
}

/* =========================
   ADMIN PANEL
========================= */

.admin-body {
  background: #111;
  color: #ddd;
}

.admin-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.admin-title {
  font-size: 24px;
  margin-bottom: 30px;
  color: #fff;
  border-left: 3px solid var(--accent-gold);
  padding-left: 15px;
}

.form {
  background: #1a1a1a;
  padding: 30px;
  border: 1px solid #333;
}

input,
select,
textarea {
  background: #000;
  border: 1px solid #333;
  color: #fff;
  padding: 12px;
  border-radius: 2px;
  width: 100%;
  font-size: 14px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}

button {
  background: var(--accent-gold);
  color: #000;
  padding: 12px 30px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 12px;
  transition: all 0.3s ease;
  border-radius: 4px;
}

button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.admin-item {
  background: #1a1a1a;
  border-bottom: 1px solid #333;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* =========================
   ADMIN PANEL GRID
========================= */

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.admin-card {
  background: #1a1a1a;
  border: 1px solid #333;
  padding: 0;
  /* Image flush */
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.admin-card:hover {
  transform: scale(1.02);
  border-color: var(--accent-gold);
  z-index: 2;
}

.admin-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-bottom: 1px solid #333;
}

.admin-card-info {
  padding: 15px;
}

.admin-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-card-actions {
  margin-top: 10px;
  display: flex;
  gap: 5px;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.admin-card:hover .admin-card-actions {
  opacity: 1;
}

.admin-card-actions button {
  font-size: 10px;
  padding: 6px 10px;
}

/* =========================
   DETAIL PAGE (Generic)
========================= */
/* Will be specific in car.html but defaults here */
table {
  width: 100%;
  border-collapse: collapse;
}

td {
  padding: 15px;
  border-bottom: 1px solid #333;
}

tr:last-child td {
  border-bottom: none;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
  .header {
    padding: 15px 25px;
    flex-direction: row;
    /* Keep logo and hamburger horizontal */
    justify-content: space-between;
  }

  .hamburger {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    /* Cover full height now */
    left: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(15px);
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    /* Center everything vertically */
    padding: 40px;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
  }

  .nav.active {
    left: 0;
  }

  .nav a {
    margin: 10px 0;
    font-size: 22px;
    font-weight: 300;
    width: 100%;
    text-align: center;
    color: #fff;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav .lang-switch {
    margin-left: 0;
    margin-top: 30px;
    font-size: 16px;
    display: flex;
    flex-direction: column !important;
    /* Force vertical stacking */
    gap: 15px;
    color: transparent;
    /* Hide the separator pipes | */
  }

  .nav .lang-switch span {
    color: var(--text-muted);
    font-size: 18px;
  }

  .nav .lang-switch span.active {
    color: var(--accent-gold);
  }

  .hero-inner h1 {
    font-size: 36px;
  }

  .hero-inner p {
    font-size: 11px;
  }

  .row {
    grid-template-columns: 1fr;
  }

  /* Stacking contact page and detail page grids */
  .admin-container[style*="grid-template-columns"],
  .admin-container[style*="display:grid"] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* Slider titles on mobile */
  #sliderTitle {
    font-size: 32px !important;
  }

  #sliderSub1,
  #sliderSub2 {
    font-size: 11px !important;
  }

  /* WhatsApp bubble redesign - Premium Message Bubble Look */
  .whatsapp-label {
    display: none !important;
  }

  .whatsapp-float {
    width: 60px;
    height: 60px;
    padding: 0;
    bottom: 30px;
    right: 25px;
    display: flex;
    /* Visible on mobile */
    align-items: center;
    justify-content: center;
    /* Create a message bubble shape with a small tail effect */
    border-radius: 50% 50% 4px 50%;
    background: #25d366;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    border: none;
    animation: bubbleUp 0.5s ease-out;
  }

  @keyframes bubbleUp {
    from {
      transform: scale(0.5);
      opacity: 0;
    }

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

  .whatsapp-float img {
    width: 32px;
    height: 32px;
  }
}