/* ===========================================
   OhmDirect Store — Design System
   Extends the landing page theme
   =========================================== */

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

:root {
  --black: #0a0a0a;
  --white: #fafafa;
  --accent: #00e5a0;
  --accent-dim: #00c488;
  --accent-glow: rgba(0, 229, 160, 0.15);
  --grey-100: #f0f0f0;
  --grey-200: #e0e0e0;
  --grey-600: #6b6b6b;
  --grey-800: #2a2a2a;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.06);
  --card-border-hover: rgba(0, 229, 160, 0.2);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
}

a { color: inherit; text-decoration: none; }

main { flex: 1; }

/* ===========================================
   Navigation
   =========================================== */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.5px;
  color: var(--white);
  text-decoration: none;
}

.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.9rem;
  color: var(--grey-600);
  transition: color 0.2s;
  font-weight: 500;
}

.nav-link:hover, .nav-link.active {
  color: var(--white);
}

.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.1rem;
}

.cart-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--accent);
  color: var(--black);
  min-width: 18px;
  height: 18px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cart-badge.visible {
  opacity: 1;
  transform: scale(1);
}

.cart-badge.bump {
  animation: bump 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bump {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* ===========================================
   Sale Banner
   =========================================== */
.sale-banner {
  margin-top: 60px;
  background: linear-gradient(135deg, #ff3b5c 0%, #ff6b3b 100%);
  text-align: center;
  padding: 0.7rem 1.5rem;
}

.sale-banner-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  letter-spacing: 1.5px;
}

.sale-banner-text strong {
  font-weight: 700;
}

/* ===========================================
   Page Header
   =========================================== */
.page-header {
  padding: 8rem 2rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.page-header h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.page-header .highlight {
  background: linear-gradient(135deg, var(--accent) 0%, #00b8d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  color: var(--grey-600);
  font-size: 1.1rem;
  max-width: 600px;
  line-height: 1.7;
}

.page-label {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

/* ===========================================
   Category Tabs
   =========================================== */
.category-tabs {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.category-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 100px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--grey-600);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.category-tab:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}

.category-tab.active {
  color: var(--black);
  background: var(--accent);
  border-color: var(--accent);
}

.category-tab.active .tab-count {
  background: rgba(0, 0, 0, 0.2);
  color: var(--black);
}

.tab-count {
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  color: var(--grey-600);
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  min-width: 20px;
  text-align: center;
}

.empty-state {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
}

.empty-state p {
  color: var(--grey-600);
  font-size: 1.05rem;
}

/* ===========================================
   Product Grid
   =========================================== */
.product-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ===========================================
   Product Card
   =========================================== */
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.product-card:hover {
  border-color: var(--card-border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 229, 160, 0.06);
}

.product-image {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.8), transparent);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Hide gradient overlay on cards with real images */
.product-image.has-image::after {
  opacity: 0;
}

.product-emoji {
  font-size: 4.5rem;
  filter: drop-shadow(0 0 30px rgba(0, 229, 160, 0.2));
  z-index: 1;
  transition: transform 0.3s ease;
}

.product-card:hover .product-emoji {
  transform: scale(1.1);
}

/* Real product image inside card */
.product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 18px;
  display: block;
  transition: transform 0.35s ease;
  z-index: 1;
  position: relative;
}

.product-card:hover .product-img {
  transform: scale(1.06);
}

.product-info {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-info h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 0.35rem;
}

.product-tagline {
  color: var(--grey-600);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-rating {
  font-size: 0.8rem;
  color: #f5a623;
  letter-spacing: 1px;
}

.product-rating .count {
  color: var(--grey-600);
  font-size: 0.75rem;
  margin-left: 0.25rem;
  letter-spacing: 0;
}

.product-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
}

/* Featured badge */
.product-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  background: var(--accent);
  color: var(--black);
}

/* Sale badge on product cards */
.sale-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  background: #ff3b5c;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  box-shadow: 0 2px 12px rgba(255, 59, 92, 0.4);
}

/* Discount price styles on cards */
.product-price-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.product-price-original {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--grey-600);
  text-decoration: line-through;
}

/* Detail page discount styles */
.detail-price-original {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--grey-600);
  text-decoration: line-through;
  margin-right: 0.75rem;
}

.detail-sale-badge {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  background: #ff3b5c;
  color: #fff;
  vertical-align: middle;
  box-shadow: 0 2px 12px rgba(255, 59, 92, 0.3);
}

/* ===========================================
   Product Detail Page
   =========================================== */
.product-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 7rem 2rem 4rem;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.product-detail-image {
  aspect-ratio: 1;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--card-border);
}

.product-detail-image .product-emoji {
  font-size: 8rem;
}

/* Real product image on detail page */
.product-detail-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 32px;
  display: block;
  transition: transform 0.4s ease;
}

.product-detail-image.has-image:hover .product-detail-img {
  transform: scale(1.03);
}

