.supply-builder-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 4% 8%, rgba(8, 196, 100, 0.08), transparent 28%),
    linear-gradient(180deg, #f7f8f1, #fbfaf6);
  color: var(--navy);
}

.hidden {
  display: none !important;
}

/* =========================
   TOPBAR
========================= */

.supply-builder-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 78px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 14px 32px;
  border-bottom: 1px solid rgba(12, 33, 66, 0.08);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.supply-builder-logo img {
  width: 160px;
  display: block;
}

.supply-builder-topbar-copy {
  display: grid;
  gap: 3px;
}

.supply-builder-topbar-copy strong {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 950;
}

.supply-builder-topbar-copy span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.supply-builder-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* =========================
   BUTTONS
========================= */

.supply-primary-btn,
.supply-secondary-btn,
.supply-mini-btn,
.supply-danger-btn {
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.supply-primary-btn {
  min-height: 42px;
  padding: 10px 18px;
  background: var(--green);
  color: white;
  box-shadow: 0 14px 34px rgba(8, 196, 100, 0.18);
}

.supply-secondary-btn {
  min-height: 42px;
  padding: 10px 18px;
  background: rgba(12, 33, 66, 0.07);
  color: var(--navy);
}

.supply-mini-btn {
  min-height: 34px;
  padding: 8px 12px;
  background: rgba(12, 33, 66, 0.07);
  color: var(--navy);
  font-size: 0.78rem;
}

.supply-danger-btn {
  min-height: 38px;
  padding: 9px 13px;
  background: rgba(157, 51, 40, 0.1);
  color: #9d3328;
  font-size: 0.78rem;
}

/* =========================
   WORKSPACE
========================= */

.supply-builder-workspace {
  width: min(1500px, calc(100% - 44px));
  margin: 0 auto;
  padding: 28px 0 70px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.supply-readiness-panel {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 28px;
  border: 1px solid rgba(12, 33, 66, 0.08);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 20px 55px rgba(20, 50, 92, 0.08);
}

.readiness-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  font-weight: 950;
}

.readiness-header strong {
  color: var(--green);
}

.readiness-meter {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(12, 33, 66, 0.08);
}

.readiness-meter div {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--green);
  transition: width 0.24s ease;
}

.readiness-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.readiness-list li {
  display: grid;
  grid-template-columns: 13px 1fr;
  align-items: center;
  gap: 9px;
  color: #59697d;
  font-size: 0.84rem;
  font-weight: 850;
}

.readiness-list li span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: rgba(12, 33, 66, 0.16);
}

.readiness-list li[data-status="complete"] span {
  background: var(--green);
}

.readiness-list li em {
  grid-column: 2;
  width: fit-content;
  margin-top: 2px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(8, 196, 100, 0.1);
  color: var(--green);
  font-size: 0.67rem;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.supply-status-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.4;
}

/* =========================
   CANVAS
========================= */

.supply-page-canvas {
  width: 100%;
  overflow: hidden;
  border-radius: 36px;
  border: 1px solid rgba(12, 33, 66, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 252, 245, 0.94));
  box-shadow: 0 24px 70px rgba(20, 50, 92, 0.11);
}

.supply-page-tabs {
  display: flex;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid rgba(12, 33, 66, 0.08);
  background:
    radial-gradient(circle at 8% 20%, rgba(8, 196, 100, 0.08), transparent 28%),
    rgba(255, 255, 255, 0.72);
}

.supply-page-tab {
  flex: 1;
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px 18px;
  border-radius: 22px;
  border: 1px solid rgba(12, 33, 66, 0.08);
  background: rgba(255, 255, 255, 0.82);
  color: var(--navy);
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(20, 50, 92, 0.055);
}

.supply-page-tab span {
  font-size: 0.98rem;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.supply-page-tab small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.supply-page-tab.active {
  border-color: rgba(8, 196, 100, 0.18);
  background:
    radial-gradient(circle at 90% 12%, rgba(8, 196, 100, 0.12), transparent 30%),
    rgba(244, 255, 247, 0.96);
}

.supply-page-tab.active span {
  color: var(--green);
}

/* =========================
   COMPACT BUSINESS HEADER
========================= */

.supply-business-header {
  padding: 30px 36px;
  border-bottom: 1px solid rgba(12, 33, 66, 0.08);
  background:
    radial-gradient(circle at 92% 12%, rgba(8, 196, 100, 0.07), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 252, 245, 0.86));
}

.supply-business-header-content {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
}

.supply-business-logo {
  width: 148px;
  height: 148px;
  border-radius: 30px;
  border: 1px solid rgba(12, 33, 66, 0.1);
  background: white;
  box-shadow: 0 16px 36px rgba(20, 50, 92, 0.1);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.supply-business-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  padding: 0;
  display: block;
  transform: none;
}

