@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue",
    sans-serif;
  font-weight: 400;
  font-variation-settings: "wght" var(--font-weight, 400);
  line-height: 1.5;
  color: var(--secondary);
  background: var(--bg);
  transition: background-color 0.3s ease, color 0.3s ease;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

a:hover {
  text-decoration: underline;
}

button,
input,
select {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--secondary);
  color: var(--surface);
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  z-index: 999;
}

.skip-link:focus {
  left: 0.75rem;
}

/* ===== Layout tokens ===== */
:root {
  --container: 1100px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.12);
  --border: rgba(2, 6, 23, 0.12);
  --muted: #64748b;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --secondary: #0f172a;
  
  /* Font-weight variables for variable fonts */
  --font-weight: 400;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
}

/* Dark mode support via system preference */
@media (prefers-color-scheme: dark) {
  :root {
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --border: rgba(148, 163, 184, 0.1);
    --muted: #94a3b8;
    --bg: #0f172a;
    --surface: #1e293b;
    --primary: #3b82f6;
    --primary-2: #1e40af;
    --secondary: #e2e8f0;
  }
}

/* Dark mode via data attribute (user preference override) */
html[data-theme="dark"] {
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  --border: rgba(148, 163, 184, 0.1);
  --muted: #94a3b8;
  --bg: #0f172a;
  --surface: #1e293b;
  --primary: #3b82f6;
  --primary-2: #1e40af;
  --secondary: #e2e8f0;
}

/* Light mode via data attribute (user preference override) */
html[data-theme="light"] {
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.12);
  --border: rgba(2, 6, 23, 0.12);
  --muted: #64748b;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --secondary: #0f172a;
}

.page {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.25rem 1rem 4rem;
}

@media (min-width: 900px) {
  .page {
    padding-right: 4.75rem; /* breathing room for fixed cart */
  }
}

/* Page container with sidebar */
.page__container {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .page__container {
    grid-template-columns: 240px 1fr;
  }
}

/* Sidebar */
.sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  position: sticky;
  top: 7rem;
  align-self: start;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
}

.sidebar__widget-title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: var(--font-weight-bold);
  color: var(--secondary);
}

html[data-theme="dark"] .sidebar__widget-title {
  color: #e2e8f0;
}

/* Categories navigation */
.categories-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.categories-nav__item {
  margin-bottom: 0.25rem;
}

.categories-nav__link {
  display: block;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  color: var(--secondary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  transition: all 200ms ease;
  position: relative;
}

.categories-nav__link:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  padding-left: 1rem;
}

html[data-theme="dark"] .categories-nav__link {
  color: #e2e8f0;
}

html[data-theme="dark"] .categories-nav__link:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

/* Submenu styles */
.categories-nav__submenu {
  list-style: none;
  margin: 0.25rem 0 0 1rem;
  padding: 0;
  display: none;
}

/* Show submenu on hover */
.categories-nav__item:hover > .categories-nav__submenu {
  display: block;
}

.categories-nav__subitem {
  margin-bottom: 0.15rem;
}

.categories-nav__sublink {
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 200ms ease;
}

.categories-nav__sublink:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
  padding-left: 1rem;
}

/* Add arrow indicators for items with submenu */
.categories-nav__item:has(.categories-nav__submenu) > .categories-nav__link::after {
  content: '›';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  font-size: 1.2rem;
  font-weight: var(--font-weight-semibold);
  transition: transform 200ms ease;
}

.categories-nav__item:hover > .categories-nav__link::after {
  transform: translateY(-50%) rotate(90deg) scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 1023px) {
  .sidebar {
    position: relative;
    top: 0;
    max-height: none;
  }
  
  .categories-nav__submenu {
    display: block;
  }
}

