/* =============================================
   Carlynk - Main Stylesheet
   Japanese Used Car Auction Platform
   ============================================= */

/* CSS Variables */
:root {
  --primary-color: #1a5f7a;
  --primary-dark: #134b5f;
  --secondary-color: #e74c3c;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --white: #ffffff;
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.6;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

/* =============================================
   Header
   ============================================= */
.header {
  background: #1a1a1a;
  color: var(--white);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Header Top Bar */
.header-top-bar {
  background: #3d3d3d;
  padding: 8px 0;
  font-size: 12px;
  color: #ccc;
}

.header-top-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.currency-select {
  display: flex;
  align-items: center;
  gap: 8px;
}

.currency-select span {
  color: #999;
  font-size: 11px;
  text-transform: uppercase;
}

.currency-select select {
  background: #3d3d3d;
  border: 1px solid #555;
  color: #fff;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
}

.header-top-info {
  display: flex;
  gap: 30px;
  align-items: center;
}

.header-top-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ccc;
}

.header-top-item svg {
  color: #e97730;
}

/* Main Header */
.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 45px;
  width: auto;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 30px;
}

.header-contact {
  display: flex;
  align-items: center;
  gap: 25px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-item svg {
  flex-shrink: 0;
}

.contact-text {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: #ccc;
  line-height: 1.4;
}

.contact-numbers {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: #fff;
  line-height: 1.5;
}

.contact-numbers strong {
  color: #e97730;
  font-size: 11px;
  margin-right: 8px;
}

.header-nav {
  display: flex;
  gap: 15px;
  align-items: center;
  border-left: 1px solid #444;
  padding-left: 25px;
  margin-left: 10px;
}

.header-nav a {
  color: #ccc;
  padding: 8px 15px;
  border-radius: 4px;
  transition: all 0.3s;
  font-size: 14px;
}

.header-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.header-nav .logout-btn {
  background: #e97730;
  color: #fff;
}

.header-nav .logout-btn:hover {
  background: #d66a25;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 15px;
  background: rgba(255,255,255,0.1);
  border-radius: 20px;
  font-size: 13px;
}

.user-info .user-icon {
  width: 30px;
  height: 30px;
  background: #e97730;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =============================================
   Login Page
   ============================================= */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.login-main {
  flex: 1;
  display: flex;
  align-items: stretch;
}

.login-wrapper {
  display: flex;
  width: 100%;
  min-height: calc(100vh - 200px);
}

.login-hero {
  flex: 1;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
}

.login-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(233, 119, 48, 0.1) 0%, transparent 70%);
  animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.login-hero-content {
  position: relative;
  z-index: 1;
  color: white;
  max-width: 500px;
}

.login-hero-content h1 {
  font-size: 42px;
  margin-bottom: 20px;
  color: #e97730;
}

.login-hero-content > p {
  font-size: 18px;
  color: #999;
  margin-bottom: 40px;
}

.features-list {
  list-style: none;
  padding: 0;
}

.features-list li {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  font-size: 16px;
  color: #ccc;
}

.features-list li svg {
  color: #e97730;
  flex-shrink: 0;
}

.login-form-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  background: #f8f9fa;
}

.login-box {
  background: var(--white);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 420px;
}

.login-box-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo {
  height: 50px;
  margin-bottom: 20px;
}

.login-box-header h2 {
  color: #1a1a1a;
  margin-bottom: 8px;
  font-size: 24px;
}

.login-box-header p {
  color: #6b7280;
  font-size: 14px;
}

.input-with-icon {
  position: relative;
}

.input-with-icon svg {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

.input-with-icon input {
  padding-left: 45px !important;
}

.btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #e97730;
  font-size: 16px;
  padding: 14px 20px;
  border: none;
  transition: all 0.3s;
}

.btn-login:hover {
  background: #d66a25;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(233, 119, 48, 0.4);
}

