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

body {
  font-family:
    'Inter',
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  background-color: #f3f4f6;
  color: #111827;
}
#toastMessage.toast-message {
  position: fixed;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 280px;
  max-width: 450px;
  padding: 14px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  z-index: 9999;
  opacity: 0;
  transition:
    top 0.3s ease,
    opacity 0.3s ease;
  pointer-events: none;
}
#toastMessage.toast-message.show {
  top: 20px;
  opacity: 1;
}
#toastMessage.toast-message.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
#toastMessage.toast-message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
#toastMessage.toast-message.warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
/* ===== NAVBAR ===== */

.top-nav {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 999; /* keeps navbar above all content */
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 12px 20px;

  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  align-items: center;
}
/* left */
.nav-left {
  display: flex;
  align-items: center;
  gap: 28px;
  justify-content: flex-start;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  text-decoration: none;
  color: #111827;
}

.logo-blue {
  color: #2563eb;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  font-size: 16px;
  text-decoration: none;
  color: #111827;
}

.nav-links a:hover {
  color: #2563eb;
}

/* center search */
.nav-center {
  display: flex;
  justify-content: center;
}

.nav-search {
  position: relative;
  width: 100%;
}

.nav-search input {
  width: 100%;
  height: 40px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
  padding: 0 44px 0 14px;
  font-size: 13px;
}

.nav-search input::placeholder {
  color: #9ca3af;
}
.nav-search input:focus {
  border: 2px solid #2563eb;

  outline: none;
}

.search-icon {
  display: block;
  width: 18px;
  height: 18px;
}
.search-button {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
}
/* right: account & cart */
.nav-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
}

/* account button */
.account-wrapper {
  position: relative;
}

.account-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  color: #111827;
}

.nav-icon-img {
  width: 18px;
  height: 18px;
}

.chevron-icon {
  width: 14px;
  height: 14px;
}

/* dropdown */
.account-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 180px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.18);
  padding: 6px 0;
  display: none;
  z-index: 20;
}

.account-dropdown a {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  text-decoration: none;
  color: #111827;
}

.account-dropdown a:hover {
  background-color: #f3f4f6;
}

/* show on hover */
.account-wrapper:hover .account-dropdown {
  display: block;
}

/* cart */
.nav-cart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 13px;
  color: #111827;
}

.cart-badge {
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background-color: #2563eb;
  color: #ffffff;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===== HERO ===== */

.hero {
  background-color: #ffffff;
  padding: 40px 20px 36px;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  align-items: center;
  column-gap: 40px;
}

.hero-text h1 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-text p {
  font-size: 15px;
  color: #4b5563;
  max-width: 520px;
  margin-bottom: 22px;
}

.btn-primary {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 8px;
  background-color: #2563eb;
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.hero-image img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
}

/* ===== SECTIONS ===== */

.section {
  padding: 28px 20px 10px;
}

.section-light {
  background-color: #f3f4f6;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
}
/* categories */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.category-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 15px 12px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;

  text-decoration: none;
  color: #222222;
  transition: all 0.25s ease;
  cursor: pointer;
}

.category-card:hover {
  background: #f0f6ff;
  border-color: #bfdbfe;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-5px);
}

.category-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.category-card:hover .category-icon {
  transform: scale(1.1);
}

.category-card span {
  font-size: 14px;
  font-weight: 600;
  color: #333333;
  text-align: center;
}
/* featured builds */

.builds-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.build-card {
  background-color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
}
.build-card {
  transition: all 0.25s ease;
}

.build-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}
.build-image {
  height: 190px;
  padding: 5px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.build-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.build-body h3 {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  text-align: center;
  margin: 12px 0;
}
.btn-secondary {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 8px 0;
  border-radius: 6px;
  border: none;
  background-color: #2563eb;
  color: #ffffff;
  font-size: 13px;
  text-decoration: none;
}

.btn-secondary:hover {
  background-color: #1d4ed8;
}

/* ===== FOOTER ===== */

.footer {
  margin-top: 30px;
  background-color: #f9fafb;
  border-top: 1px solid #e5e7eb;
  padding: 24px 20px 16px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.footer-col h4 {
  font-size: 14px;
  margin-bottom: 6px;
}

.footer-col p,
.footer-col a {
  font-size: 13px;
  color: #6b7280;
  text-decoration: none;
  display: block;
  margin-bottom: 4px;
}

.footer-col a:hover {
  color: #111827;
}

.footer-bottom {
  max-width: 1200px;
  margin: 10px auto 0;
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
}
.nav-cart {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -12px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 50%;
  background-color: #25eb39;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 404 Page */
.error-page-body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  background: #f2f4f7;
}

.error-page-header {
  padding: 16px 24px;
}

.error-logo {
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
  color: #2563eb;
}

.error-page-wrapper {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-box {
  text-align: center;
}

.error-code {
  font-size: 80px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #111827;
}

.error-title {
  font-size: 24px;
  margin: 0 0 12px;
  font-weight: 600;
  color: #111827;
}

.error-title-dot {
  position: relative;
}

.error-text {
  max-width: 420px;
  margin: 0 auto 24px;
  font-size: 13px;
  line-height: 1.5;
  color: #6b7280;
}

.error-btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 6px;
  background: #2563eb;
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
}

.error-btn:hover {
  opacity: 0.9;
}

/* tablets */
@media (max-width: 992px) {
  .nav-container {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

  .nav-left {
    justify-content: space-between;
  }

  .nav-center {
    order: 3;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    row-gap: 24px;
    text-align: center;
  }

  .hero-text p {
    margin-left: auto;
    margin-right: auto;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .builds-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .account-wrapper {
    position: relative;
  }

  .account-dropdown {
    left: 0;
    right: auto;
    top: calc(100% + 8px);
    min-width: 180px;
    max-width: calc(100vw - 28px);
  }
  .nav-container {
    padding: 10px 14px;
  }

  .nav-left {
    flex-wrap: wrap;
    gap: 10px;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    gap: 16px;
  }

  .nav-right {
    justify-content: flex-start;
  }

  .hero {
    padding: 24px 14px 18px;
  }

  .hero-text h1 {
    font-size: 28px;
  }

  .section {
    padding: 22px 14px 8px;
  }

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

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

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