.supply-business-logo span {
  color: var(--green);
  font-size: 1.8rem;
  font-weight: 950;
}

.supply-business-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.supply-kicker {
  margin: 0;
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.supply-business-copy h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(2.35rem, 4.5vw, 4rem);
  line-height: 0.94;
  letter-spacing: -0.055em;
}

.supply-business-copy p {
  margin: 0;
}

#supplyBusinessMeta {
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 850;
}

.supply-business-intro {
  max-width: 780px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 760;
  line-height: 1.48;
}
/* =========================
   TOOLS
========================= */

.supply-tools-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(160px, 1fr));
  gap: 12px;
  padding: 18px 36px;
  border-bottom: 1px solid rgba(12, 33, 66, 0.08);
  background: rgba(12, 33, 66, 0.018);
}

.supply-tool-field {
  display: grid;
  gap: 6px;
  color: var(--navy);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.supply-tool-field input,
.supply-tool-field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(12, 33, 66, 0.1);
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
}

/* =========================
   PRODUCTS
========================= */

.supply-products-section {
  padding: 34px 36px 46px;
}

.supply-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.supply-section-heading h2 {
  margin: 4px 0 0;
  color: var(--navy);
  font-size: clamp(1.55rem, 2.2vw, 2.2rem);
  letter-spacing: -0.035em;
}

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

.supply-section-description {
  max-width: 860px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 760;
  line-height: 1.55;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.product-card,
.product-editor-card,
.product-add-card,
.no-products-card {
  border-radius: 28px;
  border: 1px solid rgba(12, 33, 66, 0.08);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 42px rgba(20, 50, 92, 0.06);
  overflow: hidden;
}

.product-card {
  display: grid;
}

.product-image-frame {
  position: relative;
  width: calc(100% - 28px);
  margin: 14px 14px 0;
  aspect-ratio: 16 / 10;
  border-radius: 22px;
  border: 1px solid rgba(12, 33, 66, 0.08);
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(8, 196, 100, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(239, 246, 236, 0.98), rgba(255, 252, 245, 0.98));
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 950;
}

.product-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-badge-row {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
}

.product-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--navy);
  font-size: 0.7rem;
  font-weight: 950;
  backdrop-filter: blur(12px);
}

.product-badge.featured {
  background: rgba(8, 196, 100, 0.94);
  color: white;
}

.product-badge.draft {
  background: rgba(217, 163, 58, 0.14);
  color: #9b6a14;
}

.product-badge.hidden-product {
  background: rgba(12, 33, 66, 0.12);
  color: var(--muted);
}

.product-card-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

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

.product-card-heading h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.26rem;
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.product-card-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 780;
  line-height: 1.45;
}

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

.product-meta-item {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(12, 33, 66, 0.04);
}

.product-meta-item span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.product-meta-item strong {
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 950;
  line-height: 1.3;
}

.product-card.is-featured-card {
  border-color: rgba(238, 181, 42, 0.46);
  box-shadow:
    0 20px 54px rgba(20, 50, 92, 0.08),
    0 0 0 4px rgba(238, 181, 42, 0.08),
    0 0 34px rgba(238, 181, 42, 0.18);
}

.product-card.is-featured-card .product-image-frame {
  border-color: rgba(238, 181, 42, 0.28);
}

.unit-clarity {
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(8, 196, 100, 0.08);
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.45;
}

.unit-clarity.warning {
  background: rgba(217, 163, 58, 0.12);
  color: #8d6416;
}

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

.product-icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(12, 33, 66, 0.07);
  color: var(--navy);
  cursor: pointer;
  transition:
    transform 0.14s ease,
    background 0.14s ease,
    color 0.14s ease,
    box-shadow 0.14s ease;
}

.product-icon-btn:hover {
  transform: translateY(-1px);
  background: rgba(12, 33, 66, 0.11);
}

.product-icon-btn svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.product-icon-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
}

.product-icon-btn.is-featured {
  background: rgba(238, 181, 42, 0.18);
  color: #9b6a14;
  box-shadow: 0 0 0 3px rgba(238, 181, 42, 0.08);
}

.product-icon-btn.is-featured:hover {
  background: rgba(238, 181, 42, 0.24);
}

.product-icon-btn.danger {
  background: rgba(157, 51, 40, 0.08);
  color: #9d3328;
}

.product-icon-btn.danger:hover {
  background: rgba(157, 51, 40, 0.13);
}

/* =========================
   ADD CARD + EMPTY
========================= */

