.marketplace-shell {
  --marketplace-ink: #173126;
  --marketplace-ink-soft: #5b6c63;
  --marketplace-vine: #1f5a43;
  --marketplace-vine-dark: #103626;
  --marketplace-leaf: #5ea16c;
  --marketplace-leaf-soft: #ecf5ee;
  --marketplace-gold: #f5c45d;
  --marketplace-gold-deep: #e7a82e;
  --marketplace-cream: #fbf7ef;
  --marketplace-clay: #e7dac8;
  --marketplace-shadow: 0 24px 60px rgba(16, 54, 38, 0.12);
  --marketplace-radius-sm: 0.2rem;
  --marketplace-radius: 0.3rem;
  --marketplace-radius-md: 0.4rem;
  --marketplace-radius-lg: 0.5rem;
  color: var(--marketplace-ink);
  font-family: "Manrope", Verdana, Geneva, sans-serif;
}

.marketplace-shell .btn-primary:not(.menurooster-square-icon-button),
.marketplace-shell .btn-menurooster-blue:not(.menurooster-square-icon-button) {
  background-color: var(--marketplace-gold);
  border-color: var(--marketplace-gold);
  color: #36270c;
  font-weight: 800;
  border-radius: var(--marketplace-radius);
  padding: 0.8rem 1.35rem;
  box-shadow: 0 10px 24px rgba(245, 196, 93, 0.25);
}

.marketplace-shell .btn-primary:not(.menurooster-square-icon-button):hover,
.marketplace-shell .btn-primary:not(.menurooster-square-icon-button):focus,
.marketplace-shell .btn-menurooster-blue:not(.menurooster-square-icon-button):hover,
.marketplace-shell .btn-menurooster-blue:not(.menurooster-square-icon-button):focus {
  background-color: var(--marketplace-gold-deep);
  border-color: var(--marketplace-gold-deep);
  color: #2c1f0a;
}

.marketplace-shell .btn-outline-secondary:not(.menurooster-square-icon-button) {
  border-color: rgba(23, 49, 38, 0.14);
  color: var(--marketplace-ink);
  background-color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  border-radius: var(--marketplace-radius);
  padding: 0.75rem 1.2rem;
}

.marketplace-shell .btn-outline-secondary:not(.menurooster-square-icon-button):hover,
.marketplace-shell .btn-outline-secondary:not(.menurooster-square-icon-button):focus {
  border-color: rgba(23, 49, 38, 0.22);
  color: var(--marketplace-ink);
  background-color: #ffffff;
}

.marketplace-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.marketplace-kicker--dark {
  color: var(--marketplace-vine);
}

.marketplace-home,
.marketplace-search-page,
.marketplace-product-page {
  display: grid;
  gap: 2rem;
}

.marketplace-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(19rem, 0.9fr);
  gap: 1.5rem;
  padding: clamp(1.5rem, 2vw, 2.25rem);
  border-radius: var(--marketplace-radius-lg);
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(245, 196, 93, 0.22), transparent 34%),
    radial-gradient(circle at bottom left, rgba(94, 161, 108, 0.34), transparent 28%),
    linear-gradient(135deg, #153628 0%, #1f5a43 52%, #2d7959 100%);
  box-shadow: var(--marketplace-shadow);
}

.marketplace-hero::after {
  content: "";
  position: absolute;
  inset: auto -4rem -6rem auto;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(0);
}

.marketplace-hero__copy,
.marketplace-hero__rail,
.marketplace-product-hero__content {
  position: relative;
  z-index: 1;
}

.marketplace-hero__title,
.marketplace-search-hero__title,
.marketplace-section__title,
.marketplace-product-show__hero-name,
.marketplace-product-card__item-name {
  font-family: "Fraunces", Georgia, serif;
}

.marketplace-hero__title {
  margin: 0.7rem 0 0.9rem;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 0.98;
  font-weight: 700;
  color: #fdfaf2;
  max-width: 13ch;
}

