:root {
  --ink-900: #0f2233;
  --ink-800: #1e3a5f;
  --ink-700: #334155;
  --ink-500: #64748b;
  --line: #d8dee6;
  --line-soft: #e8edf3;
  --surface: #ffffff;
  --surface-alt: #f7f8fa;
  --surface-soft: #eef7f4;
  --accent: #2f8f6b;
  --accent-strong: #26775a;
  --accent-dark: #1c5a44;
  --success-bg: #e7f6ee;
  --success-ink: #1b6b43;
  --danger-bg: #fdecec;
  --danger-ink: #a93f3f;
  --focus-ring: rgba(21, 94, 239, 0.22);
  --focus-outline: #155eef;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.25rem;
  --space-5: 1.5rem;
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.1);
}

html {
  font-size: 16px;
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink-900);
  background: var(--surface-alt);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus-outline);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.marketplace-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--ink-900);
  box-shadow: var(--shadow-sm);
}

.marketplace-topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.85rem 0 0.65rem;
}

.brand-block {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  text-decoration: none;
  color: #fff;
}

.brand-image-wrap,
.footer-brand-image-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 26px rgba(4, 12, 20, 0.18);
  overflow: hidden;
}

.brand-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  transform: scale(1.22);
}

.brand-subtitle {
  max-width: 22rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.marketplace-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.header-collapse {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem 1.25rem;
  align-items: center;
  padding: 0.35rem 0 0.95rem;
}

.header-search,
.catalog-search {
  display: grid;
  grid-template-columns: 1fr auto;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #fff;
}

.header-search input {
  min-width: 0;
  min-height: 48px;
  padding: 0 1rem;
  border: 0;
  background: #fff;
}

.header-search button {
  min-width: 104px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.header-utility {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  min-width: 0;
}

.utility-chip,
.cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.15s ease, background 0.15s ease;
}

.utility-chip {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.utility-chip-light {
  background: rgba(255, 255, 255, 0.18);
}

.utility-chip:hover,
.cart-pill:hover,
.account-chip:hover {
  transform: translateY(-1px);
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  min-height: 44px;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.account-chip span:last-child {
  min-width: 0;
}

.account-chip strong,
.account-chip small {
  white-space: normal;
  overflow-wrap: anywhere;
}

.account-chip small {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.74rem;
}

.account-chip strong {
  display: block;
  font-size: 0.92rem;
}

.avatar-thumb,
.avatar-placeholder,
.profile-avatar-large {
  flex-shrink: 0;
  border-radius: 50%;
}

.avatar-thumb,
.avatar-placeholder {
  width: 36px;
  height: 36px;
}

.avatar-thumb {
  object-fit: cover;
}

.avatar-placeholder {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.cart-pill {
  background: var(--accent);
  color: #fff;
}

.cart-pill-count {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.marketplace-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  grid-column: 1 / -1;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.marketplace-nav a {
  color: rgba(255, 255, 255, 0.84);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.35;
}

.header-menu-toggle {
  display: none;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
}

.header-menu-toggle-box {
  display: grid;
  gap: 0.24rem;
}

.header-menu-toggle-box span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.content-shell {
  flex: 1;
  padding: 1.15rem 0 3rem;
}

.page-banner,
.hero-shell,
.section-block,
.product-card,
.catalog-sidebar,
.checkout-form-shell,
.confirmation-card,
.table-card,
.account-sidecard,
.detail-layout,
.auth-shell {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.page-banner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
}

.page-banner p {
  margin: 0.35rem 0 0;
  color: var(--ink-500);
}

.page-banner strong {
  overflow-wrap: anywhere;
}

.page-banner-compact {
  margin-top: 1rem;
}

.eyebrow {
  display: inline-flex;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  background: #e7f6ee;
  color: var(--ink-800);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-shell {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  padding: 1.65rem;
  background:
    radial-gradient(circle at top right, rgba(47, 143, 107, 0.18), transparent 32%),
    linear-gradient(135deg, #fff, #f7fbff);
}

.hero-copy h1,
.catalog-header h1,
.detail-copy h1,
.confirmation-card h1,
.auth-shell h1 {
  margin: 0.55rem 0 0.85rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.hero-copy p,
.catalog-header p,
.detail-description,
.detail-note,
.summary-note,
.empty-state p,
.site-footer p,
.section-heading p,
.auth-shell p,
.page-banner small {
  color: var(--ink-500);
  line-height: 1.65;
}

.hero-actions,
.detail-actions,
.checkout-actions,
.header-actions,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-panel {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.marketplace-story {
  background: linear-gradient(180deg, #fff, #f8fcfa);
}

.hero-stat,
.summary-line,
.detail-meta,
.price-panel,
.trust-strip,
.process-steps li,
.profile-upload-card {
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  background: var(--surface-soft);
}

.hero-stat {
  padding: 1rem 1.15rem;
}

.hero-stat strong,
.catalog-summary strong {
  display: block;
  font-size: 1.9rem;
}

.hero-note {
  margin: 0;
}

.section-block {
  margin-top: 1.15rem;
  padding: 1.35rem;
}

.section-heading,
.catalog-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.text-link {
  color: #0066c0;
  font-weight: 700;
  text-decoration: none;
}

.btn-brand,
.btn-soft,
.btn-accent {
  min-height: 44px;
  padding: 0.8rem 1.2rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-weight: 700;
}

.btn-brand {
  background: var(--accent);
  color: #fff;
}

.btn-brand:hover {
  background: var(--accent-strong);
  color: #fff;
}

.btn-soft {
  background: #fff;
  color: var(--ink-900);
  border-color: var(--line);
}

.btn-accent {
  background: var(--ink-800);
  color: #fff;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1rem 1.15rem;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.story-card {
  padding: 1.15rem;
  border-radius: 18px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #ffffff, #eef7f4);
}

.story-card strong {
  display: block;
  margin-bottom: 0.45rem;
}

.story-card p {
  margin: 0;
  color: var(--ink-500);
  line-height: 1.65;
}

.trust-strip strong,
.metric-card strong {
  display: block;
  margin-bottom: 0.25rem;
}

.search-shell {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.75rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

.search-input,
.form-control,
.form-select,
textarea.form-control {
  min-width: 0;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: none !important;
}

textarea.form-control {
  min-height: 120px;
}

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

.category-card {
  display: block;
  padding: 1.2rem;
  border-radius: 16px;
  text-decoration: none;
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #fff, #f4fbf8);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.category-card:hover,
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.category-count {
  display: inline-flex;
  margin-bottom: 0.8rem;
  color: #0066c0;
  font-size: 0.84rem;
  font-weight: 700;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 1.25rem;
}

.catalog-sidebar {
  padding: 1.2rem;
  align-self: start;
}

.catalog-summary {
  min-width: 180px;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  background: #f4fbf8;
  text-align: right;
}

.filter-chip {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  padding: 0.85rem 1rem;
  margin-top: 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: #fff;
  text-decoration: none;
}

.filter-chip.active {
  background: #e7f6ee;
  border-color: #9dd3ba;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.product-card {
  overflow: hidden;
}

.product-card-link {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  text-decoration: none;
}

.product-media,
.detail-media {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #f4fbf8, #e9f5f0);
}

.product-image,
.detail-main-image,
.detail-thumb {
  display: block;
  width: 100%;
  object-fit: contain;
}

.product-image {
  aspect-ratio: 1 / 1;
  max-width: 82%;
  max-height: 220px;
  padding: 0.75rem;
}

.detail-main-image {
  aspect-ratio: 1 / 1;
  max-width: 78%;
  max-height: 360px;
  padding: 0.75rem;
  border-radius: 16px;
}

.detail-thumb {
  aspect-ratio: 1 / 1;
  padding: 0.35rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line-soft);
}

.product-placeholder,
.detail-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  color: var(--ink-800);
  font-weight: 800;
  background: linear-gradient(135deg, #7fd6b0, #d9f5ea);
}

.product-placeholder {
  aspect-ratio: 1 / 1;
  font-size: 2.5rem;
}

.detail-placeholder {
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  font-size: 4rem;
}

.product-copy {
  display: grid;
  align-content: start;
  gap: 0.9rem;
  padding: 1rem 1rem 1.15rem;
}

.product-copy h3,
.category-card h3,
.table-card h2,
.catalog-sidebar h2,
.checkout-form-shell h2,
.detail-copy h2 {
  margin: 0;
  overflow-wrap: anywhere;
}

.product-copy p {
  margin: 0;
  color: var(--ink-500);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.badge-soft,
.stock-label,
.process-steps strong {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.28rem 0.72rem;
  font-size: 0.79rem;
  font-weight: 800;
}

.badge-soft {
  background: #e8f5f0;
  color: var(--ink-800);
}

.price-row,
.product-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.price-row span,
.price-panel span,
.detail-meta dt,
.summary-line span,
.mini-stat span {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-500);
}

.price-row strong,
.price-panel strong,
.money-strong {
  font-size: 1.4rem;
}

.stock-label.available {
  background: var(--success-bg);
  color: var(--success-ink);
}

.stock-label.unavailable {
  background: var(--danger-bg);
  color: var(--danger-ink);
}

.empty-state {
  padding: 2rem;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: #fff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
}

.detail-gallery,
.detail-copy {
  min-width: 0;
}

.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.price-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  padding: 1rem;
  margin: 1.25rem 0;
}

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

.detail-meta dd {
  margin: 0.25rem 0 0;
  font-weight: 700;
}

.back-link {
  display: inline-flex;
  margin-bottom: 1rem;
  color: #0066c0;
  text-decoration: none;
  font-weight: 700;
}

.checkout-grid,
.account-grid,
.cart-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.25rem;
  align-items: start;
}

.checkout-form-shell,
.confirmation-card,
.table-card,
.account-sidecard,
.auth-shell {
  padding: 1.4rem;
}

.summary-stack {
  display: grid;
  gap: 0.75rem;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
}

.summary-line strong {
  max-width: 14rem;
}

.summary-note {
  margin: 1rem 0 0;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  padding: 0;
  margin: 0 0 1.25rem;
  list-style: none;
}

.process-steps li {
  padding: 0.95rem 1rem;
}

.process-steps li.active {
  background: #e7f6ee;
  border-color: #9dd3ba;
}

.process-steps strong {
  margin-bottom: 0.45rem;
  background: rgba(19, 25, 33, 0.08);
  color: var(--ink-800);
}

.process-steps li.active strong {
  background: var(--accent);
}

.cart-list {
  display: grid;
  gap: 1rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.1rem;
  padding: 1rem;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: #fff;
}

.cart-item-media {
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #f4fbf8;
  overflow: hidden;
}

.cart-item-media img,
.cart-item-media .product-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 82%;
  max-height: 150px;
  object-fit: contain;
}

.cart-item-body {
  display: grid;
  gap: 1rem;
}

.cart-item-top,
.cart-item-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.cart-saved-note {
  margin-top: 0.85rem;
  color: var(--ink-500);
}

.profile-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.profile-avatar-large {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: var(--shadow-sm);
}

.profile-avatar-fallback {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
}

.profile-upload-card {
  padding: 1rem;
  margin-top: 1rem;
}

.account-sidecard {
  display: grid;
  gap: 1rem;
}

.metric-card {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: #f4fbf8;
  border: 1px solid var(--line-soft);
}

.metric-card strong {
  font-size: 1.4rem;
}

.table-responsive table {
  margin-bottom: 0;
}

.table thead th {
  font-size: 0.83rem;
  color: var(--ink-500);
  border-bottom-width: 1px;
}

.table td,
.table th {
  vertical-align: middle;
}

.auth-shell {
  max-width: 720px;
  margin: 0 auto;
}

.site-footer {
  padding: 1.5rem 0 2rem;
}

.footer-brand {
  display: grid;
  gap: 0.8rem;
}

.footer-brand-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  transform: scale(1.18);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.validation-summary-valid {
  display: none;
}

.alert {
  border-radius: 14px;
  border: 0;
}

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

.info-span-2 {
  grid-column: span 2;
}

.payment-checklist {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink-500);
}

.payment-checklist li + li {
  margin-top: 0.55rem;
}

.detail-media-main {
  min-height: 420px;
}

.detail-media-thumb {
  min-height: 88px;
}

.chat-widget {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.chat-trigger {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 260px;
  padding: 0.9rem 1rem;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #0f766e, #155eef);
  color: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.22);
  text-align: left;
}

.chat-trigger strong,
.chat-trigger small {
  display: block;
  color: #fff;
}

.chat-trigger small {
  opacity: 0.8;
}

.chat-trigger-copy {
  min-width: 0;
}

.chat-trigger-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.chat-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.85rem);
  width: min(380px, calc(100vw - 2rem));
  height: min(560px, calc(100vh - 8rem));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}

.chat-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem 0.95rem;
  background: linear-gradient(180deg, rgba(21, 94, 239, 0.08), rgba(15, 118, 110, 0.02));
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.chat-panel-header p {
  margin: 0.35rem 0 0;
  color: var(--ink-500);
  font-size: 0.92rem;
}

.chat-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink-900);
  font-size: 1.35rem;
  line-height: 1;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 0;
  padding: 1rem;
  overflow-y: auto;
  background:
    radial-gradient(circle at top right, rgba(21, 94, 239, 0.05), transparent 40%),
    linear-gradient(180deg, #f8fbff, #f4f8f7);
}

.chat-loading,
.chat-empty,
.chat-error {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink-500);
}

.chat-error {
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: #991b1b;
}

.chat-message {
  max-width: 88%;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.chat-message-role {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chat-message p {
  margin: 0;
  color: var(--ink-800);
  line-height: 1.55;
}

.chat-message-assistant {
  align-self: flex-start;
  background: #fff;
}

.chat-message-assistant .chat-message-role {
  color: #155eef;
}

.chat-message-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #0f766e, #155eef);
}

.chat-message-user .chat-message-role,
.chat-message-user p {
  color: #fff;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: end;
  padding: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: #fff;
}

.chat-form textarea {
  resize: none;
  min-height: 58px;
  max-height: 110px;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 16px;
  outline: none;
}

.chat-form textarea:focus {
  border-color: rgba(21, 94, 239, 0.45);
  box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.08);
}

.chat-form button {
  min-width: 96px;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: #155eef;
  color: #fff;
  font-weight: 700;
}

.chat-form-loading button {
  opacity: 0.7;
}

@media (min-width: 1200px) {
  .header-collapse.collapse {
    display: grid !important;
  }

  .header-collapse.collapsing {
    height: auto !important;
  }
}

@media (max-width: 1199.98px) {
  .header-menu-toggle {
    display: inline-flex;
  }

  .header-collapse {
    grid-template-columns: 1fr;
  }

  .header-utility {
    justify-content: flex-start;
  }

  .catalog-layout,
  .checkout-grid,
  .account-grid,
  .cart-page-grid,
  .detail-layout,
  .hero-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .marketplace-topbar {
    gap: 0.75rem;
    align-items: center;
  }

  .brand-image-wrap {
    width: 58px;
    height: 58px;
  }

  .brand-subtitle {
    max-width: 12rem;
    font-size: 0.76rem;
  }

  .header-menu-toggle-label {
    display: none;
  }

  .header-collapse {
    gap: 0.85rem;
    padding: 0 0 0.85rem;
  }

  .header-search,
  .catalog-search,
  .search-shell {
    grid-template-columns: 1fr;
  }

  .header-search button,
  .catalog-search .btn,
  .search-shell .btn {
    width: 100%;
    min-width: 0;
  }

  .header-utility {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .utility-chip,
  .account-chip {
    width: 100%;
    justify-content: center;
  }

  .marketplace-nav {
    display: grid;
    gap: 0.5rem;
  }

  .marketplace-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.55rem 0;
  }

  .page-banner {
    padding: 0.95rem 1rem;
  }

  .content-shell {
    padding-top: 0.9rem;
  }

  .section-block,
  .checkout-form-shell,
  .confirmation-card,
  .table-card,
  .account-sidecard,
  .auth-shell,
  .hero-shell,
  .detail-layout {
    padding: 1.15rem;
  }

  .search-shell,
  .process-steps,
  .trust-strip,
  .story-grid,
  .price-panel,
  .detail-meta {
    grid-template-columns: 1fr;
  }

  .cart-item {
    grid-template-columns: 1fr;
  }

  .cart-item-top,
  .cart-item-actions,
  .section-heading,
  .catalog-header,
  .footer-grid {
    flex-direction: column;
    align-items: start;
  }

  .catalog-summary {
    width: 100%;
    min-width: 0;
    text-align: left;
  }

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

  .chat-widget {
    right: 0.85rem;
    left: auto;
    bottom: 0.85rem;
    align-items: flex-end;
  }

  .chat-trigger {
    min-width: 0;
    padding: 0.8rem;
    border-radius: 999px;
  }

  .chat-panel {
    width: min(360px, calc(100vw - 1.5rem));
    height: min(68vh, 480px);
    bottom: calc(100% + 0.65rem);
  }

  .chat-trigger-copy {
    display: none;
  }

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

  .chat-form button {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .marketplace-topbar-actions {
    gap: 0.5rem;
  }

  .cart-pill {
    padding: 0.7rem 0.8rem;
  }

  .cart-pill span:last-child {
    display: none;
  }

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

  .hero-shell,
  .section-block,
  .detail-layout,
  .checkout-form-shell,
  .confirmation-card,
  .table-card,
  .account-sidecard,
  .auth-shell {
    padding: 1rem;
  }
}

@media (max-width: 767.98px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

  .info-span-2 {
    grid-column: span 1;
  }
}
