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

:root {
  --bg-dark: #020617;
  --bg-panel: #020617;
  --bg-panel-soft: #0b1220;
  --accent: #f97316;
  --accent-soft: #fbbf24;
  --accent-soft-rgb: 251, 191, 36;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --border-soft: rgba(148, 163, 184, 0.35);
  --danger: #ef4444;
  --success: #22c55e;
}

body {
  font-family: "Poppins", Arial, sans-serif;
  background: radial-gradient(circle at top left, #020617, #020617);
  color: var(--text-main);
  min-height: 100vh;
  padding-bottom: 56px;
}

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
}

.page-shell {
  max-width: 1240px;
  margin: 12px auto 32px;
  padding: 0 12px;
}

/* NAVBAR */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.98);
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.9);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.6);
  position: sticky;
  top: 6px;
  z-index: 40;
  backdrop-filter: blur(10px);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-text {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 2px;
}

.logo-dot {
  color: var(--accent-soft);
}

.nav-badge {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: #e5e7eb;
}

.nav-links a {
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  transition: width 0.18s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.nav-icon-link {
  padding: 6px 12px;
  color: #e5e7eb;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 12px;
  transition: all 0.2s ease;
}

.nav-icon-link:hover {
  background: rgba(15, 23, 42, 0.8);
}

.mini-cart-wrapper {
  position: relative;
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.8);
  color: #e5e7eb;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  font-size: 12px;
}

.cart-btn:hover {
  background: rgba(15, 23, 42, 1);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.8);
}

.cart-icon {
  font-size: 15px;
}

.cart-count {
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: #111827;
}

.nav-auth {
  display: flex;
  gap: 8px;
}

.btn-nav-outline,
.btn-nav-solid {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn-nav-outline {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.7);
  color: #e5e7eb;
}

.btn-nav-outline:hover {
  background: rgba(15, 23, 42, 0.92);
}

.btn-nav-solid {
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  color: #111827;
  font-weight: 600;
}

.btn-nav-solid:hover {
  opacity: 0.94;
  box-shadow: 0 7px 18px rgba(248, 181, 0, 0.35);
  transform: translateY(-1px);
}

.user-menu {
  position: relative;
}

.user-menu-btn {
  cursor: pointer;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 8px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 8px;
  display: none;
  flex-direction: column;
  min-width: 150px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.9);
}

.user-dropdown.active {
  display: flex;
}

.user-dropdown a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  transition: background 0.2s ease;
}

.user-dropdown a:hover {
  background: rgba(15, 23, 42, 0.8);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #e5e7eb;
}

.nav-links-mobile {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.98);
  border-bottom: 1px solid var(--border-soft);
  padding: 16px;
  display: none;
  flex-direction: column;
  gap: 12px;
  z-index: 30;
  backdrop-filter: blur(10px);
}

.nav-links-mobile a {
  padding: 8px;
  border-radius: 8px;
  font-size: 14px;
}

.nav-links-mobile a:hover {
  background: rgba(15, 23, 42, 0.8);
}

/* HERO SECTION */
.hero {
  text-align: center;
  padding: 60px 20px 40px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.4), transparent);
  border-radius: 16px;
  margin-bottom: 40px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 600;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
}

/* CATEGORIES */
.categories-section {
  margin-bottom: 60px;
}

.section-title {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 32px;
  text-align: center;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  padding: 0 12px;
}

.category-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.05), rgba(249, 115, 22, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border-color: var(--accent-soft);
}

.category-card:hover::before {
  opacity: 1;
}

.category-icon {
  font-size: 64px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.category-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.category-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.category-btn {
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  color: #111827;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
}

.category-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(248, 181, 0, 0.4);
}

/* PRODUCTS GRID */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.product-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
  border-color: var(--accent-soft);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: #111827;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  z-index: 2;
}

.product-image {
  position: relative;
  width: 100%;
  height: 220px;
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.btn-wishlist {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-soft);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.btn-wishlist:hover {
  background: var(--accent);
  color: #111827;
}

.product-info {
  padding: 16px;
}

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

.product-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}

.product-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.product-price .price {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-soft);
}

.product-price .unit {
  font-size: 12px;
  color: var(--text-muted);
}

.product-stock {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 600;
}

.product-stock.in-stock {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.product-stock.low-stock {
  background: rgba(251, 191, 36, 0.2);
  color: var(--accent-soft);
}

.product-stock.out-of-stock {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.product-actions {
  display: flex;
  gap: 8px;
}

.btn-view,
.btn-add-cart {
  flex: 1;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-view {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-main);
}

.btn-view:hover {
  background: rgba(15, 23, 42, 0.8);
}

.btn-add-cart {
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  color: #111827;
}

.btn-add-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(248, 181, 0, 0.4);
}

.btn-view-all {
  display: inline-block;
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  color: #111827;
  font-weight: 600;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.btn-view-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(248, 181, 0, 0.4);
}

/* FEATURES */
.features {
  background: rgba(15, 23, 42, 0.4);
  border-radius: 16px;
  padding: 48px 24px;
  margin-bottom: 60px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}

.feature-item {
  text-align: center;
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.feature-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* FOOTER */
.footer {
  padding: 48px 20px 24px;
  border-top: 1px solid var(--border-soft);
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto 32px;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 16px;
  font-size: 16px;
}

.footer-section ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-section ul a {
  color: var(--text-muted);
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-section ul a:hover {
  color: var(--accent-soft);
}

.footer-section p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
}

/* MOBILE BOTTOM BAR */
.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.98);
  border-top: 1px solid var(--border-soft);
  padding: 8px 16px;
  display: none;
  justify-content: space-around;
  align-items: center;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.mobile-bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.mobile-bottom-item:hover {
  color: var(--accent-soft);
}

.mobile-bottom-icon {
  font-size: 20px;
}

/* PAGE HEADER */
.page-header {
  text-align: center;
  padding: 40px 20px;
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 16px;
}

/* BREADCRUMB */
.breadcrumb {
  padding: 16px 0;
  font-size: 14px;
  color: var(--text-muted);
}

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

.breadcrumb a:hover {
  text-decoration: underline;
}

/* AUTH PAGES */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-container {
  max-width: 450px;
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 2px;
  display: block;
  margin-bottom: 24px;
}

.auth-header h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-soft);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.link-secondary {
  color: var(--accent-soft);
  transition: opacity 0.2s ease;
}

.link-secondary:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.btn-auth-primary {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  color: #111827;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.btn-auth-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(248, 181, 0, 0.4);
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  font-size: 14px;
}

.auth-footer a {
  color: var(--accent-soft);
  font-weight: 600;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
}

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

.alert-success {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
  border: 1px solid var(--success);
}

/* FILTERS */
.filters-section {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  padding: 20px;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 12px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-group label {
  font-size: 14px;
  font-weight: 500;
}

.filter-group select {
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 14px;
  cursor: pointer;
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-form input {
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 14px;
  min-width: 200px;
}

.search-form button {
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  color: #111827;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.search-form button:hover {
  opacity: 0.9;
}

.no-products {
  text-align: center;
  padding: 60px 20px;
}

.no-products p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links,
  .nav-auth {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .mobile-bottom-bar {
    display: flex;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 16px;
  }

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

  .section-title {
    font-size: 24px;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
  }

  .page-header h1 {
    font-size: 28px;
  }
}
