:root {
  --deep: #0a192f;
  --deep-2: #112744;
  --aqua: #20b2aa;
  --turquoise: #40e0d0;
  --coral: #ff7a59;
  --amber: #ffd166;
  --white: #ffffff;
  --mist: rgba(255, 255, 255, 0.78);
  --glass: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.22);
  --shadow: 0 20px 50px rgba(2, 11, 24, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--white);
  background: var(--deep);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

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

.ocean-video,
#oceanCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ocean-video {
  z-index: -3;
  object-fit: cover;
  filter: brightness(0.54) contrast(1.08) saturate(0.78);
  background: #061524;
}

#oceanCanvas {
  z-index: -2;
  opacity: 0.34;
  background:
    radial-gradient(ellipse at 52% 8%, rgba(184, 224, 229, 0.16), transparent 34rem),
    radial-gradient(ellipse at 18% 72%, rgba(14, 83, 102, 0.34), transparent 32rem),
    linear-gradient(180deg, #08131f 0%, #0a192f 34%, #061524 62%, #03101c 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 10, 18, 0.18), rgba(3, 10, 18, 0.52) 58%, rgba(3, 10, 18, 0.74) 100%),
    radial-gradient(ellipse at 48% 12%, rgba(216, 235, 235, 0.12), transparent 36rem);
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(ellipse at 50% 16%, rgba(64, 224, 208, 0.2), transparent 34rem),
    rgba(3, 10, 18, 0.78);
  backdrop-filter: blur(18px);
}

.auth-gate.hidden {
  display: none;
}

.auth-card {
  position: relative;
  display: grid;
  gap: 13px;
  width: min(430px, 100%);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.auth-logo {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.13);
}

.auth-card h1 {
  margin: 0;
  font-size: 2.35rem;
}

.auth-copy {
  margin: 0;
  color: var(--mist);
  line-height: 1.55;
}

.auth-tabs {
  gap: 8px;
}

.auth-tabs button {
  flex: 1;
  cursor: pointer;
  font-weight: 800;
}

.auth-card label {
  display: grid;
  gap: 8px;
  color: var(--mist);
  font-size: 0.88rem;
  font-weight: 700;
}

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

.password-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.password-field input {
  min-width: 0;
  border: 0;
  background: transparent;
}

.password-toggle {
  align-self: stretch;
  min-width: 92px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-weight: 800;
}

.auth-recovery {
  width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 24px;
  align-items: center;
  padding: 14px clamp(16px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 17, 33, 0.82);
  backdrop-filter: blur(18px);
}

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

.user-name-badge {
  max-width: 220px;
  color: #ffffff;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand,
.main-nav,
.category-tabs,
.admin-tabs,
.form-actions,
.switch-row,
.auth-tabs {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 12px 28px rgba(2, 11, 24, 0.18);
}

.brand-mark svg,
.auth-logo svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.brand-text {
  display: grid;
  gap: 1px;
  line-height: 1;
}

.brand-text small {
  color: var(--mist);
  font-size: 0.68rem;
  font-weight: 700;
}

.main-nav {
  justify-content: center;
  gap: 10px;
}

.main-nav a,
.category-tabs button,
.admin-tabs button,
.auth-tabs button,
.ghost-button,
.secondary-link {
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--white);
}

.main-nav a,
.category-tabs button,
.admin-tabs button,
.auth-tabs button {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 8px;
}

.cart-button,
.primary-button,
.primary-link {
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 12px 26px rgba(2, 11, 24, 0.2);
  backdrop-filter: blur(18px);
}

