:root {
  --bg: #ffffff;
  --bg-strong: #0c0c0c;
  --card: #ffffff;
  --ink: #0c0c0c;
  --muted: rgba(12, 12, 12, 0.62);
  --line: rgba(12, 12, 12, 0.14);
  --accent: #931f1d;
  --accent-strong: #931f1d;
  --green: #256d1b;
  --shadow: 0 24px 70px rgba(12, 12, 12, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  font-family: "IBM Plex Sans", "Trebuchet MS", Verdana, sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(147, 31, 29, 0.16), transparent 28rem),
    radial-gradient(circle at 82% 12%, rgba(37, 109, 27, 0.14), transparent 24rem),
    linear-gradient(135deg, #ffffff 0%, #f7f7f7 48%, #ededed 100%);
}

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

.shell {
  width: min(1770px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 16px;
  border: 1px solid rgba(12, 12, 12, 0.09);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 32px rgba(12, 12, 12, 0.08);
}

.brand,
.nav,
.hero-actions,
.stats,
.admin-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 15px;
  color: #ffffff;
  font-weight: 900;
  background: var(--bg-strong);
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.eyebrow {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  gap: 8px;
}

.nav a,
.button,
.admin-links a {
  border-radius: 999px;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.nav a {
  padding: 10px 14px;
  color: var(--muted);
}

.nav-badge {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  background: var(--accent);
}

.mobile-nav {
  display: none;
}

.nav a:hover,
.admin-links a:hover {
  color: var(--ink);
  background: rgba(147, 31, 29, 0.12);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 24px;
  align-items: stretch;
  padding: 64px 0 34px;
}

.hero-copy,
.hero-card,
.filters,
.section,
.admin-panel {
  border: 1px solid rgba(12, 12, 12, 0.1);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: clamp(28px, 5vw, 62px);
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.45rem, 6vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
}

.hero-text {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.7;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  padding: 14px 18px;
  font-weight: 800;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button:hover,
.category-card:hover,
.product-card:hover {
  transform: translateY(-2px);
}

.primary {
  color: #ffffff;
  background: var(--accent);
}

.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.ghost {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.hero-card {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  color: #ffffff;
  background:
    linear-gradient(160deg, rgba(12, 12, 12, 0.2), rgba(12, 12, 12, 0.9)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 18px),
    var(--bg-strong);
}

.chip {
  align-self: flex-start;
  padding: 7px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(147, 31, 29, 0.42);
}

.hero-card h2 {
  margin: 18px 0;
  font-size: 2rem;
}

.stats {
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}

.stats div {
  min-width: 0;
}

.stats dt {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
}

.stats dd {
  margin: 4px 0 0;
  font-size: 1.55rem;
  font-weight: 900;
}

.filters {
  margin-top: 18px;
  padding: clamp(18px, 3vw, 28px);
}

.filter-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.filter-head h3 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 2.3rem);
  letter-spacing: -0.04em;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-actions .button {
  border: 0;
  cursor: pointer;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.filter-grid label {
  display: grid;
  gap: 7px;
}

.wide-filter,
.filter-grid label:nth-child(5),
.filter-grid label:nth-child(6),
.filter-grid label:nth-child(7) {
  grid-column: span 2;
}

.filter-grid label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.checkbox-filter {
  align-content: end;
}

.checkbox-filter input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.checkbox-filter {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  min-height: 48px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.filter-summary {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  max-width: min(420px, calc(100% - 32px));
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  color: #ffffff;
  font-weight: 800;
  line-height: 1.5;
  background: linear-gradient(135deg, var(--accent-strong), var(--bg-strong));
  box-shadow: 0 20px 50px rgba(12, 12, 12, 0.28);
}

.search,
.select {
  display: grid;
  gap: 7px;
}

.search {
  flex: 1;
}

.select {
  min-width: 250px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0 14px;
  color: var(--ink);
  font: inherit;
  background: rgba(255, 255, 255, 0.92);
}

textarea {
  min-height: 92px;
  padding-top: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(147, 31, 29, 0.22);
  border-color: var(--accent);
}

.section {
  margin-top: 24px;
  padding: clamp(20px, 4vw, 34px);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  letter-spacing: -0.04em;
}

.category-grid,
.product-grid {
  display: grid;
  gap: 16px;
}

.category-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.product-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 30px;
}

.category-card,
.product-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.category-card {
  padding: 18px;
  cursor: pointer;
}

.category-card:hover,
.product-card:hover {
  border-color: rgba(147, 31, 29, 0.5);
  box-shadow: 0 18px 38px rgba(12, 12, 12, 0.12);
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.06rem;
}

.category-card small,
.product-card p,
.specs-list {
  color: var(--muted);
}

.product-card {
  overflow: hidden;
}

.product-media {
  display: flex;
  min-height: 145px;
  align-items: flex-end;
  padding: 18px;
  color: #ffffff;
  background:
    radial-gradient(circle at 70% 25%, rgba(147, 31, 29, 0.48), transparent 7rem),
    linear-gradient(135deg, var(--green), var(--bg-strong));
}

.product-media span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0.86;
}

.product-body {
  padding: 18px;
}

.product-body h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.price {
  margin-top: 16px;
  font-size: 1.45rem;
  font-weight: 900;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.meta span {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
  background: rgba(37, 109, 27, 0.12);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.card-actions button {
  border: 1px solid rgba(12, 12, 12, 0.1);
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  background: rgba(147, 31, 29, 0.1);
}

.card-actions button:last-child {
  color: var(--accent-strong);
  background: rgba(147, 31, 29, 0.08);
}

.specs-list {
  display: grid;
  gap: 7px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
}

.empty {
  margin: 18px 0 0;
  color: var(--muted);
}

.cart-panel {
  background:
    linear-gradient(135deg, rgba(37, 109, 27, 0.08), rgba(147, 31, 29, 0.07)),
    rgba(255, 255, 255, 0.82);
}

.cart-items {
  display: grid;
  gap: 12px;
}

.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
}

.cart-item strong,
.cart-item small {
  display: block;
}

.cart-item small {
  margin-top: 5px;
  color: var(--muted);
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantity-control button,
.remove-cart {
  border: 1px solid rgba(12, 12, 12, 0.12);
  border-radius: 999px;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  background: rgba(147, 31, 29, 0.08);
}

.quantity-control button {
  width: 38px;
  height: 38px;
}

.quantity-control input {
  width: 78px;
  min-height: 38px;
  text-align: center;
}

.remove-cart {
  padding: 10px 12px;
  color: var(--accent);
}

.cart-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.cart-summary span {
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cart-summary strong {
  font-size: 1.8rem;
}

.admin-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.4fr) minmax(0, 1.6fr);
  gap: 24px;
  color: #ffffff;
  background: var(--bg-strong);
}

.admin-panel p {
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.7;
}

.admin-message {
  min-height: 24px;
  margin-top: 16px;
  color: #ffffff;
  font-weight: 800;
}

.admin-message.is-error {
  color: #ffffff;
}

.auth-card {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-card p {
  margin: 0;
  color: #ffffff;
  font-weight: 800;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form label {
  display: grid;
  gap: 7px;
}

.login-form label span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-form .button,
.auth-card > .button {
  justify-content: center;
  border: 0;
  cursor: pointer;
}

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

.admin-form {
  display: grid;
  align-content: start;
  gap: 13px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.07);
}

.product-admin-form {
  grid-column: span 2;
}

.admin-form h3 {
  margin: 0;
  font-size: 1.25rem;
}

.admin-form label {
  display: grid;
  gap: 7px;
}

.admin-form label span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.inline-head h4 {
  margin: 0;
}

.spec-editor,
.compact-list {
  display: grid;
  gap: 10px;
}

.spec-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(120px, 0.7fr) minmax(130px, 1fr) minmax(90px, auto);
  gap: 8px;
  align-items: center;
}

.spec-row input,
.spec-row select {
  min-width: 0;
}

.spec-row .button {
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 12px;
  text-align: center;
}

.compact-list {
  margin-top: 4px;
}

.compact-list p {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.compact-list span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.85rem;
}

.admin-checkbox {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  min-height: 48px;
  padding-top: 20px;
}

.admin-checkbox input {
  width: auto;
  min-height: auto;
}

.admin-form .button {
  justify-content: center;
  border: 0;
  cursor: pointer;
}

.admin-links {
  grid-column: 1 / -1;
  flex-wrap: wrap;
  align-content: start;
  gap: 10px;
}

.admin-links a {
  padding: 12px 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 840px) {
  body {
    padding-bottom: 88px;
  }

  .topbar,
  .filter-head,
  .admin-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    display: grid;
  }

  .nav {
    display: none;
  }

  .mobile-nav {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 25;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(12, 12, 12, 0.12);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 46px rgba(12, 12, 12, 0.18);
    backdrop-filter: blur(18px);
  }

  .mobile-nav a {
    position: relative;
    display: grid;
    min-height: 58px;
    place-items: center;
    gap: 3px;
    border-radius: 20px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-align: center;
  }

  .mobile-nav a:active,
  .mobile-nav a:hover {
    color: var(--accent);
    background: rgba(147, 31, 29, 0.1);
  }

  .mobile-nav span {
    color: var(--ink);
    font-size: 1.2rem;
    line-height: 1;
  }

  .mobile-nav strong {
    font-size: 0.68rem;
  }

  .mobile-nav em {
    position: absolute;
    top: 5px;
    right: 10px;
    font-style: normal;
  }

  .hero,
  .admin-panel {
    grid-template-columns: 1fr;
  }

  .filter-grid,
  .admin-forms,
  .product-admin-form,
  .form-row,
  .spec-row {
    grid-template-columns: 1fr;
  }

  .product-admin-form {
    grid-column: auto;
  }

  .cart-item,
  .cart-summary {
    grid-template-columns: 1fr;
  }

  .cart-item {
    align-items: stretch;
  }

  .cart-summary {
    display: grid;
    justify-items: stretch;
  }

  .wide-filter,
  .filter-grid label:nth-child(5),
  .filter-grid label:nth-child(6),
  .filter-grid label:nth-child(7) {
    grid-column: auto;
  }

  .select {
    min-width: 0;
  }
}