/* ===== Header / nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 247, 251, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  .site-header {
    background: rgba(15, 23, 42, 0.92);
  }
}

html[data-theme="dark"] .site-header {
  background: rgba(15, 23, 42, 0.92);
}

html[data-theme="light"] .site-header {
  background: rgba(246, 247, 251, 0.92);
}

.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.2px;
}

.brand__mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #87CEEB, #ffffff);
  color: transparent;
  font-size: 1.1rem;
  font-weight: var(--font-weight-extrabold);
  letter-spacing: -0.05em;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(135deg, #00a8e8, #87CEEB);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.brand__mark:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(135, 206, 235, 0.3);
}

@media (prefers-color-scheme: dark) {
  .brand__mark {
    background: linear-gradient(135deg, #1e40af, #0c4a6e);
    background-image: linear-gradient(135deg, #60a5fa, #3b82f6);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
  }

  .brand__mark:hover {
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.4);
  }
}

.brand__name {
  font-size: 1rem;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.topnav__link {
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  color: var(--secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.topnav__link[aria-current="page"] {
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary-2);
}

.topnav__link:hover {
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary);
  text-decoration: none;
}

html[data-theme="dark"] .topnav__link {
  color: #e2e8f0;
}

html[data-theme="dark"] .topnav__link:hover {
  color: #60a5fa;
}

/* ===== Account Navigation ===== */
.account-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.account-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  color: var(--secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.account-nav__link:hover {
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary-2);
}

html[data-theme="dark"] .account-nav__link {
  color: #e2e8f0;
}

html[data-theme="dark"] .account-nav__link:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}