.product-add-card,
.no-products-card {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 26px;
  border-style: dashed;
  background:
    radial-gradient(circle at 20% 18%, rgba(8, 196, 100, 0.08), transparent 35%),
    rgba(255, 255, 255, 0.66);
  color: var(--navy);
  text-align: center;
}

.product-add-card {
  cursor: pointer;
  border-color: rgba(8, 196, 100, 0.2);
  background:
    radial-gradient(circle at 50% 20%, rgba(8, 196, 100, 0.12), transparent 34%),
    rgba(244, 255, 247, 0.72);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.product-add-card:hover {
  transform: translateY(-2px);
  border-color: rgba(8, 196, 100, 0.22);
  box-shadow: 0 22px 50px rgba(20, 50, 92, 0.1);
}

.product-add-icon {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: rgba(8, 196, 100, 0.11);
  color: var(--green);
  font-size: 2rem;
  font-weight: 800;
}

.product-add-card strong,
.no-products-card strong {
  font-size: 1.18rem;
  font-weight: 950;
}

.product-add-card span,
.no-products-card span {
  max-width: 260px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 780;
  line-height: 1.45;
}

/* =========================
   INLINE EDITOR CARD
========================= */

.product-editor-card {
  grid-column: span 2;
  padding: 22px;
  display: grid;
  gap: 18px;
  border-color: rgba(8, 196, 100, 0.18);
  background:
    radial-gradient(circle at 90% 10%, rgba(8, 196, 100, 0.09), transparent 34%),
    rgba(255, 255, 255, 0.92);
}

.product-editor-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.product-editor-heading h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.45rem;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.product-editor-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 780;
  line-height: 1.45;
}

.product-form {
  display: grid;
  gap: 18px;
}

.product-form-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(12, 33, 66, 0.08);
  background: rgba(255, 255, 255, 0.66);
}

.product-form-section h4 {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 950;
}

.form-grid {
  display: grid;
  gap: 14px;
}

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

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

.form-field {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 950;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid rgba(12, 33, 66, 0.1);
  border-radius: 18px;
  padding: 12px 13px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 760;
}

.form-field textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.5;
}

.field-note {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
  line-height: 1.45;
}

.unit-description-field.is-required input {
  border-color: rgba(217, 163, 58, 0.5);
  background: rgba(255, 250, 237, 0.9);
}

.toggle-field {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(12, 33, 66, 0.08);
  background: rgba(12, 33, 66, 0.035);
  cursor: pointer;
}

.toggle-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.toggle-field span {
  display: grid;
  gap: 3px;
}

.toggle-field strong {
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 950;
}

.toggle-field small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
  line-height: 1.4;
}

.editor-status {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.4;
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.editor-actions .supply-danger-btn {
  margin-right: auto;
}

/* =========================
   RESPONSIVE
========================= */

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

  .product-editor-card {
    grid-column: span 2;
  }
}

@media (max-width: 980px) {
  .supply-builder-workspace {
    grid-template-columns: 1fr;
  }

  .supply-readiness-panel {
    position: relative;
    top: auto;
  }

  .supply-tools-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .supply-builder-topbar {
    grid-template-columns: 1fr;
  }

  .supply-builder-workspace {
    width: min(100% - 28px, 1500px);
  }

  .supply-page-tabs {
    flex-direction: column;
  }

.supply-business-header {
  padding: 26px 24px;
}

.supply-business-header-content {
  grid-template-columns: 1fr;
}

.supply-business-logo {
  width: 96px;
  height: 96px;
}

  .supply-tools-row,
  .product-grid,
  .form-grid.two-columns,
  .form-grid.three-columns {
    grid-template-columns: 1fr;
  }

  .supply-products-section {
    padding: 28px 24px 38px;
  }

  .supply-section-heading {
    display: grid;
  }

  .product-editor-card {
    grid-column: span 1;
  }

  .editor-actions .supply-danger-btn,
  .editor-actions button {
    width: 100%;
    margin-right: 0;
  }
}

/* =========================
   PRODUCT EDITOR MODAL
========================= */

.supply-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 33, 66, 0.36);
  backdrop-filter: blur(12px);
}

.product-editor-modal .product-editor-card {
  width: min(900px, 96vw);
  max-height: min(92vh, 980px);
  overflow-y: auto;
  grid-column: auto;
  padding: 34px;
  border-radius: 34px;
  box-shadow: 0 30px 90px rgba(12, 33, 66, 0.24);
}

.product-editor-heading {
  position: relative;
  padding-right: 48px;
}

.product-editor-close {
  position: absolute;
  right: 0;
  top: 0;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(12, 33, 66, 0.07);
  color: var(--navy);
  font: inherit;
  font-size: 1.35rem;
  font-weight: 950;
  cursor: pointer;
}