.marketplace-hero__lede {
  max-width: 42rem;
  margin: 0 0 1.35rem;
  color: rgba(253, 250, 242, 0.84);
  font-size: 1.05rem;
  line-height: 1.7;
}

.marketplace-search-panel,
.marketplace-search-panel--light {
  padding: 1.25rem;
  border-radius: var(--marketplace-radius-lg);
  background: rgba(255, 255, 255, 0.96);
  color: var(--marketplace-ink);
  box-shadow: 0 14px 36px rgba(16, 54, 38, 0.12);
}

.marketplace-search-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.marketplace-search-panel__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.marketplace-search-panel__copy,
.marketplace-section__subtitle,
.marketplace-search-hero__copy,
.marketplace-product-hero__subtitle {
  margin: 0.35rem 0 0;
  color: var(--marketplace-ink-soft);
  line-height: 1.65;
}

.marketplace-search-panel--light {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 247, 239, 0.98));
  border: 1px solid rgba(23, 49, 38, 0.08);
}

.marketplace-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
}

.marketplace-search-form__field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  min-height: 4rem;
  border: 1px solid rgba(23, 49, 38, 0.12);
  border-radius: var(--marketplace-radius-md);
  background: #ffffff;
}

.marketplace-search-form__field i {
  color: var(--marketplace-vine);
}

.marketplace-search-form__field .form-control {
  border: 0;
  box-shadow: none;
  padding: 0;
  font-size: 1rem;
  background: transparent;
}

.marketplace-search-form__field .form-control:focus {
  box-shadow: none;
}

.marketplace-search-form__actions {
  display: flex;
}

.marketplace-search-form__actions .btn {
  min-width: 12rem;
}

.marketplace-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.marketplace-quick-link {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-radius: var(--marketplace-radius);
  background: var(--marketplace-leaf-soft);
  color: var(--marketplace-vine);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
}

.marketplace-quick-link:hover,
.marketplace-quick-link:focus {
  color: var(--marketplace-vine-dark);
  background: #e0efdf;
}

.marketplace-hero__rail {
  display: grid;
  gap: 1rem;
}

.marketplace-highlight-card {
  padding: 1.15rem 1.2rem;
  border-radius: var(--marketplace-radius-lg);
  background: rgba(255, 255, 255, 0.14);
  color: #fdfaf2;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
}

.marketplace-highlight-card--soft {
  background: rgba(255, 255, 255, 0.1);
}

.marketplace-highlight-card--warm {
  background: linear-gradient(135deg, rgba(245, 196, 93, 0.26), rgba(255, 255, 255, 0.08));
}

.marketplace-highlight-card__label,
.marketplace-buybox__label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.marketplace-highlight-card__value {
  margin: 0.25rem 0 0.35rem;
  font-size: 2rem;
  line-height: 1;
  font-weight: 800;
}

.marketplace-highlight-card p {
  margin: 0;
  color: rgba(253, 250, 242, 0.82);
  line-height: 1.55;
}

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

.marketplace-story-card,
.marketplace-distributor-card,
.marketplace-empty-state,
.marketplace-product-card,
.marketplace-buybox,
.marketplace-product-gallery,
.marketplace-offers-shell {
  border-radius: var(--marketplace-radius-lg);
  box-shadow: var(--marketplace-shadow);
}

.marketplace-story-card,
.marketplace-distributor-card,
.marketplace-empty-state {
  padding: 1.3rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 247, 239, 0.96));
  border: 1px solid rgba(23, 49, 38, 0.08);
}

.marketplace-story-card__icon {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--marketplace-radius-md);
  margin-bottom: 1rem;
  background: var(--marketplace-leaf-soft);
  color: var(--marketplace-vine);
  font-size: 1.2rem;
}

.marketplace-story-card h2,
.marketplace-distributor-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.marketplace-story-card p,
.marketplace-distributor-card p,
.marketplace-empty-state p {
  margin: 0;
  color: var(--marketplace-ink-soft);
  line-height: 1.65;
}

.marketplace-section {
  display: grid;
  gap: 1rem;
}