/* ===== Authentication State ===== */
.auth-state {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-state__user {
  font-size: 0.85rem;
  color: #475569;
}

html[data-theme="dark"] .auth-state__user {
  color: #cbd5e1;
}

.auth-state__logged-out {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.auth-state__signup {
  display: flex;
}

.auth-state__logged-in {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.account-nav__link {
  border: none;
  background: none;
  cursor: pointer;
}

/* ===== Search Bar ===== */
.search-bar {
  flex: 0 1 300px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 1.5rem;
}

@media (max-width: 1024px) {
  .search-bar {
    flex: 0 1 250px;
    margin: 0 1rem;
  }
}

@media (max-width: 900px) {
  .search-bar {
    flex: 0 1 200px;
    margin: 0 0.75rem;
  }
}

@media (max-width: 720px) {
  .search-bar {
    flex: 1;
    margin: 0 0.5rem;
    order: -1;
  }

  .site-header__inner {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .brand {
    flex: 0 0 auto;
    order: 0;
  }

  .topnav {
    display: none;
  }

  .account-nav {
    flex: 0 0 auto;
    order: 1;
    margin-left: 0;
    gap: 0.25rem;
  }

  .account-nav__text {
    display: none;
  }

  .auth-state__user {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-header__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0.75rem 0.5rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: center;
  }

  .brand {
    grid-column: 1;
    order: auto;
  }

  .search-bar {
    grid-column: 1 / -1;
    flex: 1;
    margin: 0;
    order: auto;
  }

  .account-nav {
    grid-column: 2;
    grid-row: 1;
    order: auto;
    margin-left: 0;
  }

  .account-nav__link {
    padding: 0.4rem;
  }
}

.search-bar__input {
  flex: 1;
  padding: 0.6rem 0.85rem;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 20px;
  font-size: 0.9rem;
  background: rgba(37, 99, 235, 0.05);
  color: var(--secondary);
  transition: all 0.2s ease;
}

.search-bar__input::placeholder {
  color: rgba(15, 23, 42, 0.5);
}

.search-bar__input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

html[data-theme="dark"] .search-bar__input {
  background: rgba(59, 130, 246, 0.08);
  color: #e2e8f0;
}

html[data-theme="dark"] .search-bar__input::placeholder {
  color: rgba(226, 232, 240, 0.4);
}

html[data-theme="dark"] .search-bar__input:focus {
  border-color: #60a5fa;
  background: #1e293b;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.search-bar__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--secondary);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  opacity: 0;
  pointer-events: none;
}

.search-bar__button.visible {
  opacity: 1;
  pointer-events: auto;
}

.search-bar__button:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

html[data-theme="dark"] .search-bar__button:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.3s ease;
  color: var(--secondary);
}

.theme-toggle:hover {
  background: rgba(37, 99, 235, 0.1);
}

.theme-toggle__icon {
  display: inline-block;
  transition: transform 0.3s ease;
}

.theme-toggle:active .theme-toggle__icon {
  transform: rotate(20deg) scale(1.1);
}

@media (prefers-color-scheme: dark) {
  .theme-toggle {
    color: #f1f5f9;
  }
}

.account-nav__icon {
  font-size: 1.1rem;
}

.account-nav__text {
  display: none;
}

@media (min-width: 640px) {
  .account-nav__text {
    display: inline;
  }
}

.account-nav__link--secondary {
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  margin-left: 0.5rem;
}

.account-nav__link--secondary:hover {
  background: var(--primary-2);
  color: white;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem 0.875rem;
}

.breadcrumb__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.breadcrumb__item:not(:last-child)::after {
  content: "›";
  color: #94a3b8;
  margin-left: 0.15rem;
}

.breadcrumb__link {
  color: var(--muted);
}

.breadcrumb__link:hover {
  color: #0f172a;
}

/* ===== Intro ===== */
.page__intro {
  padding: 1rem 0 1.25rem;
}

.page__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 1.1rem + 1.2vw, 2rem);
  letter-spacing: -0.02em;
}

.page__lead {
  margin: 0;
  color: var(--muted);
}

/* ===== Empty State ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.empty-state__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state__title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: var(--font-weight-semibold);
}

.empty-state__description {
  margin: 0 0 1.5rem;
  color: var(--muted);
  max-width: 400px;
}

/* ===== Buttons ===== */
.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, border-color 120ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--block {
  width: 100%;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

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

.btn--secondary {
  background: #111827;
  color: #fff;
}

.btn--secondary:hover {
  background: #0b1220;
}

.btn--ghost {
  background: transparent;
  border-color: rgba(15, 23, 42, 0.18);
  color: #0f172a;
}

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

.btn--sm {
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  font-size: 0.9rem;
}

/* ===== Product grid (CSS tableless) ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

@media (min-width: 720px) {
  .product-grid {
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(2, 6, 23, 0.04);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 200ms ease;
  display: grid;
  grid-template-rows: auto 1fr;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.product-card.hidden {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.product-card__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f1f5f9;
}

.product-card__body {
  padding: 0.95rem;
  display: grid;
  gap: 0.5rem;
}

.product-card__title {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.product-card__price {
  margin: 0;
  color: var(--secondary);
  font-weight: var(--font-weight-bold);
}

.product-card__link--text:hover {
  text-decoration: underline;
}

/* ===== Empty State ===== */
.products-section {
  padding: 3rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state {
  text-align: center;
  max-width: 400px;
  padding: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(2, 6, 23, 0.04);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.empty-state:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.empty-state__icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

.empty-state__title {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  font-weight: var(--font-weight-semibold);
  color: var(--secondary);
}

.empty-state__description {
  margin: 0 0 2rem;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Empty state when no products match search */
.product-grid.empty {
  grid-column: 1 / -1;
  padding: 3rem 1rem;
  text-align: center;
}

.product-grid.empty::after {
  content: "No products found. Try adjusting your search.";
  display: block;
  color: var(--muted);
  font-size: 1.1rem;
}

/* ===== Product detail page ===== */
.product {
  display: grid;
  grid-template-columns: 45% 55%;
  gap: 1.5rem;
  align-items: start;
}

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

.product__media,
.product__info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.product__media {
  padding: 0.85rem;
}

.product__img {
  width: 100%;
  border-radius: 12px;
  background: #e2e8f0;
  box-shadow: 0 1px 0 rgba(2, 6, 23, 0.05);
}

/* Product Slider */
.product__slider {
  position: relative;
  margin-bottom: 0.75rem;
  overflow: hidden;
  border-radius: 12px;
}

.slider__track {
  position: relative;
  width: 100%;
  height: auto;
  overflow: hidden;
}

.slider__item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 400ms ease, transform 400ms ease;
}

.slider__item--active {
  position: relative;
  opacity: 1;
  transform: translateX(0);
}

.slider__item img {
  width: 100%;
  height: auto;
  display: block;
}

/* Slider controls */
.slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.slider__btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.slider__btn--prev {
  left: 12px;
}

.slider__btn--next {
  right: 12px;
}

/* Slider indicators */
.slider__indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.slider__indicator {
  width: 8px;
  height: 8px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
}

.slider__indicator:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.slider__indicator--active {
  background: #fff;
  transform: scale(1.2);
}

/* Thumbnail gallery */
.product__gallery {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.product__gallery::-webkit-scrollbar {
  height: 4px;
}

.product__gallery::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 2px;
}

.product__gallery::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.1);
  border-radius: 2px;
}

.product__gallery::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.2);
}

.thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: all 200ms ease;
  flex-shrink: 0;
}

.thumb:hover {
  border-color: rgba(37, 99, 235, 0.35);
  transform: translateY(-2px);
}

.thumb--active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product__info {
  padding: 1rem;
  display: grid;
  gap: 0.85rem;
}

.product__header {
  display: grid;
  gap: 0.2rem;
}

.product__title {
  margin: 0;
  font-size: clamp(1.25rem, 1.05rem + 1vw, 1.75rem);
  letter-spacing: -0.02em;
}

.product__sku {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.product__price {
  margin: 0;
  font-size: 1.35rem;
  font-weight: var(--font-weight-extrabold);
}

.product__desc {
  margin: 0;
  color: #334155;
}

.product__spec-title {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.list {
  margin: 0;
  padding-left: 1.15rem;
  color: #334155;
}

.list__item {
  margin: 0.2rem 0;
}

.product__cta {
  display: grid;
  gap: 0.5rem;
}

/* ===== Forms (placeholders) ===== */
.form {
  display: grid;
  gap: 0.75rem;
}

.form__field {
  display: grid;
  gap: 0.35rem;
}

.form__label {
  color: var(--muted);
  font-size: 0.9rem;
}

.form__control {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: #fff;
}

.form__control:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

/* ===== Fixed cart ===== */
.cart {
  position: fixed;
  right: 0.75rem;
  top: 6.2rem;
  z-index: 60;
  width: min(360px, calc(100vw - 1.5rem));
}

.cart__toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cart__handle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.65rem 0.8rem;
  border-radius: 999px;
  background: #0b1220;
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow);
  user-select: none;
}

.cart__handle-title {
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.2px;
}

.cart__handle-badge {
  min-width: 28px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-weight: var(--font-weight-bold);
  font-size: 0.85rem;
}

.cart__panel {
  margin-top: 0.55rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: translateY(-6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

/* Desktop hover reveal */
@media (hover: hover) and (pointer: fine) {
  .cart:hover .cart__panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

/* Mobile/tablet tap-to-open */
.cart__toggle:checked ~ .cart__panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cart__panel-header {
  padding: 0.9rem 0.9rem 0.6rem;
  border-bottom: 1px solid rgba(2, 6, 23, 0.08);
}

.cart__title {
  margin: 0;
  font-size: 1.05rem;
}

.cart__subtitle {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.cart__items {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0.5rem;
  display: grid;
  gap: 0.5rem;
  max-height: 45vh;
  overflow: auto;
}

.cart-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.55rem;
  border-radius: 12px;
  border: 1px solid rgba(2, 6, 23, 0.08);
  background: #fff;
}

.cart-item--empty {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  padding: 2rem 1rem;
  border-style: dashed;
}

.cart-item--empty .cart-item__name {
  font-weight: var(--font-weight-semibold);
  margin-bottom: 0.25rem;
}

.cart-item--empty .cart-item__meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.cart-item__media {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.cart-item__name {
  margin: 0;
  font-weight: var(--font-weight-bold);
  font-size: 0.95rem;
}

.cart-item__meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.cart-item__actions {
  display: grid;
  gap: 0.35rem;
  justify-items: end;
}

.cart-item__qty-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 10px;
  padding: 0.25rem;
  background: #f8fafc;
}

.qty-btn--increment,
.qty-btn--decrement {
  min-width: 32px;
  padding: 0.35rem 0.4rem;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 200ms ease, color 200ms ease;
}

.qty-btn--increment:hover,
.qty-btn--decrement:hover {
  background-color: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.qty-btn--increment:active,
.qty-btn--decrement:active {
  background-color: rgba(37, 99, 235, 0.2);
}

.cart-item__qty {
  display: flex;
  align-items: center;
}

.cart-item__qty-input {
  width: 48px;
  padding: 0.35rem 0.4rem;
  border: none;
  text-align: center;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: var(--font-weight-semibold);
}

.cart-item__qty-input:focus {
  outline: none;
}


.cart__panel-footer {
  padding: 0.75rem 0.9rem 0.9rem;
  border-top: 1px solid rgba(2, 6, 23, 0.08);
  display: grid;
  gap: 0.65rem;
}

.cart__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #0f172a;
  font-weight: var(--font-weight-bold);
}

.cart__summary-label {
  color: var(--muted);
  font-weight: var(--font-weight-semibold);
}

/* Make the cart start closed on touch devices; keep handle always visible */
@media (max-width: 720px) {
  .cart {
    top: auto;
    bottom: 0.75rem;
  }
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.site-footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.25rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer__link {
  color: var(--muted);
}

.site-footer__link:hover {
  color: var(--secondary);
}

/* ===== Home hero ===== */
.hero {
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  display: grid;
  gap: 2.5rem;
}

.hero__content {
  display: grid;
  gap: 0.8rem;
  max-width: 600px;
}

.hero__pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: var(--font-weight-semibold);
}

.hero__title {
  margin: 0;
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.3rem);
  letter-spacing: -0.03em;
}

.hero__subtitle {
  margin: 0;
  color: #334155;
}

@media (prefers-color-scheme: dark) {
  .hero__subtitle {
    color: #cbd5e1;
  }
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.hero__visual {
  position: relative;
  min-height: 350px;
}

.hero__carousel {
  position: relative;
  width: 100%;
  height: 350px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #f6f7fb, #ffffff);
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.15);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  .hero__carousel {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.1);
  }
}

.hero__product-card {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3rem 2.5rem;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  pointer-events: none;
}

.hero__product-card--active {
  opacity: 1;
  pointer-events: auto;
}

.hero__product-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
}

