:root {
  --violet: #4b12ff;
  --violet-dark: #3410c8;
  --ink: #181a22;
  --muted: #6d7280;
  --line: #e1e4ec;
  --soft: #f5f6f9;
  --paper: #ffffff;
  --green: #159947;
  --amber: #d97706;
  --red: #dc2626;
  --shadow: 0 18px 48px rgba(24, 26, 34, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #eef0f5;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

body.cart-open {
  overflow: hidden;
}

body.cart-open::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 29;
  background: rgba(15, 23, 42, 0.24);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 58px 132px minmax(240px, 1fr) auto 110px;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.site-header > * {
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  gap: 8px;
  width: max-content;
  height: auto;
  padding: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  text-decoration: none;
  min-width: 0;
  line-height: 0;
  overflow: hidden;
}

.brand img {
  display: block;
  height: auto;
  object-fit: contain;
}

.brand-mark-img {
  width: 54px;
  border-radius: 10px;
}

.catalog-toggle,
.cart-button,
.mobile-login-button,
.hero-actions a,
.hero-actions button,
.filters button,
.product-bottom button,
.checkout-button,
.submit-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--violet);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.catalog-toggle {
  gap: 10px;
}

.catalog-toggle span,
.catalog-toggle span::before,
.catalog-toggle span::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 3px;
  background: currentColor;
  content: "";
}

.catalog-toggle span {
  position: relative;
  flex: 0 0 auto;
}

.catalog-toggle span::before,
.catalog-toggle span::after {
  position: absolute;
  left: 0;
}

.catalog-toggle span::before {
  top: -6px;
}

.catalog-toggle span::after {
  top: 6px;
}

.search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.search span {
  padding: 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
}

.header-links {
  display: flex;
  gap: 18px;
  align-items: center;
}

.header-links a,
.header-links button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.header-links .login-link {
  color: var(--violet-dark);
}

.cart-button {
  position: relative;
  gap: 8px;
  overflow: hidden;
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.button-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.cart-icon {
  transition: opacity 160ms ease, transform 160ms ease;
}

.cart-check,
.add-check {
  display: none;
  position: relative;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.cart-check::after,
.add-check::after {
  position: absolute;
  left: 6px;
  top: 2px;
  width: 7px;
  height: 13px;
  border: solid currentColor;
  border-width: 0 3px 3px 0;
  content: "";
  transform: rotate(45deg);
}

.cart-button.cart-confirmed {
  background: var(--green);
  box-shadow: 0 10px 24px rgba(21, 153, 71, 0.24);
  transform: translateY(-1px);
}

.cart-button.cart-confirmed .cart-icon {
  opacity: 0;
  transform: scale(0.72);
}

.cart-button.cart-confirmed .cart-check {
  display: block;
  position: absolute;
}

.mobile-login-button {
  display: none;
  gap: 8px;
  padding: 0 14px;
}

.mobile-login-button [data-auth-label] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-button strong {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  color: var(--violet);
  font-size: 12px;
}

.product-bottom button,
.product-detail-summary > button {
  position: relative;
  overflow: hidden;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.product-bottom button.is-added,
.product-detail-summary > button.is-added {
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 22px rgba(21, 153, 71, 0.22);
  transform: scale(0.98);
}

.product-bottom button.is-added .add-check,
.product-detail-summary > button.is-added .add-check {
  display: block;
}

.page-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr) 310px;
  gap: 20px;
  align-items: start;
  max-width: 1540px;
  margin: 0 auto;
  padding: 20px 22px 36px;
}

body.view-home .page-shell {
  grid-template-columns: minmax(0, 1fr) 310px;
}

body.view-home .category-sidebar,
body.view-home .catalog-view,
body.view-home .catalog-filter-panel,
body.view-catalog .category-sidebar,
body.view-catalog .home-only {
  display: none;
}

.category-sidebar,
.catalog-filter-panel,
.cart-summary-panel {
  position: sticky;
  top: 96px;
  align-self: start;
}

.sidebar-head,
.cart-head,
.toolbar,
.product-bottom,
.cart-summary-head,
.cart-summary-total,
.cart-summary-discount,
.cart-summary-bonus,
.cart-total,
.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.catalog-filter-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.filter-panel-head {
  display: grid;
  gap: 5px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.filter-panel-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.filter-panel-head strong {
  font-size: 20px;
  line-height: 1.15;
}

.filter-toggle {
  display: none;
}

.sidebar-head {
  margin-bottom: 12px;
}

.sidebar-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sidebar-head button,
.category-back,
.active-category button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--violet);
  font-weight: 900;
}

