:root {
  --navy: #0B3B6F;
  --teal: #2EC4D6;
  --bg: #F5F7FA;
  --text: #0B2A44;
  --muted: #6b7280;
}

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

body {
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ================= HEADER ================= */

.header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 56px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid #ddd;
  z-index: 100;
}

.logo {
  height: 36px;
}

.hamburger {
  font-size: 22px;
  background: none;
  border: none;
}

/* ================= CONTENT ================= */

.content {
  padding: 68px 10px 78px;
}

/* Make / Model */
.vehicle-select {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.vehicle-select select {
  height: 30px;
  font-size: 0.75rem;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #fff;
  color: var(--text);
}

/* Search */
.search {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #ccc;
  margin-bottom: 6px;
}

/* Chips */
.chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 8px;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.7rem;
  border: none;
  background: #e5e7eb;
  font-weight: 700;
}

.chip.active {
  background: var(--navy);
  color: #fff;
}

/* ================= PRODUCT GRID ================= */

.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.card {
  background: #fff;
  border-radius: 10px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 6.8rem;
}

.card img {
  height: 90px;
  width: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.card h3 {
  font-size: 0.75rem;
  font-weight: 700;
}

.card p {
  font-size: 0.65rem;
  color: var(--muted);
}

.card .description {
  display: -webkit-box;
  -webkit-line-clamp: 3;      /* number of lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;

  line-height: 1.4;
  min-height: calc(1.4em * 3); /* keeps card heights aligned */
}

.card:hover .description {
  -webkit-line-clamp: unset;
  max-height: none;
  overflow: visible;
}

/*
.card .description {
  position: relative;
}

.card .description::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1.2em;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff);
}
*/

.price {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--navy);
}

/* ================= BOTTOM TABS ================= */

.tabs {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 56px;
  background: #fff;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid #ddd;
  overflow-x: auto;
}

.tab {
  font-size: 0.7rem;
  font-weight: 800;
  background: none;
  border: none;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
}

.tab.active {
  background: var(--teal);
  color: #fff;
}

/* ================= MODAL ================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal.show {
  display: flex;
}

.modal-card {
  background: #fff;
  width: 92%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px;
  padding: 16px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: none;
  font-size: 18px;
}

.modal-image {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 12px;
}

.modal-title {
  margin: 12px 0 4px;
}

.modal-description {
  font-size: 14px;
  color: #555;
}

.modal-price {
  font-weight: 700;
  margin: 8px 0;
}

.modal-filters {
 display: flex;
 gap: 1.5rem
}

.modal-filters select,
.modal-qty {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.btn-primary,
.btn-secondary {
  flex: 1;
  padding: 12px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
}

.btn-primary {
  background: #2EC4D6;
  color: #000;
}

.btn-secondary {
  background: #0B3B6F;
  color: #fff;
}

.hidden {
  display: none;
}

/* ================= CART ================= */
.cart-panel {
  position: fixed;
  inset: 0 0 0 auto;
  width: 320px;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 1200;
  display: flex;
  flex-direction: column;
}

.cart-panel.open {
  transform: translateX(0);
}

.cart-header,
.cart-footer {
  padding: 16px;
  border-bottom: 1px solid #eee;
}

.cart-footer {
  border-top: 1px solid #eee;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.cart-item {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.cart-item img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 8px;
}

.cart-info h4 {
  margin: 0;
  font-size: 14px;
}

.cart-info p {
  font-size: 12px;
  color: #666;
  margin: 2px 0;
}

.cart-qty {
  font-size: 12px;
}

/* ================= SIDEBAR ================= */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 280px;
  background: #fff;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #eee;
}

.sidebar-logo {
  height: 32px;
}

.close-sidebar {
  background: none;
  border: none;
  font-size: 20px;
}

.sidebar-nav {
  padding: 16px;
  flex: 1;
}

.sidebar-link {
  display: block;
  padding: 12px 0;
  color: #0B2A44;
  text-decoration: none;
  font-weight: 500;
}

.sidebar-link.active {
  color: #2EC4D6;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid #eee;
}

.cart-item-btn {
 background: transparent;
 color: #2EC4D6;
 border: none;
 margin: 0.5rem;
}

.cart-button {
  width: 100%;
  padding: 12px;
  border-radius: 999px;
  border: none;
  background: #0B3B6F;
  color: #fff;
  font-weight: 600;
}

.cart-count {
  background: #2EC4D6;
  color: #000;
  border-radius: 50%;
  padding: 2px 8px;
  margin-left: 6px;
}

.close-cart {
 background-color: transparent;
 font-size: 1.5rem;
 border: none;
}
/* Backdrop */
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 900;
}

.backdrop.show {
  opacity: 1;
  pointer-events: auto;
}