@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Manrope:wght@500;700&display=swap");

:root {
  color-scheme: light;
  --bg: #f7f7f7;
  --bg-noise: radial-gradient(circle at 20% 20%, rgba(0, 0, 0, 0.05), transparent 32%),
    radial-gradient(circle at 80% 0, rgba(0, 0, 0, 0.07), transparent 28%), #f7f7f7;
  --fg: #0d0d0d;
  --card-bg: #ffffff;
  --accent: #0d0d0d;
  --accent-alt: #1f1f1f;
  --muted: #4a4a4a;
  --border: #e5e5e5;
  --shadow: 0 18px 38px rgba(0, 0, 0, 0.08);
  --radius: 18px;
  --spacing: 18px;
  font-family: "Space Grotesk", "Manrope", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.01em;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-noise);
  color: var(--fg);
  touch-action: manipulation;
}

.loading-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #0d0d0d, #1d1d1d);
  z-index: 300;
}

.loading-card {
  width: min(360px, 90vw);
  padding: 28px 24px 22px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.loading-logo {
  width: 120px;
  height: auto;
  border-radius: 18px;
  object-fit: contain;
}

.loading-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #f0f0f0;
  overflow: hidden;
  border: 1px solid #e5e5e5;
}

.loading-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  border-radius: 999px;
  transition: width linear;
}

.loading-message {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
}

body.nav-open,
body.lightbox-open {
  overflow: hidden;
}

#app {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 18px 96px;
}

#catalog {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.view-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.category-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.06);
  min-height: 180px;
  position: relative;
}

.category-card h3 {
  margin: 0;
  font-size: 20px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.category-card .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.category-card .card-footer button {
  flex: 1;
}

.catalog-section h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.catalog-section .tagline {
  margin-bottom: 16px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.title-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.brand-logo {
  height: 40px;
  width: auto;
  display: block;
  border-radius: 10px;
}

.brand-button {
  border: none;
  background: none;
  padding: 0;
  font-size: 32px;
  font-weight: 700;
  color: var(--fg);
  cursor: pointer;
  text-align: left;
  letter-spacing: 0.04em;
}

.brand-button:hover,
.brand-button:focus-visible {
  color: var(--accent-alt);
  outline: none;
}

.app-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 520px;
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.icon-button img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: invert(1);
}

.icon-button.ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
  box-shadow: none;
  filter: none;
}

.icon-button.ghost img {
  filter: none;
}

.icon-button:hover,
.icon-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
  background: var(--accent-alt);
  outline: none;
}

.icon-button.ghost:hover,
.icon-button.ghost:focus-visible {
  background: rgba(0, 0, 0, 0.04);
  box-shadow: none;
}

.pill-button {
  border: 1px solid var(--fg);
  background: var(--fg);
  color: #fff;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.pill-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
  background: var(--accent-alt);
}

#cart-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  color: var(--fg);
  font-weight: 700;
  border: 1px solid var(--fg);
}

.catalog-grid,
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0c0c0c;
}

.carousel img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.card-carousel img {
  height: 190px;
}

