﻿body{
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    font-size: 16px;
    color: #1a1a1a;
    scroll-behavior: smooth; 
}

header, .sticky-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  background: white !important;
  z-index: 10000 !important;
  border-bottom: 1px solid #e0e0e0 !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05) !important;
  padding: 0 !important;
  height: 60px !important;
  overflow: visible !important;
}

.sticky-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  padding: 0 0.5rem;
}



.logo {
    display: flex;
    align-items: center;
    padding: 0 1.2rem;
    border-right: 1px solid #e8e8e8;
    flex-shrink: 0;
    height: 60px;
}
.logo a{
    text-decoration: none;
    color: #111;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: opacity 0.2s ease;
}
.logo a:hover {
  opacity: 0.75;
}
.logo h1 {
  margin: 0;
  padding: 0;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo img {
    width: 2rem;
    height: auto;
}




.menu{
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  overflow: visible; /* allow dropdowns to overflow and overlay content */
  -webkit-overflow-scrolling: touch;
  padding: 0;
  margin: 0;
  gap: 0;
  height: 60px;
  align-items: center;
}

/* Hide horizontal scrollbar but keep scroll behavior */
.menu {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}
.menu::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.menu li a{
  display: flex;
  align-items: center;
  color: #333;
  padding: 0 1rem;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
  height: 60px;
  transition: all 0.2s ease;
  position: relative;
}

.menu li a:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #d63f3f;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}

.menu li a:hover{
  color: #d63f3f;
}

.menu li a:hover:after {
  transform: scaleX(1);
  transform-origin: left;
}

.menu li{
  position: relative;
  height: 65px;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}



.submenu{
  display: none;
  position: absolute;
  background-color: white;
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
  border-radius: 8px;
  width: 210px;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  top: 100%; /* position immediately below the parent li */
  left: 0;
  border: 1px solid #f0f0f0;
  z-index: 10050; /* bring above other content */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
}

.dropdown:hover .submenu{
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Fallback: show submenu when parent has .open (used by JS for touch/hover) */
.dropdown.open .submenu {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

.submenu li {
  position: relative;
  margin: 0;
}

.submenu li a {
  color: #333;
  padding: 0.75rem 1.2rem;
  display: block;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  border-bottom: none;
  transition: all 0.15s ease;
  height: auto;
  position: relative;
}

.submenu li a:after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #d63f3f;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.2s ease;
}

.submenu li a:hover {
  color: #d63f3f;
  background-color: #fafafa;
  padding-left: 1.5rem;
}

.submenu li a:hover:after {
  transform: scaleY(1);
}

header, .menu {
  position: relative;
  z-index: 10;
}



.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex: 1 1 auto;
  gap: 0;
  height: 60px;
  min-width: 0;
}



.login {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 1.2rem;
  height: 60px;
  gap: 0;
}

.login a {
  color: #333;
  padding: 0 0.8rem;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  height: 60px;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  position: relative;
}

.login a:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #d63f3f;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}

.login a:hover {
  color: #d63f3f;
}

.login a:hover:after {
  transform: scaleX(1);
  transform-origin: left;
}



.user-info {
  position: fixed;
  bottom: auto;
  right: 20px;
  top: 70px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.7rem;
  background-color: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.user-info:hover {
  background-color: #f9f9f9;
  border-color: #d0d0d0;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.user-avatar {
  position: relative;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #d63f3f;
  flex-shrink: 0;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.admin-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #d63f3f;
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  font-weight: bold;
  border: 2px solid white;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: flex-start;
}

.user-name {
  margin: 0;
  font-weight: 600;
  color: #111;
  font-size: 0.8rem;
  white-space: nowrap;
  line-height: 1.1;
}

.admin-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: nowrap;
  align-items: center;
}

.user-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: nowrap;
  align-items: center;
}

.admin-btn {
  font-size: 0.6rem;
  color: white;
  background: #0056b3;
  text-decoration: none;
  font-weight: 600;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  display: inline-block;
  line-height: 1;
}

.admin-btn:hover {
  background: #003d82;
}

