/* === Explosive Throttle Design System === */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --black: #0a0a0a;
  --white: #f5f2ed;
  --cream: #e8e2d8;
  --orange: #e85d26;
  --orange-glow: #ff6b35;
  --orange-dark: #c44d1e;
  --gray: #6b6560;
  --dark-gray: #1a1816;
  --mid-gray: #2d2926;
  --light-gray: #3d3936;
  --success: #22c55e;
  --danger: #ef4444;
}

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

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

a {
  color: var(--orange);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--orange-glow);
}

img {
  max-width: 100%;
  height: auto;
}

/* === NAVIGATION === */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--mid-gray);
  padding: 0 24px;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--orange);
}

.nav-cart {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-cart-count {
  background: var(--orange);
  color: var(--black);
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -8px;
  right: -10px;
}

.nav-cart-count:empty,
.nav-cart-count[data-count="0"] {
  display: none;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--mid-gray);
  }
  .nav-links.open {
    display: flex;
  }
}

/* === PAGE LAYOUT === */
.page-content {
  padding-top: 64px;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === PAGE HEADER === */
.page-header {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--mid-gray);
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.page-header p {
  font-size: 17px;
  color: var(--gray);
  max-width: 600px;
}

/* === CATEGORY FILTER === */
.category-filter {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 20px;
  border: 1px solid var(--mid-gray);
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  transition: all 0.2s;
}

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

.filter-btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--black);
}

/* === PRODUCT GRID === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2px;
  margin-bottom: 80px;
}

.product-card {
  background: var(--dark-gray);
  overflow: hidden;
  transition: background 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
}

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

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.product-card:hover::before {
  transform: scaleX(1);
}

.product-card-image {
  width: 100%;
  aspect-ratio: 1;
  background: var(--mid-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
  overflow: hidden;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--orange);
  color: var(--black);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
}

.product-card-info {
  padding: 20px;
}

.product-card-category {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}

.product-card-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--white);
}

.product-card-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
}

.product-card-price .compare {
  font-size: 14px;
  color: var(--gray);
  text-decoration: line-through;
  margin-left: 8px;
  font-weight: 400;
}

.product-card-stock {
  font-size: 12px;
  color: var(--gray);
  margin-top: 4px;
}

.product-card-stock.out {
  color: var(--danger);
}

/* === PRODUCT DETAIL === */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  padding: 60px 0 80px;
}

.product-image-main {
  background: var(--dark-gray);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  position: relative;
  overflow: hidden;
}

.product-image-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  padding: 20px 0;
}

.product-info .category-tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-info .category-tag::before {
  content: '';
  width: 30px;
  height: 2px;
  background: var(--orange);
}

.product-info h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
  line-height: 1.1;
}

.product-info .price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 24px;
}

.product-info .price .compare {
  font-size: 20px;
  color: var(--gray);
  text-decoration: line-through;
  margin-left: 12px;
  font-weight: 400;
}

.product-info .description {
  font-size: 16px;
  line-height: 1.7;
  color: var(--cream);
  opacity: 0.85;
  margin-bottom: 32px;
}

.product-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--mid-gray);
  background: var(--dark-gray);
}

.qty-btn {
  background: none;
  border: none;
  color: var(--white);
  font-size: 18px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s;
}

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

.qty-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 600;
  padding: 0 12px;
  min-width: 40px;
  text-align: center;
  color: var(--white);
}

/* === BUTTONS === */
.btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 14px 32px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--orange-glow);
  color: var(--black);
}

.btn-primary:disabled {
  background: var(--mid-gray);
  color: var(--gray);
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--mid-gray);
}

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

.btn-large {
  padding: 16px 40px;
  font-size: 15px;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* === PRODUCT SPECS === */
.product-specs {
  list-style: none;
  border-top: 1px solid var(--mid-gray);
  padding-top: 24px;
}

.product-specs li {
  font-size: 14px;
  color: var(--cream);
  padding: 10px 0;
  border-bottom: 1px solid rgba(45, 41, 38, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-specs li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--orange);
  border-radius: 50%;
  flex-shrink: 0;
}

/* === CART === */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  padding: 40px 0 80px;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 20px;
  background: var(--dark-gray);
  padding: 20px;
  align-items: center;
}

.cart-item-image {
  width: 100px;
  height: 100px;
  background: var(--mid-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  overflow: hidden;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.cart-item-details .item-category {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}

.cart-item-details .item-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--mid-gray);
}

.cart-item-qty button {
  background: none;
  border: none;
  color: var(--white);
  font-size: 14px;
  padding: 6px 10px;
  cursor: pointer;
}

.cart-item-qty button:hover {
  background: var(--mid-gray);
}

.cart-item-qty span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 0 8px;
  min-width: 30px;
  text-align: center;
}

.cart-remove {
  background: none;
  border: none;
  color: var(--gray);
  font-size: 12px;
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

/* Cart Summary */
.cart-summary {
  background: var(--dark-gray);
  padding: 32px;
  position: sticky;
  top: 88px;
  height: fit-content;
}

.cart-summary h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--mid-gray);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--cream);
}

.summary-row.total {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--mid-gray);
}

.cart-summary .btn {
  margin-top: 24px;
}

.cart-empty {
  text-align: center;
  padding: 80px 0;
}

.cart-empty h2 {
  font-size: 28px;
  margin-bottom: 12px;
}

.cart-empty p {
  color: var(--gray);
  font-size: 16px;
  margin-bottom: 32px;
}

/* === SUCCESS PAGE === */
.success-page {
  text-align: center;
  padding: 100px 0;
  max-width: 600px;
  margin: 0 auto;
}

.success-icon {
  font-size: 64px;
  margin-bottom: 24px;
}

.success-page h1 {
  font-size: 36px;
  margin-bottom: 16px;
}

.success-page p {
  font-size: 17px;
  color: var(--cream);
  opacity: 0.85;
  line-height: 1.6;
  margin-bottom: 8px;
}

.success-page .order-id {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  color: var(--gray);
  letter-spacing: 1px;
  margin: 24px 0;
}

.success-page .btn {
  margin-top: 32px;
}

/* === FOOTER (SHARED) === */
.site-footer {
  padding: 40px 24px;
  text-align: center;
  border-top: 1px solid var(--mid-gray);
  margin-top: 80px;
}

.site-footer p {
  font-size: 13px;
  color: var(--gray);
  letter-spacing: 1px;
}

.site-footer a {
  color: var(--orange);
  text-decoration: none;
}

/* === TOAST NOTIFICATION === */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--dark-gray);
  border: 1px solid var(--orange);
  border-left: 4px solid var(--orange);
  padding: 16px 24px;
  font-size: 14px;
  color: var(--white);
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

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

/* === LOADING SKELETON === */
.skeleton {
  background: linear-gradient(90deg, var(--dark-gray) 25%, var(--mid-gray) 50%, var(--dark-gray) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 30px 0 60px;
  }

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

  .cart-item {
    grid-template-columns: 80px 1fr;
    gap: 12px;
  }

  .cart-item-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .cart-item-image {
    width: 80px;
    height: 80px;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .product-card-info {
    padding: 14px;
  }

  .product-card-name {
    font-size: 15px;
  }

  .product-card-price {
    font-size: 17px;
  }

  .page-header {
    padding: 40px 0 24px;
    margin-bottom: 24px;
  }
}