.product-detail-info {
  padding-top: 1rem;
}

.product-detail-category {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 500;
}

.product-detail-info h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.product-detail-tagline {
  color: var(--grey-600);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.product-detail-rating {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.product-detail-rating .stars {
  color: #f5a623;
  font-size: 1rem;
  letter-spacing: 2px;
}

.product-detail-rating .count {
  color: var(--grey-600);
  font-size: 0.9rem;
}

.product-detail-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.product-detail-stock {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.stock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.product-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.2px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 229, 160, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

/* Editorial Review */
.editorial-section {
  margin-bottom: 3rem;
}

.editorial-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.editorial-section h2 .icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(0, 229, 160, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.editorial-review {
  color: var(--grey-200);
  font-size: 1.05rem;
  line-height: 1.85;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}

/* Specs Grid */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.spec-item {
  padding: 1rem 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
}

.spec-label {
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--grey-600);
  margin-bottom: 0.35rem;
}

.spec-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--white);
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--grey-600);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.back-link:hover { color: var(--white); }

/* ===========================================
   Cart Page
   =========================================== */
.cart-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 7rem 2rem 4rem;
}

.cart-section h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
}

.cart-subtitle {
  color: var(--grey-600);
  margin-bottom: 3rem;
  font-size: 1rem;
}

.cart-empty {
  text-align: center;
  padding: 5rem 2rem;
}

.cart-empty-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.cart-empty h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.cart-empty p {
  color: var(--grey-600);
  margin-bottom: 2rem;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.cart-item:hover {
  border-color: rgba(255,255,255,0.1);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.cart-item-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.cart-item-info p {
  color: var(--grey-600);
  font-size: 0.85rem;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.qty-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}

.qty-value {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  min-width: 24px;
  text-align: center;
}

.cart-item-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  text-align: right;
  min-width: 80px;
}

.cart-item-remove {
  cursor: pointer;
  color: var(--grey-600);
  font-size: 1.2rem;
  padding: 0.25rem;
  transition: color 0.2s;
  background: none;
  border: none;
}

.cart-item-remove:hover {
  color: #ff4444;
}

/* Cart Summary */
.cart-summary {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 2rem;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
}

.cart-summary-row.total {
  border-top: 1px solid var(--card-border);
  margin-top: 0.5rem;
  padding-top: 1.25rem;
}

.cart-summary-label {
  color: var(--grey-600);
  font-size: 0.95rem;
}

.cart-summary-value {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
}

.cart-summary-row.total .cart-summary-label {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 600;
}

.cart-summary-row.total .cart-summary-value {
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 700;
}

.cart-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cart-note {
  text-align: center;
  color: var(--grey-600);
  font-size: 0.8rem;
  margin-top: 1rem;
}

/* ===========================================
   Checkout Success
   =========================================== */
.success-section {
  max-width: 600px;
  margin: 0 auto;
  padding: 10rem 2rem 4rem;
  text-align: center;
}

.success-icon {
  font-size: 5rem;
  margin-bottom: 2rem;
}

.success-section h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 1rem;
}

.success-section p {
  color: var(--grey-600);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* ===========================================
   Footer
   =========================================== */
footer {
  padding: 2.5rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.footer-left {
  font-size: 0.8rem;
  color: var(--grey-600);
}

.footer-right {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.15);
}

/* ===========================================
   Toast Notification
   =========================================== */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--grey-800);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 200;
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  font-size: 1.2rem;
}

.toast-message {
  font-size: 0.9rem;
  font-weight: 500;
}

.toast-link {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.toast-link:hover {
  text-decoration: underline;
}

/* ===========================================
   Divider
   =========================================== */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 160, 0.2), transparent);
}

/* ===========================================
   Responsive
   =========================================== */
@media (max-width: 768px) {
  nav { padding: 0.9rem 1.25rem; }
  .nav-links { gap: 1.25rem; }

  .page-header { padding: 7rem 1.25rem 2rem; }

  .category-tabs {
    padding: 0 1.25rem 1.5rem;
    gap: 0.4rem;
  }

  .category-tab {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    padding: 0 1.25rem 4rem;
  }

  .product-emoji { font-size: 3rem; }
  .product-info { padding: 1rem; }
  .product-info h3 { font-size: 0.95rem; }
  .product-tagline { font-size: 0.8rem; }

  .product-detail { padding: 6rem 1.25rem 3rem; }
  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .product-detail-image .product-emoji { font-size: 5rem; }

  .cart-section { padding: 6rem 1.25rem 3rem; }
  .cart-item {
    grid-template-columns: 60px 1fr;
    gap: 1rem;
  }
  .cart-item-qty { grid-column: 2; }
  .cart-item-price { grid-column: 2; }

  .product-actions {
    flex-direction: column;
  }

  .specs-grid {
    grid-template-columns: 1fr 1fr;
  }

  footer {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .specs-grid {
    grid-template-columns: 1fr;
  }
}