.category-list {
  display: grid;
  gap: 8px;
}

.mobile-menu-account {
  display: none;
}

.category-back {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 11px;
  cursor: pointer;
}

.category-path {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f0edff;
  color: var(--violet-dark);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.category-path span {
  color: var(--muted);
}

.category-group {
  display: grid;
  gap: 6px;
}

.category-group > button,
.category-group .subcat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 9px 11px 9px calc(11px + var(--depth, 0) * 12px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.category-group > button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-group > button.active,
.category-group .subcat.active {
  border-color: rgba(75, 18, 255, 0.45);
  background: #f0edff;
  color: var(--violet-dark);
}

.category-group strong {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 24px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
}

.category-group div {
  display: grid;
  gap: 5px;
}

.category-group .subcat {
  min-height: 34px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 13px;
}

.content {
  min-width: 0;
}

.hero,
.home-showcase,
.toolbar,
.product-card,
.cart-summary-panel,
.cart-panel {
  min-width: 0;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  min-height: 330px;
  padding: 32px;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(112deg, rgba(75, 18, 255, 0.95), rgba(39, 30, 74, 0.87)),
    url("https://images.unsplash.com/photo-1503387762-592deb58ef4e?auto=format&fit=crop&w=1400&q=82");
  background-position: center;
  background-size: cover;
  color: #fff;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  min-width: 0;
  max-width: min(860px, calc(100% - 300px));
}

.hero-logo {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: clamp(28px, 5vw, 82px);
  width: clamp(190px, 16vw, 280px);
  height: auto;
  opacity: 0.28;
  transform: translateY(-50%);
  pointer-events: none;
  user-select: none;
}

.hero-copy p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.hero-actions a {
  background: #fff;
  color: var(--violet-dark);
  padding: 0 18px;
}

.hero-actions a.ghost-link {
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.hero-actions button {
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.14);
}

.home-showcase {
  margin-top: 26px;
}

.info-panels {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.info-panels article,
.bonus-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.info-panels span,
.bonus-panel span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.info-panels h2,
.bonus-panel h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.info-panels p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.4;
}

.bonus-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
  margin-top: 26px;
}

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

.bonus-form input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  padding: 0 12px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 800;
}

.bonus-form button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--violet);
  color: #fff;
  font-weight: 900;
}

.bonus-form p {
  grid-column: 1 / -1;
  min-height: 20px;
  margin: 0;
  color: var(--violet-dark);
  font-weight: 900;
}

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

.section-head span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.section-head h2 {
  margin: 0;
  font-size: 25px;
}

.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 14px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--violet);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.section-more:hover,
.section-more:focus-visible {
  border-color: rgba(75, 18, 255, 0.42);
  background: #f0edff;
  outline: 0;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.empty-section {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.toolbar {
  margin-top: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.catalog-view.catalog-root .toolbar {
  display: none;
}

.toolbar h2 {
  margin: 0 0 4px;
  font-size: 25px;
}

.toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filters {
  display: grid;
  gap: 12px;
}

.filter-control {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.select-shell {
  position: relative;
}

.select-shell::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 13px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--violet);
  border-bottom: 2px solid var(--violet);
  pointer-events: none;
  transform: translateY(-65%) rotate(45deg);
}

.filters select {
  width: 100%;
  min-height: 46px;
  padding: 0 38px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  appearance: none;
  background: #f8f9fc;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.filters select:hover {
  border-color: rgba(75, 18, 255, 0.26);
  background: #fff;
}

.filters select:focus {
  border-color: rgba(75, 18, 255, 0.62);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(75, 18, 255, 0.12);
}

.filters button {
  min-height: 40px;
  padding: 0 14px;
}

.active-category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  padding: 8px 8px 8px 12px;
  border-radius: 8px;
  background: #f0edff;
  color: var(--violet-dark);
  font-weight: 900;
}

.active-category button {
  width: 28px;
  height: 28px;
}

.subcategory-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.subcategory-grid[hidden] {
  display: none;
}

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

.subcategory-head span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.subcategory-head h3 {
  margin: 0;
  font-size: 20px;
}

.subcategory-head button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--violet);
  font-weight: 900;
}