.login-footer {
  text-align: center;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.login-footer p {
  color: #6b7280;
  font-size: 14px;
}

.login-footer a {
  color: #e97730;
  font-weight: 500;
}

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

/* =============================================
   Footer
   ============================================= */
.footer {
  background: #1a1a1a;
  color: #ccc;
  padding: 40px 20px;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer-logo-img {
  height: 40px;
}

.footer-info {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.footer-address,
.footer-phone,
.footer-email {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.footer-info svg {
  color: #e97730;
  flex-shrink: 0;
}

.footer-copyright {
  width: 100%;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #333;
  margin-top: 20px;
}

.footer-copyright p {
  font-size: 12px;
  color: #666;
}

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

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--gray-300);
  border-radius: 5px;
  font-size: 14px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.1);
}

.form-group.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group.checkbox input {
  width: auto;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-success {
  background: var(--success-color);
  color: var(--white);
}

.btn-success:hover {
  background: #219a52;
}

.btn-danger {
  background: var(--danger-color);
  color: var(--white);
}

.btn-danger:hover {
  background: #c0392b;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* =============================================
   Search Section
   ============================================= */
.search-section {
  background: var(--white);
  padding: 20px;
  margin: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--gray-200);
}

.search-header h2 {
  color: var(--primary-color);
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-header h2 .search-icon {
  width: 22px;
  height: 22px;
  color: var(--primary-color);
}

/* Hidden - no longer needed */
.auction-type-tabs {
  display: none;
}

.auction-type-tabs label {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 15px;
  background: var(--gray-100);
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s;
}

.auction-type-tabs input:checked + span {
  color: var(--primary-color);
  font-weight: 600;
}

.quick-search {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: var(--gray-100);
  border-radius: 5px;
}

.quick-search input[type="text"] {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid var(--gray-300);
  border-radius: 5px;
}

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

.filter-column {
  background: var(--gray-100);
  border-radius: 5px;
  overflow: hidden;
}

.filter-column-header {
  background: var(--gray-700);
  color: var(--white);
  padding: 10px 15px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.filter-column-body {
  max-height: 200px;
  overflow-y: auto;
  padding: 10px;
}

.filter-column-body label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
  border-radius: 3px;
}

.filter-column-body label:hover {
  background: var(--gray-200);
}

.make-section-header {
  padding: 6px 10px;
  font-weight: bold;
  font-size: 12px;
  color: var(--primary);
  background: var(--gray-200);
  border-left: 3px solid var(--primary);
  margin-bottom: 5px;
}

.make-section-header:not(:first-child) {
  margin-top: 10px;
}

.range-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
  padding: 15px;
  background: var(--gray-100);
  border-radius: 5px;
}

.range-group h4 {
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--gray-700);
}

.range-inputs {
  display: flex;
  gap: 10px;
  align-items: center;
}

.range-inputs select {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
}

.search-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* Exchange Rate Display */
.exchange-rate-display {
  display: flex;
  align-items: center;
}

.exchange-rate {
  display: flex;
  align-items: center;
  padding: 6px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}

/* =============================================
   Results Table
   ============================================= */
.results-section {
  background: var(--white);
  margin: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  overflow: hidden;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
}

.results-header .count {
  font-weight: 600;
}

.results-legend {
  display: flex;
  gap: 20px;
  font-size: 13px;
}

.results-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-dot.available { background: var(--success-color); }
.status-dot.sold { background: var(--gray-500); }
.status-dot.bid { background: var(--warning-color); }

#records-per-page {
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  background: var(--white);
  font-size: 13px;
  cursor: pointer;
}

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

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

.results-table th {
  background: var(--gray-700);
  color: var(--white);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  position: sticky;
  top: 0;
}

.results-table tr:hover {
  background: var(--gray-100);
}

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

.results-table .sold {
  color: #16a34a;
  font-weight: 600;
}

.results-table .not-sold {
  color: #6b7280;
  font-style: italic;
}

.results-table .actions {
  display: flex;
  gap: 5px;
}

.btn-bid {
  background: var(--success-color);
  color: var(--white);
  padding: 6px 15px;
  border-radius: 4px;
  font-size: 12px;
  border: none;
  cursor: pointer;
}

.btn-view {
  background: var(--primary-color);
  color: var(--white);
  padding: 6px 15px;
  border-radius: 4px;
  font-size: 12px;
  border: none;
  cursor: pointer;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 20px;
}

.pagination button {
  padding: 8px 15px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  cursor: pointer;
  border-radius: 4px;
}

