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

:root {
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --page-max-width: 1320px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  --shadow-sm: 0 12px 32px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 24px 60px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 36px 120px rgba(0, 0, 0, 0.34);

  --bg-main:
    radial-gradient(circle at top left, rgba(247, 166, 58, 0.18), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(183, 94, 31, 0.16), transparent 18%),
    linear-gradient(180deg, #0a0d10 0%, #11151a 32%, #171d24 100%);
  --bg-shell: rgba(14, 18, 22, 0.72);
  --bg-surface: rgba(21, 27, 33, 0.92);
  --bg-surface-2: rgba(31, 38, 46, 0.88);
  --bg-surface-3: rgba(16, 21, 26, 0.98);
  --bg-subtle: rgba(255, 255, 255, 0.03);
  --bg-strong: linear-gradient(135deg, #f5b24b 0%, #de7a2b 100%);
  --bg-strong-soft: rgba(245, 178, 75, 0.14);
  --bg-ok-soft: rgba(67, 197, 124, 0.16);
  --text-main: #f4f0e8;
  --text-muted: #aeb6bf;
  --text-soft: #d8d2c8;
  --text-strong: #ffffff;
  --text-inverse: #1d1308;
  --border-main: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(255, 255, 255, 0.06);
  --accent: #f5b24b;
  --accent-strong: #de7a2b;
  --accent-contrast: #1c1209;
  --ok: #62d38f;
  --danger: #ef6f6c;
  --topbar-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --card-shadow: var(--shadow-md);
  --select-menu-bg: #1e2630;
  --select-menu-text: #f4f0e8;
  --select-menu-hover-bg: #2b3644;
  --select-menu-selected-bg: #334257;
  --select-scrollbar-track: rgba(255, 255, 255, 0.08);
  --select-scrollbar-thumb: rgba(245, 178, 75, 0.38);
  --mobile-sticky-filters-top: 188px;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 166, 35, 0.65) rgba(15, 22, 30, 0.95);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 22, 30, 0.95);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(245, 166, 35, 0.85),
    rgba(226, 112, 28, 0.85)
  );
  border: 2px solid rgba(15, 22, 30, 0.95);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(245, 166, 35, 1),
    rgba(226, 112, 28, 1)
  );
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg-main);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body * {
  min-width: 0;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
  max-width: var(--page-max-width);
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) 0;
  margin-bottom: var(--space-8);
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-1);
}

.hero-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  margin-bottom: var(--space-8);
  box-shadow: var(--card-shadow);
}

.hero-card h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin: var(--space-4) 0;
  max-width: 20ch;
}

.hero-copy {
  color: var(--text-soft);
  font-size: 1.125rem;
  max-width: 60ch;
  margin-bottom: var(--space-8);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
}

.toolbar {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.control {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 200px;
}

.filter-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

input, select {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}

.catalog-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.catalog-load-more {
  min-width: 180px;
}

.catalog-load-more:disabled {
  cursor: wait;
  opacity: 0.72;
}

.storefront-contact {
  margin-top: 42px;
  padding: var(--space-6);
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.storefront-contact-head {
  margin-bottom: var(--space-4);
}

.storefront-contact-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2vw, 1.9rem);
}

.storefront-contact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}

.storefront-contact-card {
  min-width: 0;
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
}

.storefront-contact-card h3 {
  margin: 0 0 var(--space-2);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.storefront-contact-card p,
.storefront-contact-list,
.storefront-contact-schedule {
  margin: 0;
}

.storefront-contact-list {
  display: grid;
  gap: var(--space-2);
  padding: 0;
  list-style: none;
}

.storefront-contact-card a {
  color: var(--text-main);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.storefront-contact-card a:hover,
.storefront-contact-card a:focus-visible {
  color: var(--accent);
}

.storefront-contact-schedule {
  display: grid;
  gap: var(--space-2);
}

.storefront-contact-schedule div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
}

.storefront-contact-schedule dt {
  color: var(--text-muted);
}

.storefront-contact-schedule dd {
  margin: 0;
  color: var(--text-main);
  font-weight: 700;
  text-align: right;
}

@media (max-width: 960px) {
  .storefront-contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .storefront-contact {
    margin-top: 32px;
    padding: var(--space-4);
    border-radius: var(--radius-md);
  }

  .storefront-contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .storefront-contact-card {
    padding: var(--space-3);
  }

  .storefront-contact-schedule div {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .storefront-contact-schedule dd {
    text-align: left;
  }
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: transform 0.2s, border-color 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--bg-strong-soft);
}

.product-media {
  aspect-ratio: 1;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.badge {
  font-size: 0.75rem;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--accent);
}

.product-body h2 {
  font-size: 1.25rem;
  margin: 0 0 var(--space-2);
}

.description {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.solid-button {
  background: var(--bg-strong);
  color: var(--accent-contrast);
  border: none;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.solid-button:hover {
  opacity: 0.9;
}

.ghost-button {
  background: transparent;
  border: 1px solid var(--border-main);
  color: var(--text-main);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
}

.cart-chip {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-pill);
  padding: var(--space-2) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-main);
  cursor: pointer;
}

#cart-count {
  background: var(--accent);
  color: var(--accent-contrast);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.ui-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .page-shell {
    padding: var(--space-4);
  }
  .hero-card {
    padding: var(--space-6);
  }
  .hero-actions {
    flex-direction: column;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  line-height: 1.58;
  color: var(--text-main);
  background: var(--bg-main);
  background-attachment: fixed;
  transition:
    background 220ms ease,
    color 220ms ease;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.ui-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: inline-block;
}

button,
a,
input,
select,
textarea,
.product-card,
.product-image,
.badge,
.stock,
.topnav-link {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    filter 180ms ease,
    opacity 180ms ease;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 72%, white 28%);
  outline-offset: 3px;
}

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

button {
  cursor: pointer;
}

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

.hidden,
.hidden-section {
  display: none !important;
}

.public-hidden {
  display: none !important;
}

body.admin-shell .topnav.public-hidden {
  display: inline-flex !important;
}

body.admin-shell .ghost-button.public-hidden {
  display: inline-flex !important;
}

body.admin-shell .muted.public-hidden {
  display: block !important;
}

body.admin-shell .app-section.public-hidden:not(.hidden-section) {
  display: block !important;
}

.page-shell {
  width: calc(100% - 40px);
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 24px 0 88px;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 15;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-7);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    var(--bg-shell);
  backdrop-filter: blur(18px);
  box-shadow: var(--topbar-shadow);
}

.topbar-title,
.hero-card h1,
.section-title,
.metric-value,
.product-body h2,
.drawer-header h2,
.drawer-empty h3,
.drawer-confirmation h3,
.modal-header h2 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

.topbar-title {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2.3rem);
  line-height: 1.05;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  flex-wrap: nowrap;
}

.topnav {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
}

.topnav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  color: var(--text-soft);
  font-size: 0.94rem;
  font-weight: 600;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.topnav-link:hover {
  color: var(--text-main);
  transform: translateY(-1px);
}

.nav-icon {
  width: 19px;
  height: 19px;
  opacity: 0.94;
}

.topnav-link:active {
  transform: translateY(0);
}

.topnav-link.active,
.topnav-link[aria-current="page"] {
  background: var(--bg-strong);
  color: var(--accent-contrast);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.app-section {
  display: block;
  animation: section-enter 180ms ease;
}

.app-section + .app-section {
  margin-top: var(--space-9);
}

@keyframes section-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-card,
.toolbar,
.metric-card,
.funnel-card,
.latest-card,
.crm-card,
.product-card,
.modal-card,
.drawer-panel,
.dashboard-empty {
  border: 1px solid var(--border-main);
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 42px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(140deg, rgba(245, 178, 75, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 42%),
    var(--bg-surface);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -10% -30% auto;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 178, 75, 0.16), transparent 62%);
  pointer-events: none;
}

