:root {
  --bg-dark: #111827;
  --bg-darker: #020617;
  --bg-light: #f3f4f6;
  --accent: #f97316; /* badala ya Amazon yellow */
  --accent-dark: #ea580c;
  --text-light: #f9fafb;
  --text-muted: #9ca3af;
  --card-bg: #ffffff;
  --border-soft: #e5e7eb;
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-soft: 0 2px 6px rgba(15, 23, 42, 0.15);
  --max-width: 1200px;
  --transition-fast: 0.15s ease-in-out;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-light);
  color: #111827;
}

/* Top bar */

.top-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: var(--bg-dark);
  color: var(--text-light);
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-bar__logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 140px;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--accent);
  color: #111827;
  font-weight: 700;
}

.logo-mark.small {
  width: 24px;
  height: 24px;
  font-size: 0.8rem;
}

.logo-text {
  font-weight: 700;
  letter-spacing: 0.03em;
}

.top-bar__search {
  flex: 1;
  display: flex;
  align-items: stretch;
  max-width: 650px;
}

.search-category {
  border: none;
  background: #e5e7eb;
  padding: 0.4rem 0.6rem;
  border-radius: 999px 0 0 999px;
  font-size: 0.85rem;
  outline: none;
}

.search-input {
  flex: 1;
  border: none;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
  outline: none;
}

.search-btn {
  border: none;
  background: var(--accent);
  color: #111827;
  padding: 0 0.9rem;
  border-radius: 0 999px 999px 0;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.search-btn:hover {
  background: var(--accent-dark);
}

.top-bar__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.action-item {
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  cursor: pointer;
}

.action-label {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.action-strong {
  font-weight: 600;
  font-size: 0.8rem;
}

.cart {
  position: relative;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.9rem;
}

.cart-count {
  position: absolute;
  top: -6px;
  left: 10px;
  background: var(--accent);
  color: #111827;
  border-radius: 999px;
  padding: 0 5px;
  font-size: 0.7rem;
  font-weight: 700;
}

/* Mobile menu toggle */

.mobile-menu-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid #4b5563;
  color: var(--text-light);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
}

/* Nav bar */

.nav-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: #1f2937;
  color: var(--text-light);
  overflow-x: auto;
}

.nav-item {
  border: none;
  background: transparent;
  color: var(--text-light);
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition-fast);
}

.nav-item:hover {
  background: #374151;
}

/* Hero */

.hero {
  background: linear-gradient(135deg, #111827, #020617);
  color: var(--text-light);
  padding: 2.5rem 1rem 3rem;
  display: flex;
  justify-content: center;
}

.hero-content {
  width: 100%;
  max-width: var(--max-width);
}

.hero-content h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.hero-content p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.hero-btn {
  border: none;
  background: var(--accent);
  color: #111827;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.hero-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

/* Main */

.main {
  max-width: var(--max-width);
  margin: -2rem auto 2rem;
  padding: 0 1rem;
}

/* Product sections */

.product-section {
  background: transparent;
  margin-bottom: 1.5rem;
}

.product-section h2 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.product-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.product-image {
  width: 100%;
  height: 150px;
  border-radius: var(--radius-sm);
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 0.8rem;
}

.product-title {
  font-size: 0.9rem;
  font-weight: 500;
}

.product-price {
  font-weight: 700;
  color: #16a34a;
  font-size: 0.9rem;
}

.product-btn {
  margin-top: auto;
  border: none;
  background: #0f766e;
  color: #ecfeff;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.product-btn:hover {
  background: #115e59;
  transform: translateY(-1px);
}

/* Footer */

.footer {
  background: var(--bg-darker);
  color: var(--text-light);
  padding-top: 1rem;
  margin-top: 2rem;
}

.back-to-top {
  display: block;
  width: 100%;
  border: none;
  background: #1f2937;
  color: var(--text-light);
  padding: 0.6rem 0;
  cursor: pointer;
  font-size: 0.8rem;
}

.footer-columns {
  max-width: var(--max-width);
  margin: 1rem auto;
  padding: 0 1rem 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.footer-col h4 {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.footer-col a {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 0.25rem;
}

.footer-col a:hover {
  color: var(--text-light);
}

.footer-bottom {
  border-top: 1px solid #111827;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.8rem;
}

/* Responsive */

@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .top-bar {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .top-bar__search {
    order: 3;
    width: 100%;
  }

  .top-bar__actions {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .nav-bar {
    display: none;
    flex-wrap: wrap;
  }

  .nav-bar.open {
    display: flex;
  }

  .hero {
    padding: 1.5rem 1rem 2rem;
  }

  .hero-content h1 {
    font-size: 1.4rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .top-bar__logo {
    min-width: auto;
  }
}