.hero__product-image img {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(37, 99, 235, 0.15));
}

.hero__product-info {
  flex: 1;
  padding-left: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__product-label {
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.hero__product-name {
  font-size: 2rem;
  font-weight: var(--font-weight-extrabold);
  color: #0f172a;
  margin-bottom: 1rem;
  line-height: 1.2;
}

@media (prefers-color-scheme: dark) {
  .hero__product-name {
    color: #e2e8f0;
  }
}

.hero__product-price {
  font-size: 1.625rem;
  font-weight: var(--font-weight-bold);
  color: var(--primary);
  margin-bottom: 2rem;
}

.btn--small {
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  width: fit-content;
}

.hero__indicators {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
  z-index: 10;
}

.hero__indicator {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero__indicator--active {
  background: #2563eb;
  width: 24px;
  border-radius: 999px;
}

.hero__indicator:hover {
  background: rgba(255, 255, 255, 0.8);
}

@media (max-width: 900px) {
  .hero__carousel {
    min-height: 400px;
    height: auto;
  }

  .hero__product-card {
    flex-direction: column;
    padding: 2.5rem 2rem;
  }

  .hero__product-image {
    margin-bottom: 1.5rem;
    min-height: 200px;
  }

  .hero__product-image img {
    max-height: 220px;
  }

  .hero__product-info {
    padding-left: 0;
    text-align: center;
  }

  .hero__product-name {
    font-size: 1.5rem;
  }

  .hero__product-price {
    font-size: 1.375rem;
  }
}

@media (max-width: 640px) {
  .hero__carousel {
    min-height: 430px;
  }

  .hero__product-card {
    padding: 1.5rem 1rem;
  }

  .hero__product-image {
    margin-bottom: 1rem;
    min-height: 160px;
  }

  .hero__product-image img {
    max-height: 180px;
  }

  .hero__product-name {
    font-size: 1.25rem;
  }

  .hero__product-price {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
  }

  .btn--small {
    padding: 0.625rem 1.25rem;
    font-size: 0.8125rem;
  }
}

/* ===== Section head (reusable) ===== */
.section {
  margin-top: 1.5rem;
}

.section-head {
  margin-bottom: 0.75rem;
}

.section-head__title {
  margin: 0 0 0.2rem;
  font-size: 1.1rem;
}

.section-head__subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.section-head--tight {
  margin-bottom: 0.4rem;
}

/* ===== Featured categories (home) ===== */
.featured-categories {
  margin-bottom: 1.5rem;
}

.featured-categories__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
}

.pill-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.85rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.08);
  text-decoration: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.pill-card:hover {
  background: rgba(15, 23, 42, 0.05);
  text-decoration: none;
}

html[data-theme="dark"] .pill-card {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.12);
}

