/* assets/css/style.css */
:root{
  --blue:#1e40af;
  --yellow:#f59e0b;
  --red:#ef4444;
  --black:#111827;
  --white:#fff;
  --gray:#e5e7eb;
  --gray-dark:#4b5563;
  --green:#10b981;
  --orange:#f97316;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  font-family:system-ui,Segoe UI,Roboto,Arial,sans-serif;
  background:#f7f7f7;
  color:#111;
}

.container {
  max-width:1200px;
  margin:0 auto;
  padding:16px;
}

main.container {
  padding-top:32px;
  padding-bottom:40px;
}

/* Header Styles */
.site-header {
  background:var(--black);
  color:#fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-header .nav-wrapper {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  padding: 12px 0;
}

.brand {
  color:#fff;
  text-decoration:none;
  font-weight:700;
  font-size: 1.5rem;
}

/* Admin Dashboard Styles */
.admin-dashboard {
  margin-top: 20px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray);
}

.admin-header h1 {
  margin: 0;
  font-size: 1.8rem;
  color: var(--black);
}

.admin-actions {
  display: flex;
  gap: 10px;
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--white);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-icon {
  font-size: 2rem;
  color: var(--blue);
  margin-right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-content h3 {
  margin: 0 0 5px;
  font-size: 0.9rem;
  color: var(--gray-dark);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--black);
}

.dashboard-charts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.chart-container {
  background: var(--white);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  height: 300px;
}

.chart-container h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.1rem;
  color: var(--black);
}

/* Responsivitas */
@media (max-width: 992px) {
  .stats-cards {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .dashboard-charts {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .admin-actions {
    flex-wrap: wrap;
  }
  
  .stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .stats-cards {
    grid-template-columns: 1fr;
  }
}

/* Form Styles */
.card {
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

.card-body {
  padding: 20px;
}

.form-section {
  margin-bottom: 25px;
}

.form-section h3 {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--black);
  border-bottom: 1px solid var(--gray);
  padding-bottom: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--gray-dark);
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--gray);
  border-radius: 4px;
  font-size: 1rem;
}

.form-control:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.2);
}

.checkbox-group label {
  display: block;
  margin-bottom: 10px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.current-image {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.current-image img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.current-image span {
  font-size: 0.9rem;
  color: var(--gray-dark);
}

/* Responsive Form */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Table Styles */
.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--gray);
}

.table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: var(--gray-dark);
}

.table tbody tr:hover {
  background-color: rgba(0,0,0,0.02);
}

.thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-available {
  background-color: var(--green);
  color: white;
}

.badge-sold {
  background-color: var(--red);
  color: white;
}

.badge-featured {
  background-color: var(--yellow);
  color: var(--black);
}

.btn-sm {
  padding: 4px 8px;
  font-size: 0.8rem;
}

.actions {
  display: flex;
  gap: 5px;
}

.btn-info {
  background-color: #0ea5e9;
  color: white;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

.gallery-item {
  text-align: center;
}

.gallery-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 5px;
}

.stat-icon {
  font-size: 2rem;
  color: var(--blue);
  margin-right: 15px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 64, 175, 0.1);
  border-radius: 50%;
}

.stat-content h3 {
  margin: 0 0 5px 0;
  font-size: 0.9rem;
  color: var(--gray-dark);
  font-weight: 500;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--black);
}

.admin-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.admin-section {
  background: var(--white);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h2 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--black);
}

.table-responsive {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th, 
.admin-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--gray);
}

.admin-table th {
  background-color: #f9fafb;
  font-weight: 600;
  color: var(--gray-dark);
}

.admin-table tr:hover {
  background-color: #f9fafb;
}

.admin-table img.thumb {
  border-radius: 4px;
  object-fit: cover;
}

.badge-pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-right: 5px;
}

.btn-sm {
  padding: 4px 8px;
  font-size: 0.8rem;
}

@media (min-width: 768px) {
  .admin-content {
    grid-template-columns: 1fr;
  }
}

.nav-links {
  display: none;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: 0;
  background: var(--black);
  border-radius: 14px;
  margin-top: 16px;
  padding: 16px 0;
  box-shadow: 0 16px 32px rgba(0,0,0,0.25);
}

.nav-links a {
  color:#fff;
  text-decoration:none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  padding: 12px 20px;
}

.nav-links a:hover {
  color: var(--yellow);
}

.nav-links a.btn {
  background:var(--yellow);
  color:#111;
  border-radius:8px;
  font-weight: 600;
  justify-content: center;
  margin: 8px 20px 0;
}

.nav-links a.btn:hover {
  background: #e69009;
  transform: translateY(-2px);
}

.nav-links a.badge {
  background:#374151;
  padding:4px 10px;
  border-radius:999px;
  justify-content: center;
}