.marketplace-section__header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

.marketplace-section__header--tight {
  align-items: center;
}

.marketplace-section__title {
  margin: 0.3rem 0 0;
  font-size: clamp(1.55rem, 2vw, 2.15rem);
  line-height: 1.05;
  font-weight: 700;
}

.marketplace-results-count {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1rem;
  border-radius: var(--marketplace-radius);
  background: var(--marketplace-leaf-soft);
  color: var(--marketplace-vine);
  font-size: 0.88rem;
  font-weight: 800;
}

.marketplace-product-card {
  overflow: hidden;
  background: #ffffff;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.marketplace-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 54px rgba(16, 54, 38, 0.16);
}

.marketplace-product-card__media {
  min-height: 14rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background:
    radial-gradient(circle at top left, rgba(245, 196, 93, 0.18), transparent 30%),
    linear-gradient(180deg, #f9f4ea 0%, #eef5ef 100%);
}

.marketplace-product-card__image {
  max-height: 12rem;
  object-fit: contain;
}

.marketplace-product-card__placeholder,
.marketplace-product-gallery__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--marketplace-vine);
  background: rgba(255, 255, 255, 0.7);
}

.marketplace-product-card__placeholder {
  width: 100%;
  min-height: 12rem;
  border-radius: var(--marketplace-radius-md);
  font-size: 2.1rem;
}

.marketplace-product-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.marketplace-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0.2rem 0.7rem;
  border-radius: var(--marketplace-radius);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.marketplace-badge--muted {
  background: #f1ece3;
  color: #6d5c4d;
}

.marketplace-badge--leaf {
  background: var(--marketplace-leaf-soft);
  color: var(--marketplace-vine);
}

.marketplace-product-card__brand {
  margin-bottom: 0.5rem;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--marketplace-vine);
}

.marketplace-product-card__item-name {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.15;
  font-weight: 700;
  text-transform: none;
}

.marketplace-product-card__details,
.marketplace-product-card__description {
  margin-top: 0.8rem;
  color: var(--marketplace-ink-soft);
  line-height: 1.6;
}

.marketplace-product-card__description {
  margin-bottom: 0;
}

.marketplace-product-card__stats,
.marketplace-product-hero__stats,
.marketplace-distributor-card__meta,
.marketplace-buybox__links,
.marketplace-buybox__admin-actions,
.marketplace-buybox__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.marketplace-product-card__footer {
  margin-top: 1rem;
}

.marketplace-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--marketplace-radius);
  background: #f5f1e8;
  color: #5c4f42;
  font-size: 0.82rem;
  font-weight: 700;
}

.marketplace-stat-pill--warm {
  background: #fff2d6;
  color: #83510d;
}

.marketplace-distributor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.marketplace-distributor-card {
  display: grid;
  gap: 0.9rem;
}

.marketplace-distributor-card__topline,
.marketplace-distributor-card__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.marketplace-empty-state {
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  padding: 2rem 1.5rem;
  text-align: center;
}

.marketplace-empty-state--spacious {
  padding: 3rem 1.5rem;
}

.marketplace-empty-state__icon {
  width: 4rem;
  height: 4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--marketplace-radius-md);
  background: var(--marketplace-leaf-soft);
  color: var(--marketplace-vine);
  font-size: 1.4rem;
}

.marketplace-empty-state__title {
  font-size: 1.15rem;
  font-weight: 800;
}

.marketplace-search-hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

.marketplace-search-hero__title {
  margin: 0.35rem 0 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.08;
  font-weight: 700;
  max-width: 22ch;
}

.marketplace-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  font-size: 0.88rem;
  color: var(--marketplace-ink-soft);
}

.marketplace-breadcrumbs a {
  color: var(--marketplace-vine);
  text-decoration: none;
  font-weight: 700;
}

.marketplace-product-hero {
  display: grid;
  grid-template-columns: minmax(18rem, 0.8fr) minmax(0, 1.2fr);
  gap: 1.5rem;
  align-items: start;
}