.hero-card::before {
  content: "";
  position: absolute;
  top: 54px;
  left: 28px;
  width: min(56%, 560px);
  height: 152px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(245, 178, 75, 0.24), transparent 72%);
  filter: blur(10px);
  opacity: 0.95;
  pointer-events: none;
}

.hero-card h1 {
  max-width: 860px;
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(2.8rem, 4.4vw, 5.25rem);
  line-height: 0.92;
  text-shadow: 0 10px 36px rgba(0, 0, 0, 0.18);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  font-weight: 700;
}

.hero-copy,
.description {
  color: var(--text-muted);
  line-height: 1.68;
}

.hero-copy {
  max-width: 780px;
  margin-bottom: 0;
}

.hero-card .hero-copy {
  margin-top: 22px;
  color: color-mix(in srgb, var(--text-main) 78%, var(--text-muted));
  font-size: 1.03rem;
  line-height: 1.78;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.hero-actions .solid-button,
.hero-actions .ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 210px;
  min-height: 52px;
  padding-inline: 22px;
  border-radius: 12px;
}

.hero-actions .solid-button {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 16px 34px rgba(222, 122, 43, 0.26);
}

.hero-actions .ghost-button {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border-main));
  background: rgba(255, 255, 255, 0.018);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.hero-meta {
  margin: 22px 0 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 300px 300px;
  gap: 16px;
  align-items: start;
  padding: 20px 24px;
  margin: 24px 0;
  border: 1px solid #1f2a36;
  border-radius: 24px;
  background:
    linear-gradient(180deg, #111820 0%, #0f1720 100%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.search-filters-bar {
  background: rgba(15, 22, 30, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@media (min-width: 961px) {
  .search-filters-bar {
    position: sticky;
    top: 126px;
    z-index: 14;
  }
}

@media (min-width: 768px) and (max-width: 960px) {
  .search-filters-bar {
    position: sticky;
    top: 196px;
    z-index: 14;
    gap: 16px;
  }
}

.control,
.filter-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.control-label,
.filter-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  color: #9aa7b5;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  min-height: 18px;
}

.control-icon {
  width: 18px;
  height: 18px;
  color: #3b82f6;
  opacity: 0.95;
  transform: none;
}

.filter-item:hover .control-icon,
.filter-item:focus-within .control-icon {
  opacity: 1;
}

.filter-label svg,
.control-label svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: block;
}

.toolbar .control input,
.toolbar .control select,
.toolbar .control textarea {
  width: 100%;
  height: 46px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid #2a3542;
  border-radius: 14px;
  background: #17212c;
  color: #e6edf3;
  outline: none;
  font-size: 14px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.search-input-wrap {
  position: relative;
}

.search-input-wrap #search-input {
  padding-right: 52px;
}

.search-clear-button {
  position: absolute;
  top: 50%;
  right: 12px;
  z-index: 1;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  color: #9aa7b5;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.search-clear-button:hover {
  background: rgba(59, 130, 246, 0.12);
  color: #e6edf3;
  opacity: 1;
}

.search-clear-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.search-status {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.search-status:empty {
  display: none;
}

.clear-filters-button {
  grid-column: 1 / -1;
  justify-self: end;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.72;
  padding: 6px 12px;
  margin-top: -4px;
  transition:
    opacity 0.18s ease,
    color 0.18s ease,
    background 0.18s ease;
}

.clear-filters-button:hover {
  background: rgba(245, 178, 75, 0.1);
  color: var(--text-main);
  opacity: 1;
}

.clear-filters-button[hidden] {
  display: none;
}

@media (max-width: 720px) {
  .details-table,
  .details-table tbody,
  .details-table tr,
  .details-table th,
  .details-table td {
    display: block;
    width: 100%;
  }

  .details-table tr {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .details-table th {
    margin-bottom: 6px;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

.toolbar .control select {
  appearance: none;
  padding-right: 44px;
  color-scheme: dark;
  background-image:
    linear-gradient(45deg, transparent 50%, #9aa7b5 50%),
    linear-gradient(135deg, #9aa7b5 50%, transparent 50%);
  background-position:
    calc(100% - 19px) calc(50% - 1px),
    calc(100% - 14px) calc(50% - 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.toolbar .control input::placeholder,
.toolbar .control textarea::placeholder {
  color: #6b7785;
}

.toolbar .control input:hover,
.toolbar .control textarea:hover {
  border-color: #3b82f6;
}

.toolbar .control input:focus,
.toolbar .control textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.control-dropdown {
  position: relative;
}

.native-select-hidden {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.custom-select {
  position: relative;
}

.custom-select-trigger {
  width: 100%;
  min-height: 46px;
  height: 46px;
  padding: 0 16px;
  padding-right: 44px;
  border: 1px solid #2a3542;
  border-radius: 14px;
  background: #17212c;
  color: #e6edf3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.custom-select-trigger-content {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.custom-select-trigger-content span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-trigger:hover {
  border-color: #3b82f6;
  background: #17212c;
}

.custom-select-trigger:focus-visible {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
  outline: none;
}

.custom-select[data-open="true"] .custom-select-trigger {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.custom-select-arrow {
  position: absolute;
  top: 50%;
  right: 17px;
  width: 10px;
  height: 10px;
  border-right: 2px solid #9aa7b5;
  border-bottom: 2px solid #9aa7b5;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 160ms ease, border-color 160ms ease;
}

.custom-select[data-open="true"] .custom-select-arrow {
  transform: translateY(-20%) rotate(-135deg);
  border-color: #3b82f6;
}

.custom-select-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 40;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 30%),
    #171d22;
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(245, 178, 75, 0.05),
    0 0 24px rgba(222, 122, 43, 0.08);
  overflow: hidden;
}

.custom-select-options {
  max-height: 280px;
  padding: 8px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 178, 75, 0.65) rgba(255, 255, 255, 0.03);
}

.custom-select-options::-webkit-scrollbar {
  width: 10px;
}

.custom-select-options::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

.custom-select-options::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(245, 178, 75, 0.86), rgba(222, 122, 43, 0.86));
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.custom-select-option {
  width: 100%;
  padding: 12px 14px 12px 16px;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #e5e7eb;
  font-size: 0.94rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition:
    background 140ms ease,
    color 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
}

.custom-select-option:hover,
.custom-select-option:focus-visible {
  background: rgba(245, 178, 75, 0.1);
  color: color-mix(in srgb, var(--accent) 82%, white 18%);
  outline: none;
}

.custom-select-option.selected {
  background: rgba(245, 178, 75, 0.12);
  border-left-color: color-mix(in srgb, var(--accent) 82%, white 18%);
  color: #fff3dc;
}

.control select option,
.kanban-status-select option {
  background: var(--select-menu-bg);
  color: var(--select-menu-text);
}

.control select option:checked,
.kanban-status-select option:checked {
  background: var(--select-menu-selected-bg);
}

.control select option:hover,
.kanban-status-select option:hover {
  background: var(--select-menu-hover-bg);
}

.control select::-webkit-scrollbar,
.kanban-status-select::-webkit-scrollbar {
  width: 10px;
}

.control select::-webkit-scrollbar-track,
.kanban-status-select::-webkit-scrollbar-track {
  background: var(--select-scrollbar-track);
  border-radius: 999px;
}

.control select::-webkit-scrollbar-thumb,
.kanban-status-select::-webkit-scrollbar-thumb {
  background: var(--select-scrollbar-thumb);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.control select::-webkit-scrollbar-thumb:hover,
.kanban-status-select::-webkit-scrollbar-thumb:hover {
  filter: brightness(1.08);
}

.control textarea {
  min-height: 112px;
  resize: vertical;
}

.control input::placeholder,
.control textarea::placeholder {
  color: color-mix(in srgb, var(--text-muted) 84%, transparent);
}

.control input:hover,
.control textarea:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border-main));
  background: color-mix(in srgb, var(--bg-surface-2) 90%, var(--accent) 10%);
}

.control select:hover,
.kanban-status-select:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border-main));
  background-color: color-mix(in srgb, var(--bg-surface-2) 90%, var(--accent) 10%);
}

.control input:focus,
.control textarea:focus {
  border-color: rgba(245, 178, 75, 0.52);
  box-shadow:
    0 0 0 4px rgba(245, 178, 75, 0.16),
    0 12px 24px rgba(0, 0, 0, 0.08);
  background: color-mix(in srgb, var(--bg-surface-2) 86%, white 14%);
}

.control select:focus,
.kanban-status-select:focus {
  border-color: rgba(245, 178, 75, 0.52);
  box-shadow:
    0 0 0 4px rgba(245, 178, 75, 0.16),
    0 12px 24px rgba(0, 0, 0, 0.08);
  background-color: var(--bg-surface-2);
}

body[data-route="analytics"] .control input:focus,
body[data-route="analytics"] .control select:focus,
body[data-route="analytics"] .control textarea:focus,
body[data-route="analytics"] .kanban-status-select:focus,
body[data-route="crm"] .control input:focus,
body[data-route="crm"] .control select:focus,
body[data-route="crm"] .control textarea:focus,
body[data-route="crm"] .kanban-status-select:focus {
  border-color: rgba(42, 105, 217, 0.42);
  box-shadow: 0 0 0 4px rgba(42, 105, 217, 0.12);
}

.results-bar,
.product-footer,
.badge-row,
.button-row,
.summary-row,
.cart-item-top,
.cart-item-bottom,
.cart-item-meta,
.quantity-controls,
.modal-header,
.modal-actions,
.detail-meta,
.crm-lead-top,
.crm-lead-meta,
.crm-customer-top,
.crm-customer-meta,
.crm-related-top,
.crm-related-meta,
.crm-duplicate-top,
.crm-duplicate-meta,
.crm-activity-top,
.crm-order-request-head,
.crm-order-item-meta,
.crm-order-header,
.section-header,
.drawer-header,
.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.results-bar {
  margin-bottom: 20px;
  padding: 0 2px;
  min-height: 28px;
  justify-content: flex-start;
}

#summary-text[data-state="loading"] {
  color: var(--accent);
}

.catalog-empty {
  grid-column: 1 / -1;
  padding: 36px 32px;
  border: 1px dashed color-mix(in srgb, var(--accent) 24%, var(--border-main));
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
    var(--bg-surface);
}

.catalog-empty h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.catalog-pagination {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.catalog-load-more {
  min-width: 220px;
}

.catalog-feedback {
  margin: 18px 0 0;
  color: var(--danger);
  font-weight: 600;
  text-align: center;
}

.scroll-top-button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 34;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    rgba(11, 18, 24, 0.94);
  color: var(--text-main);
  box-shadow:
    0 18px 40px rgba(2, 6, 23, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.scroll-top-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  transform: translateY(-1px);
}

.scroll-top-button.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.scroll-top-button:hover {
  border-color: rgba(245, 178, 75, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    rgba(14, 21, 30, 0.98);
  box-shadow:
    0 22px 44px rgba(2, 6, 23, 0.34),
    0 0 0 4px rgba(245, 178, 75, 0.12);
}

.scroll-top-button:active {
  transform: translateY(1px) scale(0.98);
}

.scroll-top-button:focus-visible {
  outline: none;
  border-color: rgba(245, 178, 75, 0.48);
  box-shadow:
    0 22px 44px rgba(2, 6, 23, 0.34),
    0 0 0 4px rgba(245, 178, 75, 0.18);
}

.catalog-skeleton {
  display: grid;
  gap: 14px;
  min-height: 320px;
  padding: 22px;
  border: 1px solid var(--border-soft);
  border-radius: 28px;
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.skeleton-line,
.skeleton-chip {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-muted) 16%, transparent);
}

.skeleton-line::after,
.skeleton-chip::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-line.short { width: 30%; height: 12px; }
.skeleton-line.medium { width: 58%; height: 14px; }
.skeleton-line.long { width: 100%; height: 56px; border-radius: 16px; }
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.skeleton-chip {
  height: 72px;
  border-radius: 18px;
}

@keyframes skeleton-shimmer {
  to {
    transform: translateX(100%);
  }
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 28px;
  align-items: stretch;
  scroll-margin-top: 118px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 100%;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 34%),
    linear-gradient(155deg, rgba(245, 178, 75, 0.08), transparent 34%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.045), transparent 28%),
    var(--bg-surface);
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(245, 178, 75, 0.1);
  pointer-events: none;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 178, 75, 0.24);
  box-shadow:
    0 30px 64px rgba(0, 0, 0, 0.28),
    0 10px 28px rgba(245, 178, 75, 0.1);
}

