/* style.css - OtoDriveZone Production */

/* 1. GLOBAL & LAYOUT */
body {
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f7f6;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.main-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 30px;
  align-items: start;
}

h2 {
  color: #2c3e50;
  text-align: center;
  margin-bottom: 25px;
}

/* 2. BRAND GRID & CARDS */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 16px;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 15px;
  border: 1px solid #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
  border-color: #007bff !important;
}

.card img {
  max-width: 60px;
  height: 40px;
  object-fit: contain;
  margin-bottom: 8px;
}

.card span {
  font-size: 12px;
  font-weight: 600;
  color: #555;
}

/* 3. SIDEBAR */
.sidebar {
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-section {
  background: white;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.sidebar-section h3 {
  font-size: 15px;
  margin: 0 0 15px 0;
  border-bottom: 2px solid #007bff;
  padding-bottom: 8px;
}

.sidebar-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.sidebar-list li {
  list-style-type: none !important;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}

.sidebar-list li:hover .side-model {
  color: #007bff;
}

.side-brand {
  font-weight: 700;
  font-size: 11px;
  color: #007bff;
  text-transform: uppercase;
  display: block;
}

.side-model {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  display: block;
}

/* 4. SPECIFICATION HEADER */
.variant-info-container {
  display: flex;
  align-items: center;
  gap: 20px;
  background: white;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid #e2e8f0;
  text-align: left !important;
}

.brand-logo-fixed {
  width: 80px;
  max-height: 60px;
  object-fit: contain;
  flex-shrink: 0;
}

.model-title {
  margin: 0 !important;
  text-align: left !important;
  font-size: 24px !important;
  color: #1a202c;
}

.model-description {
  font-size: 14px;
  color: #718096;
  text-align: left !important;
}

/* 5. VARIANT BUTTONS */
.variant-tab-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
  padding-bottom: 15px;
}

.variant-btn {
  padding: 8px 18px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: 0.2s;
}

.variant-btn:hover {
  background: #f0f7ff;
  border-color: #007bff;
  color: #007bff;
}

/* 6. HEADER NAV (Back Button) */
.header-nav {
  margin-bottom: 20px;
}

.header-nav button {
  background-color: transparent;
  color: #007bff;
  border: 1px solid #007bff;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.header-nav button:hover {
  background-color: #007bff;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.header-nav button:active {
  transform: scale(0.98);
}

/* 7. ACCORDION & DRAWERS */
.accordion {
  background: white;
  border: 1px solid #edf2f7;
  padding: 16px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 8px;
  outline: none;
  transition: 0.3s;
}

.accordion.active {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background-color: #f8fafc;
}

.panel {
  display: none;
  background: white;
  border: 1px solid #edf2f7;
  border-top: none;
  border-left: 4px solid #007bff;
  padding: 0 16px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dotted #e2e8f0;
  gap: 15px;
  align-items: flex-start;
}

.spec-label {
  color: #64748b;
  font-size: 13px;
  flex: 0 0 45%;
  word-wrap: break-word;
  text-align: left;
}

.spec-value {
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  flex: 1;
  word-wrap: break-word;
}

/* 8. DIALOG BOX (Scrollable) */
.dialog-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 16px;
  padding: 24px;
  z-index: 10000;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3), 0 0 0 100vw rgba(0, 0, 0, 0.5);
  width: 90%;
  max-width: 450px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.dialog-box h3 {
  margin-top: 0;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.models-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 15px 0;
  overflow-y: auto;
  padding-right: 5px;
  flex-grow: 1;
}

.models-list::-webkit-scrollbar {
  width: 6px;
}

.models-list::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 10px;
}

.model-item {
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: 0.2s;
  border: 1px solid #eee;
  font-size: 14px;
  font-weight: 500;
}

.model-item:hover {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.btn-cancel {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 10px;
  background: #f1f5f9;
  color: #475569;
  flex-shrink: 0;
}

.btn-cancel:hover {
  background: #e2e8f0;
}

/* 9. RESPONSIVE */
@media (max-width: 850px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    width: 100%;
    order: 2;
    margin-top: 30px;
  }
}

@media (max-width: 480px) {
  .variant-info-container {
    flex-direction: column;
    text-align: center !important;
  }
  .model-title,
  .model-description {
    text-align: center !important;
  }
  .spec-row {
    flex-direction: column;
    gap: 5px;
  }
  .spec-value {
    text-align: left;
  }
}

/* 10. SKELETON ANIMATION */
.skeleton {
  background: #eee;
  background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border: none !important;
  color: transparent !important;
  user-select: none;
  pointer-events: none;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Sizing Helpers */
.sk-card { height: 110px; width: 100%; border-radius: 12px; }
.sk-text { height: 14px; width: 80%; margin: 5px 0; border-radius: 4px; }
.sk-button { height: 35px; width: 100px; border-radius: 20px; }
.sk-header { height: 120px; width: 100%; border-radius: 12px; margin-bottom: 20px; }
.sk-list-item { height: 45px; width: 100%; margin-bottom: 8px; border-radius: 8px; }