html[data-theme="dark"] .pill-card:hover {
  background: rgba(59, 130, 246, 0.12);
}

.pill-card__icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--surface);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.pill-card__body {
  display: grid;
  gap: 0.05rem;
}

.pill-card__title {
  margin: 0;
  font-size: 0.95rem;
}

.pill-card__meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ===== Category grid page ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.category-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 0.9rem;
  display: grid;
  gap: 0.6rem;
  box-shadow: 0 1px 0 rgba(2, 6, 23, 0.04);
}

.category-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.06);
  font-size: 1.2rem;
}

.category-card__title {
  margin: 0;
  font-size: 1rem;
}

.category-card__desc {
  margin: 0;
  color: #475569;
  font-size: 0.9rem;
}

/* ===== Auth / Registration Styles ===== */
.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 2rem auto;
}

@media (max-width: 900px) {
  .auth-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.auth-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: var(--font-weight-bold);
  color: var(--secondary);
}

html[data-theme="dark"] .auth-card__title {
  color: #e2e8f0;
}

.auth-card__subtitle {
  margin: 0 0 2rem;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.5;
}

html[data-theme="dark"] .auth-card__subtitle {
  color: #cbd5e1;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group--checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.75rem;
}

.form-label {
  font-weight: var(--font-weight-semibold);
  color: var(--secondary);
  font-size: 0.95rem;
}

html[data-theme="dark"] .form-label {
  color: #e2e8f0;
}

.form-input {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--secondary);
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

html[data-theme="dark"] .form-input {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
}

html[data-theme="dark"] .form-input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.form-error {
  font-size: 0.85rem;
  color: #dc2626;
  display: none;
}

.form-error.visible {
  display: block;
}

.form-checkbox {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--primary);
}

.form-checkbox-label {
  font-size: 0.95rem;
  color: #475569;
  cursor: pointer;
  line-height: 1.5;
}

html[data-theme="dark"] .form-checkbox-label {
  color: #cbd5e1;
}

.form-checkbox-label .link {
  color: var(--primary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
}

.form-checkbox-label .link:hover {
  text-decoration: underline;
}

.auth-card__footer {
  margin: 1.5rem 0 0;
  text-align: center;
  color: #64748b;
  font-size: 0.95rem;
}

html[data-theme="dark"] .auth-card__footer {
  color: #cbd5e1;
}

.auth-card__footer .link {
  color: var(--primary);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
}

.auth-card__footer .link:hover {
  text-decoration: underline;
}

.auth-benefits {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: var(--radius);
  padding: 2rem;
}

html[data-theme="dark"] .auth-benefits {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
  border-color: rgba(59, 130, 246, 0.2);
}

.auth-benefits__title {
  margin: 0 0 1.5rem;
  font-size: 1.3rem;
  font-weight: var(--font-weight-bold);
  color: var(--secondary);
}

html[data-theme="dark"] .auth-benefits__title {
  color: #e2e8f0;
}

.auth-benefits__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-benefits__item {
  display: flex;
  gap: 1rem;
}

.auth-benefits__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-weight: var(--font-weight-bold);
  font-size: 0.9rem;
}

.auth-benefits__item strong {
  display: block;
  color: var(--secondary);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

html[data-theme="dark"] .auth-benefits__item strong {
  color: #e2e8f0;
}

.auth-benefits__item p {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.5;
}

html[data-theme="dark"] .auth-benefits__item p {
  color: #cbd5e1;
}

.link {
  color: var(--primary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
}

.link:hover {
  text-decoration: underline;
}

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

.category-card__btn {
  margin-top: 0.15rem;
}

/* ===== Features ===== */
.features {
  margin-top: 1.75rem;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.feature {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 0.9rem;
}

.feature__title {
  margin: 0 0 0.25rem;
  font-size: 0.98rem;
}

.feature__text {
  margin: 0;
  color: #475569;
  font-size: 0.9rem;
}

/* ===== 404 Error Page ===== */
.error-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1100px;
  margin: 4rem auto;
  align-items: center;
  min-height: 500px;
}

@media (max-width: 900px) {
  .error-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 2rem auto;
    min-height: auto;
  }
}

.error-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  position: relative;
}