.cart-button,
.primary-button,
.ghost-button,
.primary-link,
.secondary-link {
  min-height: 44px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.cart-button {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

.cart-button strong {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: rgba(10, 25, 47, 0.16);
}

.primary-button,
.ghost-button {
  padding: 0 16px;
}

.ghost-button,
.secondary-link {
  padding: 0 16px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
}

button:hover,
a:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(64, 224, 208, 0.18);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(255, 209, 102, 0.78);
  outline-offset: 3px;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: 24px;
  align-items: center;
  min-height: auto;
  padding: 28px 0 22px;
}

.hero-copy h1 {
  margin: 10px 0 16px;
  font-size: clamp(3.6rem, 5.8rem, 6.2rem);
  line-height: 0.92;
}

.hero-text {
  max-width: 620px;
  margin: 0;
  color: var(--mist);
  font-size: 1.14rem;
  line-height: 1.65;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-media {
  position: relative;
  height: 220px;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  opacity: 0.7;
  filter: saturate(1.04) contrast(1.03);
}

.hero-stat {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 2px;
  min-width: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 18, 34, 0.76);
  backdrop-filter: blur(14px);
}

.hero-stat span {
  color: var(--amber);
  font-size: 2rem;
  font-weight: 800;
}

.hero-stat small {
  color: var(--mist);
}

.toolbar,
.popular-section,
.catalog-section,
.account-section,
.admin-section {
  padding: 38px 0;
}

.catalog-section {
  scroll-margin-top: 96px;
}

.admin-section.login-only {
  display: grid;
  place-items: center;
  min-height: 70vh;
}

.admin-section[hidden] {
  display: none;
}

.admin-section .eyebrow {
  color: var(--white);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 18px;
  align-items: end;
}

.search-field,
.promo-field,
.checkout-form label,
.admin-form label {
  display: grid;
  gap: 8px;
  color: var(--mist);
  font-size: 0.88rem;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

input,
select {
  min-height: 46px;
  padding: 0 13px;
}

textarea {
  padding: 12px 13px;
  resize: vertical;
}

select option {
  color: #0a192f;
}

.category-tabs,
.admin-tabs {
  flex-wrap: wrap;
  gap: 8px;
}

.category-tabs button.active,
.admin-tabs button.active,
.auth-tabs button.active {
  border-color: rgba(64, 224, 208, 0.8);
  color: var(--white);
  background: rgba(64, 224, 208, 0.24);
}

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

.section-heading h2 {
  margin: 0;
  font-size: 2rem;
}

.popular-carousel {
  display: grid;
  grid-auto-columns: minmax(0, calc((100% - 16px) / 2));
  grid-auto-flow: column;
  align-items: stretch;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 0 14px;
  scroll-snap-type: x mandatory;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px;
}

.product-card,
.panel,
.cart-drawer,
.product-dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 14px 32px rgba(2, 11, 24, 0.18);
  backdrop-filter: blur(18px);
}

.product-card {
  display: grid;
  grid-template-rows: clamp(240px, 24vw, 320px) 1fr;
  height: 590px;
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.product-image {
  position: relative;
  height: clamp(240px, 24vw, 320px);
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-row {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  padding: 6px 8px;
  border-radius: 999px;
  color: #061224;
  background: var(--amber);
  font-size: 0.72rem;
  font-weight: 800;
}

.badge.sale {
  background: var(--coral);
  color: var(--white);
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  min-height: 0;
  padding: 14px;
}

.product-body h3 {
  margin: 0;
  font-size: 1.06rem;
}

.product-body > p {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.product-body > .price-row {
  margin-top: auto;
  min-height: 42px;
}

.product-card .price-row strong {
  white-space: nowrap;
}

.product-card .quantity-control {
  flex: 0 0 auto;
}

.product-card .card-actions {
  margin-top: 2px;
  min-height: 44px;
}

.product-card .card-actions > button {
  flex: 1 1 0;
  min-width: 0;
}

.muted,
.product-body p,
.cart-item small,
.timeline-list small,
.admin-list small,
.success-message {
  color: var(--mist);
}

.price-row,
.card-actions,
.cart-head,
.cart-summary div,
.panel-head,
.cart-item,
.admin-item,
.client-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.price-row strong {
  color: var(--amber);
  font-size: 1.12rem;
}

.quantity-control {
  display: grid;
  grid-template-columns: 38px 40px 38px;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.quantity-control button {
  height: 38px;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.quantity-control span {
  text-align: center;
  font-weight: 800;
}

.account-layout,
.admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: 18px;
}

.panel {
  padding: 18px;
}

.panel h3 {
  margin: 0 0 14px;
}

.timeline-list,
.admin-list,
.client-table,
.cart-items {
  display: grid;
  gap: 10px;
}

.timeline-item,
.admin-item,
.client-row,
.cart-item {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.order-details summary {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
}

.order-details summary::-webkit-details-marker {
  display: none;
}

.order-details summary span:first-child {
  display: grid;
  gap: 4px;
}

.order-details summary::after {
  content: "Подробнее";
  min-width: 96px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.76rem;
  font-weight: 800;
  text-align: center;
}

.order-details[open] summary::after {
  content: "Свернуть";
}

.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.order-detail-grid div {
  display: grid;
  gap: 4px;
}

.order-products {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.order-product-link {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  text-align: left;
}

.order-product-link:hover {
  border-color: rgba(255, 255, 255, 0.54);
  background: rgba(255, 255, 255, 0.16);
}

.status-pill {
  padding: 6px 9px;
  border-radius: 999px;
  color: #061224;
  background: var(--turquoise);
  font-size: 0.76rem;
  font-weight: 800;
}

.address-list {
  display: grid;
  gap: 10px;
  padding-left: 18px;
  color: var(--mist);
}

.admin-form {
  display: grid;
  gap: 12px;
  align-self: start;
}

.admin-form[hidden],
.admin-grid.wide-mode .admin-form {
  display: none;
}

.admin-workspace[hidden] {
  display: none;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

.admin-grid.wide-mode {
  grid-template-columns: 1fr;
}

.admin-grid.wide-mode .admin-panel.active {
  grid-column: 1 / -1;
}

.analytics-panel.active {
  display: block;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.kpi-card span,
.kpi-card small {
  color: var(--mist);
}

.kpi-card strong {
  font-size: 1.35rem;
}

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

.analytics-block {
  grid-column: span 6;
}

.analytics-block.wide {
  grid-column: 1 / -1;
}

.analytics-layout h4 {
  margin: 0 0 10px;
}

.analytics-list,
.analytics-card {
  display: grid;
  gap: 10px;
}

.analytics-card,
.analytics-table {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.analytics-row {
  display: grid;
  gap: 7px;
}

.analytics-row-head,
.analytics-table-head,
.analytics-table-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.6fr) repeat(4, minmax(72px, 0.7fr));
  gap: 8px;
  align-items: center;
}

.analytics-row-head {
  grid-template-columns: 1fr auto;
}

.analytics-table-head {
  color: var(--mist);
  font-size: 0.78rem;
  font-weight: 800;
}

.analytics-table-row {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.analytics-table.compact .analytics-table-head,
.analytics-table.compact .analytics-table-row {
  grid-template-columns: minmax(130px, 1.5fr) repeat(4, minmax(64px, 0.7fr));
}

.bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.72);
}

.admin-item img {
  width: 64px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
}

.orders-table-head,
.order-row,
.clients-table-head,
.client-row {
  display: grid;
  gap: 14px;
  align-items: center;
}

.orders-table-head,
.order-row {
  grid-template-columns: minmax(112px, 0.72fr) minmax(170px, 1fr) minmax(220px, 1.45fr) 128px 170px;
}

.orders-table-head {
  padding: 0 12px 2px;
  color: var(--mist);
  font-size: 0.78rem;
  font-weight: 800;
}

.order-row {
  justify-content: stretch;
}

.order-row small {
  min-width: 0;
}

.order-total {
  justify-self: end;
  width: 128px;
  text-align: right;
}

.order-status-select {
  justify-self: end;
  width: 170px;
}

.client-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}

.client-summary div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.client-summary span,
.clients-table-head {
  color: var(--mist);
  font-size: 0.78rem;
  font-weight: 800;
}

.clients-table-head,
.client-row {
  grid-template-columns: minmax(150px, 1fr) minmax(190px, 1.15fr) 82px 128px 104px minmax(190px, 1.25fr);
}

.clients-table-head {
  padding: 0 12px 2px;
}

.clients-table-head span:nth-child(3),
.clients-table-head span:nth-child(4) {
  justify-self: end;
  text-align: right;
}

.client-row {
  justify-content: stretch;
}

.client-cell {
  display: grid;
  gap: 4px;
}

.client-cell strong,
.client-cell small {
  display: block;
}

.client-orders,
.client-total {
  justify-self: end;
  text-align: right;
}

.client-row small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-actions button,
.icon-button {
  min-width: 36px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(460px, 100%);
  height: 100vh;
  padding: 20px;
  overflow-y: auto;
  transform: translateX(104%);
  transition: transform 220ms ease;
}

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

.cart-drawer h2,
.cart-drawer h3 {
  margin: 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 118px;
  align-items: center;
  justify-content: stretch;
}

.cart-item img {
  width: 76px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
}

.cart-item > div:not(.quantity-control) {
  min-width: 0;
}

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

.cart-item .quantity-control {
  grid-template-columns: 34px 38px 34px;
  justify-self: start;
  width: 106px;
}

.cart-summary {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.checkout-form {
  display: grid;
  gap: 11px;
}

.delivery-choice {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: var(--mist);
}

.delivery-choice legend {
  padding: 0 6px;
  color: var(--white);
  font-weight: 800;
}

.delivery-choice label {
  display: flex;
  grid-template-columns: none;
  gap: 9px;
  align-items: center;
}

.delivery-choice input {
  width: 18px;
  min-height: 18px;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(0, 0, 0, 0.45);
}

.product-dialog {
  width: min(860px, calc(100% - 28px));
  max-height: 88vh;
  padding: 0;
  overflow: auto;
  color: var(--white);
}

.product-dialog::backdrop {
  background: rgba(2, 11, 24, 0.7);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.details-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  padding: 18px;
}

.details-layout img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border-radius: 8px;
  object-fit: cover;
}

.reviews,
.recommendations {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.review-item,
.review-form {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.review-item p {
  margin: 0;
  color: var(--mist);
  line-height: 1.5;
}

.review-form label {
  display: grid;
  gap: 8px;
  color: var(--mist);
  font-size: 0.88rem;
  font-weight: 700;
}

.empty-state {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--mist);
  background: var(--glass);
}

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .hero,
  .toolbar,
  .account-layout,
  .admin-grid,
  .analytics-layout,
  .kpi-grid,
  .details-layout {
    grid-template-columns: 1fr;
  }

  .analytics-block,
  .analytics-block.wide {
    grid-column: 1;
  }

  .hero {
    min-height: auto;
    padding-top: 24px;
  }

  .hero-copy h1 {
    font-size: 4rem;
  }

  .hero-media,
  .hero-media img {
    min-height: 0;
  }

  .hero-media {
    height: 220px;
  }

  .popular-carousel {
    grid-auto-columns: minmax(260px, 78%);
  }

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

  .product-card {
    height: 560px;
    grid-template-rows: 230px 1fr;
  }

  .product-image {
    height: 230px;
  }
}

@media (max-width: 560px) {
  main {
    width: min(100% - 22px, 1180px);
  }

  .topbar {
    gap: 12px;
    padding: 12px;
  }

  .brand span:last-child,
  .cart-button span {
    display: none;
  }

  #openAuth {
    min-width: 54px;
    padding-inline: 10px;
  }

  .hero-copy h1 {
    font-size: 3.1rem;
  }

  .hero-text {
    font-size: 1rem;
  }

  .hero-media {
    height: 180px;
  }

  .card-actions,
  .panel-head,
  .admin-item,
  .client-row {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-actions {
    justify-content: flex-start;
  }

  .order-details summary,
  .order-detail-grid,
  .orders-table-head,
  .order-row,
  .client-summary,
  .clients-table-head,
  .client-row,
  .analytics-table-head,
  .analytics-table-row {
    grid-template-columns: 1fr;
  }

  .orders-table-head,
  .clients-table-head {
    display: none;
  }

  .order-total,
  .order-status-select,
  .client-orders,
  .client-total {
    justify-self: stretch;
    width: 100%;
    text-align: left;
  }

  .order-details summary {
    align-items: stretch;
    flex-direction: column;
  }

  .order-details summary::after {
    width: 100%;
  }

  .cart-drawer {
    border-radius: 0;
  }
}