.subcategory-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.subcategory-card {
  display: grid;
  gap: 7px;
  min-height: 86px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.subcategory-card:hover,
.subcategory-card:focus-visible {
  border-color: rgba(75, 18, 255, 0.42);
  background: #f0edff;
  outline: 0;
}

.subcategory-card span {
  font-weight: 950;
  line-height: 1.25;
}

.subcategory-card strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.product-card {
  display: grid;
  grid-template-rows: 220px 1fr;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.product-card:focus-visible {
  outline: 3px solid rgba(75, 18, 255, 0.28);
  outline-offset: 2px;
}

@media (hover: none) and (pointer: coarse) {
  .product-card:focus,
  .product-card:focus-visible,
  .product-card-link:focus,
  .product-card-link:focus-visible,
  .product-title-link:focus,
  .product-title-link:focus-visible {
    outline: 0;
  }
}

.product-card.preorder {
  border-color: rgba(217, 119, 6, 0.42);
}

.product-image {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  padding: 18px;
  border-bottom: 1px solid #eef0f5;
  background: #fff;
}

.product-image::after,
.product-detail-media::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 3;
  width: 72px;
  aspect-ratio: 568 / 720;
  background: url("/assets/opti-mum-logo-watermark-neutral.png?v=20260608-28") center / contain no-repeat;
  opacity: 0.2;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.product-card-link,
.product-title-link {
  color: inherit;
  text-decoration: none;
}

.product-card-link:focus-visible,
.product-title-link:focus-visible {
  outline: 3px solid rgba(75, 18, 255, 0.28);
  outline-offset: 2px;
}

.product-title-link {
  display: block;
}

.product-title-link:hover {
  color: var(--violet-dark);
}

.product-flags {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: calc(100% - 20px);
  pointer-events: none;
}

.flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(24, 26, 34, 0.1);
  background: rgba(255, 255, 255, 0.94);
  color: #2c313b;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(24, 26, 34, 0.12);
}

.flag::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 999px;
  background: var(--flag-accent, var(--violet));
}

.flag.top {
  --flag-accent: var(--violet);
}

.flag.new {
  --flag-accent: #159947;
}

.flag.sale {
  --flag-accent: #dc2626;
}

.flag.quantity {
  --flag-accent: #d97706;
}

.product-image img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.placeholder {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 8px;
  background: var(--violet);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.product-no-photo {
  width: 100%;
  height: 100%;
  min-height: 150px;
  background: #fff;
}

.product-info {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(58px, auto) minmax(20px, auto) auto;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  background: #fff;
}

.badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
}

.stock,
.preorder-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.stock::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  content: "";
}

.stock.available {
  background: #eaf8ef;
  color: var(--green);
}

.stock.available::before {
  background: var(--green);
}

.stock.low {
  background: #fff4e6;
  color: var(--amber);
}

.stock.low::before {
  background: var(--amber);
}

.stock.preorder {
  background: #fff4e6;
  color: var(--amber);
}

.stock.preorder::before {
  background: var(--amber);
}

.preorder-note {
  background: #f0edff;
  color: var(--violet-dark);
}

.product-card h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.product-card p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.product-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  align-items: end;
  gap: 8px;
  min-height: 54px;
}

.product-bottom strong {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: 20px;
  line-height: 1.1;
}

.product-bottom strong span {
  color: var(--muted);
  font-size: 12px;
  text-decoration: line-through;
}

.product-bottom button {
  width: 120px;
  min-width: 120px;
  min-height: 44px;
  padding: 0 10px;
  white-space: nowrap;
}

.product-card.compact {
  grid-template-rows: 176px 1fr;
  min-height: 372px;
}

.product-card.compact .product-info {
  grid-template-rows: auto minmax(52px, auto) minmax(18px, auto) auto;
}

.product-card.compact .product-bottom {
  grid-template-columns: minmax(0, 1fr) 120px;
  align-items: end;
}

.product-card.compact .product-bottom button {
  min-width: 120px;
  width: 120px;
}

