﻿:root {
  --bg-main: #09090b;
  --bg-card: #111117;
  --bg-soft: #181823;
  --text-main: #f5f5f7;
  --text-dim: #b4b6c0;
  --accent: #ef303d;
  --accent-deep: #b80f22;
  --line: rgba(255, 255, 255, 0.08);
  --success: #3ac26b;
  --warning: #ffc857;
  --radius: 20px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  min-height: 100%;
  font-family: 'Manrope', sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at 20% 15%, rgba(239, 48, 61, 0.2), transparent 38%),
    radial-gradient(circle at 80% 30%, rgba(184, 15, 34, 0.18), transparent 40%),
    var(--bg-main);
}

body {
  position: relative;
  overflow-x: hidden;
}

.app {
  width: 100%;
  min-width: 0;
}

.bg-overlay,
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg-overlay {
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.02), transparent 45%, rgba(239, 48, 61, 0.04));
}

.bg-grid {
  opacity: 0.2;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 100%);
}

.shell {
  width: 100%;
  min-width: 0;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 14px 44px;
  display: grid;
  gap: 16px;
}

.card {
  min-width: 0;
  max-width: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent), var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  animation: reveal 0.5s ease forwards;
}

.hero {
  display: grid;
  gap: 14px;
}

.kicker {
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.hero h1 {
  margin: 0;
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(30px, 7vw, 52px);
  line-height: 1.1;
  text-transform: uppercase;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--text-dim);
  max-width: 680px;
  line-height: 1.45;
}

.hero-tags,
.hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(239, 48, 61, 0.35);
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffd5d9;
  background: rgba(239, 48, 61, 0.12);
  font-size: 12px;
}

.tag-link {
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.tag-link:hover {
  transform: translateY(-1px);
  border-color: rgba(239, 48, 61, 0.8);
  background: rgba(239, 48, 61, 0.24);
  box-shadow: 0 10px 20px rgba(184, 15, 34, 0.3);
}

.tag-link:focus-visible {
  outline: 2px solid rgba(239, 48, 61, 0.8);
  outline-offset: 2px;
}

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

input,
select,
textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: var(--text-main);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.5) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.5) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 11px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(239, 48, 61, 0.7);
  box-shadow: 0 0 0 3px rgba(239, 48, 61, 0.2);
}

label {
  display: grid;
  gap: 8px;
  color: var(--text-dim);
  font-size: 13px;
}

.primary-btn,
.ghost-btn,
.product-btn,
.status-btn,
.delete-btn,
.detail-btn,
.tab-btn,
.slide-nav {
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  color: #fff;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.2s ease;
}

.primary-btn,
.product-btn,
.status-btn,
.cart-btn {
  padding: 11px 13px;
  background: linear-gradient(100deg, var(--accent), var(--accent-deep));
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(184, 15, 34, 0.45);
}

.primary-btn:hover,
.product-btn:hover,
.status-btn:hover,
.detail-btn:hover,
.cart-btn:hover {
  transform: translateY(-1px);
}

.ghost-btn,
.detail-btn,
.tab-btn {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.section-head h2,
.section-head h3 {
  margin: 0;
  font-family: 'Unbounded', sans-serif;
  font-size: 18px;
}

.controls {
  display: grid;
  gap: 14px;
}

.search-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

#applyFiltersBtn {
  white-space: nowrap;
  min-height: 46px;
  line-height: 1.1;
  padding-inline: 14px;
}

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

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#cartCountBadge {
  min-width: 22px;
  min-height: 22px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

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