.marketplace-product-gallery {
  padding: 1.15rem;
  background:
    radial-gradient(circle at top left, rgba(245, 196, 93, 0.18), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f6f3ec 100%);
}

.marketplace-product-gallery__frame {
  min-height: 24rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--marketplace-radius-md);
  background: linear-gradient(180deg, #fbfaf7 0%, #eef4ee 100%);
}

.marketplace-product-gallery__image {
  max-height: 22rem;
  object-fit: contain;
}

.marketplace-product-gallery__placeholder {
  width: 100%;
  min-height: 22rem;
  border-radius: var(--marketplace-radius-md);
  font-size: 2.8rem;
}

.marketplace-product-show__hero-name {
  margin: 0.4rem 0 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  font-weight: 700;
  text-transform: none;
}

.marketplace-product-hero__subtitle {
  font-size: 1rem;
}

.marketplace-buybox {
  display: grid;
  gap: 1rem;
  padding: 1.3rem;
  margin-top: 1.1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(251, 247, 239, 0.98));
  border: 1px solid rgba(23, 49, 38, 0.08);
}

.marketplace-buybox__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.marketplace-buybox__value {
  margin-top: 0.25rem;
  font-weight: 700;
  line-height: 1.5;
}

.marketplace-buybox__description {
  color: var(--marketplace-ink-soft);
  line-height: 1.7;
}

.marketplace-selection-box {
  display: grid;
  justify-items: end;
  gap: 0.45rem;
  padding: 1rem 1.1rem;
  min-width: 15rem;
  border-radius: var(--marketplace-radius-lg);
  background: linear-gradient(180deg, #ffffff 0%, #f4efe5 100%);
  border: 1px solid rgba(23, 49, 38, 0.08);
}

.marketplace-selection-box__count {
  font-size: 1rem;
  font-weight: 800;
}

.marketplace-selection-box__meta {
  font-size: 0.82rem;
  color: var(--marketplace-ink-soft);
}

.marketplace-offers-shell {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(23, 49, 38, 0.08);
}

.marketplace-offers-table thead th {
  padding-top: 1rem;
  padding-bottom: 1rem;
  background: #183d2d !important;
  color: #fbf7ef !important;
  border-bottom: 0;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.marketplace-offers-table tbody tr:nth-of-type(odd) > * {
  background-color: #ffffff !important;
}

.marketplace-offers-table tbody tr:nth-of-type(even) > * {
  background-color: #fbf7ef !important;
}

.marketplace-offers-table tbody td {
  padding-top: 1rem;
  padding-bottom: 1rem;
  vertical-align: middle;
  border-color: rgba(23, 49, 38, 0.08);
}

.marketplace-offers-table__thumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.marketplace-offers-table__thumb {
  width: 3rem;
  height: 3rem;
  object-fit: cover;
  border-radius: var(--marketplace-radius-sm);
  border: 1px solid rgba(23, 49, 38, 0.12);
  background: #ffffff;
}

.marketplace-offers-table__linked-items {
  margin-top: 0.75rem;
}

.marketplace-offers-table .menurooster-square-icon-button {
  width: 2.25rem;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: var(--marketplace-radius-sm);
  box-shadow: none;
}

.marketplace-offers-table .form-check-input {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 0.35rem;
}

@media (max-width: 1199.98px) {
  .marketplace-distributor-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .marketplace-hero,
  .marketplace-product-hero,
  .marketplace-story-grid {
    grid-template-columns: 1fr;
  }

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

  .marketplace-search-hero,
  .marketplace-section__header {
    align-items: start;
    flex-direction: column;
  }

  .marketplace-selection-box {
    width: 100%;
    justify-items: start;
  }
}

@media (max-width: 767.98px) {
  .marketplace-distributor-grid,
  .marketplace-buybox__grid {
    grid-template-columns: 1fr;
  }

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

  .marketplace-search-form__actions .btn {
    width: 100%;
    min-width: 0;
  }

  .marketplace-search-panel__header {
    flex-direction: column;
  }
}
