:root {
  --primary: #d97706;
  --primary-dark: #b45309;
  --primary-light: #fef3c7;
  --dark-bg: #0f172a;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-white: #ffffff;
  --success: #16a34a;
  --danger: #dc2626;
  --radius: 8px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text-main);
  background-color: var(--slate-50);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  background-color: var(--slate-900);
  color: var(--text-white);
  border-bottom: 2px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-white);
  font-size: 1.25rem;
  font-weight: 700;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  font-weight: 800;
  border-radius: var(--radius);
  font-size: 1.2rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--slate-200);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

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

.cart-badge {
  background-color: var(--primary);
  color: white;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 9999px;
  font-weight: bold;
}

main {
  flex: 1;
}

.hero-banner {
  background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.9)), url('') center/cover no-repeat;
  color: white;
  padding: 4.5rem 1.5rem;
  text-align: center;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--slate-200);
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: var(--slate-700);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--slate-800);
}

.btn-block {
  width: 100%;
  text-align: center;
}

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

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--slate-200);
  padding-bottom: 1rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--slate-900);
}

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

.product-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--slate-200);
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.product-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background-color: var(--slate-100);
}

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

.product-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.25rem;
}

.product-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.5rem;
}

.product-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--slate-100);
}

.product-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--slate-900);
}

.product-stock {
  font-size: 0.8rem;
  font-weight: 600;
}

.stock-in {
  color: var(--success);
}

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

.cart-action-row {
  margin-top: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.feature-box {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--slate-200);
  text-align: center;
}

.feature-box h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--slate-900);
}

.feature-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.site-footer {
  background-color: var(--slate-900);
  color: var(--slate-200);
  margin-top: auto;
  padding: 2.5rem 1.5rem 1.5rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--slate-700);
}

.footer-title {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--slate-200);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--slate-900);
  color: white;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
  font-size: 0.9rem;
  border-left: 4px solid var(--primary);
  animation: slideIn 0.3s ease-out;
}

.toast-success {
  border-left-color: var(--success);
}

.toast-error {
  border-left-color: var(--danger);
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
  }
  .hero-title {
    font-size: 1.85rem;
  }
}