.product-card:active {
  transform: translateY(-1px);
}

.badge,
.event-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.stock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.stock.ok {
  border-color: rgba(98, 211, 143, 0.22);
  background: linear-gradient(180deg, rgba(98, 211, 143, 0.18), rgba(98, 211, 143, 0.1));
  color: #93efb6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.stock.to-order {
  border-color: rgba(245, 178, 75, 0.24);
  background: linear-gradient(180deg, rgba(245, 178, 75, 0.15), rgba(245, 178, 75, 0.08));
  color: #f4c983;
}

.product-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  max-height: 300px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
    #f3f5f7;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 -18px 30px rgba(0, 0, 0, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.08);
}

.product-image,
.product-placeholder {
  width: 100%;
  height: 100%;
}

.product-image {
  display: block;
  object-fit: contain;
  transform: scale(1);
  transition: transform 200ms ease;
}

.product-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

.product-card:hover .product-image {
  transform: scale(1.01);
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 2px 2px 0;
}

.product-body h2 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 1.34rem;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.product-body .description {
  margin: 14px 0 0;
  display: -webkit-box;
  overflow: hidden;
  min-height: 3.2em;
  font-size: 0.94rem;
  line-height: 1.62;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.product-body .description.hidden {
  display: none !important;
}

.product-footer {
  margin-top: auto;
  display: grid;
  gap: 16px;
  align-items: stretch;
  padding-top: 14px;
}

.price {
  font-family: var(--font-body);
  margin-top: 0;
  color: var(--text-strong);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.product-footer .add-to-cart {
  display: inline-flex;
  align-items: center;
  width: 100%;
  justify-content: center;
}

.ghost-button,
.solid-button,
.cart-chip,
.icon-button,
.text-button {
  border-radius: 14px;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.ghost-button,
.solid-button,
.cart-chip,
.icon-button {
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--border-main);
  border-radius: 12px;
}

.ghost-button,
.icon-button,
.cart-chip {
  background: var(--bg-surface-2);
  color: var(--text-main);
}

.solid-button {
  background: var(--bg-strong);
  color: var(--accent-contrast);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.ghost-button:hover,
.solid-button:hover,
.cart-chip:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.ghost-button:hover,
.cart-chip:hover,
.icon-button:hover {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border-main));
  background: color-mix(in srgb, var(--bg-surface-2) 84%, var(--accent) 16%);
}

.solid-button:hover {
  filter: brightness(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 16px 28px color-mix(in srgb, var(--accent) 24%, transparent);
}

.ghost-button:active,
.solid-button:active,
.cart-chip:active,
.icon-button:active {
  transform: translateY(0) scale(0.98);
}

.cart-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  transform-origin: center;
}

.button-icon-svg {
  width: 20px;
  height: 20px;
}

.cart-chip-label {
  display: inline-flex;
  align-items: center;
}

#cart-count {
  display: inline-grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 999px;
  background: var(--bg-strong-soft);
  color: var(--accent);
  line-height: 1;
  text-align: center;
}

.mobile-cart-bar {
  position: fixed;
  right: 12px;
  left: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 20;
  display: none;
  align-items: center;
  gap: 12px;
  justify-content: center;
  min-height: 58px;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--border-main);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    rgba(17, 24, 32, 0.96);
  color: var(--text-main);
  box-shadow:
    0 18px 42px rgba(2, 6, 23, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  text-align: left;
}

.mobile-cart-bar-summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1 1 auto;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
}

