/* Shared design system for the Parts Store — used by both store-landing.html
   (featured storefront) and store.html (full catalog) so the two pages read
   as one product, not two bolted-together UIs. Page-specific layout stays in
   store-landing.css / store.css; this file only holds what both share:
   reset, nav chrome, the product-card component, and the footer. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #0A0A0A; min-height: 100vh; color: #fff; display: flex; flex-direction: column; }

/* Top nav */
.topnav { display: flex; align-items: center; justify-content: space-between; padding: 0 2.5rem; height: 60px; background: #000; border-bottom: 3px solid #CC1F1F; position: sticky; top: 0; z-index: 100; }
.topnav-left { display: flex; align-items: center; gap: 2.5rem; }
.logo { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -0.5px; text-transform: uppercase; text-decoration: none; }
.logo span { color: #CC1F1F; }
.nav-links { display: flex; gap: 6px; }
.nav-link { display: flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.5); text-decoration: none; border-radius: 6px; transition: color 0.15s, background 0.15s; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.05); }
.nav-link.active { color: #fff; background: rgba(204,31,31,0.15); }
.nav-link i { font-size: 17px; }
.topnav-right { display: flex; align-items: center; gap: 8px; }
.nav-icon-btn { position: relative; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 6px; color: rgba(255,255,255,0.5); font-size: 20px; cursor: pointer; border: none; background: none; text-decoration: none; transition: color 0.15s, background 0.15s; }
.nav-icon-btn:hover { color: #fff; background: rgba(255,255,255,0.05); }
.nav-badge { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; font-size: 10px; font-weight: 700; background: #CC1F1F; color: #fff; border-radius: 99px; display: none; align-items: center; justify-content: center; padding: 0 4px; }
.theme-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 6px; color: rgba(255,255,255,0.5); font-size: 20px; cursor: pointer; border: none; background: none; transition: color 0.15s, background 0.15s; }
.theme-btn:hover { color: #fff; background: rgba(255,255,255,0.05); }

/* Nav dropdowns (notifications, etc.) — same structure as the rest of the
   app's dashboard/inventory/messages pages, ported here so the store's
   bell/user menus don't render inline in the topnav flex row. */
.dropdown-wrap { position: relative; }
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #1A1A1A;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  z-index: 200;
  overflow: hidden;
}
.dropdown.open { display: block; }
.dropdown-header { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.62); }

.notif-panel { min-width: 340px; right: 0; }
.notif-item { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.04); transition: background 0.1s; cursor: pointer; }
.notif-item:hover { background: rgba(255,255,255,0.03); }
.notif-item:last-child { border-bottom: none; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.notif-dot.red { background: #CC1F1F; }
.notif-dot.green { background: #22C55E; }
.notif-dot.blue { background: #3B82F6; }
.notif-dot.amber { background: #F59E0B; }
.notif-body { flex: 1; }
.notif-body p { font-size: 13px; color: rgba(255,255,255,0.7); line-height: 1.4; margin-bottom: 2px; }
.notif-body p strong { color: #fff; }
.notif-body time { font-size: 11px; color: rgba(255,255,255,0.25); }
.notif-empty { padding: 24px 16px; text-align: center; font-size: 13px; color: rgba(255,255,255,0.6); }
.notif-footer { padding: 10px 16px; border-top: 1px solid rgba(255,255,255,0.06); display: flex; justify-content: space-between; align-items: center; }
.notif-footer a { font-size: 12px; font-weight: 600; color: #CC1F1F; text-decoration: none; cursor: pointer; }
.notif-footer a:hover { text-decoration: underline; }

body.light .dropdown { background: #fff; border-color: #E0E0E0; box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
body.light .dropdown-header { color: #999; border-bottom-color: #EEE; }
body.light .notif-body p { color: rgba(0,0,0,0.65); }
body.light .notif-body p strong { color: #111; }
body.light .notif-body time { color: rgba(0,0,0,0.35); }
body.light .notif-empty { color: rgba(0,0,0,0.5); }
body.light .notif-footer { border-top-color: #EEE; }

.main { width: 100%; max-width: 1320px; margin: 0 auto; padding: 2rem 2.5rem 3rem; flex: 1; }

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,0.62); margin-bottom: 1.25rem; }
.breadcrumb a { color: rgba(255,255,255,0.5); text-decoration: none; }
.breadcrumb a:hover { color: #fff; }

/* Product card */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.product-card { background: #111; border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; overflow: hidden; cursor: pointer; transition: border-color 0.15s, transform 0.15s; position: relative; }
.product-card:hover { border-color: rgba(204,31,31,0.3); transform: translateY(-2px); }
.product-img { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; background: #1A1A1A; display: flex; align-items: center; justify-content: center; }
.wishlist-btn { position: absolute; bottom: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.15); color: #fff; cursor: pointer; font-size: 16px; transition: all 0.15s; z-index: 2; }
.wishlist-btn:hover { background: rgba(0,0,0,0.8); border-color: rgba(255,255,255,0.3); }
.wishlist-btn.active { color: #CC1F1F; background: rgba(255,255,255,0.92); border-color: #CC1F1F; }
.wishlist-btn.active:hover { background: #fff; }
.product-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-img .no-img { font-size: 48px; color: rgba(255,255,255,0.1); }
.product-sale-badge { position: absolute; top: 12px; left: 12px; padding: 4px 10px; font-size: 11px; font-weight: 700; color: #fff; background: #CC1F1F; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.03em; }
.product-stock-badge { position: absolute; top: 12px; right: 12px; padding: 4px 10px; font-size: 11px; font-weight: 700; border-radius: 4px; text-transform: uppercase; }
.badge-instock { background: rgba(34,197,94,0.15); color: #22C55E; }
.badge-low { background: rgba(245,158,11,0.15); color: #F59E0B; }
.badge-out { background: rgba(239,68,68,0.15); color: #EF4444; }
.product-info { padding: 16px; }
.product-vendor { font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.product-title { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 6px; line-height: 1.3; }
.product-rating { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; font-size: 12px; color: rgba(255,255,255,0.65); }
.product-rating .stars { color: #F59E0B; letter-spacing: -1px; }
.product-prices { display: flex; align-items: baseline; gap: 8px; }
.product-price { font-size: 18px; font-weight: 800; color: #CC1F1F; }
.product-compare { font-size: 13px; color: rgba(255,255,255,0.6); text-decoration: line-through; }
.product-add { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 12px; margin-top: 12px; font-size: 13px; font-weight: 700; color: #fff; background: rgba(204,31,31,0.12); border: 1.5px solid rgba(204,31,31,0.3); border-radius: 8px; cursor: pointer; transition: all 0.15s; }
.product-add:hover { background: #CC1F1F; border-color: #CC1F1F; }
.product-add.added { background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.3); color: #22C55E; pointer-events: none; }
.product-add:disabled { opacity: 0.5; cursor: not-allowed; background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); color: rgba(255,255,255,0.62); }
.product-add:disabled:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); color: rgba(255,255,255,0.62); }

/* Footer */
.bottombar { background: #000; border-top: 1px solid rgba(255,255,255,0.08); padding: 12px 2.5rem; display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.bottombar-left { font-size: 11px; color: rgba(255,255,255,0.6); }
.bottombar-right { display: flex; gap: 20px; }
.bottombar-right a { font-size: 11px; color: rgba(255,255,255,0.6); text-decoration: none; }
.bottombar-right a:hover { color: rgba(255,255,255,0.6); }

@media (max-width: 768px) {
  .topnav { padding: 0 1.25rem; }
  .nav-links { display: none; }
  .main { padding: 1.5rem 1.25rem; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .product-info { padding: 12px; }
  .product-price { font-size: 16px; }
  .bottombar { padding: 12px 1.25rem; flex-direction: column; gap: 6px; text-align: center; }
}

/* Light mode */
body.light { background: #F5F5F5; color: #111; }
body.light .topnav { background: #fff; }
body.light .logo { color: #111; }
body.light .breadcrumb { color: #999; }
body.light .breadcrumb a { color: #666; }
body.light .breadcrumb a:hover { color: #111; }
body.light .nav-link { color: rgba(0,0,0,0.5); }
body.light .nav-link:hover { color: #111; background: rgba(0,0,0,0.04); }
body.light .nav-link.active { color: #CC1F1F; background: rgba(204,31,31,0.08); }
body.light .product-card { background: #fff; border-color: #E8E8E8; }
body.light .product-card:hover { border-color: rgba(204,31,31,0.3); }
body.light .product-img { background: #F0F0F0; }
body.light .product-img .no-img { color: rgba(0,0,0,0.1); }
body.light .product-vendor { color: #999; }
body.light .product-title { color: #111; }
body.light .product-rating { color: #999; }
body.light .product-compare { color: #999; }
body.light .product-add { background: rgba(204,31,31,0.06); border-color: rgba(204,31,31,0.2); color: #CC1F1F; }
body.light .product-add:hover { background: #CC1F1F; border-color: #CC1F1F; color: #fff; }
body.light .product-add:disabled { opacity: 0.5; background: #F5F5F5; border-color: #DDD; color: #999; }
body.light .product-add:disabled:hover { background: #F5F5F5; border-color: #DDD; color: #999; }
body.light .bottombar { background: #fff; border-top-color: #E8E8E8; }
body.light .bottombar-left { color: #999; }
body.light .bottombar-right a { color: #999; }
body.light .bottombar-right a:hover { color: #555; }
body.light .theme-btn { color: rgba(0,0,0,0.4); }
body.light .theme-btn:hover { color: #111; background: rgba(0,0,0,0.04); }
body.light .nav-icon-btn { color: rgba(0,0,0,0.4); }
body.light .nav-icon-btn:hover { color: #111; background: rgba(0,0,0,0.04); }