.product-card.preorder .product-bottom button {
  background: var(--amber);
}

.product-card.preorder .product-bottom button.is-added {
  background: var(--green);
}

.load-more {
  display: block;
  min-width: 190px;
  min-height: 42px;
  margin: 22px auto 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--violet);
  font-weight: 900;
}

.load-more[hidden] {
  display: none;
}

.cart-summary-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.cart-summary-head span,
.cart-head span,
.modal-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.cart-summary-head strong,
.cart-head strong,
.modal-head strong {
  font-size: 20px;
}

.cart-summary-total,
.cart-summary-discount,
.cart-summary-bonus {
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f0edff;
}

.cart-summary-discount {
  background: #e7f8ef;
}

.cart-summary-bonus {
  background: #fff7ed;
}

.cart-summary-discount[hidden] {
  display: none;
}

.cart-summary-total span,
.cart-summary-discount span,
.cart-summary-bonus span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.cart-summary-total strong {
  color: var(--violet-dark);
  font-size: 22px;
}

.cart-summary-discount strong {
  color: #087f5b;
  font-size: 18px;
}

.cart-summary-bonus strong {
  color: #c2410c;
  font-size: 18px;
}

.cart-details-button {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--violet);
  font-weight: 900;
}

.cart-panel {
  position: fixed;
  top: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 45;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 16px;
  width: min(430px, calc(100vw - 36px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  transform: translateX(calc(100% + 36px));
  transition: transform 180ms ease;
}

body.cart-open .cart-panel {
  transform: translateX(0);
}

.cart-head button,
.modal-head button {
  width: 34px;
  height: 34px;
  border: 0 !important;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 22px;
  appearance: none;
}

.cart-head button:focus,
.cart-head button:focus-visible,
.modal-head button:focus,
.modal-head button:focus-visible,
.product-detail-head button:focus,
.product-detail-head button:focus-visible,
.remove:focus,
.remove:focus-visible {
  outline: 0 !important;
  box-shadow: none !important;
}

.cart-items {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: #cbd2df transparent;
}

.cart-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9fc;
}

.cart-item-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.cart-item-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: start;
  gap: 10px;
}

.cart-item-title strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.cart-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cart-item-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.cart-discount {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e7f8ef;
  color: #087f5b;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.cart-item-bottom {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.cart-line-totals {
  display: block;
  min-width: 0;
}

.cart-line-totals div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 10px;
  gap: 2px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  background: #fff;
}

.cart-line-totals dt,
.cart-line-totals dd {
  margin: 0;
  font-size: 12px;
  font-weight: 900;
}

.cart-line-totals dt {
  color: var(--muted);
}

.cart-line-totals dd {
  color: var(--ink);
  justify-self: end;
  line-height: 1.15;
}

.cart-line-totals small {
  grid-column: 1 / -1;
  color: #087f5b;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.qty {
  display: grid;
  grid-template-columns: 32px 68px 32px;
  justify-self: end;
  min-height: 36px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.qty button {
  border: 0;
  background: #fff;
  color: var(--violet);
  font-weight: 900;
}

.qty input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  appearance: textfield;
}

.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.qty input:focus {
  outline: 2px solid rgba(75, 18, 255, 0.24);
  outline-offset: -2px;
}

.qty span {
  display: grid;
  place-items: center;
  color: var(--ink);
}

.remove {
  width: 28px;
  height: 28px;
  border: 0 !important;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  font-weight: 900;
  appearance: none;
}

.empty-cart {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.cart-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  justify-content: stretch;
  justify-items: stretch;
  align-items: stretch;
  min-height: 44px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cart-total div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 12px;
  width: 100%;
  justify-self: stretch;
  min-height: 38px;
  padding: 0 2px;
}

.cart-total span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
}

.cart-total strong {
  color: var(--ink);
  font-size: 19px;
  line-height: 1;
  justify-self: end;
  min-width: 86px;
  text-align: right;
  white-space: nowrap;
}

.cart-total div:first-child strong {
  color: #087f5b;
  font-size: 18px;
}

.cart-total div:last-child {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f0edff;
}

.cart-total div:last-child strong {
  color: var(--violet-dark);
  font-size: 24px;
}

.checkout-button {
  width: 100%;
}

.cart-panel small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