.mobile-cart-bar-summary strong {
  color: var(--text-main);
  white-space: nowrap;
}

.mobile-cart-bar-action {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f5a623;
  color: #000;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
}
@media (max-width: 767px) {
  .mobile-cart-bar:not(.hidden) {
    display: flex;
  }

  body.has-mobile-cart-bar .page-shell {
    padding-bottom: calc(128px + env(safe-area-inset-bottom));
  }

  body.has-mobile-cart-bar .scroll-top-button {
    bottom: calc(86px + env(safe-area-inset-bottom));
  }
}

.cart-chip-pulse {
  animation: cart-chip-pulse 420ms ease;
}

.cart-count-bump {
  animation: cart-count-bump 520ms ease;
}

@keyframes cart-chip-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(245, 178, 75, 0);
  }
  45% {
    transform: scale(1.035);
    box-shadow: 0 0 0 8px rgba(245, 178, 75, 0.12);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(245, 178, 75, 0);
  }
}

@keyframes cart-count-bump {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.14);
  }
  100% {
    transform: scale(1);
  }
}

.icon-button {
  min-width: 44px;
  justify-content: center;
  font-size: 1.25rem;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
}

.dashboard-shell,
.crm-shell {
  margin-top: 42px;
}

.metric-grid,
.crm-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card {
  border-radius: 22px;
  padding: 18px;
}

.metric-card:hover,
.crm-card:hover,
.latest-card:hover,
.funnel-card:hover {
  border-color: color-mix(in srgb, var(--accent) 18%, var(--border-main));
}

.metric-label {
  display: block;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.metric-value {
  font-size: clamp(1.7rem, 2vw, 2.15rem);
  line-height: 1;
}

.section-header {
  margin-bottom: 18px;
}

.section-header.compact {
  margin-bottom: 12px;
}

.section-title {
  margin: 0;
  font-size: 1.7rem;
}

.section-title.small {
  font-size: 1.08rem;
}

.dashboard-empty,
.funnel-card,
.latest-card,
.crm-card {
  border-radius: 24px;
  padding: 22px;
}

.funnel-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
}

.funnel-step,
.kanban-column,
.kanban-card,
.crm-lead-item,
.crm-customer-item,
.crm-related-item,
.crm-duplicate-group,
.crm-duplicate-candidate,
.crm-activity-item,
.crm-note-item,
.crm-order-request-card,
.crm-order-item,
.crm-detail-grid div,
.crm-inquiry-block,
.crm-customer-link-state,
.crm-customer-detail-placeholder,
.cart-item {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--bg-surface-2);
}

.funnel-step {
  padding: 16px;
  text-align: center;
}

.funnel-step span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.funnel-step strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.funnel-arrow {
  text-align: center;
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 700;
}

.latest-card {
  margin-top: 18px;
}

.table-wrap {
  overflow: auto;
}

.events-table,
.details-table {
  width: 100%;
  border-collapse: collapse;
}

.events-table th,
.events-table td,
.details-table th,
.details-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  vertical-align: top;
}

.events-table th,
.details-table th {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.details-table th {
  width: 34%;
}

.metadata-cell {
  max-width: 360px;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
}

.crm-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.crm-tab {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--border-main);
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  color: var(--text-soft);
  font-weight: 600;
}

.crm-tab.active {
  background: var(--bg-strong);
  color: var(--accent-contrast);
}

.crm-workspace {
  display: block;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(240px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.kanban-column {
  min-height: 340px;
  padding: 14px;
}

.kanban-column-header h4,
.kanban-card-head h5,
.crm-order-request-head h5,
.crm-order-item h5,
.crm-customer-top h3,
.crm-related-top h4,
.crm-duplicate-top h4,
.crm-activity-top h4,
.crm-lead-top h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.kanban-column-header span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 30px;
  border-radius: 999px;
  background: var(--bg-strong-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.kanban-column-body,
.crm-lead-list,
.crm-customer-list,
.crm-related-list,
.crm-activity-list,
.crm-duplicates,
.crm-duplicate-groups,
.crm-order-request-list,
.crm-order-items-list,
.crm-notes-list,
.cart-items {
  display: grid;
  gap: 12px;
}

.kanban-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 8px 2px;
}

.kanban-card,
.crm-lead-item,
.crm-customer-item,
.crm-related-item,
.crm-order-request-card {
  padding: 14px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.kanban-card:hover,
.crm-lead-item:hover,
.crm-customer-item:hover,
.crm-related-item:hover,
.crm-order-request-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-main);
  box-shadow: var(--shadow-sm);
}

.kanban-card:active,
.crm-lead-item:active,
.crm-customer-item:active,
.crm-related-item:active,
.crm-order-request-card:active {
  transform: translateY(0);
}

.kanban-contact,
.crm-customer-meta,
.crm-related-meta,
.crm-duplicate-meta,
.crm-activity-item span,
.crm-lead-meta {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.compact-control span {
  margin-bottom: 4px;
}

.crm-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
}

.customers-layout {
  grid-template-columns: 0.85fr 1.15fr;
}

.compact-card {
  margin-bottom: 18px;
}

.inner-card {
  padding: 18px;
}

.crm-form,
.checkout-form-shell {
  display: grid;
  gap: 14px;
}

.crm-inline-message {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid rgba(17, 162, 95, 0.24);
  border-radius: 16px;
  background: rgba(17, 162, 95, 0.1);
  color: var(--ok);
  font-weight: 600;
}

.crm-customer-detail-placeholder,
.crm-customer-link-state,
.crm-inquiry-block,
.crm-detail-grid div,
.crm-note-item,
.crm-order-item,
.crm-activity-item,
.crm-duplicate-candidate,
.crm-duplicate-group {
  padding: 14px;
}

.crm-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.crm-detail-grid span,
.crm-inquiry-block span {
  display: block;
  margin-bottom: 6px;
}

.crm-customer-link-state {
  margin-bottom: 14px;
}

.crm-customer-link-state strong,
.crm-related-item strong {
  display: block;
  margin-bottom: 6px;
}

.crm-related-meta {
  flex-wrap: wrap;
}

.crm-note-item span {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.crm-order-request-editor.hidden {
  display: none;
}

.crm-customer-detail-placeholder.hidden-section {
  display: none !important;
}

.button-row {
  flex-wrap: wrap;
}

.button-row .ghost-button,
.button-row .solid-button {
  flex: 1 1 220px;
}

.order-items-header {
  margin-top: 18px;
}

.muted {
  color: var(--text-muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 11, 15, 0.64);
  backdrop-filter: blur(6px);
}

.modal-card {
  width: min(980px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 26px;
  padding-bottom: 18px;
  border-radius: 30px;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 178, 75, 0.35) rgba(255, 255, 255, 0.03);
}

.modal-card,
.drawer-panel {
  scrollbar-width: thin;
}

.modal-card::-webkit-scrollbar {
  width: 10px;
}

.modal-card::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
}

.modal-card::-webkit-scrollbar-thumb {
  background: rgba(245, 178, 75, 0.34);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.modal-card::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 178, 75, 0.48);
  background-clip: padding-box;
}

.detail-meta {
  display: flex;
  gap: 12px 18px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.detail-meta > span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 600;
}

.modal-product-media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  min-height: 220px;
  margin-top: 8px;
  padding: 18px;
  border: 1px solid var(--border-main);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)),
    rgba(9, 14, 20, 0.72);
}

.modal-product-image {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 300px;
  object-fit: contain;
}

.modal-product-placeholder {
  min-height: 160px;
}

.modal-media-column {
  min-width: 0;
}

.modal-media-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, 72px);
  gap: 10px;
  margin-top: 10px;
}

.modal-media-selector-item {
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1;
  padding: 5px;
  border: 1px solid var(--border-main);
  border-radius: 12px;
  background: rgba(9, 14, 20, 0.72);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.modal-media-selector-item:hover,
.modal-media-selector-item.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(245, 178, 75, 0.14);
}