.pagination button.active {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

/* =============================================
   Vehicle Detail Page
   ============================================= */
.vehicle-detail {
  padding: 20px;
}

.vehicle-info-header {
  background: var(--white);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.vehicle-info-item {
  padding: 10px;
  background: var(--gray-100);
  border-radius: 4px;
}

.vehicle-info-item label {
  display: block;
  font-size: 11px;
  color: var(--gray-600);
  text-transform: uppercase;
  margin-bottom: 3px;
}

.vehicle-info-item span {
  font-weight: 600;
  color: var(--gray-800);
}

.vehicle-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.vehicle-images {
  background: var(--white);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.main-image {
  width: 100%;
  max-height: 600px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 15px;
  background: #f5f5f5;
}

.image-thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding: 5px;
}

.image-thumbnails img {
  width: 100%;
  height: 55px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s, border 0.3s;
  border: 2px solid transparent;
}

.image-thumbnails img:hover,
.image-thumbnails img.active {
  opacity: 1;
  border: 2px solid var(--primary);
}

.image-count {
  margin-top: 10px;
  padding: 8px;
  background: var(--gray-100);
  border-radius: 4px;
  text-align: center;
  font-size: 13px;
  color: var(--gray-600);
}

.bid-form-container {
  background: var(--white);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 80px;
}

.bid-form-container h3 {
  margin-bottom: 20px;
  color: var(--primary-color);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color);
}

.min-bid {
  color: var(--danger-color);
  font-size: 13px;
  margin-top: 5px;
}

.bid-error {
  color: #dc2626;
  font-size: 13px;
  margin-top: 5px;
  font-weight: 500;
}

/* Sold Notice (for already sold vehicles) */
.sold-notice {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  text-align: center;
  border: 2px solid #fca5a5;
}

.sold-badge {
  display: inline-block;
  background: #dc2626;
  color: white;
  padding: 10px 30px;
  border-radius: 25px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 15px;
}

.sold-notice p {
  color: #6b7280;
  margin-bottom: 20px;
}

.sold-price-display {
  background: white;
  padding: 15px 25px;
  border-radius: 8px;
  display: inline-block;
}

.sold-price-display .label {
  color: #6b7280;
  font-size: 14px;
  margin-right: 10px;
}

.sold-price-display .price {
  color: #16a34a;
  font-size: 24px;
  font-weight: 700;
}

/* Vehicle Info Item Sold Status */
.vehicle-info-item.sold .sold-for {
  color: #16a34a;
  font-weight: 700;
}

.vehicle-info-item.not-sold .sold-for {
  color: #6b7280;
  font-style: italic;
}

/* AUC Grade and Avg Price Styling */
.vehicle-info-item .auc-grade {
  background: #e97730;
  color: white;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 600;
}

.vehicle-info-item .avg-price {
  color: #2563eb;
  font-weight: 500;
}

/* =============================================
   Modal
   ============================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

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

.modal {
  background: var(--white);
  padding: 30px;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  transform: scale(0.9);
  transition: transform 0.3s;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

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

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--gray-500);
}

.modal-success {
  text-align: center;
  padding: 30px;
}

.modal-success .checkmark {
  width: 80px;
  height: 80px;
  background: var(--success-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--white);
  font-size: 40px;
}

/* =============================================
   Admin Page
   ============================================= */
.admin-container {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

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

.admin-table {
  width: 100%;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.admin-table th {
  background: var(--gray-700);
  color: var(--white);
}

/* =============================================
   Loading & Alerts
   ============================================= */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.alert {
  padding: 15px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.alert-error {
  background: #fdecea;
  color: var(--danger-color);
  border: 1px solid #f5c6cb;
}

.alert-success {
  background: #d4edda;
  color: var(--success-color);
  border: 1px solid #c3e6cb;
}

/* =============================================
   Responsive
   ============================================= */

/* Table wrapper for horizontal scroll */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Mobile Card View */
.mobile-cards {
  display: none;
}

.vehicle-card {
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 15px;
  overflow: hidden;
}

.vehicle-card-header {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
}

.vehicle-card-image {
  width: 100px;
  height: 75px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.vehicle-card-title {
  flex: 1;
  min-width: 0;
}

.vehicle-card-title h4 {
  font-size: 14px;
  color: var(--gray-800);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vehicle-card-title .lot-info {
  font-size: 12px;
  color: var(--gray-600);
}

.vehicle-card-title .auction-date {
  font-size: 11px;
  color: var(--gray-500);
}

.vehicle-card-body {
  padding: 12px;
}

.vehicle-card-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.spec-item {
  text-align: center;
  padding: 6px;
  background: var(--gray-100);
  border-radius: 4px;
}

.spec-item .label {
  display: block;
  font-size: 10px;
  color: var(--gray-500);
  text-transform: uppercase;
}

.spec-item .value {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-800);
}

.vehicle-card-prices {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  background: var(--gray-50);
  border-radius: 4px;
  margin-bottom: 12px;
}

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

.price-item .label {
  display: block;
  font-size: 10px;
  color: var(--gray-500);
}

.price-item .value {
  font-size: 14px;
  font-weight: 700;
}

.price-item .value.sold {
  color: var(--success-color);
}

.price-item .value.not-sold {
  color: var(--gray-500);
}

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

.vehicle-card-actions .btn-bid,
.vehicle-card-actions .btn-view {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  text-align: center;
}

/* =============================================
   Tablet (768px以下)
   ============================================= */
@media (max-width: 768px) {
  /* Hide top bar completely */
  .header-top-bar {
    display: none;
  }
  
  /* Hide contact info */
  .header-contact {
    display: none;
  }
  
  /* Header main - horizontal layout */
  .header-main {
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 15px;
    gap: 10px;
  }
  
  /* Smaller logo */
  .logo-img {
    height: 35px;
  }
  
  /* Compact navigation */
  .header-right {
    gap: 10px;
  }
  
  .header-nav {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    gap: 8px;
    align-items: center;
  }
  
  .header-nav a {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  /* Hide user greeting, show only icon */
  .user-info {
    padding: 0;
    background: none;
    gap: 0;
  }
  
  .user-info span {
    display: none;
  }
  
  .user-info .user-icon {
    width: 32px;
    height: 32px;
  }
  
  /* Compact logout button */
  .header-nav .logout-btn {
    padding: 6px 12px;
    font-size: 11px;
  }

  /* Login page responsive */
  .login-wrapper {
    flex-direction: column;
  }
  
  .login-hero {
    padding: 40px 20px;
    min-height: auto;
  }
  
  .login-hero-content h1 {
    font-size: 28px;
  }
  
  .login-form-section {
    padding: 30px 20px;
  }
  
  .login-box {
    padding: 30px 20px;
  }
  
  /* Footer responsive */
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-info {
    flex-direction: column;
    gap: 15px;
  }

  /* Filter grid - 2 columns on tablet */
  .filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .vehicle-content {
    grid-template-columns: 1fr;
  }

  .bid-form-container {
    position: static;
  }

  /* Show cards, hide table on mobile */
  .results-table {
    display: none;
  }
  
  .mobile-cards {
    display: block;
  }
  
  /* Results header - stack on mobile */
  .results-header {
    flex-direction: column;
    gap: 10px;
    align-items: stretch !important;
    padding: 15px;
  }
  
  .results-header .count {
    text-align: center;
  }
  
  .results-legend {
    justify-content: center;
  }
  
  .results-header select {
    width: 100%;
  }
  
  /* Search section padding */
  .search-section {
    padding: 15px;
  }
  
  .search-header {
    flex-direction: column;
    gap: 10px;
  }
  
  .quick-search {
    flex-direction: column;
    gap: 10px;
  }
  
  .quick-search input[type="text"] {
    width: 100%;
  }
  
  /* Range filters */
  .range-filters {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   Mobile (480px以下)
   ============================================= */
@media (max-width: 480px) {
  /* Even more compact header */
  .header-main {
    padding: 8px 10px;
  }
  
  .logo-img {
    height: 30px;
  }
  
  .header-nav {
    gap: 5px;
  }
  
  .header-nav a {
    padding: 5px 8px;
    font-size: 11px;
  }
  
  .header-nav .logout-btn {
    padding: 5px 8px;
    font-size: 10px;
  }
  
  .user-info .user-icon {
    width: 28px;
    height: 28px;
  }
  
  .user-info .user-icon svg {
    width: 14px;
    height: 14px;
  }

  /* Single column filters */
  .filter-grid {
    grid-template-columns: 1fr;
  }
  
  /* Card specs - 2 columns */
  .vehicle-card-specs {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Smaller card image */
  .vehicle-card-image {
    width: 80px;
    height: 60px;
  }
  
  .vehicle-card-title h4 {
    font-size: 13px;
  }
  
  /* Search actions full width */
  .search-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .search-actions .btn {
    width: 100%;
  }
  
  /* Modal responsive */
  .modal {
    width: 95%;
    padding: 20px;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  /* Vehicle detail page */
  .vehicle-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .vehicle-info-item {
    padding: 8px;
  }
  
  .vehicle-info-item label {
    font-size: 10px;
  }
  
  .vehicle-info-item span {
    font-size: 12px;
  }
}