.nav-links.is-open {
  display: flex;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

.nav-toggle-bar {
  display: block;
  width: 26px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

@media (min-width: 992px) {
  .site-header .nav-wrapper {
    flex-wrap: nowrap;
    gap: 24px;
  }

  .nav-toggle {
    display: none;
  }

  .nav-links {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    gap: 22px;
    background: transparent;
    border: none;
    border-radius: 0;
    margin-top: 0;
    padding: 0;
    box-shadow: none;
  }

  .nav-links a {
    padding: 0;
  }

  .nav-links a.btn {
    margin: 0;
    padding: 8px 16px;
  }
}

/* Hero Section */
.hero-section {
  background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('/assets/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 80px 20px;
  text-align: center;
  margin-bottom: 40px;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.hero-search {
  max-width: 600px;
  margin: 0 auto 30px;
}

.hero-search form {
  display: flex;
  gap: 10px;
}

.hero-search input {
  flex: 1;
  padding: 12px 20px;
  border-radius: 30px;
  border: none;
  font-size: 1rem;
}

.hero-search button {
  padding: 12px 25px;
  border-radius: 30px;
  font-weight: 600;
}

.hero-brands {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.brand-badge {
  background: rgba(255,255,255,0.2);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.brand-badge:hover {
  background: var(--yellow);
  color: var(--black);
}

/* Section Styles */
.section {
  margin-bottom: 60px;
  padding: 0 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 1.8rem;
  margin: 0;
  position: relative;
  padding-left: 15px;
}

.section-header h2:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 5px;
  background: var(--blue);
  border-radius: 10px;
}

.view-all {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}

/* Car Card Styles */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.car-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.car-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.car-image {
  position: relative;
  height: 200px;
}

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

.discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--red);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 0.8rem;
}

.car-info {
  padding: 20px;
}

.car-info h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.car-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 15px;
}

.badge-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef;
  color: #123;
  font-size: 0.8rem;
}

.car-price {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--blue);
}

.car-actions {
  display: flex;
  justify-content: space-between;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  border: 0;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: #15307e;
}

.btn-outline {
  background: #fff;
  border: 1px solid #ddd;
  color: #111;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.btn-danger {
  background: var(--red);
  color: #fff;
  border: 0;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-favorite {
  padding: 10px 12px;
}

/* Features Section */
.why-us {
  text-align: center;
  background: #f9f9f9;
  padding: 60px 20px;
  border-radius: 15px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.feature-card {
  background: white;
  padding: 30px 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--blue);
  margin-bottom: 20px;
}

.feature-card h3 {
  margin: 0 0 15px;
}

.feature-card p {
  color: #666;
  margin: 0;
}

/* Testimonials */
.testimonials {
  text-align: center;
}

.testimonial-slider {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  padding: 20px 0;
  scroll-snap-type: x mandatory;
}

.testimonial-card {
  min-width: 300px;
  flex: 1;
  background: white;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  scroll-snap-align: start;
}

.testimonial-content {
  font-style: italic;
  margin-bottom: 20px;
}

.testimonial-content p {
  margin: 0;
}

.testimonial-author {
  text-align: right;
}

.author-name {
  font-weight: bold;
}

.author-info {
  color: #666;
  font-size: 0.9rem;
}

/* Form Styles */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-control:focus {
  border-color: var(--blue);
  outline: none;
}

/* Alert Styles */
.alert {
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
}

.alert.success {
  background: #dcfce7;
  color: #166534;
  border-left: 5px solid #166534;
}

.alert.danger {
  background: #fee2e2;
  color: #991b1b;
  border-left: 5px solid #991b1b;
}

/* Table Styles */
.table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  border-radius: 10px;
  overflow: hidden;
}

.table th {
  background: #f5f5f5;
  font-weight: 600;
}

.table th, .table td {
  border: 1px solid #eee;
  padding: 12px 15px;
  text-align: left;
}

.table tr:hover {
  background: #f9f9f9;
}

/* Search and Filter */
.searchbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 20px 0;
  flex-wrap: wrap;
}

.filters {
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 28px;
  border-radius: 16px;
  margin: 30px 0;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
}

.filter-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.filter-field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-dark);
  margin-bottom: 8px;
}

.filter-field .form-control {
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid #dbe1e8;
}

.filter-field .form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12);
}

.filter-range-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.filter-range {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-range__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--gray-dark);
}

.filter-range__display {
  font-weight: 600;
  color: var(--blue);
  font-size: 0.9rem;
}

.filter-range__sliders {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-range__sliders input[type="range"] {
  width: 100%;
  accent-color: var(--blue);
  cursor: pointer;
  height: 6px;
}

.filter-range__inputs {
  display: flex;
  align-items: center;
  gap: 14px;
}

.filter-range__inputs .form-control {
  flex: 1;
  min-width: 0;
  background: #fff;
}

.range-separator {
  font-size: 0.85rem;
  color: var(--gray-dark);
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.filter-actions .btn-primary,
.filter-actions .btn-outline {
  min-width: 150px;
  text-align: center;
  padding: 12px 24px;
}

.filter-actions .btn-outline {
  line-height: normal;
}

.pagination {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pagination a,
.pagination strong {
  padding: 8px 12px;
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--black);
  text-decoration: none;
  font-weight: 600;
}

.pagination a:hover {
  background: var(--blue);
  color: #fff;
}

.pagination strong {
  background: var(--blue);
  color: #fff;
}

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

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

.footer-column h3 {
  color: var(--yellow);
  margin-top: 0;
}

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

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column a {
  color: #ddd;
  text-decoration: none;
}

.footer-column a:hover {
  color: var(--yellow);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #333;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.2rem;
  }
  
  .hero-search form {
    flex-direction: column;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

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

  .filter-range-group {
    grid-template-columns: 1fr;
  }
  
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .testimonial-slider {
    flex-direction: column;
  }
  
  .testimonial-card {
    min-width: auto;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 12px;
  }

  .filters {
    padding: 22px;
    border-radius: 14px;
    margin: 20px 0;
  }

  .nav-links {
    border-radius: 16px;
  }

  .nav-links a {
    padding: 12px 18px;
  }

  .filter-range {
    padding: 18px;
  }

  .filter-range__inputs {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-range__inputs .form-control {
    width: 100%;
  }

  .range-separator {
    display: none;
  }

  .filter-actions {
    flex-direction: column;
  }

  .filter-actions .btn-primary,
  .filter-actions .btn-outline {
    width: 100%;
  }

  .nav-toggle {
    margin-left: auto;
  }

  .hero-section {
    padding: 50px 15px;
  }
  
  .section {
    padding: 0 15px;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
}
