/* Products catalog, detail panel, and cart — extends style.css */

.menu a[aria-current="page"] {
  color: var(--bg);
  background: orange;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.products-page .eyebrow {
  color: orange;
  border: none;
  width: auto;
  text-align: left;
  background: transparent;
  text-shadow: none;
}

.product-body .eyebrow {
  font-size: 0.72rem;
  margin-bottom: 0;
}

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: #1c3232;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.cart-btn:hover,
.cart-btn:focus-visible {
  border-color: orange;
  color: orange;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: orange;
  color: #111;
  font-size: 0.68rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.cart-count[data-empty="true"] {
  display: none;
}

.products-hero {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 28px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
}

.products-hero .lede {
  max-width: 52ch;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hero-stat {
  background: #2f4f4f;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
}

.hero-stat strong {
  display: block;
  font-size: 1.5rem;
  color: orange;
}

.hero-stat span {
  color: #fff;
  font-size: 0.88rem;
}

.catalog-wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 72px;
}

.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.search-box {
  flex: 1 1 240px;
  min-width: 200px;
  position: relative;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  background: #1c3232;
  color: #fff;
  border-radius: 999px;
  padding: 12px 16px 12px 42px;
  font: inherit;
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.7;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #2f4f4f;
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.is-active {
  background: orange;
  color: #111;
  border-color: orange;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.product-card {
  background: #2f4f4f;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: orange;
}

.product-media {
  height: 168px;
  display: grid;
  place-items: center;
  position: relative;
  background:
    radial-gradient(circle at 20% 20%, rgba(62, 200, 216, 0.35), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(255, 165, 0, 0.28), transparent 40%),
    #1c3232;
}

.product-media svg {
  width: 72px;
  height: 72px;
  color: #fff;
}

.product-badges {
  position: absolute;
  left: 12px;
  top: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
}

.badge-integrate {
  color: #3ec8d8;
  border: 1px solid #3ec8d8;
}

.badge-download {
  color: orange;
  border: 1px solid orange;
}

.product-body {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.product-body h3 {
  color: orange;
  font-size: 1.15rem;
}

.product-body p {
  color: #fff;
  font-size: 0.92rem;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
}

.price {
  font-weight: 800;
  font-size: 1.05rem;
}

.product-actions {
  display: flex;
  gap: 8px;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.82rem;
  cursor: pointer;
  border: 0;
}

.btn-cyan {
  background: aqua;
  color: #111;
}

.btn-cyan:hover {
  background: #3ec8d8;
}

.btn-outline {
  background: transparent;
  border: 1px solid orange;
  color: #fff;
}

.btn-outline:hover {
  background: orange;
  color: #111;
}

.empty-catalog {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  background: #2f4f4f;
  border-radius: var(--radius);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.product-panel,
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(560px, 100%);
  background: #0f2a2a;
  z-index: 90;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  overflow: auto;
  box-shadow: var(--shadow);
}

.product-panel.is-open,
.cart-drawer.is-open {
  transform: translateX(0);
}

.panel-head {
  position: sticky;
  top: 0;
  background: #2f4f4f;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  z-index: 1;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
}

.panel-media {
  height: 200px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(62, 200, 216, 0.25), rgba(255, 140, 0, 0.2)),
    #1c3232;
}

.panel-content {
  padding: 22px;
}

.panel-kicker {
  color: orange;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.panel-price {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 8px 0 16px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px;
}

.tab {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #2f4f4f;
  color: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.tab.is-active {
  background: orange;
  color: #111;
  border-color: orange;
}

.tab-panel {
  display: none;
  color: #fff;
  font-size: 0.95rem;
}

.tab-panel.is-active {
  display: block;
}

.tab-panel ul,
.tab-panel ol {
  margin: 8px 0 0 18px;
}

.tab-panel li {
  margin: 6px 0;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table th,
.spec-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

.spec-table th {
  color: orange;
  width: 38%;
  font-weight: 700;
}

.code-block {
  margin-top: 10px;
  background: #081616;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  overflow: auto;
  font-size: 0.82rem;
  color: #9be7ef;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.cart-list {
  list-style: none;
  padding: 16px 20px;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-item h3 {
  font-size: 0.98rem;
  color: orange;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.qty-row button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #2f4f4f;
  color: #fff;
  cursor: pointer;
}

.cart-summary {
  padding: 16px 20px 28px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-weight: 700;
}

.checkout-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.checkout-form label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

.checkout-form input,
.checkout-form textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #1c3232;
  color: #fff;
  padding: 10px 12px;
  font: inherit;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: orange;
  color: #111;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 999px;
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1024px) {
  .products-hero,
  .product-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-actions {
    margin-left: auto;
  }

  .header-actions .menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
  }

  .cart-btn {
    order: 0;
  }

  .products-hero,
  .product-grid,
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .product-panel,
  .cart-drawer {
    width: 100%;
  }
}