.modal-media-selector-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.modal-media-selector-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-media-video-selector {
  align-content: center;
  gap: 3px;
  color: var(--text-main);
  font-size: 0.68rem;
  font-weight: 700;
}

.modal-media-play-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: rgba(245, 178, 75, 0.14);
  color: var(--accent);
  font-size: 0.72rem;
}

.modal-main-video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 300px;
  border-radius: 12px;
  background: #05080c;
  object-fit: contain;
}

.detail-section {
  margin-top: 30px;
}

.detail-section-summary {
  margin-top: 0;
}

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

.detail-section h3 {
  margin-top: 0;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.key-specs-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  margin: 0;
}

.key-specs-list dt,
.key-specs-list dd {
  margin: 0;
}

.key-specs-list dt {
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.key-specs-list dd {
  color: var(--text-strong);
  font-size: 0.98rem;
  font-weight: 600;
}

.full-description {
  display: grid;
  gap: 12px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.full-description p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.72;
}

.details-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.details-table th {
  color: var(--text-soft);
  width: 38%;
  vertical-align: top;
  word-break: break-word;
  padding: 12px 14px;
}

.details-table td {
  color: var(--text-main);
  vertical-align: top;
  word-break: break-word;
  padding: 12px 14px;
}

.modal-actions {
  position: sticky;
  bottom: -1px;
  margin-top: 28px;
  padding-top: 18px;
  padding-bottom: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -12px 24px rgba(4, 7, 11, 0.24);
  justify-content: flex-end;
  background:
    linear-gradient(180deg, rgba(16, 21, 26, 0), rgba(16, 21, 26, 0.92) 26%, rgba(16, 21, 26, 0.98) 100%);
  backdrop-filter: blur(10px);
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  background: rgba(8, 11, 15, 0.36);
  backdrop-filter: blur(4px);
  animation: drawer-fade-in 180ms ease;
}

.drawer-panel {
  width: min(560px, 100%);
  height: 100vh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid var(--border-main);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    var(--bg-surface-3);
  animation: drawer-panel-in 220ms ease;
}

@keyframes drawer-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes drawer-panel-in {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.drawer-header {
  flex: 0 0 auto;
  margin-bottom: 24px;
}

.drawer.is-confirmation .drawer-panel > .drawer-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0;
}

.drawer.is-confirmation .drawer-panel > .drawer-header > div {
  display: none;
}

.drawer-header h2,
.drawer-empty h3,
.drawer-confirmation h3 {
  margin: 0;
  font-size: 1.65rem;
}

.drawer-content.hidden,
.drawer-empty.hidden,
.drawer-confirmation.hidden {
  display: none !important;
}

.drawer-content {
  flex: 1 1 auto;
  min-height: 0;
}

#cart-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#checkout-form-state {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 178, 75, 0.36) rgba(255, 255, 255, 0.03);
}

.drawer-empty,
.drawer-confirmation {
  padding: 14px 0;
}

.drawer-empty {
  display: grid;
  align-content: start;
  gap: 14px;
}

.cart-item {
  display: block;
  min-height: 0;
  padding: 10px 12px;
  margin-bottom: 8px;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.cart-item:hover {
  border-color: rgba(245, 166, 35, 0.45);
  background: rgba(255, 255, 255, 0.045);
}

.cart-item:active {
  transform: scale(0.995);
}

.cart-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.cart-item-title {
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

.cart-item-meta {
  display: block;
  min-width: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.25;
  opacity: 0.7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-meta span::before {
  content: " · ";
}

.cart-item-price {
  flex-shrink: 0;
  color: var(--text-main);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.cart-item,
.checkout-summary-item,
.checkout-summary-item-title,
.checkout-summary-item-meta {
  overflow-wrap: anywhere;
}

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

.qty-control {
  display: inline-grid;
  grid-template-columns: 28px minmax(28px, auto) 28px;
  align-items: center;
  border: 1px solid var(--border-main);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.cart-stepper-button {
  min-height: 28px;
  border: 0;
  background: transparent;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 700;
  padding: 0;
  transition:
    background 0.18s ease,
    transform 0.12s ease;
}

.cart-stepper-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.cart-stepper-button:active {
  transform: scale(0.92);
}

.cart-stepper-value {
  min-width: 28px;
  padding: 0 6px;
  text-align: center;
  font-weight: 700;
}

.remove-button {
  align-self: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  opacity: 0.75;
  text-decoration: underline;
  text-decoration-color: rgba(239, 111, 108, 0.35);
  text-underline-offset: 3px;
  transition:
    opacity 0.18s ease,
    color 0.18s ease;
}

.remove-button:hover {
  color: #ff8b88;
  opacity: 1;
  text-decoration-color: currentColor;
}

.cart-summary {
  flex: 0 0 auto;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.cart-summary .checkout-button,
.cart-summary .clear-cart-button {
  width: 100%;
}

.cart-items {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 178, 75, 0.36) rgba(255, 255, 255, 0.03);
}

.cart-items::-webkit-scrollbar,
#checkout-form-state::-webkit-scrollbar {
  width: 10px;
}

.cart-items::-webkit-scrollbar-track,
#checkout-form-state::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
}

.cart-items::-webkit-scrollbar-thumb,
#checkout-form-state::-webkit-scrollbar-thumb {
  background: rgba(245, 178, 75, 0.34);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.checkout-header {
  margin-bottom: 18px;
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.checkout-form-panel,
.checkout-order-summary {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
    linear-gradient(180deg, #1a1f24 0%, #0f1216 100%);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.checkout-form-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.checkout-panel-head .eyebrow {
  margin-bottom: 0;
}

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

.checkout-control {
  gap: 8px;
}

.checkout-control-full {
  grid-column: 1 / -1;
}

.checkout-label {
  color: #9ca3af;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.required-indicator {
  color: var(--accent);
}

#checkout-form .control input,
#checkout-form .control textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent), #161c22;
  color: #e5e7eb;
  padding: 12px 14px;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

#checkout-form .control input {
  min-height: 48px;
}

#checkout-form .control textarea {
  min-height: 128px;
  resize: vertical;
  padding-top: 13px;
}

#checkout-form .control input::placeholder,
#checkout-form .control textarea::placeholder {
  color: #6b7280;
}

#checkout-form .control input:hover,
#checkout-form .control textarea:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

#checkout-form .control input:focus,
#checkout-form .control input:focus-visible,
#checkout-form .control textarea:focus,
#checkout-form .control textarea:focus-visible {
  outline: none;
  border-color: rgba(245, 178, 75, 0.44);
  box-shadow: 0 0 0 1px rgba(245, 178, 75, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent), #182029;
}

#checkout-form .control input:-webkit-autofill,
#checkout-form .control input:-webkit-autofill:hover,
#checkout-form .control input:-webkit-autofill:focus,
#checkout-form .control textarea:-webkit-autofill,
#checkout-form .control textarea:-webkit-autofill:hover,
#checkout-form .control textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: #e5e7eb;
  caret-color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-box-shadow:
    0 0 0 1000px #161c22 inset,
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 rgba(0, 0, 0, 0);
  box-shadow:
    0 0 0 1000px #161c22 inset,
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 rgba(0, 0, 0, 0);
  transition: background-color 9999s ease-out 0s;
}

#checkout-form .control input:-webkit-autofill:focus,
#checkout-form .control textarea:-webkit-autofill:focus {
  border-color: rgba(245, 178, 75, 0.44);
  -webkit-box-shadow:
    0 0 0 1000px #182029 inset,
    0 0 0 1px rgba(245, 178, 75, 0.1);
  box-shadow:
    0 0 0 1000px #182029 inset,
    0 0 0 1px rgba(245, 178, 75, 0.1);
}

#checkout-form .control input:invalid,
#checkout-form .control textarea:invalid {
  box-shadow: none;
}