.product-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.product-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  min-height: 2.5em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-desc {
  margin: 0;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.35;
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-meta {
  display: grid;
  gap: 6px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.price {
  font-weight: 800;
  color: #ffd9dc;
}

.stock-badge {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
}

.stock-badge.in-stock {
  background: rgba(58, 194, 107, 0.12);
  border-color: rgba(58, 194, 107, 0.45);
  color: #9ef0be;
}

.stock-badge.preorder {
  background: rgba(255, 200, 87, 0.12);
  border-color: rgba(255, 200, 87, 0.45);
  color: #ffe09a;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

.meta-list {
  display: grid;
  gap: 4px;
  color: var(--text-dim);
  font-size: 12px;
}

.product-body .meta-list {
  min-height: 0;
}

.orders-list,
.admin-products,
.admin-orders,
.cart-items {
  display: grid;
  gap: 10px;
}

.order-item,
.admin-item,
.cart-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.order-item.focused {
  border-color: rgba(239, 48, 61, 0.75);
  box-shadow: 0 0 0 2px rgba(239, 48, 61, 0.25);
}

.tab-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tab-btn.active {
  background: linear-gradient(100deg, rgba(239, 48, 61, 0.24), rgba(184, 15, 34, 0.24));
  border-color: rgba(239, 48, 61, 0.6);
}

.status-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(239, 48, 61, 0.15);
  color: #ffd3d6;
  border: 1px solid rgba(239, 48, 61, 0.4);
}

.tiny-title {
  margin: 10px 0 6px;
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.size-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.catalog-size-list {
  flex-wrap: nowrap;
  overflow: hidden;
  padding-bottom: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.catalog-size-list::-webkit-scrollbar {
  display: none;
}

.catalog-size-list .size-chip {
  flex: 0 0 auto;
  min-width: 38px;
  text-align: center;
}

.catalog-size-list .size-chip-hidden {
  display: none !important;
}

.catalog-size-list .size-chip-more {
  flex: 0 0 auto;
  min-width: 52px;
  padding-inline: 10px;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #d5d9e8;
  cursor: pointer;
}

.catalog-size-list .size-chip-more:hover {
  border-color: rgba(239, 48, 61, 0.7);
  color: #ffe8ea;
}

.size-chip {
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(20, 21, 31, 0.92);
  color: #dde0eb;
  font-size: 12px;
  font-weight: 700;
}

.size-chip.available {
  border-color: rgba(239, 48, 61, 0.88);
  background: linear-gradient(130deg, rgba(239, 48, 61, 0.34), rgba(184, 15, 34, 0.46));
  color: #ffe8ea;
  text-shadow: 0 0 10px rgba(239, 48, 61, 0.35);
}

.size-chip.unavailable {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #8e93a5;
}

.size-chip-btn {
  cursor: pointer;
}

.size-chip-btn.selected {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2), 0 0 0 4px rgba(239, 48, 61, 0.35);
  transform: translateY(-1px);
}

.size-chart {
  margin: 10px 0;
  color: #ffd9de;
  font-size: 13px;
}

.quantity-row {
  max-width: 170px;
}

.product-modal-card .quantity-row {
  max-width: 96px;
  margin-bottom: 4px;
}

#productModalQuantity {
  height: 36px;
  padding: 6px 10px;
  text-align: center;
}

.admin {
  border-color: rgba(239, 48, 61, 0.35);
}

.admin-id {
  font-size: 12px;
  color: var(--text-dim);
}

.admin-block {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.admin-form,
.admin-side {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.admin-form {
  display: grid;
  gap: 10px;
  align-content: start;
}

.admin-form .primary-btn {
  width: 100%;
  min-height: 48px;
}

.admin-side {
  display: grid;
  align-content: start;
  gap: 12px;
}

.admin-subtabs {
  margin-bottom: 10px;
}

#adminCategoriesList,
#adminCategoryMappingList {
  margin-top: 2px;
}

#adminProductCreateBlock,
#adminProductListBlock {
  min-width: 0;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.inline-form .primary-btn,
.inline-form .status-btn,
.inline-form .detail-btn,
.inline-form .delete-btn {
  width: auto;
  min-height: 42px;
  white-space: nowrap;
}

.upload-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.015);
  display: grid;
  gap: 9px;
}

.upload-title {
  margin: 0;
  color: var(--text-dim);
  font-size: 13px;
}

.upload-btn {
  position: relative;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid rgba(239, 48, 61, 0.5);
  background: rgba(239, 48, 61, 0.18);
  color: #ffe8eb;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
}

.upload-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.gallery-grid-tight {
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
}

.admin-form h3,
.admin-side h3,
.admin-block h3 {
  margin: 0 0 10px;
  font-family: 'Unbounded', sans-serif;
  font-size: 15px;
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.checkbox-row input {
  width: auto;
}

.admin input[type='checkbox'] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  margin: 0;
  border-radius: 6px;
  border: 1px solid rgba(239, 48, 61, 0.6);
  background: rgba(255, 255, 255, 0.05);
  display: inline-grid;
  place-content: center;
  cursor: pointer;
}

.admin input[type='checkbox']::before {
  content: '';
  width: 10px;
  height: 10px;
  transform: scale(0);
  transition: transform 0.15s ease;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--accent), #ff6a76);
}

.admin input[type='checkbox']:checked::before {
  transform: scale(1);
}

.toggle-row {
  position: relative;
  width: fit-content;
  gap: 8px;
}

.toggle-row input[type='checkbox'] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-switch {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(239, 48, 61, 0.6);
  background: rgba(255, 255, 255, 0.07);
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  transition: transform 0.2s ease;
}

.toggle-row input[type='checkbox']:checked + .toggle-switch {
  background: rgba(239, 48, 61, 0.28);
  border-color: rgba(239, 48, 61, 0.9);
}

