:root {
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --line: #cbd5e1;
  --brand: #0f172a;
  --brand-soft: #1e293b;
  --panel: #ffffff;
}

* {
  box-sizing: border-box;
}

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

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.deal-strip {
  background: #0f172a;
  color: #e2e8f0;
  border-bottom: 1px solid #1e293b;
}

.deal-row {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.86rem;
  white-space: nowrap;
  overflow-x: auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.brand {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.menu {
  display: flex;
  gap: 1rem;
}

.menu a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
}

.menu .portal-link {
  font-weight: 700;
  color: var(--text);
}

.cart-button {
  border: none;
  background: var(--brand);
  color: white;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
}

.cart-count {
  display: inline-block;
  min-width: 22px;
  margin-left: 0.35rem;
  border-radius: 999px;
  background: white;
  color: var(--brand);
  font-size: 0.85rem;
  padding: 0.1rem 0.45rem;
}

.hero {
  padding: 3.5rem 0 2.5rem;
}

.hero-image {
  padding: 0;
  margin-bottom: 1.25rem;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.78) 0%, rgba(2, 6, 23, 0.45) 55%, rgba(2, 6, 23, 0.68) 100%),
    url("./images/speaker-4.png");
  background-size: cover;
  background-position: center 50%;
  border-bottom: 1px solid var(--line);
  will-change: background-position;
}

.hero-overlay {
  padding: 4rem 0;
  min-height: 350px;
  display: flex;
  align-items: center;
}

@media (prefers-reduced-motion: reduce) {
  .hero-image {
    background-position: center center !important;
  }
}

.eyebrow {
  font-size: 0.9rem;
  color: #dbeafe;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  color: #f8fafc;
}

.hero-copy {
  color: #e2e8f0;
  max-width: 580px;
}

.cta {
  margin-top: 1rem;
  display: inline-block;
  text-decoration: none;
  background: var(--brand);
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: 8px;
}

.hero-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 14px;
  padding: 1rem;
}

.hero-card ul {
  padding-left: 1.2rem;
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.section {
  padding: 2rem 0;
}

.muted {
  background: #eff6ff;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

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

.filters {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.filters label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.filters input,
.filters select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

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

.catalog-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
}

.catalog-sidebar {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.85rem;
  height: fit-content;
  position: sticky;
  top: 82px;
}

.catalog-sidebar h3 {
  margin: 0.2rem 0 0.7rem;
}

.sidebar-block {
  padding: 0.65rem 0;
  border-top: 1px solid #e2e8f0;
}

.sidebar-block:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.brand-filters {
  display: grid;
  gap: 0.4rem;
  max-height: 180px;
  overflow: auto;
}

.product-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.product-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  margin-bottom: 0.7rem;
}

.product-card h3 {
  margin-top: 0;
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
  min-height: 44px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.badge {
  font-size: 0.74rem;
  background: #e2e8f0;
  color: #0f172a;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}

.price {
  font-weight: 700;
  margin: 0.55rem 0;
}

.rating {
  color: #f59e0b;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.product-card button {
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
}

.card-actions {
  display: grid;
  gap: 0.45rem;
  margin-top: auto;
}

.compare-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.product-card button:disabled {
  cursor: not-allowed;
  color: #64748b;
}

.product-detail-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 1rem;
}

.product-detail-image {
  width: 100%;
  max-width: 760px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  margin-bottom: 0.8rem;
}

.product-detail-card ul {
  margin-top: 0.5rem;
}

.product-detail-card button {
  margin-top: 0.8rem;
  border: none;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
}

.product-detail-card button:disabled {
  background: #64748b;
  cursor: not-allowed;
}

.empty-state {
  margin-top: 1rem;
  color: var(--muted);
}

.pagination {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
}

.pagination button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
}

.pagination button:disabled {
  cursor: not-allowed;
  color: #94a3b8;
}

.compare-tray {
  position: sticky;
  bottom: 0;
  z-index: 8;
  background: #0f172a;
  color: #fff;
  border-top: 1px solid #1e293b;
  padding: 0.6rem 0;
}

.compare-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.compare-actions {
  display: flex;
  gap: 0.5rem;
}

.compare-actions button {
  border: 1px solid #475569;
  background: #1e293b;
  color: #fff;
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.checklist {
  margin: 0;
  padding-left: 1.2rem;
}

.checklist li {
  margin-bottom: 0.45rem;
}

details {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  padding: 0.8rem;
  margin-bottom: 0.6rem;
}

summary {
  cursor: pointer;
  font-weight: 600;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: -360px;
  width: 340px;
  height: 100%;
  background: #fff;
  border-left: 1px solid var(--line);
  padding: 1rem;
  transition: right 0.2s ease;
}

.cart-panel.open {
  right: 0;
}

.cart-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-items {
  list-style: none;
  padding-left: 0;
}

.cart-items li {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0;
  font-size: 0.92rem;
}

.cart-item-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.cart-item-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.cart-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.cart-controls button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 5px;
  width: 24px;
  height: 24px;
  padding: 0;
  line-height: 1;
  cursor: pointer;
}

.cart-total {
  font-weight: 700;
}

.cart-total.small {
  color: var(--muted);
  font-weight: 500;
}

.checkout-button {
  width: 100%;
  border: none;
  background: var(--brand);
  color: #fff;
  padding: 0.7rem;
  border-radius: 8px;
  cursor: pointer;
}

.checkout-button:disabled {
  background: #64748b;
  cursor: not-allowed;
}

.checkout-form {
  margin-top: 1rem;
  display: grid;
  gap: 0.55rem;
}

.checkout-form h4 {
  margin: 0.5rem 0 0;
}

.checkout-form input,
.checkout-form textarea {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.5rem 0.6rem;
  font: inherit;
}

.checkout-status {
  min-height: 1.2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.paypal-section {
  margin-top: 0.35rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.6rem;
}

.paypal-label {
  margin: 0 0 0.45rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.hidden-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
  margin-top: 2rem;
  background: #fff;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

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

  .catalog-sidebar {
    position: static;
  }

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

  .menu {
    display: none;
  }

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