.detail-carousel img {
  height: 320px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.carousel-btn.prev {
  left: 8px;
}

.carousel-btn.next {
  right: 8px;
}

.product-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-name {
  font-size: 18px;
  margin: 0;
}

.product-rating {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.product-desc {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.product-price {
  font-size: 18px;
  font-weight: 700;
}

.product-volume {
  font-size: 13px;
  color: var(--muted);
}

.product-availability {
  font-size: 13px;
  color: var(--muted);
}

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

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

.product-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  background: var(--card-bg);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.product-detail img {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  max-height: 340px;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.detail-gallery img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  height: 120px;
}

.detail-rating {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  margin: 4px 0;
}

.detail-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 15px;
  color: var(--muted);
}

.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  background: #0d0d0d;
  color: #fff;
  letter-spacing: 0.02em;
}

.detail-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.solid-button {
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  color: #fff;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  flex: 1;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.solid-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.solid-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.ghost-button {
  border: 1px solid var(--fg);
  background: transparent;
  color: var(--fg);
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.ghost-button:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.danger-button {
  border: 1px solid rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
}

.telegram-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: none;
  background: #2491ff;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(36, 145, 255, 0.35);
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.telegram-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(36, 145, 255, 0.45);
}

.telegram-button:active {
  transform: translateY(0);
  box-shadow: 0 8px 24px rgba(36, 145, 255, 0.3);
}

.tagline {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.benefits li {
  font-size: 12px;
  background: #0d0d0d;
  color: #fff;
  padding: 5px 10px;
  border-radius: 999px;
}

.placeholder {
  text-align: center;
  color: var(--muted);
  margin-top: 32px;
}

.hidden {
  display: none !important;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  width: min(360px, 90vw);
  height: 100%;
  background: var(--card-bg);
  box-shadow: rgba(0, 0, 0, 0.2) -6px 0 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  z-index: 180;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
  align-items: stretch;
}

.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-link {
  border: 1px solid var(--border);
  background: #f3f3f3;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  outline: none;
  transform: translateX(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.2);
}

.nav-link.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  color: #fff;
  border-color: transparent;
}

.nav-footer {
  margin-top: auto;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(140deg, #0d0d0d, #242424);
  color: #fff;
}

.nav-footer img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}

.nav-footer-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-footnote {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nav-footnote-muted {
  font-size: 13px;
  opacity: 0.9;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 140;
}

.nav-user {
  padding: 6px 0 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.user-chip {
  width: 100%;
  border: none;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  color: var(--fg);
  line-height: 1.2;
}

.user-chip:hover,
.user-chip:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #f8f8f8, #ededed);
  display: grid;
  place-items: center;
  color: var(--fg);
  font-weight: 700;
  font-size: 16px;
  overflow: hidden;
  position: relative;
}

.user-avatar.has-photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.user-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.user-hint {
  color: var(--muted);
  font-size: 13px;
}

.profile-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #f8f8f8, #ededed);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 700;
  font-size: 20px;
  color: var(--fg);
}

.profile-avatar.has-photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.profile-hero h2 {
  margin: 0;
  font-size: 26px;
}

.profile-hint {
  margin: 2px 0 0;
  color: var(--muted);
}

.profile-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px 16px;
}

.profile-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.profile-warning {
  margin: 4px 0 0;
  font-size: 13px;
  color: #b45309;
}

.profile-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-row .modal-field {
  margin: 0;
}

.floating-cart {
  position: fixed;
  right: 18px;
  left: auto;
  bottom: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--fg);
  background: linear-gradient(145deg, var(--accent), var(--accent-alt));
  display: grid;
  place-items: center;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  z-index: 130;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.floating-cart:hover,
.floating-cart:focus-visible {
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.32);
}

.floating-cart img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

#floating-cart-counter {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--fg);
  font-weight: 800;
  border-radius: 999px;
  border: 1px solid var(--fg);
  font-size: 13px;
  padding: 0 8px;
}

.cart-drawer {
  position: fixed;
  right: 0;
  top: 0;
  width: min(360px, 100vw);
  max-width: 100%;
  height: 100%;
  background: var(--card-bg);
  box-shadow: rgba(0, 0, 0, 0.2) -4px 0 24px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-sizing: border-box;
  z-index: 200;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.drawer-header h2 {
  margin: 0;
}

.cart-close-button {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border-color: var(--border);
  background: #fff;
  box-shadow: none;
}

.cart-close-button img {
  width: 16px;
  height: 16px;
  filter: none;
}

.cart-close-button:hover,
.cart-close-button:focus-visible {
  background: rgba(0, 0, 0, 0.04);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.08);
}

.cart-drawer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 150;
  pointer-events: auto;
}

body.cart-open {
  overflow: hidden;
}

.cart-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--card-bg);
}

.cart-item.empty {
  justify-content: center;
  text-align: center;
}

.cart-item-image {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f2f2f2;
  filter: grayscale(100%);
}

.cart-item-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.cart-item-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