#checkout-form .control input.field-invalid,
#checkout-form .control textarea.field-invalid,
#checkout-form .control input.input-error,
#checkout-form .control textarea.input-error {
  border-color: rgba(239, 111, 108, 0.68);
  box-shadow: 0 0 0 3px rgba(239, 111, 108, 0.1);
}

.field-error {
  color: #f59e9e;
  font-size: 0.78rem;
  line-height: 1.35;
}

.checkout-form-message {
  margin: 0;
}

.checkout-actions {
  margin-top: 4px;
  display: grid;
  gap: 12px;
}

.checkout-actions .ghost-button,
.checkout-actions .solid-button {
  min-height: 48px;
  width: 100%;
  flex: 1 1 auto;
}

.checkout-actions .solid-button:disabled,
.checkout-actions .ghost-button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  filter: saturate(0.8);
}

.checkout-order-summary {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.checkout-summary-head {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.checkout-summary-item {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.checkout-summary-item:hover {
  transform: translateY(-1px);
  border-color: rgba(245, 178, 75, 0.16);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

.checkout-summary-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.checkout-summary-item-title {
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.checkout-summary-item-total {
  flex-shrink: 0;
  font-weight: 700;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}

.checkout-summary-item-meta {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 13px;
  opacity: 0.75;
}

#checkout-total,
.checkout-summary-total-value {
  white-space: nowrap;
}

.checkout-total-row {
  margin-top: 0;
  margin-bottom: 0;
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.98rem;
  color: var(--text-main);
}

.checkout-total-row strong {
  font-size: 1.02rem;
  font-family: inherit;
  color: var(--text-main);
}

.checkout-total-inline {
  margin: -4px 0 2px;
}

@media (max-width: 960px) {
  .checkout-layout,
  .checkout-fields-grid {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 767px) {
  .search-filters-bar {
    position: sticky;
    top: var(--mobile-sticky-filters-top);
    z-index: 14;
    margin: 8px 0 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
  }

  .search-filters-bar .control:first-child {
    grid-column: 1 / -1;
  }

  .search-filters-bar .control,
  .search-filters-bar .filter-item {
    gap: 6px;
    padding: 8px 10px;
    border-radius: 14px;
  }

  .search-filters-bar .control-label,
  .search-filters-bar .filter-label {
    font-size: 12px;
    min-height: 16px;
  }

  .search-filters-bar input,
  .search-filters-bar select,
  .search-filters-bar .custom-select-trigger {
    height: 38px;
    min-height: 38px;
    font-size: 14px;
  }

  .search-filters-bar .clear-filters-button {
    grid-column: 1 / -1;
    justify-self: end;
    min-height: 28px;
    padding: 4px 8px;
  }
}

@media (max-width: 720px) {
  .cart-toast {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
  }

  .cart-toast-body {
    flex-direction: column;
    align-items: stretch;
  }

  .cart-toast-button {
    width: 100%;
  }

  .scroll-top-button {
    right: 16px;
    bottom: 16px;
  }
}

.form-message {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(245, 178, 75, 0.22);
  border-radius: 16px;
  background: var(--bg-strong-soft);
  color: var(--text-main);
  font-weight: 600;
}

.added-feedback {
  animation: add-to-cart-flash 520ms ease;
}

@keyframes add-to-cart-flash {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(0.985);
    filter: brightness(1.04);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      0 0 0 6px rgba(245, 178, 75, 0.14);
  }
  100% {
    transform: scale(1);
    filter: none;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      0 16px 28px color-mix(in srgb, var(--accent) 24%, transparent);
  }
}

.cart-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 32;
  width: min(420px, calc(100vw - 24px));
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    linear-gradient(180deg, #1a1f24 0%, #10151b 100%);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.cart-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cart-toast-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cart-toast-title {
  margin: 0 0 4px;
  color: var(--text-strong);
  font-weight: 700;
}

.cart-toast-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.cart-toast-actions {
  flex: 0 0 auto;
}

.cart-toast-button {
  min-height: 42px;
  white-space: nowrap;
}

.summary-row {
  margin-bottom: 16px;
  font-size: 1.03rem;
}

.checkout-button,
.clear-cart-button {
  width: 100%;
}

.clear-cart-button {
  margin-bottom: 10px;
}

.product-link {
  color: var(--accent);
}

@media (min-width: 1600px) {
  :root {
    --page-max-width: 1600px;
  }
}

@media (min-width: 1920px) {
  :root {
    --page-max-width: 1800px;
  }
}

@media (max-width: 1280px) {
  .catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
  }

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

@media (max-width: 1100px) {
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }

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

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

  .crm-layout,
  .customers-layout {
    grid-template-columns: 1fr;
  }

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

  .funnel-arrow {
    display: none;
  }
}

@media (max-width: 960px) {
  .toolbar,
  .metric-grid,
  .crm-summary-grid,
  .crm-detail-grid,
  .attributes {
    grid-template-columns: 1fr;
  }

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

  .product-card {
    padding: 18px;
    gap: 20px;
  }

  .catalog-skeleton {
    min-height: 280px;
  }

  .clear-filters-button {
    justify-self: start;
    margin-top: 0;
  }

  .kanban-board {
    grid-template-columns: repeat(7, minmax(260px, 260px));
  }
}

@media (max-width: 1280px) and (min-width: 961px) {
  .toolbar {
    grid-template-columns: minmax(240px, 1fr) 260px 260px;
  }
}

@media (max-width: 640px) {
  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 24px, 1320px);
    padding-top: 12px;
    padding-bottom: 48px;
  }

  .topbar,
  .hero-card,
  .toolbar,
  .product-card,
  .crm-card,
  .metric-card,
  .latest-card,
  .funnel-card,
  .modal-card {
    border-radius: 22px;
  }

  .topbar {
    position: sticky;
    top: 8px;
    gap: 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
  }

  .topbar .eyebrow {
    margin-bottom: 8px;
    font-size: 0.66rem;
  }

  .topbar,
  .results-bar,
  .product-footer,
  .badge-row,
  .section-header,
  .drawer-header,
  .modal-header,
  .modal-actions,
  .crm-tabs,
  .crm-lead-top,
  .crm-lead-meta,
  .crm-customer-top,
  .crm-customer-meta,
  .crm-related-top,
  .crm-related-meta,
  .crm-duplicate-top,
  .crm-duplicate-meta,
  .crm-activity-top,
  .crm-order-request-head,
  .crm-order-item-meta,
  .crm-order-header,
  .button-row,
  .topbar-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .topnav {
    width: 100%;
    overflow: auto;
  }

  .topnav-link,
  .crm-tab {
    flex: 1 1 auto;
  }

  #clear-analytics-button,
  #reset-local-demo-button {
    display: none;
  }

  .cart-chip {
    align-self: stretch;
    justify-content: center;
    min-height: 42px;
    padding: 8px 12px;
    font-size: 0.94rem;
  }

  #cart-count {
    flex-basis: 24px;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    font-size: 0.82rem;
  }

  .card-actions {
    width: 100%;
    justify-content: stretch;
  }

  .card-actions .ghost-button,
  .card-actions .solid-button {
    flex: 1 1 100%;
  }

  .drawer-panel {
    width: 100%;
  }

  .topbar-title {
    font-size: 1.32rem;
  }

  .hero-card h1 {
    font-size: 2.25rem;
    line-height: 1.02;
  }

  .hero-card {
    padding: 30px 24px;
  }

  .hero-card .hero-copy {
    font-size: 0.98rem;
  }

  .section-title {
    font-size: 1.35rem;
  }

  .section-title.small {
    font-size: 1rem;
  }

  .metric-value {
    font-size: 1.45rem;
  }

  .control input,
  .control select,
  .control textarea,
  .kanban-status-select,
  .ghost-button,
  .solid-button,
  .cart-chip,
  .icon-button {
    min-height: 50px;
    font-size: 16px;
  }

  .catalog-empty,
  .catalog-skeleton {
    padding: 22px;
  }

  .catalog-grid {
    gap: 18px;
    scroll-margin-top: 92px;
  }

  .hero-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .solid-button,
  .hero-actions .ghost-button {
    width: 100%;
    min-width: 0;
  }

  .detail-section-head,
  .key-specs-list {
    grid-template-columns: 1fr;
  }

  .detail-section-head {
    display: grid;
    justify-content: stretch;
  }
}