.product-photo-upload-row {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.product-photo-upload-btn {
  position: relative;
  width: 168px;
  aspect-ratio: 16 / 11;
  border: 1px dashed rgba(12, 33, 66, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 35% 28%, rgba(8, 196, 100, 0.1), transparent 35%),
    rgba(255, 255, 255, 0.76);
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 950;
  cursor: pointer;
  overflow: hidden;
}

.product-photo-upload-btn:hover {
  border-color: rgba(8, 196, 100, 0.28);
  box-shadow: inset 0 0 0 3px rgba(8, 196, 100, 0.08);
}

.product-photo-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-photo-upload-btn span {
  position: relative;
  z-index: 2;
}

.product-photo-upload-btn.has-image span {
  opacity: 0;
}

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

.product-photo-help strong {
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 950;
}

.product-photo-help p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 780;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .product-photo-upload-row {
    grid-template-columns: 1fr;
  }

  .product-photo-upload-btn {
    width: 100%;
  }

  .product-editor-modal .product-editor-card {
    padding: 28px 20px;
  }
}

/* =========================
   EDIT / PREVIEW MODE SWITCH
========================= */

.profile-mode-switch {
  min-width: 278px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-radius: 999px;
  color: var(--navy);
}

.mode-switch-track {
  position: relative;
  width: 100%;
  height: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(12, 33, 66, 0.09);
  background: rgba(255, 255, 255, 0.74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 12px 34px rgba(20, 50, 92, 0.08);
  overflow: hidden;
}

.mode-switch-option {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 1;
  pointer-events: none;
}

.mode-switch-knob {
  position: absolute;
  z-index: 2;
  top: 4px;
  width: calc(50% - 4px);
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  box-shadow:
    0 12px 28px rgba(12, 33, 66, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition:
    transform 0.18s ease,
    background 0.18s ease;
}

.mode-switch-knob span {
  color: white;
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 1;
}

.profile-mode-switch.to-edit .mode-switch-knob {
  left: 4px;
  background: var(--navy);
}

.profile-mode-switch.to-preview .mode-switch-knob {
  left: 50%;
  background: var(--green);
}

@media (max-width: 760px) {
  .profile-mode-switch {
    min-width: 190px;
    height: 42px;
  }

  .mode-switch-track {
    height: 42px;
  }

  .mode-switch-knob {
    height: 34px;
  }

  .mode-switch-option,
  .mode-switch-knob span {
    font-size: 0.72rem;
  }
}

.setup-mode .editor-only {
  display: none !important;
}

/* =========================
   PRODUCT IMAGE FULL-FIT PATCH
   Shows full product photos inside product cards
========================= */

.supply-builder-page .product-image-frame {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  aspect-ratio: auto !important;
  height: 176px;
  padding: 10px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(8, 196, 100, 0.08), transparent 32%),
    linear-gradient(135deg, rgba(248, 250, 246, 0.98), rgba(255, 252, 245, 0.98));
}

.supply-builder-page .product-image-frame img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  padding: 0 !important;
  display: block !important;
}

/* =========================
   ADAPTIVE PRODUCT IMAGE FRAMES
   Makes the image frame match the uploaded image ratio
   without changing the product card size.
========================= */

.product-card .product-image-frame.has-adaptive-image {
  --product-image-ratio: 1.25;
  --product-image-height: 195px;

  width: min(
    calc(100% - 28px),
    calc(var(--product-image-ratio) * var(--product-image-height))
  );
  height: var(--product-image-height);
  aspect-ratio: auto;
  justify-self: center;
  margin: 14px auto 0;
  padding: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
}

.product-card .product-image-frame.has-adaptive-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

.product-card .product-image-frame.has-adaptive-image .product-badge-row {
  left: 10px;
  right: 10px;
  top: 10px;
}

/* =========================
   MVP PRODUCT IMAGE DISPLAY FIX
   Larger frame, safer image fit, light crop zoom.
========================= */

.product-card .product-image-frame,
.product-card .product-image-frame.has-adaptive-image {
  width: calc(100% - 28px) !important;
  height: 212px !important;
  aspect-ratio: auto !important;
  justify-self: stretch !important;
  margin: 14px 14px 0 !important;
  padding: 10px !important;
  box-sizing: border-box;
  border-radius: 22px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 18% 22%, rgba(8, 196, 100, 0.06), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 252, 245, 0.92));
}

.product-card .product-image-frame img,
.product-card .product-image-frame.has-adaptive-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  display: block;
  transform: scale(1.14);
  transform-origin: center;
}

.product-card .product-badge-row {
  left: 12px;
  right: 12px;
  top: 12px;
}
