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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8f9fa;
  color: #222;
  line-height: 1.6;
}

/* HEADER */
header {
  background: #1a1a2e;
  color: white;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  color: white;
}
.logo span { color: #e63946; }
nav a {
  color: #ccc;
  text-decoration: none;
  margin-left: 24px;
  font-size: 14px;
  transition: color 0.2s;
}
nav a:hover { color: white; }

/* HERO */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
  color: white;
  padding: 60px 20px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(26px, 5vw, 48px);
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
}
.hero h1 span { color: #e63946; }
.hero p {
  font-size: 18px;
  color: #aaa;
  margin-bottom: 40px;
}

/* SEARCH BOX */
.search-box {
  background: white;
  border-radius: 16px;
  padding: 32px;
  max-width: 700px;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.search-box h2 {
  font-size: 20px;
  color: #1a1a2e;
  margin-bottom: 20px;
  font-weight: 700;
}
.search-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 600px) {
  .search-row { grid-template-columns: 1fr; }
}
.search-box select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  color: #333;
  background: white;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: border-color 0.2s;
}
.search-box select:focus {
  outline: none;
  border-color: #e63946;
}
.search-box select:disabled {
  background-color: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}
.btn-search {
  width: 100%;
  padding: 14px;
  background: #e63946;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.5px;
}
.btn-search:hover { background: #c1121f; }
.btn-search:active { transform: scale(0.98); }
.btn-search:disabled { background: #ccc; cursor: not-allowed; }

/* MAIN CONTENT */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* RESULTS */
.results-header {
  margin-bottom: 24px;
}
.results-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
}
.results-header p { color: #666; margin-top: 4px; }

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* PRODUCT CARD */
.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.card-image {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #f8f9fa;
  padding: 16px;
}
.card-body {
  padding: 16px;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.battery-badge {
  display: inline-block;
  background: #e63946;
  color: white;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}
.card-compat {
  font-size: 12px;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* PRODUCT PAGE */
.product-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 768px) {
  .product-page { grid-template-columns: 1fr; }
}
.product-image-wrap {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  text-align: center;
}
.product-image-wrap img {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
}
.product-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.product-info h1 {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
  color: #1a1a2e;
  line-height: 1.3;
}
.info-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.info-card h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #999;
  margin-bottom: 8px;
}
.battery-size-display {
  font-size: 36px;
  font-weight: 800;
  color: #e63946;
}
.btn-buy {
  display: block;
  width: 100%;
  padding: 16px;
  background: #e63946;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-buy:hover { background: #c1121f; }
.compat-list {
  font-size: 14px;
  color: #444;
  line-height: 1.8;
}
.fcc-id {
  font-size: 13px;
  color: #666;
  font-family: monospace;
}

/* VIDEO SECTION */
.video-section {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin-bottom: 48px;
}
.video-section h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 20px;
}
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 10px;
}
.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* BREADCRUMB */
.breadcrumb {
  font-size: 13px;
  color: #666;
  margin-bottom: 24px;
}
.breadcrumb a { color: #e63946; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 6px; }

/* STATS BAR */
.stats-bar {
  background: white;
  border-bottom: 1px solid #eee;
  padding: 12px 20px;
}
.stats-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 32px;
  font-size: 13px;
  color: #555;
}
.stats-inner strong { color: #e63946; }

/* FOOTER */
footer {
  background: #1a1a2e;
  color: #888;
  padding: 40px 20px;
  margin-top: 80px;
  text-align: center;
  font-size: 13px;
}
footer a { color: #aaa; text-decoration: none; }
footer a:hover { color: white; }

/* LOADING */
.loading {
  text-align: center;
  padding: 60px;
  color: #666;
}
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #eee;
  border-top-color: #e63946;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* NO RESULTS */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}
.no-results h3 { font-size: 20px; margin-bottom: 8px; color: #333; }