.toggle-row input[type='checkbox']:checked + .toggle-switch::after {
  transform: translateX(20px);
}

.admin-actions,
.checkout-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-item {
  display: grid;
  gap: 10px;
  align-content: start;
}

.admin-item .section-head {
  margin-bottom: 0;
}

.admin-size-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-size-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #c8cede;
  padding: 7px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-size-toggle.enabled {
  border-color: rgba(239, 48, 61, 0.82);
  background: rgba(239, 48, 61, 0.2);
  color: #ffe6e8;
}

.admin-size-toggle.disabled {
  opacity: 0.85;
}

.admin-size-label {
  font-weight: 700;
}

.admin-size-op {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
}

.size-editor-help {
  color: #9ca2b5;
  font-size: 12px;
}

.gallery-actions {
  margin-top: 8px;
}

.delete-btn {
  padding: 8px 10px;
  background: rgba(255, 59, 73, 0.22);
  border: 1px solid rgba(255, 59, 73, 0.45);
}

.detail-btn {
  padding: 8px 10px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 14px;
}

.modal-card {
  min-width: 0;
  width: min(560px, 100%);
  max-height: calc(100dvh - 28px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #101018;
  padding: 14px;
}

.product-modal-card {
  width: min(660px, 100%);
}

.checkout-modal-card {
  width: min(720px, 100%);
}

.product-slider {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.slide-frame {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.slide-frame img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.slide-nav {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 22px;
  line-height: 1;
  padding: 0;
}

.slide-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 10px 0;
}

.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}

.slide-dot.active {
  background: var(--accent);
}

.checkout-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.checkout-step {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  font-size: 12px;
  text-align: center;
}

.checkout-step.active {
  border-color: rgba(239, 48, 61, 0.65);
  color: #ffe5e7;
  background: rgba(239, 48, 61, 0.16);
}

.checkout-step-content {
  display: grid;
  gap: 10px;
}

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

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

.cart-item-meta {
  display: grid;
  gap: 5px;
}

.cart-item-controls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.qty-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.qty-badge {
  min-width: 28px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.cart-remove-btn {
  margin-left: 2px;
}

.mini-btn {
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

.file-mini-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 33px;
  padding: 6px 12px;
}

.file-mini-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
}

.gallery-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0f1018;
  aspect-ratio: 1 / 1;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb.draft {
  border-color: rgba(239, 48, 61, 0.45);
}

.gallery-remove-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: rgba(7, 7, 11, 0.82);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.gallery-remove-btn:hover {
  background: rgba(239, 48, 61, 0.9);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

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

.size-editor-rows {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.size-editor-row {
  grid-template-columns: 1fr auto;
}

.modal-actions {
  display: flex;
  gap: 8px;
}

.modal-actions > button {
  width: 100%;
}

.product-modal-card .modal-actions {
  margin-top: 10px;
}

.checkout-success {
  display: grid;
  gap: 10px;
  align-items: center;
  justify-items: center;
  padding: 30px 10px;
  text-align: center;
}

.success-spinner {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}

.success-check {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(58, 194, 107, 0.2);
  border: 1px solid rgba(58, 194, 107, 0.7);
  display: grid;
  place-items: center;
  font-size: 30px;
  color: #9ef0be;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 12px;
  background: #161622;
  border: 1px solid rgba(239, 48, 61, 0.4);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  z-index: 60;
}

.hidden {
  display: none !important;
}

.app-footer {
  text-align: center;
  color: #8f93a7;
  font-size: 13px;
  margin-top: 2px;
  padding-bottom: 2px;
}

.app-footer strong {
  color: #dfe2ef;
}

.faq-shell {
  max-width: 860px;
}

.faq-header {
  display: grid;
  gap: 10px;
}

.faq-header h1 {
  margin: 0;
  text-transform: none;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.12;
}

.faq-header .subtitle {
  margin-top: 0;
}

.faq-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.faq-card {
  display: grid;
  gap: 12px;
}

.faq-section {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
}

.faq-section h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
}

.faq-section p {
  margin: 0 0 8px;
  line-height: 1.45;
}

.faq-section p:last-child {
  margin-bottom: 0;
}

.faq-section ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 7px;
}

.faq-contacts {
  border: 1px solid rgba(92, 185, 255, 0.35);
  background: rgba(38, 139, 191, 0.24);
}

.faq-contacts h3 {
  margin-bottom: 10px;
}

.faq-contacts a {
  color: #84c8ff;
}

.faq-image-wrap {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.faq-image {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  display: block;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 760px) {
  .shell {
    padding: 30px 24px 60px;
  }

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

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

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

@media (min-width: 1080px) {
  .products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .filters-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(220px, 260px);
  }
}

@media (max-width: 720px) {
  .inline-form {
    grid-template-columns: 1fr;
  }

  .inline-form .primary-btn,
  .inline-form .status-btn,
  .inline-form .detail-btn,
  .inline-form .delete-btn {
    width: 100%;
  }

  .product-actions .detail-btn,
  .product-actions .product-btn {
    padding: 10px 8px;
    font-size: 14px;
  }

  .product-card .size-chip {
    padding: 7px 9px;
    font-size: 11px;
  }
}

@media (max-width: 560px) {
  .shell {
    padding: 14px 9px 24px;
    gap: 12px;
  }

  .card {
    padding: 12px;
    border-radius: 16px;
  }

  .hero {
    gap: 10px;
  }

  .hero h1 {
    font-size: clamp(24px, 8.9vw, 36px);
    line-height: 1.02;
    white-space: nowrap;
    letter-spacing: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .kicker {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .subtitle {
    font-size: 15px;
    line-height: 1.34;
  }

  .hero-actions {
    gap: 6px;
  }

  .hero-actions .tag {
    font-size: 12px;
    padding: 8px 11px;
  }

  .search-wrap {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .search-wrap .ghost-btn {
    min-width: 84px;
    padding: 9px 11px;
  }

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

  .filters-grid label {
    gap: 6px;
    font-size: 12px;
  }

  .filters-grid input,
  .filters-grid select {
    min-height: 41px;
    padding: 8px 11px;
    font-size: 13px;
  }

  .filters-grid select {
    padding-right: 32px;
    background-position: calc(100% - 13px) calc(50% - 2px), calc(100% - 8px) calc(50% - 2px);
    background-size: 4px 4px, 4px 4px;
  }

  #applyFiltersBtn {
    width: 100%;
    min-height: 41px;
    font-size: 12px;
    padding-inline: 9px;
    white-space: nowrap;
    line-height: 1.08;
    letter-spacing: 0.01em;
  }

  .section-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 8px;
  }

  .section-head h2,
  .section-head h3 {
    font-size: 16px;
  }

  .head-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .head-actions .ghost-btn,
  .head-actions .cart-btn {
    width: 100%;
    justify-content: center;
    min-height: 42px;
    padding: 9px 10px;
    font-size: 15px;
  }

  .faq-header .section-head {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .faq-header h1 {
    margin: 0;
    font-size: clamp(26px, 8vw, 34px);
    line-height: 1.16;
    text-wrap: balance;
  }

  .faq-header .subtitle {
    font-size: 14px;
    line-height: 1.35;
  }

  .faq-section {
    padding: 12px;
  }

  .faq-section h3 {
    font-size: 17px;
    line-height: 1.24;
  }

  .faq-section p,
  .faq-section li {
    font-size: 14px;
    line-height: 1.42;
  }

  .faq-image-wrap {
    padding-top: 10px;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: start;
  }

  .product-card {
    border-radius: 14px;
  }

  .product-card img {
    aspect-ratio: 1 / 1;
  }

  .product-body {
    padding: 8px;
    gap: 6px;
  }

  .product-title {
    font-size: 12px;
    line-height: 1.2;
    min-height: 1.2em;
    -webkit-line-clamp: 1;
  }

  .product-desc {
    font-size: 10px;
    line-height: 1.28;
    min-height: 1.28em;
    -webkit-line-clamp: 1;
  }

  .price-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    align-items: start;
  }

  .price {
    font-size: 16px;
    line-height: 1.05;
    white-space: nowrap;
  }

  .stock-badge {
    font-size: 10px;
    padding: 3px 6px;
    justify-self: start;
  }

  .meta-list {
    font-size: 10px;
  }

  .product-card .size-chip {
    padding: 5px 7px;
    font-size: 10px;
    min-width: 28px;
  }

  .product-actions {
    gap: 6px;
  }

  .product-actions .detail-btn,
  .product-actions .product-btn {
    font-size: 11px;
    padding: 8px 5px;
    min-height: 34px;
    white-space: nowrap;
  }

  .app-footer {
    font-size: 12px;
    line-height: 1.45;
    padding: 2px 8px 0;
  }

  .app-footer p {
    margin: 0;
    word-break: break-word;
  }
}

@media (max-width: 390px) {
  .products-grid {
    gap: 7px;
  }

  .product-body {
    padding: 7px;
  }

  .product-title {
    font-size: 11.5px;
  }

  .product-desc {
    font-size: 9.5px;
  }

  .price {
    font-size: 15px;
  }

  .product-card .size-chip {
    padding: 5px 6px;
    min-width: 26px;
  }

  .product-actions .detail-btn,
  .product-actions .product-btn {
    font-size: 10.5px;
    min-height: 32px;
    padding: 7px 4px;
  }
}