.chat-btn {
  font-size: 0.6rem;
  color: white;
  background: #667eea;
  text-decoration: none;
  font-weight: 600;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  display: inline-block;
  line-height: 1;
}

.chat-btn:hover {
  background: #5568d3;
}

.logout-btn {
  font-size: 0.6rem;
  color: white;
  background: #d63f3f;
  text-decoration: none;
  font-weight: 600;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  display: inline-block;
  line-height: 1;
}

.logout-btn:hover {
  background: #b83030;
}



.carpreview {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 10px;
  width: 250px;
  z-index: 10060;
}

.carpreview img {
  width: 100%;
}

.carpreview p {
  margin: 5px;
  font-size: 12px;
  color: #000000;
}

.submenu li:hover .carpreview {
  display: block;
}



.divider {
  height: 2px;
  background: rgb(219,214,214);
  margin: 20px 10px;
  border-radius: 2px;
}



#SpecialCars{
  position: relative;
  width: 90%;
  max-width: 1200px;
  margin: 30px auto 40px auto;
  overflow: hidden;
}

#SpecialCars img{
  width: 100%;
  border-radius: 10px;
  display: block;
  transition: transform 0.4s;
}

/* Carousel image sizing */
.carousel-item {
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-item img {
  max-height: 340px; /* limit height so whole car is visible */
  width: auto;
  object-fit: contain; /* show whole image */
  border-radius: 10px;
}

@media (max-width: 992px) {
  .carousel-item img {
    max-height: 260px;
  }
}

@media (max-width: 576px) {
  .carousel-item img {
    max-height: 200px;
  }
}

/* Make carousel and info-column stretch to same height using flexbox */
.row.g-3.align-items-stretch {
  align-items: stretch;
}

.col-md-8 > .carousel, .col-md-4 > .info-column {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.col-md-8 > .carousel .carousel-inner,
.col-md-8 > .carousel .carousel-item {
  height: 100%;
}

.col-md-8 > .carousel .carousel-item {
  display: flex;
  align-items: center;
  justify-content: center;
}

.col-md-8 > .carousel .carousel-item img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

/* Ensure the featured/card row stays aligned */
.card .row.align-items-stretch {
  align-items: center;
}

/* Limit width of the carousel to avoid overflowing the column */
#SpecialCars {
  max-width: 100%;
  overflow: hidden;
}

/* Make the info panels a fixed max width so they don't wrap under the carousel */
.card .col-md-4 {
  max-width: 420px;
}

/* Info column sizing to match carousel heights */
.info-column {
  max-width: 420px;
  display: flex;
  flex-direction: column;
}

.info-column .d-flex {
  flex: 1 1 auto;
  width: 100%;
  justify-content: space-between;
}

/* Match the carousel image heights previously set */
@media (min-width: 993px) {
  .info-column { min-height: 360px; }
}

@media (max-width: 992px) {
  .info-column { min-height: 260px; }
}

@media (max-width: 576px) {
  .info-column { min-height: 200px; }
}



#SpecialCars:hover img{
  transform: scale(1.05);
}



.text-overlay{
  position: absolute;
  top: 50%;
  left: -300px;
  font-size: 70%;
  
  width: 300px;

  
  color: white;

  padding: 20px;
  border-radius: 10px;

  transition: 0.4s;
}



#SpecialCars:hover .text-overlay{
  left: 1px;
}

.text-overlay h3{
  margin-top: 0;
}

.text-overlay p{
  margin: 5px 0;
}



.submenu{
  text-align: center;
  padding: 20px;
  font-weight: bold;
  font-size: 150%;
  margin-bottom: 40px;
}
.information{
  display: flex;
  justify-content: center;
  gap: 30px;
  top: 60px; /* position below header/menu */
  max-width: 1200px;
  margin: auto;
}

.subinfor{
  width: 350px;
  border-radius: 10px;
  overflow: hidden;
  background: white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: transform 0.3s, box-shadow 0.3s;
}