/* Zero-build storefront wide-screen scaling overrides */
.page-shell {
  width: calc(100% - 48px) !important;
  max-width: 1600px !important;
}

.topbar,
.hero-card,
.toolbar,
.results-bar,
.catalog-grid {
  width: 100%;
}

.catalog-grid {
  grid-template-columns: 1fr !important;
  gap: 24px !important;
  align-items: stretch;
}

@media (min-width: 768px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1100px) {
  .page-shell {
    max-width: 1600px !important;
  }

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

@media (min-width: 1920px) {
  .page-shell {
    max-width: 1840px !important;
  }

  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 26px !important;
  }

  .hero-card h1 {
    max-width: 900px;
  }

  .hero-card .hero-copy {
    max-width: 820px;
  }
}

@media (min-width: 2400px) {
  .page-shell {
    max-width: 2200px !important;
  }

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

@media (max-width: 960px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
  }
}

@media (max-width: 640px) {
  .cart-summary {
    position: sticky;
    bottom: 0;
    z-index: 2;
  }

  .cart-items {
    padding-bottom: 12px;
  }

  .cart-item-bottom,
  .cart-item-controls {
    flex-wrap: wrap;
  }

  .cart-item-controls {
    justify-content: flex-end;
  }

  .page-shell {
    width: calc(100% - 24px) !important;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  .product-card {
    padding: 16px;
    gap: 16px;
  }

  .product-body h2 {
    font-size: 1.08rem;
    line-height: 1.24;
  }

  .product-body .description {
    font-size: 0.88rem;
    line-height: 1.5;
    min-height: 3em;
  }

  .price {
    font-size: 1.18rem;
  }

  .product-footer {
    gap: 12px;
    padding-top: 10px;
  }

  .product-footer .add-to-cart {
    min-height: 46px;
    padding-inline: 10px;
    font-size: 0.92rem;
  }
}

/* Public storefront polish */
.search-input-wrap {
  display: grid;
  align-items: center;
}

.search-input-wrap #search-input {
  background: #17212c;
  border-color: #2a3542;
  color: #e6edf3;
  caret-color: #e6edf3;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.search-input-wrap #search-input:focus,
.search-input-wrap #search-input:active,
.search-input-wrap #search-input:focus-visible {
  outline: none;
  background: #17212c;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.search-input-wrap #search-input:-webkit-autofill,
.search-input-wrap #search-input:-webkit-autofill:hover,
.search-input-wrap #search-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #e6edf3;
  caret-color: #e6edf3;
  border-color: #2a3542;
  -webkit-box-shadow:
    0 0 0 1000px #17212c inset,
    0 0 0 1px #2a3542 inset;
  box-shadow:
    0 0 0 1000px #17212c inset,
    0 0 0 1px #2a3542 inset;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.search-input-wrap #search-input:-webkit-autofill:focus {
  border-color: #3b82f6;
  -webkit-box-shadow:
    0 0 0 1000px #17212c inset,
    0 0 0 3px rgba(59, 130, 246, 0.16);
  box-shadow:
    0 0 0 1000px #17212c inset,
    0 0 0 3px rgba(59, 130, 246, 0.16);
}

.search-clear-button {
  right: 10px;
  z-index: 1;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  appearance: none;
  touch-action: manipulation;
  transition: opacity 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.search-clear-button:hover {
  background: transparent;
  color: #cbd5e1;
  opacity: 1;
}

.search-clear-button:active {
  transform: translateY(-50%);
}

.search-clear-button:focus-visible {
  outline: none;
  border-color: #5b8cff;
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.28);
}

.modal-detail-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
  margin-top: 10px;
}

.modal-detail-main {
  min-width: 0;
}

.modal-detail-main .detail-section-summary {
  margin-top: 18px;
}

.modal-detail-main .hero-copy {
  max-width: none;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

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

.detail-meta > span {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 74px;
  padding: 12px 14px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    rgba(255, 255, 255, 0.035);
  line-height: 1.25;
}

.detail-meta > span:empty {
  display: none;
}

.detail-meta-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-meta strong {
  min-width: 0;
  color: var(--text-strong);
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

#modal-price strong {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.2rem;
}

#modal-stock strong {
  color: var(--ok);
}

#modal-stock.is-out-of-stock strong {
  color: var(--danger);
}

.modal-detail-main .detail-meta {
  gap: 12px;
  align-items: stretch;
}

.modal-detail-main .detail-meta > span {
  position: relative;
  min-height: 88px;
  align-content: center;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.045);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 10px 24px rgba(0, 0, 0, 0.1);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.modal-detail-main .detail-meta > span::before {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  align-self: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1;
  margin-right: 6px;
  vertical-align: -1px;
}

#modal-price::before {
  content: "$";
  color: var(--accent);
}

#modal-stock::before {
  content: "✓";
  color: var(--ok);
}

#modal-stock.is-out-of-stock::before {
  content: "!";
  color: var(--danger);
}

#modal-sku::before {
  content: "#";
}

#modal-category::before {
  content: "▦";
}

.modal-detail-main .detail-meta-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: color-mix(in srgb, var(--text-muted) 88%, white 12%);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1;
}

.modal-detail-main .detail-meta strong {
  color: var(--text-strong);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.modal-detail-main #modal-price {
  border-color: rgba(245, 178, 75, 0.18);
  background:
    linear-gradient(180deg, rgba(245, 178, 75, 0.105), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.045);
}

.modal-detail-main #modal-price strong {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.3vw, 1.62rem);
  font-weight: 800;
  line-height: 1.05;
}

.modal-detail-main #modal-stock {
  border-color: rgba(98, 211, 143, 0.16);
}

.modal-detail-main #modal-stock strong {
  color: var(--ok);
  font-size: 1.08rem;
}

.modal-detail-main #modal-stock.is-out-of-stock {
  border-color: rgba(239, 111, 108, 0.18);
}

.modal-detail-main #modal-stock.is-out-of-stock strong {
  color: var(--danger);
}

.modal-detail-main #modal-sku strong,
.modal-detail-main #modal-category strong {
  color: color-mix(in srgb, var(--text-main) 82%, var(--text-muted));
  font-size: 0.96rem;
  font-weight: 650;
}

@media (hover: hover) and (pointer: fine) {
  .modal-detail-main .detail-meta > span:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 14px 30px rgba(0, 0, 0, 0.16);
  }
}

.key-specs-list {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.key-spec-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  min-width: 0;
}

.key-spec-card dt,
.key-spec-card dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.details-table {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.details-table tr:last-child th,
.details-table tr:last-child td {
  border-bottom: 0;
}

.details-table td {
  overflow-wrap: anywhere;
}

.modal-actions .solid-button,
#modal-add-to-cart {
  min-height: 54px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 18px 34px rgba(222, 122, 43, 0.3);
}

.product-card,
.product-body,
.product-footer {
  min-width: 0;
}

.product-meta,
.product-footer {
  gap: 10px;
}

.product-meta .badge,
.product-meta .stock,
.product-body h2,
.price {
  min-width: 0;
  overflow-wrap: break-word;
}

@media (max-width: 720px) {
  .modal-backdrop {
    align-items: stretch;
    padding: 10px;
  }

  .modal-card {
    max-height: calc(100vh - 20px);
    padding: 18px;
    border-radius: 22px;
  }

  .modal-detail-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .modal-product-media {
    min-height: 180px;
    margin-top: 0;
  }

  .modal-media-selector {
    gap: 8px;
    overflow-x: auto;
    grid-auto-flow: column;
    grid-auto-columns: 58px;
    grid-template-columns: none;
    padding-bottom: 4px;
  }

  .modal-main-video {
    max-height: 260px;
  }

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

  .modal-detail-main .detail-meta {
    gap: 10px;
  }

  .modal-detail-main .detail-meta > span {
    min-height: 82px;
    padding: 14px;
  }

  .modal-actions {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 14px 0 0;
  }

  .modal-actions .ghost-button {
    display: none;
  }
}

