/* BuckSteel Design System */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=DM+Sans:wght@400;500;600&display=swap');

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

:root {
  --bark: #1a1612;
  --steel: #2d2d2d;
  --rust: #c45a2d;
  --rust-light: #d4744a;
  --sand: #e8dcc8;
  --cream: #f5f0e8;
  --white: #ffffff;
  --moss: #3d5a3a;
  --danger: #c0392b;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bark);
  color: var(--cream);
  overflow-x: hidden;
  min-height: 100vh;
}

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

/* NAV */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(26, 22, 18, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(196, 90, 45, 0.15);
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--cream);
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--rust); }

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

.nav-links a {
  font-size: 0.9rem;
  color: rgba(232, 220, 200, 0.7);
  transition: color 0.2s;
  font-weight: 500;
}
.nav-links a:hover { color: var(--cream); }

.nav-cart {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: rgba(232, 220, 200, 0.7);
  transition: color 0.2s;
  cursor: pointer;
}
.nav-cart:hover { color: var(--cream); }

.cart-badge {
  background: var(--rust);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.cart-badge:empty, .cart-badge[data-count="0"] { display: none; }

/* MOBILE NAV */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cream);
  margin: 5px 0;
  transition: all 0.3s;
}

@media (max-width: 768px) {
  .nav-hamburger { display: block; }
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(26, 22, 18, 0.98);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
    border-bottom: 1px solid rgba(196, 90, 45, 0.15);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
}

/* MAIN CONTAINER */
.main {
  padding-top: 80px;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* SECTION LABELS */
.section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--rust);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-label::before {
  content: '';
  width: 2rem;
  height: 1px;
  background: var(--rust);
}

/* HEADINGS */
h1, h2, h3 {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--cream);
}

/* BREADCRUMBS */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(232, 220, 200, 0.5);
  margin-bottom: 1.5rem;
}
.breadcrumb a { transition: color 0.2s; }
.breadcrumb a:hover { color: var(--rust); }
.breadcrumb .sep { opacity: 0.3; }

/* PRODUCT CARD */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: rgba(45, 45, 45, 0.4);
  border: 1px solid rgba(196, 90, 45, 0.08);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  border-color: rgba(196, 90, 45, 0.3);
  transform: translateY(-2px);
}

.product-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: rgba(45, 45, 45, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  position: relative;
  overflow: hidden;
}

.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.product-card-img .emoji-fallback {
  font-size: 3.5rem;
}

.product-card-img .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--rust);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 3px;
}

.product-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rust);
  margin-bottom: 0.5rem;
}

.product-card-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.product-card-desc {
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(232, 220, 200, 0.5);
  margin-bottom: 1rem;
  flex: 1;
}

.product-card-price {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.price-current {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cream);
}

.price-compare {
  font-size: 0.9rem;
  color: rgba(232, 220, 200, 0.35);
  text-decoration: line-through;
}

/* CATEGORY FILTERS */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.filter-btn {
  background: rgba(45, 45, 45, 0.5);
  border: 1px solid rgba(196, 90, 45, 0.15);
  color: rgba(232, 220, 200, 0.7);
  padding: 0.6rem 1.25rem;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover {
  border-color: rgba(196, 90, 45, 0.4);
  color: var(--cream);
}
.filter-btn.active {
  background: var(--rust);
  border-color: var(--rust);
  color: var(--white);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--rust);
  color: var(--white);
}
.btn-primary:hover { background: var(--rust-light); }

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(196, 90, 45, 0.3);
  color: var(--cream);
}
.btn-secondary:hover { border-color: var(--rust); }

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1rem;
}

.btn-full { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* FORM INPUTS */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(232, 220, 200, 0.7);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(45, 45, 45, 0.5);
  border: 1px solid rgba(196, 90, 45, 0.15);
  border-radius: 4px;
  color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--rust);
}
.form-input::placeholder {
  color: rgba(232, 220, 200, 0.3);
}

/* DIVIDER */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(196, 90, 45, 0.3), transparent);
}

/* FOOTER */
.footer {
  padding: 2.5rem 2rem;
  border-top: 1px solid rgba(196, 90, 45, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 4rem;
}

.footer-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: rgba(232, 220, 200, 0.5);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  font-size: 0.85rem;
  color: rgba(232, 220, 200, 0.4);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--rust); }

/* LOADING STATE */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  color: rgba(232, 220, 200, 0.4);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(196, 90, 45, 0.2);
  border-top-color: var(--rust);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 0.75rem;
}

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

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}
.empty-state h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--cream);
}
.empty-state p {
  color: rgba(232, 220, 200, 0.5);
  margin-bottom: 1.5rem;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--steel);
  border: 1px solid rgba(196, 90, 45, 0.3);
  color: var(--cream);
  padding: 1rem 1.5rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* MOBILE */
@media (max-width: 768px) {
  .container { padding: 0 1.25rem; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .footer { flex-direction: column; text-align: center; }
}

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