/* Optimized CSS for Home Page */

/* Font and smooth scroll */
* {
  font-family: 'Poppins', sans-serif;
}

html {
  scroll-behavior: smooth;
}

/* Card hover effects */
.car-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.car-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.car-card:active {
  transform: translateY(-3px);
}

/* Page transition overlay */
.page-transition {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(29, 78, 216, 0.25) 50%, rgba(139, 92, 246, 0.15) 100%);
  backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-transition.active {
  opacity: 1;
  visibility: visible;
}

.loading-logo {
  width: 180px;
  height: 180px;
  animation: logoFloat 2s ease-in-out infinite;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.2));
}

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

/* WhatsApp floating button */
.whats-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  overflow: hidden;
}

.whats-float:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
}

.whats-float a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: white;
  position: relative;
}

.whats-float i {
  font-size: 28px;
}

.whats-float::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

.whats-float::after {
  content: 'Chat dengan kami';
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.whats-float:hover::after {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .whats-float {
    bottom: 15px;
    right: 15px;
    width: 55px;
    height: 55px;
  }
  
  .whats-float i {
    font-size: 24px;
  }
}

/* Car Detail Modal */
.car-image-container {
  position: relative;
  background: white;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 16px;
  border: 1px solid #f1f3f4;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.car-image {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

.car-image-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.car-image-container:hover .car-image {
  transform: scale(1.02);
}

.price-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #3b82f6;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.75rem;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  z-index: 10;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.info-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #f1f3f4;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-title i {
  color: #667eea;
  font-size: 1.1rem;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.feature-item:hover {
  background: #e2e8f0;
  transform: translateX(4px);
}

.feature-text {
  color: #4a5568;
  font-weight: 500;
  font-size: 0.8125rem;
}

.description-card {
  background: linear-gradient(135deg, #f7fafc, #edf2f7);
  border-left: 4px solid #667eea;
}

.terms-card {
  background: linear-gradient(135deg, #fff5f5, #fed7d7);
  border-left: 4px solid #f56565;
}

.terms-card .card-title {
  color: #c53030;
}

.terms-card .card-title i {
  color: #f56565;
}

.terms-list {
  color: #744210;
  line-height: 1.8;
}

.terms-list li {
  margin-bottom: 8px;
  position: relative;
  padding-left: 20px;
}

.terms-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #f56565;
  font-weight: bold;
}

/* Location Badge */
.location-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: #1e40af;
}

.location-badge i {
  width: 16px;
  height: 16px;
  color: #3b82f6;
}

.location-badge strong {
  font-weight: 600;
  color: #1e3a8a;
}

/* Add-on Section - Small */
.addon-card-small {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.75rem 1rem;
}

.addon-item-small {
  margin: 0;
}

.addon-content-small {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.addon-info-small {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.addon-icon-small {
  width: 14px;
  height: 14px;
  color: #3b82f6;
  flex-shrink: 0;
}

.addon-name-small {
  font-weight: 500;
  color: #475569;
  font-size: 0.8125rem;
}

.addon-price-small {
  font-weight: 600;
  color: #3b82f6;
  font-size: 0.8125rem;
  white-space: nowrap;
}

/* Total Price Section */
.total-price-section {
  background: white;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #f1f3f4;
}

.total-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.total-price-row:last-child {
  margin-bottom: 0;
}

.total-label {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.total-value {
  font-size: 0.95rem;
  color: #1a202c;
  font-weight: 600;
}

.total-price-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 0.5rem 0;
}

.total-final .total-label {
  font-size: 1rem;
  color: #1a202c;
  font-weight: 700;
}

.total-final .total-value {
  font-size: 1.125rem;
  color: #3b82f6;
  font-weight: 700;
}

.back-button {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 8px 16px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background 0.3s ease, transform 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  cursor: pointer;
}

.back-button:hover {
  background: rgba(255,255,255,0.3);
  transform: translateX(-4px);
}

.car-title-section {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  text-align: center;
  border: 1px solid #f1f3f4;
}

.car-title-section .car-name {
  color: #1a202c;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 6px 0;
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.car-title-section .car-type {
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0;
  letter-spacing: 0.2px;
}

/* Highlight Carousel */
.highlight-carousel {
  width: 100%;
  padding-bottom: 20px;
}

.highlight-carousel .swiper-slide {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.highlight-carousel .swiper-slide-active {
  opacity: 1;
}

.highlight-pagination {
  position: relative !important;
  bottom: 0 !important;
  margin-top: 12px;
}

.highlight-pagination .swiper-pagination-bullet {
  width: 8px !important;
  height: 8px !important;
  background: #cbd5e1 !important;
  opacity: 0.5 !important;
  transition: all 0.3s ease !important;
}

.highlight-pagination .swiper-pagination-bullet-active {
  width: 24px !important;
  height: 8px !important;
  border-radius: 4px !important;
  background: linear-gradient(135deg, #3B82F6, #1D4ED8) !important;
  opacity: 1 !important;
}

/* Modal */
#carDetailModal {
  scrollbar-width: none;
  -ms-overflow-style: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#carDetailModal:not(.hidden) {
  opacity: 1;
}

/* Pesan Sekarang Button - Biru Tua Solid */
button[onclick="pesanSekarang()"] {
  background-color: #1e3a8a !important;
  background: #1e3a8a !important;
  border: none !important;
}

button[onclick="pesanSekarang()"]:hover {
  background-color: #1e40af !important;
  background: #1e40af !important;
}

#carDetailModal::-webkit-scrollbar {
  display: none;
}

/* Iconly Icon */
.iconly {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0;
}

.iconly svg {
  width: 100%;
  height: 100%;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  padding: 2.5rem 1.5rem 1.5rem;
  margin-top: 3rem;
  position: relative;
  z-index: 1;
}

.footer-content {
  width: 100%;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: white;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  line-height: 1.6;
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.footer-contact p,
.footer-contact a {
  font-size: 0.75rem;
}

.footer-contact p i,
.footer-contact a i {
  width: 16px;
  height: 16px;
}

.footer-section p i,
.footer-section a i {
  margin-right: 0.75rem;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.footer-section p i svg,
.footer-section a i svg {
  width: 100%;
  height: 100%;
}

.footer-section p:last-child {
  margin-bottom: 0;
}

.footer-section a:hover {
  color: white;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.footer-logo img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  align-items: center;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
}

.footer-social a i {
  width: 20px;
  height: 20px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-social a i svg {
  width: 100%;
  height: 100%;
}

.footer-social a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.footer-apps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.footer-apps a {
  display: inline-block;
  transition: opacity 0.3s ease;
}

.footer-apps a:hover {
  opacity: 0.8;
}

.footer-apps img {
  display: block;
  border-radius: 8px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
}

.footer-bottom a {
  color: white;
  font-weight: 500;
  text-decoration: none;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* Utility Classes */
.logo-img {
  max-width: 180px;
}

.car-img {
  height: 140px;
  object-fit: cover;
  object-position: center;
}

.app-img {
  height: 40px;
  width: auto;
}

/* Responsive */
@media (min-width: 768px) {
  .footer {
    padding: 3rem 1.5rem 2rem;
  }

  .footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: start;
  }

  .footer-apps {
    flex-direction: row;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .feature-list {
    grid-template-columns: 1fr;
  }
  
  .car-title-section .car-name {
    font-size: 1.5rem;
  }
}

/* City Selection Modal */
.city-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.city-modal:not(.active) {
  display: none;
}

.city-modal.active {
  opacity: 1;
  visibility: visible;
}

.city-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.city-modal-content {
  position: relative;
  background: white;
  border-radius: 24px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s ease;
  z-index: 1;
}

.city-modal.active .city-modal-content {
  transform: scale(1) translateY(0);
}

.city-modal-header {
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

.city-modal-logo {
  width: 120px;
  height: auto;
  margin: 0 auto 1rem;
  display: block;
}

.city-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin: 0 0 0.5rem 0;
}

.city-modal-subtitle {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.city-modal-body {
  padding: 1.5rem 2rem 2rem;
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.city-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  background: #f8fafc;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-weight: 600;
  color: #1a202c;
}

.city-card:hover {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-color: #3b82f6;
  color: white;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.city-card:active {
  transform: translateY(-2px);
}

.city-card i {
  font-size: 2rem;
  color: #3b82f6;
  transition: color 0.3s ease;
}

.city-card:hover i {
  color: white;
}

.city-card span {
  font-weight: 600;
}

@media (max-width: 480px) {
  .city-modal-content {
    width: 95%;
    border-radius: 20px;
  }
  
  .city-modal-header {
    padding: 1.5rem 1.5rem 1rem;
  }
  
  .city-modal-logo {
    width: 100px;
  }
  
  .city-modal-title {
    font-size: 1.25rem;
  }
  
  .city-modal-body {
    padding: 1rem 1.5rem 1.5rem;
  }
  
  .city-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

@media (max-width: 640px) {
  .city-grid {
    grid-template-columns: 1fr;
  }
  
  .city-card {
    padding: 1.25rem 1rem;
  }
}

/* Cookie Consent Banner */
.cookie-consent {
  position: fixed;
  bottom: -100%;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 10002;
  display: none;
  transition: bottom 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border-top: 3px solid #3b82f6;
}

.cookie-consent.show {
  bottom: 0;
}

.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cookie-consent-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.cookie-consent-icon i {
  width: 24px;
  height: 24px;
}

.cookie-consent-text {
  flex: 1;
  min-width: 0;
}

.cookie-consent-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 0.5rem 0;
}

.cookie-consent-description {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
  line-height: 1.6;
}

.cookie-consent-buttons {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  white-space: nowrap;
}

.cookie-btn-disagree {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

.cookie-btn-disagree:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cookie-btn-agree {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  border-color: #3b82f6;
}

.cookie-btn-agree:hover {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.cookie-btn:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .cookie-consent-content {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem 1.5rem;
    gap: 1rem;
  }
  
  .cookie-consent-icon {
    width: 40px;
    height: 40px;
  }
  
  .cookie-consent-icon i {
    width: 20px;
    height: 20px;
  }
  
  .cookie-consent-text {
    width: 100%;
  }
  
  .cookie-consent-title {
    font-size: 1rem;
  }
  
  .cookie-consent-description {
    font-size: 0.8125rem;
  }
  
  .cookie-consent-buttons {
    width: 100%;
    flex-direction: column;
  }
  
  .cookie-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .cookie-consent-content {
    padding: 1rem;
  }
}

/* Advertisement Image Modal */
.ad-image-modal {
  position: fixed;
  inset: 0;
  z-index: 10003;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ad-image-modal.show {
  opacity: 1;
  visibility: visible;
}

.ad-image-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.ad-image-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  z-index: 1;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.ad-image-modal.show .ad-image-modal-content {
  transform: scale(1);
}

.ad-image-container {
  position: relative;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ad-image {
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

.ad-image-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
  color: #1a202c;
}

.ad-image-modal-close:hover {
  background: white;
  transform: scale(1.1);
}

.ad-image-modal-close i {
  width: 20px;
  height: 20px;
}

@media (max-width: 768px) {
  .ad-image-modal-content {
    max-width: 95%;
  }
  
  .ad-image-modal-close {
    top: -35px;
    width: 32px;
    height: 32px;
  }
  
  .ad-image-modal-close i {
    width: 18px;
    height: 18px;
  }
}