.cart-item-meta {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.cart-item-price {
  font-size: 13px;
  font-weight: 500;
  margin: 0;
}

.cart-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.cart-item-counter {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
}

.cart-item-subtotal {
  font-weight: 700;
}

.checkout-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.checkout-section h2 {
  margin: 0;
  font-size: 26px;
}

.checkout-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkout-summary {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.checkout-summary strong {
  font-size: 20px;
}

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

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 420px;
}

.checkout-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checkout-field label {
  font-size: 14px;
  font-weight: 700;
}

.checkout-field input {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  background: #ffffff;
  color: var(--fg);
}

.contact-row {
  display: flex;
  gap: 10px;
}

.contact-row select {
  min-width: 130px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  background: #0d0d0d;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.contact-row select:hover,
.contact-row select:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
}

.checkout-empty {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.tiny-button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
}

.drawer-footer {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.drawer-actions .ghost-button,
.drawer-actions .solid-button {
  width: 180px;
}

.total {
  font-size: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  padding-left: 34px;
}

.total::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 26px;
  height: 26px;
  background: url("wallet.svg") center / contain no-repeat;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18));
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.38);
  z-index: 120;
}

.modal-dialog {
  position: relative;
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: rgba(0, 0, 0, 0.18) 0 24px 48px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.modal-title {
  margin: 0;
  font-size: 22px;
}

.modal-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  font-size: 18px;
  cursor: pointer;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.modal-field input,
.modal-field textarea,
.modal-field select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  font-size: 14px;
  background: #ffffff;
  color: var(--fg);
}

.modal-field textarea {
  resize: vertical;
}

.modal-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #0d0d0d;
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: rgba(0, 0, 0, 0.18) 0 10px 24px;
  z-index: 100;
}

.modal-danger-zone {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-start;
}

.danger-link {
  border: none;
  background: none;
  color: #c53030;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.danger-link:hover,
.danger-link:focus-visible {
  text-decoration: underline;
}

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

.review-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.review-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.review-form .field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.review-form label {
  font-weight: 700;
  font-size: 14px;
}

.review-form input,
.review-form select,
.review-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
  color: var(--fg);
}

.review-form textarea {
  resize: vertical;
  min-height: 80px;
}

.star-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #0d0d0d;
  border-radius: 14px;
  color: #fff;
}

.star-picker {
  display: flex;
  gap: 8px;
  align-items: center;
}

.star-button {
  border: none;
  background: transparent;
  padding: 4px;
  border-radius: 10px;
  cursor: pointer;
}

.star-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
}

.star-icon {
  width: 22px;
  height: 22px;
  background-color: rgba(255, 255, 255, 0.26);
  -webkit-mask: url("star.svg") center / contain no-repeat;
  mask: url("star.svg") center / contain no-repeat;
  display: inline-block;
}

.star-icon.filled {
  background-color: #fff;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.25));
}

.review-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.attachment-tile {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  display: grid;
  place-items: center;
  cursor: pointer;
  background: #fafafa;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.attachment-preview {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

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

.remove-attachment {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.review-card {
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
}

.review-card .card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.review-stars {
  display: flex;
  gap: 6px;
  align-items: center;
}

.review-author {
  margin: 0;
  font-weight: 700;
  font-size: 16px;
}

.review-product {
  font-size: 13px;
  color: var(--muted);
}

.review-text {
  margin: 0;
  font-size: 14px;
}

.review-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-photo-thumb {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid var(--border);
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.support-card {
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: var(--shadow);
}

.support-card img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.support-card h4 {
  margin: 0 0 4px;
}

.support-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.review-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 250;
}

.review-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  background: rgba(0, 0, 0, 0.6);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.lightbox-close img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: invert(1);
}

@media (max-width: 720px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

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

  .drawer-actions .ghost-button,
  .drawer-actions .solid-button {
    width: 100%;
  }

  .checkout-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

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

  .nav-drawer {
    width: 100%;
    max-width: 100%;
    right: 0;
    left: 0;
    padding: 18px 16px;
  }

  .nav-user {
    padding: 8px 0 12px;
    margin-bottom: 8px;
  }

  .user-chip {
    padding: 12px 12px;
    gap: 10px;
  }

  .user-avatar {
    width: 44px;
    height: 44px;
    font-size: 15px;
  }

  .user-name {
    font-size: 15px;
  }

  .profile-section {
    gap: 12px;
  }

  .profile-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .profile-avatar {
    width: 64px;
    height: 64px;
  }

  .profile-card {
    padding: 14px;
  }

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

  .cart-drawer {
    width: 100%;
  }

  .floating-cart {
    width: 52px;
    height: 52px;
    right: 14px;
    left: auto;
    bottom: 18px;
  }
}

.tiny-button.danger {
  color: #c53030;
  border-color: rgba(197, 48, 48, 0.3);
}