.subinfor:hover{
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.subinfor img{
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.control{
  padding: 15px;
  text-align: center;
}

.control h3{
  margin-bottom: 15px;
}

.control button{
  padding: 10px 20px;
  border: none;
  background: #b00;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

.control button:hover{
  background: black;
}







.show{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 90%;
  max-width: 1400px;
  margin: auto;
  padding: 20px 0;
}
.show a
{
    text-decoration: none;
    color: black;
}

.car {
  overflow: hidden;
  background: #f9f9f9;
  border-radius: 8px;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.car:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.car img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.carinfo {
  padding: 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.carinfo h3 {
  font-size: 1.1rem;
  margin: 0 0 10px 0;
  color: #b00;
}

.carinfo p {
  margin: 5px 0;
  font-size: 0.9rem;
}


@media (max-width: 1280px) {
  .show {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .show {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .show {
    grid-template-columns: 1fr;
  }
  
  .car img {
    height: 200px;
  }
}



html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
section {
  flex: 1;
}


footer {
  text-align: left;
  padding: 20px;
  background: #f1f1f1;
  margin-top: auto;
}



section {
  margin-top: 60px; /* match screenshot: shorter gap */
}


@media (max-width: 768px) {
  header {
    height: 50px;
    padding: 0 0.5rem;
  }

  .logo {
    padding: 0 0.8rem;
    height: 50px;
  }

  .logo h1 {
    font-size: 1.1rem;
  }

  .logo img {
    width: 1.8rem;
  }

  .menu {
    height: 50px;
  }

  .menu li a {
    padding: 0 0.8rem;
    font-size: 0.9rem;
    height: 50px;
  }

  .menu li {
    height: 50px;
  }

  .submenu {
    top: 50px;
    width: 180px;
  }

  .login {
    margin-right: 0.8rem;
    height: 50px;
  }

  .login a {
    padding: 0 0.6rem;
    font-size: 0.85rem;
    height: 50px;
  }

  .user-info {
    top: 60px;
    right: 10px;
    padding: 0.3rem 0.5rem;
  }

  .user-avatar {
    width: 1.5rem;
    height: 1.5rem;
  }

  .user-name {
    font-size: 0.75rem;
  }

  .admin-btn, .logout-btn {
    font-size: 0.55rem;
    padding: 0.15rem 0.3rem;
  }

  section {
    margin-top: 48px;
  }
}

@media (max-width: 480px) {
  header {
    height: 45px;
  }

  .logo {
    padding: 0 0.6rem;
    height: 45px;
  }

  .logo h1 {
    font-size: 1rem;
  }

  .logo img {
    width: 1.6rem;
  }

  .menu {
    height: 45px;
  }

  .menu li a {
    padding: 0 0.6rem;
    font-size: 0.85rem;
    height: 45px;
  }

  .menu li {
    height: 45px;
  }

  .submenu {
    top: 45px;
    width: 160px;
  }

  .login {
    margin-right: 0.6rem;
    height: 45px;
  }

  .login a {
    padding: 0 0.5rem;
    font-size: 0.8rem;
    height: 45px;
  }

  .user-info {
    top: 55px;
    right: 5px;
  }

  section {
    margin-top: 32px;
  }
}

/* Align 'Tìm hiểu thêm' content to the right on larger screens */
@media (min-width: 992px) {
  .card .col-lg-4 .subinfor {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    background: transparent;
    padding: 0;
  }

  .card .col-lg-4 .subinfor .control {
    align-self: flex-end;
  }
}

/* Center 'Tìm hiểu thêm' content on smaller screens */
@media (max-width: 991px) {
  .card .col-lg-4 .subinfor {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .card .col-lg-4 .subinfor .control {
    align-self: center;
  }
}

/* ============ FLOATING CHAT BUTTON ============ */
.floating-chat-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
  z-index: 999;
  transition: all 0.3s ease;
  color: white;
  border: none;
  cursor: pointer;
  animation: float 3s ease-in-out infinite;
}

.floating-chat-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
  bottom: 35px;
}

.floating-chat-btn:active {
  transform: scale(0.95);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@media (max-width: 768px) {
  .floating-chat-btn {
    bottom: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
    font-size: 24px;
  }

  .floating-chat-btn:hover {
    bottom: 25px;
  }
}

@media (max-width: 480px) {
  .floating-chat-btn {
    bottom: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .floating-chat-btn:hover {
    bottom: 20px;
  }
}
