* {
  box-sizing: border-box;
}

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #1d4ed8;
  --primary-soft: #dbeafe;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  --radius: 16px;
  --container: 1280px;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

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

.container {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-mini {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.language-form {
  margin: 0;
}

.language-select {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.language-select:focus {
  outline: none;
  border-color: var(--primary);
}

.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;
}

.icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.icon-link:hover,
.category-link:hover,
.article-button:hover,
.mobile-filter-button:hover {
  transform: translateY(-1px);
  transition: 0.2s ease;
}

.icon {
  font-size: 18px;
}

.cart-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-header {
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  min-height: 148px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-brand h1 {
  margin: 0 0 8px 0;
  font-size: 32px;
}

.hero-brand p {
  margin: 0;
  color: var(--muted);
}

.hero-logo {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.mobile-filter-button {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
}

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 0 32px 0;
}

.sidebar-card,
.content,
.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sidebar-card {
  padding: 20px;
  position: sticky;
  top: 88px;
}

.sidebar-card h2 {
  margin: 0 0 16px 0;
  font-size: 20px;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-link {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  font-size: 15px;
}

.category-link.active {
  background: var(--primary-soft);
  border-color: #93c5fd;
  color: #1e3a8a;
  font-weight: 700;
}

.content {
  padding: 20px;
}

.content-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.content-toolbar h2 {
  margin: 0 0 6px 0;
  font-size: 28px;
}

.content-toolbar p {
  margin: 0;
  color: var(--muted);
}

.search-box input {
  width: 280px;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
}

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

.article-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.article-image {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #dbeafe, #f8fafc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #1e3a8a;
  font-weight: 700;
}

.article-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.article-category {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.article-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.article-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

.article-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.article-price {
  font-size: 20px;
  font-weight: 700;
}

.article-button {
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  padding: 10px 14px;
  cursor: pointer;
}

.site-footer {
  margin-top: 24px;
  background: #111827;
  color: #f9fafb;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 24px;
  padding: 36px 0;
}

.site-footer h3,
.site-footer h4 {
  margin-top: 0;
}

.site-footer p,
.site-footer li,
.site-footer a {
  color: #d1d5db;
}

.site-footer ul {
  padding-left: 18px;
  margin: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 14px 0;
  color: #9ca3af;
  font-size: 14px;
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  color: var(--muted);
  background: #fafafa;
}

@media (max-width: 1100px) {
  .article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .sidebar {
    display: none;
  }

  .sidebar.open {
    display: block;
  }

  .sidebar-card {
    position: static;
  }

  .mobile-filter-button {
    display: inline-flex;
  }

  .content-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box input {
    width: 100%;
  }

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

  .hero-inner,
  .topbar-inner {
    flex-wrap: wrap;
  }

  .hero-brand {
    align-items: flex-start;
  }

  .hero-brand h1 {
    font-size: 26px;
  }

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