.error-code {
  font-size: clamp(6rem, 15vw, 12rem);
  font-weight: var(--font-weight-extrabold);
  background: linear-gradient(135deg, var(--primary) 0%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  letter-spacing: -0.02em;
}

html[data-theme="dark"] .error-code {
  background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.error-icon {
  font-size: 4rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.error-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.error-title {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: var(--font-weight-extrabold);
  color: var(--secondary);
  line-height: 1.2;
}

html[data-theme="dark"] .error-title {
  color: #e2e8f0;
}

.error-subtitle {
  margin: 0;
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
}

html[data-theme="dark"] .error-subtitle {
  color: #cbd5e1;
}

.error-suggestions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.error-suggestions__label {
  margin: 0;
  font-weight: var(--font-weight-semibold);
  color: var(--secondary);
  font-size: 0.95rem;
}

html[data-theme="dark"] .error-suggestions__label {
  color: #e2e8f0;
}

.error-suggestions__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .error-suggestions__list {
    grid-template-columns: 1fr;
  }
}

.error-suggestions__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 10px;
  color: var(--primary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  transition: all 0.2s ease;
}

.error-suggestions__link:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(37, 99, 235, 0.3);
  transform: translateX(4px);
}

html[data-theme="dark"] .error-suggestions__link {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

html[data-theme="dark"] .error-suggestions__link:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

.error-suggestions__icon {
  font-size: 1.2rem;
}

.error-search {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: var(--radius);
}

html[data-theme="dark"] .error-search {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.15);
}

.error-search__label {
  margin: 0;
  font-weight: var(--font-weight-medium);
  color: var(--secondary);
  font-size: 0.95rem;
}

html[data-theme="dark"] .error-search__label {
  color: #e2e8f0;
}

.search-form {
  display: flex;
  gap: 0.5rem;
}

@media (max-width: 640px) {
  .search-form {
    flex-direction: column;
  }
}

.search-form__input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--secondary);
  transition: all 0.2s ease;
}

.search-form__input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

html[data-theme="dark"] .search-form__input {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
}

html[data-theme="dark"] .search-form__input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.search-form__submit {
  padding: 0.75rem 1.5rem;
  white-space: nowrap;
}

.error-footer {
  display: flex;
  justify-content: center;
}

.error-footer__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

html[data-theme="dark"] .error-footer__text {
  color: #cbd5e1;
}

.error-footer__text .link {
  font-weight: var(--font-weight-semibold);
}

/* ===== Search Results Page ===== */
.search-results {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.search-results__header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.search-results__title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: var(--font-weight-extrabold);
  color: var(--secondary);
}

html[data-theme="dark"] .search-results__title {
  color: #e2e8f0;
}

.search-results__query {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: var(--font-weight-semibold);
}

.search-results__count {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

html[data-theme="dark"] .search-results__count {
  color: #cbd5e1;
}

.search-results__container {
  display: grid;
  gap: 2rem;
}

.search-results__grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

@media (max-width: 640px) {
  .search-results__grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }
}

.search-results__empty {
  display: grid;
  gap: 1.5rem;
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(37, 99, 235, 0.05);
  border: 2px dashed rgba(37, 99, 235, 0.2);
  border-radius: var(--radius);
}

html[data-theme="dark"] .search-results__empty {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
}

.search-results__empty-icon {
  font-size: 4rem;
  animation: float 3s ease-in-out infinite;
}

.search-results__empty-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: var(--font-weight-bold);
  color: var(--secondary);
}

html[data-theme="dark"] .search-results__empty-title {
  color: #e2e8f0;
}

.search-results__empty-text {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

html[data-theme="dark"] .search-results__empty-text {
  color: #cbd5e1;
}

.search-results__suggestions {
  display: grid;
  gap: 1rem;
}

.search-results__suggestions p {
  margin: 0;
  font-weight: var(--font-weight-semibold);
  color: var(--secondary);
}

html[data-theme="dark"] .search-results__suggestions p {
  color: #e2e8f0;
}

.search-results__suggestions ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.search-results__suggestions li {
  padding: 0.5rem 1rem;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 20px;
  color: var(--secondary);
  font-size: 0.9rem;
}

html[data-theme="dark"] .search-results__suggestions li {
  background: rgba(59, 130, 246, 0.1);
  color: #e2e8f0;
}