/* RotorDrop Store — Shared Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --black: #0a0a0a;
  --dark: #111113;
  --card: #18181b;
  --border: #27272a;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --accent: #22d3ee;
  --accent-glow: rgba(34, 211, 238, 0.15);
  --green: #4ade80;
  --orange: #fb923c;
  --pink: #f472b6;
  --purple: #a78bfa;
  --amber: #f59e0b;
  --red: #ef4444;
}

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--black);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

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

/* ─── HEADER ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

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

.header-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--text);
}

.header-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.cart-link {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--accent);
  color: var(--black);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 100px;
}

/* ─── PAGE LAYOUT ─── */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
  min-height: calc(100vh - 64px - 80px);
}

.page-header {
  margin-bottom: 3rem;
}

.page-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.page-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.page-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 500px;
}

/* ─── PRODUCT GRID ─── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.product-card {
  background: var(--dark);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: background 0.3s;
  cursor: pointer;
  position: relative;
}

.product-card:hover {
  background: var(--card);
}

.product-image {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  overflow: hidden;
  position: relative;
}

.product-image svg {
  width: 60%;
  height: 60%;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.product-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

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

.product-compare-price {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: fit-content;
}

.product-badge.sale {
  background: rgba(74, 222, 128, 0.12);
  color: var(--green);
}

.product-badge.category {
  background: rgba(161, 161, 170, 0.1);
  color: var(--text-muted);
}

/* ─── FREE SHIPPING BADGE ─── */
.shipping-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.15);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.02em;
  margin-top: 0.25rem;
  width: fit-content;
}

.shipping-badge .ship-icon {
  font-size: 0.8rem;
}

/* ─── PRODUCT DETAIL ─── */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.detail-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  overflow: hidden;
  position: sticky;
  top: 96px;
}

.detail-image svg {
  width: 55%;
  height: 55%;
}

.detail-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.detail-name {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.detail-price-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.detail-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
}

.detail-compare-price {
  font-size: 1.1rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.detail-save {
  font-size: 0.85rem;
  color: var(--green);
  font-weight: 600;
}

.detail-description {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.detail-shipping-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.15);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green);
  width: fit-content;
}

.detail-shipping-badge .ship-icon {
  font-size: 1.1rem;
}

/* ─── SPECS TABLE ─── */
.specs-section {
  margin-top: 1rem;
}

.specs-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.specs-table {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.specs-row {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.specs-row:last-child {
  border-bottom: none;
}

.specs-label {
  width: 40%;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--dark);
}

.specs-value {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--card);
}

/* ─── FEATURES LIST ─── */
.features-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: var(--accent-glow);
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-primary:hover {
  background: #06b6d4;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.82rem;
  border-radius: 8px;
}

.btn-full {
  width: 100%;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* ─── RELATED PARTS SECTION ─── */
.related-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.related-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.related-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.related-card {
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.2s;
}

.related-card:hover {
  border-color: var(--text-muted);
  background: var(--card);
}

.related-card .product-image {
  aspect-ratio: 3/2;
  border-radius: 8px;
}

.related-card .product-image svg {
  width: 50%;
  height: 50%;
}

.related-card-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.related-card-price {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
}

/* ─── CART ─── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  align-items: start;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.cart-item {
  background: var(--dark);
  padding: 1.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.cart-item-image svg {
  width: 55%;
  height: 55%;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.cart-item-type {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

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

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

.qty-btn:hover {
  background: var(--border);
}

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

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

.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1.1rem;
  transition: color 0.2s;
}

.cart-item-remove:hover {
  color: var(--red);
}

/* Cart Summary */
.cart-summary {
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cart-summary-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.cart-summary-rows {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.cart-summary-row .label {
  color: var(--text-muted);
}

.cart-summary-row .value {
  font-weight: 600;
}

.cart-summary-row .value.free {
  color: var(--green);
}

.cart-summary-divider {
  height: 1px;
  background: var(--border);
}

.cart-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.15rem;
}

.cart-summary-total .label {
  font-weight: 600;
}

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

/* Cart Empty State */
.cart-empty {
  text-align: center;
  padding: 6rem 2rem;
}

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

.cart-empty h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

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

/* ─── CATEGORY FILTER ─── */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 6px 16px;
  border-radius: 100px;
  background: var(--dark);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.filter-btn.active {
  background: var(--accent-glow);
  border-color: rgba(34, 211, 238, 0.3);
  color: var(--accent);
}

/* ─── GUIDE CARDS ─── */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.guide-card {
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.guide-card:hover {
  border-color: var(--accent);
  background: var(--card);
}

.guide-card.featured {
  border-color: var(--amber);
}

.guide-card.featured::before {
  content: 'BEST VALUE';
  position: absolute;
  top: 16px;
  right: -28px;
  padding: 4px 40px;
  background: var(--amber);
  color: var(--black);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  transform: rotate(45deg);
}

.guide-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.guide-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.guide-card .guide-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.guide-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.25rem 0;
}

.guide-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.guide-feature .check {
  color: var(--green);
  font-weight: 700;
  font-size: 0.9rem;
}

.guide-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-top: auto;
}

.guide-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.guide-compare-price {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

/* ─── CHECKOUT SUCCESS ─── */
.success-page {
  text-align: center;
  padding: 6rem 2rem;
  max-width: 600px;
  margin: 0 auto;
}

.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.1);
  border: 2px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 2rem;
  color: var(--green);
}

.success-page h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.success-page p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.success-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── TOAST ─── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-check {
  color: var(--green);
  font-weight: 700;
}

/* ─── BREADCRUMB ─── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.breadcrumb a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb .sep {
  opacity: 0.4;
}

.breadcrumb .current {
  color: var(--text);
}

/* ─── LOADING ─── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 0.75rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── FOOTER ─── */
.site-footer {
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.site-footer .brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--text);
}

/* ─── CHECKOUT LOADING OVERLAY ─── */
.checkout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  z-index: 200;
}

.checkout-overlay .loading-spinner {
  width: 40px;
  height: 40px;
  border-width: 3px;
  margin: 0;
}

.checkout-overlay p {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .detail-image {
    position: static;
    aspect-ratio: 4/3;
  }

  .cart-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page {
    padding: 2rem 1.25rem 4rem;
  }

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

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

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-inner {
    padding: 0 1.25rem;
  }

  .header-nav {
    gap: 1rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .related-grid {
    grid-template-columns: 1fr;
  }

  .cart-item {
    flex-wrap: wrap;
  }

  .header-nav {
    gap: 0.75rem;
  }
}