@media (max-width: 640px) and (min-width: 361px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .product-media {
    aspect-ratio: 4 / 3;
  }

  .product-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-footer {
    align-items: stretch;
  }

  .product-footer .add-to-cart {
    min-height: 48px;
    line-height: 1.2;
    white-space: normal;
  }
}

@media (max-width: 360px) {
  .catalog-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .detail-meta,
  .key-specs-list {
    grid-template-columns: 1fr;
  }

  .modal-detail-main .detail-meta > span {
    min-height: 76px;
  }
}

@media (max-width: 767px) {
  .search-filters-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Progressive storefront image loading */
.product-media,
.modal-product-media {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    #121922;
}

.product-media::before,
.modal-product-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.045), transparent),
    radial-gradient(circle at 50% 42%, rgba(245, 178, 75, 0.08), transparent 44%);
  opacity: 0;
  transform: translateX(-18%);
  pointer-events: none;
}

.product-media:has(.img-loading)::before,
.modal-product-media:has(.img-loading)::before {
  opacity: 1;
  animation: image-placeholder-sheen 1.6s ease-in-out infinite;
}

.product-image,
.modal-product-image,
.product-placeholder {
  position: relative;
  z-index: 1;
}

.product-placeholder {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.product-image,
.modal-product-image {
  opacity: 1;
  filter: blur(0);
  transition:
    filter 260ms ease,
    opacity 260ms ease,
    transform 200ms ease;
  will-change: filter, opacity;
}

.product-image.img-loading,
.modal-product-image.img-loading {
  opacity: 0.68;
  filter: blur(8px);
}

.product-image.img-loaded,
.modal-product-image.img-loaded {
  opacity: 1;
  filter: blur(0);
}

.product-image.img-error,
.modal-product-image.img-error {
  opacity: 0;
  filter: none;
}

.product-placeholder {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    #121922;
}

.product-placeholder.img-placeholder-loading {
  color: transparent;
}

.modal-product-media {
  aspect-ratio: 4 / 3;
}

@keyframes image-placeholder-sheen {
  0% {
    transform: translateX(-55%);
  }
  55%,
  100% {
    transform: translateX(55%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-media:has(.img-loading)::before,
  .modal-product-media:has(.img-loading)::before {
    animation: none;
  }

  .product-image,
  .modal-product-image {
    transition: opacity 160ms ease;
  }
}

/* Product modal overflow and long text safety */
.modal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(980px, 100%);
  max-height: calc(100vh - 32px);
  overflow: hidden;
  padding: 0;
  border-radius: 30px;
}

.modal-header {
  flex: 0 0 auto;
  padding: 26px 26px 18px;
  margin-bottom: 0;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 26px 28px;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 178, 75, 0.36) rgba(255, 255, 255, 0.03);
}

.modal-body::-webkit-scrollbar {
  width: 10px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(245, 178, 75, 0.34);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 178, 75, 0.48);
  background-clip: padding-box;
}

.modal-actions {
  position: relative;
  flex: 0 0 auto;
  bottom: auto;
  z-index: 2;
  margin-top: 0;
  padding: 18px 26px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(16, 21, 26, 0.98);
  box-shadow: 0 -16px 34px rgba(4, 7, 11, 0.34);
  backdrop-filter: blur(10px);
}

.detail-section-summary {
  position: relative;
}

.modal-detail-main .hero-copy.description-collapsed,
.full-description.description-collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 8;
  line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modal-detail-main .hero-copy.description-expanded,
.full-description.description-expanded {
  display: block;
  overflow-y: auto;
}

.detail-section-summary.is-collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 42px;
  height: 54px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(16, 21, 26, 0), rgba(16, 21, 26, 0.98));
}

.modal-description-more {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  padding: 0;
  min-height: 34px;
}

.full-description {
  max-height: 360px;
  padding-right: 4px;
  line-height: 1.72;
}

.detail-section,
.modal-detail-grid,
.modal-detail-main {
  min-width: 0;
}

@media (max-width: 720px) {
  .modal-card {
    max-height: calc(100vh - 20px);
    padding: 0;
    border-radius: 22px;
  }

  .modal-header {
    padding: 18px 18px 14px;
  }

  .modal-body {
    padding: 0 18px 22px;
  }

  .modal-actions {
    padding: 14px 18px 16px;
  }

  .modal-detail-main .hero-copy.description-collapsed,
  .full-description.description-collapsed {
    -webkit-line-clamp: 7;
    line-clamp: 7;
  }
}

/* Compact product modal info row */
.modal-detail-main .detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0;
}

.modal-detail-main .detail-meta > span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  line-height: 1.2;
  transform: none;
}

.modal-detail-main .detail-meta > span::before {
  content: none;
  display: none;
}

.modal-detail-main .detail-meta-label {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.modal-detail-main .detail-meta strong {
  color: color-mix(in srgb, var(--text-main) 82%, var(--text-muted));
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.modal-detail-main #modal-price {
  order: 1;
  margin-right: 2px;
}

.modal-detail-main #modal-price .detail-meta-label,
.modal-detail-main #modal-stock .detail-meta-label {
  display: none;
}

.modal-detail-main #modal-price strong {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.6vw, 1.82rem);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.modal-detail-main #modal-stock {
  order: 2;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(98, 211, 143, 0.24);
  border-radius: 999px;
  background: rgba(98, 211, 143, 0.1);
}

.modal-detail-main #modal-stock strong {
  color: var(--ok);
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.modal-detail-main #modal-stock.is-out-of-stock {
  border-color: rgba(239, 111, 108, 0.26);
  background: rgba(239, 111, 108, 0.1);
}

.modal-detail-main #modal-stock.is-out-of-stock strong {
  color: var(--danger);
}

.modal-detail-main #modal-sku {
  order: 3;
}

.modal-detail-main #modal-category {
  order: 4;
}

.modal-detail-main #modal-sku,
.modal-detail-main #modal-category {
  min-width: 0;
  color: var(--text-muted);
}

.modal-detail-main #modal-sku strong,
.modal-detail-main #modal-category strong {
  color: color-mix(in srgb, var(--text-main) 74%, var(--text-muted));
  font-size: 0.88rem;
  font-weight: 650;
}

@media (hover: hover) and (pointer: fine) {
  .modal-detail-main .detail-meta > span:hover {
    transform: none;
    border-color: transparent;
    box-shadow: none;
  }
}

@media (max-width: 720px) {
  .modal-detail-main .detail-meta {
    gap: 9px 12px;
  }

  .modal-detail-main #modal-price {
    flex: 1 1 100%;
  }

  .modal-detail-main #modal-price strong {
    white-space: normal;
  }
}

/* Product modal price-first meta layout */
.modal-detail-main .detail-meta {
  gap: 8px 12px;
  margin-bottom: 20px;
}

.modal-detail-main #modal-price {
  flex: 1 1 100%;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.modal-detail-main #modal-price strong {
  display: inline-block;
  color: var(--accent);
  font-size: clamp(1.75rem, 2.5vw, 2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0;
}

.modal-detail-main #modal-stock {
  margin-right: 2px;
}

.modal-detail-main #modal-sku,
.modal-detail-main #modal-category {
  align-items: center;
  gap: 5px;
}

.modal-detail-main #modal-sku .detail-meta-label,
.modal-detail-main #modal-category .detail-meta-label {
  color: color-mix(in srgb, var(--text-muted) 86%, white 14%);
}

.modal-detail-main .detail-section-summary {
  margin-top: 2px;
}

@media (max-width: 720px) {
  .modal-detail-main .detail-meta {
    margin-bottom: 18px;
  }

  .modal-detail-main #modal-price strong {
    font-size: clamp(1.42rem, 8vw, 1.72rem);
  }
}