.checkout-modal,
.auth-modal {
  width: min(760px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-modal {
  width: min(520px, calc(100vw - 28px));
}

.auth-modal.account-mode {
  width: min(960px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
}

.checkout-modal::backdrop,
.auth-modal::backdrop {
  background: rgba(18, 20, 29, 0.46);
}

.product-modal {
  width: min(980px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.product-modal::backdrop {
  background: rgba(18, 20, 29, 0.46);
}

.product-detail {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 20px;
}

.product-detail-head,
.reviews-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.product-detail-head span,
.reviews-head span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.product-detail-head h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
}

.product-detail-head button {
  width: 36px;
  height: 36px;
  border: 0 !important;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 22px;
  appearance: none;
}

.product-detail-body {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(260px, 1.1fr);
  gap: 18px;
}

.product-detail-media {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 330px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.product-detail-media::after {
  right: 18px;
  bottom: 18px;
  width: 112px;
  opacity: 0.18;
}

.product-detail-media img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 390px;
  object-fit: contain;
  object-position: center;
}

.product-detail-summary {
  display: grid;
  align-content: start;
  gap: 14px;
}

.detail-price {
  display: grid;
  gap: 2px;
  font-size: 30px;
}

.detail-price span {
  color: var(--muted);
  font-size: 15px;
  text-decoration: line-through;
}

.product-detail-summary > button,
.review-form button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--violet);
  color: #fff;
  font-weight: 900;
}

.detail-facts,
.characteristics {
  display: grid;
  gap: 8px;
  margin: 0;
}

.detail-facts div,
.characteristics div {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--soft);
}

.detail-facts dt,
.characteristics dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.detail-facts dd,
.characteristics dd {
  margin: 0;
  font-weight: 900;
}

.detail-section {
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.detail-section h3,
.reviews-head h3 {
  margin: 0;
  font-size: 21px;
}

.detail-section p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.reviews-list {
  display: grid;
  gap: 10px;
}

.review-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.review-card div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.review-card span {
  color: var(--amber);
  font-weight: 900;
}

.empty-reviews {
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
}

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

.review-form textarea,
.review-form button {
  grid-column: 1 / -1;
}

.review-form input,
.review-form select,
.review-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.review-form input,
.review-form select {
  height: 42px;
  padding: 0 12px;
}

.review-form textarea {
  resize: vertical;
  padding: 10px 12px;
}

.admin-editor {
  padding: 16px;
  border: 1px solid rgba(75, 18, 255, 0.2);
  border-radius: 8px;
  background: #f8f7ff;
}

.admin-editor-head,
.admin-subhead,
.admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-editor-head span {
  display: block;
  color: var(--violet-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-editor-head h3 {
  margin: 0;
}

.admin-editor-head strong,
.admin-note,
.admin-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

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

.admin-product-form .wide {
  grid-column: 1 / -1;
}

.admin-product-form label,
.admin-characteristics {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.admin-product-form input,
.admin-product-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.admin-product-form input {
  min-height: 42px;
  padding: 0 12px;
}

.admin-product-form textarea {
  resize: vertical;
  padding: 10px 12px;
}

.admin-characteristic-rows {
  display: grid;
  gap: 8px;
}

.admin-characteristic-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) 38px;
  gap: 8px;
}

.admin-subhead button,
.admin-characteristic-row button,
.admin-actions button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--violet);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.admin-characteristic-row button {
  background: #fff;
  color: var(--red);
  border: 1px solid var(--line);
  font-size: 18px;
}

.admin-note {
  margin: 0;
}

.checkout-form,
.auth-form {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.auth-extra {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.auth-extra[hidden] {
  display: none;
}

.auth-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.auth-account div {
  display: grid;
  gap: 4px;
}

.auth-account-actions {
  display: flex !important;
  justify-content: end;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-account span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-account strong {
  font-size: 18px;
}

.auth-account small {
  color: var(--muted);
  font-weight: 800;
}

.auth-account button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--red);
  font-weight: 900;
  cursor: pointer;
}

.auth-account-actions button:first-child {
  color: var(--violet);
}

.account-details {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  align-items: start;
  gap: 14px;
}

.account-details[hidden] {
  display: none;
}

.account-bonus {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.account-password,
.account-orders {
  grid-column: 2;
}

.account-password[hidden] {
  display: none;
}

.account-bonus {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.account-bonus div,
.account-password,
.account-order {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.account-bonus span,
.account-section-head span,
.account-order-meta,
.account-order-flags {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.account-bonus strong {
  display: block;
  margin-top: 4px;
  color: var(--violet-dark);
  font-size: 18px;
}

.account-section-head {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.account-section-head strong {
  font-size: 16px;
}

.account-orders-list {
  display: grid;
  gap: 8px;
}

.account-password {
  display: grid;
  gap: 10px;
}

.account-password-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.account-password-actions button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.account-password-actions button:first-child {
  border-color: transparent;
  background: var(--violet);
  color: #fff;
}

.account-order {
  display: grid;
  gap: 8px;
}

.account-order-head,
.account-order-meta,
.account-order-flags {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.account-order-head span,
.account-order-flags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f0edff;
  color: var(--violet-dark);
}

.account-order p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.account-order small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.account-order-details {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.account-order-details summary {
  cursor: pointer;
  color: var(--violet);
  font-weight: 950;
}

.account-order-products {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.account-order-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px 86px 90px;
  gap: 8px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid #eef0f5;
  font-size: 12px;
  font-weight: 850;
}

.account-order-product.head {
  border-top: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.account-order-product span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.account-order-product span:not(:first-child) {
  text-align: right;
}

.account-order-product.empty {
  display: block;
  color: var(--muted);
}

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

.form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.form-grid label[hidden] {
  display: none;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.form-grid input,
.form-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.form-grid input {
  height: 42px;
  padding: 0 12px;
}

.form-grid textarea {
  resize: vertical;
  padding: 10px 12px;
}

.checkout-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
}

.checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--violet);
}

.order-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.order-preview div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
}

.order-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.order-preview strong {
  font-size: 20px;
}

.modal-actions button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 900;
}

.modal-actions button:first-child {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.form-status {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  opacity: 0;
  transform: translateY(12px);
  transition: 180ms ease;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: 58px 120px minmax(180px, 1fr) 96px 104px;
  }

  .hero-copy {
    max-width: min(760px, calc(100% - 220px));
  }

  .hero-logo {
    right: 28px;
    width: 200px;
    opacity: 0.22;
  }

  .header-links {
    display: none;
  }

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

  .page-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  body.view-home .page-shell {
    grid-template-columns: 1fr;
  }

  .cart-summary-panel {
    grid-column: 2;
    position: static;
  }

  body.view-home .cart-summary-panel {
    grid-column: 1;
  }

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

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

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

@media (max-width: 860px) {
  .site-header {
    display: grid;
    grid-template-columns: 48px 54px minmax(0, 1fr) 48px;
    justify-content: start;
    gap: 8px;
    min-height: 64px;
    padding: 8px 10px;
    border-bottom: 0;
    background: var(--violet);
    backdrop-filter: none;
    z-index: 35;
  }

  .brand {
    order: 1;
    grid-column: 2;
    grid-row: 1;
    width: max-content;
    height: auto;
    padding: 0;
    border-radius: 8px;
    background: #fff;
  }

  .brand-mark-img {
    width: 48px;
    border-radius: 8px;
  }

  .catalog-toggle {
    order: 0;
    grid-column: 1;
    grid-row: 1;
    display: inline-flex;
    gap: 0;
    width: 48px;
    height: 48px;
    min-height: 48px;
    min-width: 0;
    padding: 0;
    background: #fff;
    color: var(--violet);
    font-size: 0;
    line-height: 0;
  }

  .catalog-toggle span,
  .catalog-toggle span::before,
  .catalog-toggle span::after {
    width: 22px;
    height: 3px;
  }

  body.catalog-open .catalog-toggle span {
    background: transparent;
  }

  body.catalog-open .catalog-toggle span::before {
    top: 0;
    transform: rotate(45deg);
  }

  body.catalog-open .catalog-toggle span::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .cart-button {
    order: 3;
    grid-column: 4;
    grid-row: 1;
    width: 48px;
    height: 48px;
    min-height: 48px;
    min-width: 0;
    gap: 0;
    padding: 0;
    background: #fff;
    color: var(--violet);
  }

  .cart-button strong {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    border: 2px solid var(--violet);
    font-size: 10px;
  }

  .cart-button .button-icon {
    width: 22px;
    height: 22px;
  }

  .cart-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .mobile-login-button {
    display: none;
  }

  .search {
    order: 2;
    grid-column: 3;
    grid-row: 1;
    min-height: 48px;
    min-width: 0;
    overflow: hidden;
    border: 0;
    background: #fff;
  }

  .search span {
    padding: 0 10px;
    font-size: 12px;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-logo {
    width: 150px;
    right: 18px;
    opacity: 0.13;
  }

  .page-shell {
    display: block;
    padding: 14px;
  }

  .catalog-filter-panel {
    position: static;
    top: auto;
    gap: 0;
    margin-bottom: 14px;
    padding: 0;
    overflow: hidden;
  }

  .filter-panel-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 0;
  }

  .filter-panel-head strong {
    min-width: 0;
  }

  .filter-panel-head strong {
    font-size: 20px;
  }

  .filter-toggle {
    grid-column: 2;
    grid-row: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--violet);
    font-weight: 900;
  }

  .filter-toggle::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 140ms ease;
  }

  .catalog-filter-panel .filters {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--line);
  }

  .catalog-filter-panel.filters-open .filter-panel-head {
    border-bottom: 0;
  }

  .catalog-filter-panel.filters-open .filters {
    display: grid;
  }

  .catalog-filter-panel.filters-open .filter-toggle::after {
    transform: translateY(2px) rotate(225deg);
  }

  .category-sidebar {
    position: fixed;
    top: 64px;
    right: auto;
    bottom: 0;
    left: 0;
    z-index: 31;
    width: min(320px, 88vw);
    height: calc(100dvh - 64px);
    max-height: calc(100dvh - 64px);
    padding: 18px 16px calc(22px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    box-shadow: var(--shadow);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  body.view-home .category-sidebar,
  body.view-catalog .category-sidebar {
    display: block;
  }

  body.catalog-open {
    overflow: hidden;
  }

  body.catalog-open::after {
    content: "";
    position: fixed;
    inset: 64px 0 0;
    z-index: 30;
    background: rgba(15, 23, 42, 0.28);
  }

  .mobile-menu-account {
    display: grid;
    margin: 4px 0 14px;
    padding: 12px;
    border-radius: 8px;
    background: #f0edff;
  }

  .mobile-menu-account button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    background: var(--violet);
    color: #fff;
    font-weight: 900;
  }

  body.catalog-open .category-sidebar {
    transform: translateX(0);
  }

  .cart-panel {
    inset: 0;
    width: auto;
    max-width: none;
    height: 100dvh;
    padding: calc(14px + env(safe-area-inset-top)) 14px calc(16px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    transform: translateX(100%);
  }

  .cart-head {
    position: sticky;
    top: calc(-14px - env(safe-area-inset-top));
    z-index: 2;
    margin: calc(-14px - env(safe-area-inset-top)) -14px 0;
    padding: calc(14px + env(safe-area-inset-top)) 14px 12px;
    border-bottom: 1px solid var(--line);
    background: #fff;
  }

  .auth-modal,
  .auth-modal.account-mode {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  .auth-form {
    align-content: start;
    min-height: 100dvh;
    max-height: 100dvh;
    padding: calc(14px + env(safe-area-inset-top)) 14px calc(16px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .auth-modal .modal-head {
    position: sticky;
    top: calc(-14px - env(safe-area-inset-top));
    z-index: 2;
    margin: calc(-14px - env(safe-area-inset-top)) -14px 0;
    padding: calc(14px + env(safe-area-inset-top)) 14px 12px;
    border-bottom: 1px solid var(--line);
    background: #fff;
  }

  .auth-modal .modal-actions {
    position: sticky;
    bottom: calc(-16px - env(safe-area-inset-bottom));
    z-index: 2;
    margin: 0 -14px calc(-16px - env(safe-area-inset-bottom));
    padding: 12px 14px calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: #fff;
  }

  .product-modal {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  .product-detail {
    align-content: start;
    min-height: 100dvh;
    max-height: 100dvh;
    padding: calc(14px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .product-detail-head {
    position: sticky;
    top: calc(-14px - env(safe-area-inset-top));
    z-index: 2;
    align-items: start;
    margin: calc(-14px - env(safe-area-inset-top)) -14px 0;
    padding: calc(14px + env(safe-area-inset-top)) 14px 12px;
    border-bottom: 1px solid var(--line);
    background: #fff;
  }

  .product-detail-head h2 {
    font-size: 22px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 24px;
  }

  .hero h1 {
    font-size: 30px;
    overflow-wrap: anywhere;
  }

  .toolbar {
    display: grid;
    align-items: start;
  }

  .subcategory-head {
    display: grid;
    align-items: start;
  }

  .subcategory-head button {
    justify-self: start;
  }

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

  .filters select,
  .filters button {
    width: 100%;
  }

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

  .product-detail-body {
    grid-template-columns: 1fr;
  }

  .product-detail-media {
    min-height: 250px;
  }

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

  .admin-characteristic-row button {
    justify-self: start;
    width: 42px;
  }

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

  .info-panels,
  .bonus-panel {
    grid-template-columns: 1fr;
  }

  .product-card {
    grid-template-columns: 118px minmax(0, 1fr);
    grid-template-rows: 1fr;
    min-height: 172px;
  }

  .product-image {
    min-height: 172px;
    padding: 12px;
    border-right: 1px solid #eef0f5;
    border-bottom: 0;
  }

  .product-info {
    grid-template-rows: auto auto 18px auto;
  }

  .product-card.compact {
    grid-template-columns: 1fr;
    grid-template-rows: 168px 1fr;
    min-height: 352px;
  }

  .product-card.compact .product-image {
    min-height: 168px;
    border-right: 0;
    border-bottom: 1px solid #eef0f5;
  }

  .product-bottom {
    align-items: center;
  }

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

  .order-preview {
    grid-template-columns: 1fr;
  }

  .account-details,
  .account-bonus {
    grid-template-columns: 1fr;
  }

  .account-bonus,
  .account-password,
  .account-orders {
    grid-column: auto;
    grid-row: auto;
  }

  .account-order-product {
    grid-template-columns: minmax(0, 1fr) 74px;
  }

  .account-order-product.head {
    display: none;
  }

  .account-order-product span:nth-child(3)::before {
    content: "Ціна: ";
    color: var(--muted);
  }

  .account-order-product span:nth-child(4)::before {
    content: "Сума: ";
    color: var(--muted);
  }
}

@media (max-width: 520px) {
  .hero-logo {
    display: none;
  }

  .hero {
    padding: 20px;
  }

  .hero h1 {
    font-size: 27px;
  }

  .section-head {
    display: grid;
    align-items: start;
  }

  .section-head a {
    justify-self: start;
  }

  .subcategory-grid {
    padding: 12px;
  }

  .subcategory-cards {
    grid-template-columns: 1fr;
  }

  .product-card {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .product-image {
    min-height: 172px;
    padding: 10px;
  }

  .product-detail {
    padding: calc(14px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
  }

  .product-detail-head {
    display: flex;
  }

  .product-detail-head button {
    position: static;
    flex: 0 0 auto;
  }

  .detail-facts div,
  .characteristics div,
  .review-form {
    grid-template-columns: 1fr;
  }

  .admin-editor-head,
  .admin-subhead,
  .admin-actions {
    display: grid;
    align-items: start;
  }

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

  .product-card.compact {
    grid-template-columns: 108px minmax(0, 1fr);
    grid-template-rows: 1fr;
    min-height: 172px;
  }

  .product-card.compact .product-image {
    min-height: 172px;
    border-right: 1px solid #eef0f5;
    border-bottom: 0;
  }

  .product-bottom {
    grid-template-columns: minmax(0, 1fr) 120px;
  }

  .product-bottom button {
    min-width: 120px;
    width: 120px;
  }
}

@media (max-width: 380px) {
  .site-header {
    grid-template-columns: 44px 50px minmax(0, 1fr) 44px;
    gap: 6px;
    padding: 8px 10px;
  }

  .brand-mark-img {
    width: 44px;
  }

  .catalog-toggle {
    width: 44px;
    height: 46px;
    min-height: 46px;
    padding: 0;
  }

  .cart-button {
    width: 44px;
    height: 46px;
    min-height: 46px;
  }
}
