.profile-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);
}

.profile-builder-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  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.88);
  backdrop-filter: blur(18px);
}

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

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

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

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

.profile-builder-topbar-actions {
  display: flex;
  gap: 10px;
}

.builder-primary-btn,
.builder-secondary-btn,
.builder-mini-btn {
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

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

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

.mode-switch-track {
  position: relative;
  width: 100%;
  height: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(12, 33, 66, 0.09);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(244, 248, 242, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 14px 32px rgba(20, 50, 92, 0.08);
}

.mode-switch-option {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: -0.01em;
  user-select: none;
}

.mode-switch-knob {
  position: absolute;
  top: 4px;
  z-index: 2;
  width: calc(50% - 6px);
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.34), transparent 34%),
    var(--green);
  color: white;
  box-shadow:
    0 12px 28px rgba(8, 196, 100, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.mode-switch-knob span {
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: -0.01em;
}

.profile-mode-switch.to-preview .mode-switch-knob {
  right: 4px;
}

.profile-mode-switch.to-edit .mode-switch-knob {
  left: 4px;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.34), transparent 34%),
    var(--navy);
  box-shadow:
    0 12px 28px rgba(20, 50, 92, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.profile-mode-switch:hover .mode-switch-knob {
  transform: translateY(-1px);
}

.profile-mode-switch.to-preview:hover .mode-switch-knob {
  box-shadow:
    0 16px 34px rgba(8, 196, 100, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.profile-mode-switch.to-edit:hover .mode-switch-knob {
  box-shadow:
    0 16px 34px rgba(20, 50, 92, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.builder-primary-btn {
  min-height: 42px;
  padding: 10px 18px;
  background: var(--green);
  color: white;
}

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

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

.profile-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;
}

.profile-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[data-status="draft"] span {
  background: #d9a33a;
}

.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;
}

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

/* =========================================================
   ONE COHESIVE PUBLIC PROFILE PAGE
========================================================= */

.public-profile-page {
  width: 100%;
  max-width: 1180px;
  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);
}

.profile-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);
}

.profile-page-tab {
  position: relative;
  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);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

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

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

.profile-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);
}

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

.profile-page-tab:not(.disabled):hover {
  transform: translateY(-1px);
  border-color: rgba(8, 196, 100, 0.18);
  box-shadow: 0 18px 42px rgba(20, 50, 92, 0.09);
}

.profile-page-tab.disabled {
  cursor: not-allowed;
  opacity: 0.86;
}

.profile-page-tab em {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(12, 33, 66, 0.07);
  color: var(--muted);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-hero-section {
  display: grid;
}

.profile-banner-zone {
  position: relative;
  width: 100%;
  min-height: 300px;
  border: 0;
  border-bottom: 1px solid rgba(12, 33, 66, 0.08);
  background:
    radial-gradient(circle at 18% 20%, rgba(8, 196, 100, 0.14), transparent 30%),
    radial-gradient(circle at 90% 8%, rgba(138, 106, 74, 0.08), transparent 24%),
    linear-gradient(135deg, rgba(239, 246, 236, 0.98), rgba(255, 252, 245, 0.98));
  color: var(--muted);
  font: inherit;
  font-size: 1.08rem;
  font-weight: 950;
  cursor: pointer;
  overflow: hidden;
}

.profile-banner-zone:hover {
  box-shadow: inset 0 0 0 3px rgba(8, 196, 100, 0.14);
}

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

.profile-identity-section {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 26px;
  align-items: center;
  padding: 28px 42px 38px;
  background: rgba(255, 255, 255, 0.68);
}

.profile-logo-zone {
  position: relative;
  width: 148px;
  height: 148px;
  border: 1px solid rgba(12, 33, 66, 0.1);
  border-radius: 30px;
  background: white;
  color: var(--muted);
  font: inherit;
  font-weight: 950;
  cursor: pointer;
  overflow: hidden;
}

.profile-logo-zone:hover {
  box-shadow: inset 0 0 0 3px rgba(8, 196, 100, 0.14);
}

.logo-preview {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#logoPlaceholder {
  position: relative;
  z-index: 1;
}

.profile-logo-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(12, 33, 66, 0.24);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.profile-logo-zone::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%) scale(0.92);
  opacity: 0;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  pointer-events: none;
  background: white;

  -webkit-mask:
    url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 20H8.25L19.2 9.05C19.77 8.48 20.05 7.8 20.05 7C20.05 6.2 19.77 5.52 19.2 4.95L19.05 4.8C18.48 4.23 17.8 3.95 17 3.95C16.2 3.95 15.52 4.23 14.95 4.8L4 15.75V20ZM6 18V16.6L13.9 8.7L15.3 10.1L7.4 18H6ZM16.7 8.7L15.3 7.3L16.35 6.25C16.53 6.07 16.75 5.98 17 5.98C17.25 5.98 17.47 6.07 17.65 6.25L17.75 6.35C17.93 6.53 18.02 6.75 18.02 7C18.02 7.25 17.93 7.47 17.75 7.65L16.7 8.7Z' fill='white'/%3E%3C/svg%3E")
    center / contain no-repeat;

  mask:
    url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 20H8.25L19.2 9.05C19.77 8.48 20.05 7.8 20.05 7C20.05 6.2 19.77 5.52 19.2 4.95L19.05 4.8C18.48 4.23 17.8 3.95 17 3.95C16.2 3.95 15.52 4.23 14.95 4.8L4 15.75V20ZM6 18V16.6L13.9 8.7L15.3 10.1L7.4 18H6ZM16.7 8.7L15.3 7.3L16.35 6.25C16.53 6.07 16.75 5.98 17 5.98C17.25 5.98 17.47 6.07 17.65 6.25L17.75 6.35C17.93 6.53 18.02 6.75 18.02 7C18.02 7.25 17.93 7.47 17.75 7.65L16.7 8.7Z' fill='white'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.profile-logo-zone:hover::before,
.profile-logo-zone:focus-visible::before {
  opacity: 1;
}

.profile-logo-zone:hover::after,
.profile-logo-zone:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.profile-overline {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-main-details h1 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.profile-main-details p {
  margin: 0 0 16px;
  color: var(--muted);
  font-weight: 850;
}

.profile-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(8, 196, 100, 0.11);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 950;
}

.profile-chip.muted {
  background: rgba(12, 33, 66, 0.07);
  color: var(--muted);
}

.profile-page-section {
  padding: 38px 42px;
  border-top: 1px solid rgba(12, 33, 66, 0.08);
  background: transparent;
}

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

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

.section-kicker.recommended {
  color: #2e9e58;
}

.section-heading-row h2,
.profile-footer-section h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.45rem, 2.2vw, 2.1rem);
  letter-spacing: -0.035em;
}

.section-status-pill {
  white-space: nowrap;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(12, 33, 66, 0.07);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.section-status-pill[data-status="complete"] {
  background: rgba(8, 196, 100, 0.12);
  color: var(--green);
}

.section-status-pill[data-status="draft"] {
  background: rgba(217, 163, 58, 0.16);
  color: #9a6a13;
}

.section-status-pill.muted {
  color: #8190a2;
}

.section-description {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 760;
  line-height: 1.55;
}

/* =========================================================
   PROFILE-FIRST TEXT EDITING
========================================================= */

.editable-profile-section {
  padding: 0;
}

.section-display-shell {
  width: 100%;
  display: grid;
  gap: 14px;
  padding: 38px 42px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.section-display-shell:hover {
  background:
    radial-gradient(circle at 96% 12%, rgba(8, 196, 100, 0.055), transparent 28%),
    rgba(8, 196, 100, 0.012);
}

.section-display-text {
  margin: 0;
  max-width: 860px;
  color: var(--navy);
  font-size: 1.08rem;
  font-weight: 760;
  line-height: 1.7;
  white-space: pre-wrap;
}

.section-display-text.empty {
  color: var(--muted);
  font-weight: 820;
}

.section-edit-hint {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(12, 33, 66, 0.06);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
}

.section-display-shell:hover .section-edit-hint {
  background: rgba(8, 196, 100, 0.12);
  color: var(--green);
}

.section-editor-shell {
  display: grid;
  gap: 14px;
  padding: 0 42px 38px;
}

.section-editor-shell textarea,
.profile-footer-section select,
.custom-certification-row input {
  width: 100%;
  border: 1px solid rgba(12, 33, 66, 0.1);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy);
  font: inherit;
  font-weight: 750;
}

.section-editor-shell textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.5;
}

.section-action-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

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

.editable-profile-section[data-editing="true"] {
  background: rgba(8, 196, 100, 0.018);
}

.save-section-draft {
  background: rgba(217, 163, 58, 0.15);
  color: #8c6112;
}

.mark-section-complete {
  background: rgba(8, 196, 100, 0.12);
  color: var(--green);
}


/* =========================================================
   LARGE HORIZONTAL PROFILE GALLERY — CENTERED HERO PEEK
========================================================= */

.profile-gallery-section {
  padding-left: 0;
  padding-right: 0;
}

.profile-gallery-section > .section-heading-row,
.profile-gallery-section > .section-description,
.profile-gallery-section > .section-support-note,
.profile-gallery-section > .gallery-format-note {
  margin-left: 42px;
  margin-right: 42px;
}

.profile-gallery-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-top: 24px;
}

.profile-gallery-strip {
  display: flex;
  align-items: stretch;
  gap: 22px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 42px;
  padding: 4px 42px 22px;
  scrollbar-width: thin;
}

.profile-gallery-strip::-webkit-scrollbar {
  height: 10px;
}

.profile-gallery-strip::-webkit-scrollbar-track {
  background: rgba(12, 33, 66, 0.05);
  border-radius: 999px;
}

.profile-gallery-strip::-webkit-scrollbar-thumb {
  background: rgba(12, 33, 66, 0.18);
  border-radius: 999px;
}

.profile-gallery-strip::-webkit-scrollbar-thumb:hover {
  background: rgba(12, 33, 66, 0.28);
}

.gallery-showcase-tile,
.gallery-image-card {
  flex: 0 0 76%;
  min-height: 420px;
  aspect-ratio: 16 / 9;
  scroll-snap-align: center;
  border-radius: 34px;
  overflow: hidden;
}

.gallery-empty-state {
  justify-content: center;
  overflow-x: hidden;
}

.gallery-empty-state .gallery-main-tile {
  flex-basis: min(760px, 68%);
  z-index: 2;
}

.gallery-empty-state .gallery-side-peek {
  flex-basis: min(320px, 24%);
  opacity: 0.76;
}

.gallery-empty-state .gallery-extra-placeholder {
  display: none;
}

.gallery-showcase-tile {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 34px;
  border: 1px dashed rgba(12, 33, 66, 0.16);
  background:
    radial-gradient(circle at 18% 18%, rgba(8, 196, 100, 0.1), transparent 34%),
    radial-gradient(circle at 80% 70%, rgba(12, 33, 66, 0.035), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(248, 246, 240, 0.82));
  color: var(--muted);
  font: inherit;
  font-weight: 950;
  text-align: center;
}

.gallery-add-tile {
  cursor: pointer;
}

.gallery-add-tile:hover {
  border-color: rgba(8, 196, 100, 0.28);
  background:
    radial-gradient(circle at 18% 18%, rgba(8, 196, 100, 0.13), transparent 34%),
    radial-gradient(circle at 80% 70%, rgba(12, 33, 66, 0.04), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 246, 240, 0.9));
}

.gallery-add-tile strong {
  color: var(--navy);
  font-size: 1.22rem;
  letter-spacing: -0.025em;
}

.gallery-add-tile span,
.gallery-ghost-tile span {
  max-width: 280px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 850;
  line-height: 1.4;
}

.gallery-image-card {
  --gallery-card-height: 420px;
  --gallery-card-ratio: 1.6;

  position: relative;
  flex: 0 0 auto;
  height: var(--gallery-card-height);
  width: clamp(
    240px,
    calc(var(--gallery-card-ratio) * var(--gallery-card-height)),
    760px
  );
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(12, 33, 66, 0.08);
  box-shadow: 0 18px 42px rgba(20, 50, 92, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-image-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: inherit;
}
/* Product preview replacement if needed */
.product-preview-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.product-preview-tile {
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 22px;
  border-radius: 24px;
  border: 1px dashed rgba(12, 33, 66, 0.14);
  background:
    radial-gradient(circle at 18% 18%, rgba(8, 196, 100, 0.055), transparent 32%),
    rgba(255, 255, 255, 0.56);
  color: var(--muted);
  text-align: center;
  cursor: default;
  overflow: hidden;
}

.product-preview-tile strong {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.product-preview-tile span {
  max-width: 270px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.45;
}

.product-preview-action-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.product-preview-disabled-btn {
  opacity: 0.72;
  cursor: not-allowed;
}

@media (max-width: 1100px) {
  .gallery-showcase-tile,
  .gallery-image-card {
    min-height: 360px;
  }

  .gallery-empty-state .gallery-main-tile {
    flex-basis: 72%;
  }

  .gallery-empty-state .gallery-side-peek {
    flex-basis: 20%;
  }
}

@media (max-width: 900px) {
  .profile-gallery-section > .section-heading-row,
  .profile-gallery-section > .section-description,
  .profile-gallery-section > .section-support-note,
  .profile-gallery-section > .gallery-format-note {
    margin-left: 28px;
    margin-right: 28px;
  }

  .profile-gallery-strip {
    scroll-padding-inline: 28px;
    padding-inline: 28px;
  }

  .gallery-showcase-tile,
  .gallery-image-card {
    min-height: 300px;
    border-radius: 28px;
  }

  .gallery-empty-state .gallery-main-tile {
    flex-basis: 76%;
  }

  .gallery-empty-state .gallery-side-peek {
    flex-basis: 18%;
  }
}

@media (max-width: 620px) {
  .profile-gallery-section > .section-heading-row,
  .profile-gallery-section > .section-description,
  .profile-gallery-section > .section-support-note,
  .profile-gallery-section > .gallery-format-note {
    margin-left: 24px;
    margin-right: 24px;
  }

  .profile-gallery-strip {
    gap: 14px;
    scroll-padding-inline: 24px;
    padding-inline: 24px;
  }

  .gallery-showcase-tile,
  .gallery-image-card {
    min-height: 240px;
    border-radius: 24px;
  }

  .gallery-empty-state {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .gallery-empty-state .gallery-main-tile,
  .gallery-empty-state .gallery-side-peek {
    flex-basis: 86%;
  }
}


/* =========================================================
   EMBEDDED PROFILE MODULES
========================================================= */

.profile-story-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.42fr) minmax(0, 1fr);
  gap: 0;
  padding: 0;
}

.story-side-panel,
.story-main-panel {
  border: 0;
}

.story-side-panel {
  border-right: 1px solid rgba(12, 33, 66, 0.08);
  background: rgba(12, 33, 66, 0.018);
}

.compact-display-shell {
  height: 100%;
}

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

.certification-grid label {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(12, 33, 66, 0.04);
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 850;
}

.certification-grid input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.custom-certification-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 16px;
}

.selected-certifications-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.selected-certifications-list span {
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(8, 196, 100, 0.1);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 950;
}

.product-preview-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.product-preview-tile {
  cursor: default;
}

.profile-footer-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: center;
  background: rgba(12, 33, 66, 0.022);
}

.hidden {
  display: none !important;
}

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

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

  .public-profile-page {
    max-width: 100%;
  }
}

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

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

  .profile-identity-section,
  .profile-story-grid,
  .profile-footer-section {
    grid-template-columns: 1fr;
  }

  .story-side-panel {
    border-right: 0;
    border-bottom: 1px solid rgba(12, 33, 66, 0.08);
  }

  .product-preview-row,
  .certification-grid {
    grid-template-columns: 1fr;
  }

  .profile-page-section,
  .section-display-shell {
    padding: 28px 24px;
  }

  .section-editor-shell {
    padding: 0 24px 28px;
  }
}

/* =========================================================
   PROFILE POLISH PASS — WARM EMPTY STATES + HUMAN DETAILS
========================================================= */

.profile-contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.4;
}

.profile-contact-line span {
  position: relative;
}

.profile-contact-line span:not(:last-child)::after {
  content: "•";
  position: absolute;
  right: -10px;
  color: rgba(12, 33, 66, 0.28);
}

.section-support-note {
  margin: -10px 0 20px;
  color: #6d7d91;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.45;
}

.gallery-add-tile {
  display: grid;
  gap: 6px;
}

.gallery-add-tile strong {
  color: var(--navy);
  font-size: 0.98rem;
}

.gallery-add-tile span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.gallery-ghost-tile {
  min-height: 180px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  border: 1px dashed rgba(12, 33, 66, 0.13);
  background:
    radial-gradient(circle at 20% 20%, rgba(8, 196, 100, 0.06), transparent 32%),
    rgba(12, 33, 66, 0.025);
  color: rgba(89, 105, 125, 0.78);
  font-size: 0.86rem;
  font-weight: 900;
  text-align: center;
  padding: 18px;
}

.profile-story-grid .section-display-text {
  text-align: left;
}

.story-side-panel .section-display-text {
  font-size: 0.98rem;
  line-height: 1.62;
}

.story-main-panel .section-display-text {
  max-width: 760px;
}

.profile-team-section {
  background:
    radial-gradient(circle at 96% 18%, rgba(8, 196, 100, 0.055), transparent 28%),
    transparent;
}

.team-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 18px;
}

.team-add-card,
.team-ghost-card {
  min-height: 430px;
  border-radius: 26px;
  border: 1px dashed rgba(12, 33, 66, 0.15);
  background: rgba(12, 33, 66, 0.035);
  color: var(--muted);
  font: inherit;
  font-weight: 900;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  text-align: center;
  padding: 22px;
}

.team-add-card {
  cursor: pointer;
}

.team-add-card strong {
  color: var(--navy);
  font-size: 1rem;
}

.team-add-card span,
.team-ghost-card span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.team-avatar-placeholder {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 30%, rgba(8, 196, 100, 0.18), transparent 35%),
    rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(12, 33, 66, 0.1);
}

@media (max-width: 760px) {
  .team-preview-grid {
    grid-template-columns: 1fr;
  }

  .profile-contact-line span::after {
    display: none;
  }
}

.profile-contact-line .muted-empty {
  opacity: 0.58;
}


/* =========================================================
   DISPLAY-FIRST CERTIFICATIONS SECTION
========================================================= */

.editable-certifications-section {
  padding: 0;
}

.certifications-display-shell {
  width: 100%;
  display: grid;
  gap: 14px;
  padding: 38px 42px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.certifications-display-shell:hover {
  background:
    radial-gradient(circle at 96% 12%, rgba(8, 196, 100, 0.055), transparent 28%),
    rgba(8, 196, 100, 0.012);
}

.certifications-badge-display {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.certification-display-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(8, 196, 100, 0.1);
  color: var(--green);
  border: 1px solid rgba(8, 196, 100, 0.15);
  font-size: 0.84rem;
  font-weight: 950;
}

.certification-display-badge::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(8, 196, 100, 0.14);
  color: var(--green);
  font-size: 0.7rem;
}

.certification-display-badge.self-reported::after {
  content: "self-reported";
  margin-left: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(12, 33, 66, 0.055);
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.certifications-empty-state {
  width: min(100%, 640px);
  display: grid;
  gap: 6px;
  padding: 22px;
  border-radius: 24px;
  border: 1px dashed rgba(12, 33, 66, 0.15);
  background:
    radial-gradient(circle at 12% 20%, rgba(8, 196, 100, 0.08), transparent 32%),
    rgba(12, 33, 66, 0.025);
  color: var(--muted);
}

.certifications-empty-state strong {
  color: var(--navy);
  font-size: 0.98rem;
  font-weight: 950;
}

.certifications-empty-state span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.45;
}

.certifications-editor-shell {
  display: grid;
  gap: 16px;
  padding: 0 42px 38px;
  background: rgba(8, 196, 100, 0.012);
}

.editable-certifications-section[data-editing="true"] {
  background: rgba(8, 196, 100, 0.018);
}

.certifications-action-row {
  margin-top: 2px;
}

.certifications-action-row > span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.4;
}

@media (max-width: 760px) {
  .certifications-display-shell {
    padding: 28px 24px;
  }

  .certifications-editor-shell {
    padding: 0 24px 28px;
  }

  .certification-display-badge {
    width: 100%;
    justify-content: flex-start;
  }
}

/* =========================================================
   MEET THE TEAM EDITOR + MODAL
========================================================= */

.team-member-card {
  position: relative;
  min-height: 430px;
  border-radius: 26px;
  border: 1px solid rgba(12, 33, 66, 0.08);
  background:
    radial-gradient(circle at 18% 18%, rgba(8, 196, 100, 0.055), transparent 34%),
    rgba(255, 255, 255, 0.72);
  color: var(--navy);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  text-align: left;
  overflow: hidden;
}

.team-member-photo-frame {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 25%, rgba(8, 196, 100, 0.12), transparent 28%),
    rgba(12, 33, 66, 0.04);
  border: 1px solid rgba(12, 33, 66, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-member-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.team-member-photo-placeholder {
  width: 100%;
  height: 100%;
  position: relative;
  display: block;
  background: linear-gradient(180deg, rgba(245, 248, 242, 0.95), rgba(238, 243, 236, 0.98));
  overflow: hidden;
  font-size: 0;
}

.team-member-photo-placeholder::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 28%;
  width: 72px;
  height: 72px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(93, 104, 116, 0.72);
}

.team-member-photo-placeholder::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 190px;
  height: 165px;
  transform: translateX(-50%);
  border-radius: 999px 999px 38px 38px;
  background: rgba(93, 104, 116, 0.72);
}

.team-member-name,
.team-member-card h3 {
  margin: 2px 0 0;
  color: var(--navy);
  font-size: 1.28rem;
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.025em;
}

.team-member-role,
.team-member-card .team-member-role {
  margin: 0;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 950;
}

.team-member-bio,
.team-member-card .team-member-bio {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.48;
}

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

.profile-modal.hidden {
  display: none;
}

.profile-modal-card {
  position: relative;
  width: min(620px, 100%);
  max-height: min(90vh, 780px);
  overflow-y: auto;
  display: grid;
  gap: 16px;
  padding: 32px;
  border-radius: 32px;
  border: 1px solid rgba(12, 33, 66, 0.1);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 90px rgba(20, 50, 92, 0.24);
}

.profile-modal-card h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.7rem;
  letter-spacing: -0.035em;
}

.profile-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(12, 33, 66, 0.06);
  color: var(--navy);
  font-size: 1.35rem;
  font-weight: 900;
  cursor: pointer;
}

.modal-helper-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.5;
}

.team-photo-upload-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
}

.team-photo-upload-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 760;
  line-height: 1.45;
}

.team-photo-upload {
  width: 120px;
  height: 120px;
  border: 1px dashed rgba(12, 33, 66, 0.18);
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 28%, rgba(8, 196, 100, 0.13), transparent 36%),
    rgba(12, 33, 66, 0.035);
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 950;
  cursor: pointer;
  overflow: hidden;
}

.team-photo-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.modal-field input,
.modal-field textarea {
  width: 100%;
  border: 1px solid rgba(12, 33, 66, 0.1);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy);
  font: inherit;
  font-weight: 750;
  text-transform: none;
  letter-spacing: 0;
}

.modal-field textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

.modal-action-row {
  display: grid;
  gap: 14px;
}

.modal-action-row > span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.4;
}

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

@media (max-width: 640px) {
  .profile-modal-card {
    padding: 26px 20px;
  }

  .team-photo-upload-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

/* =========================================================
   TEAM CARD EDITING CONTROLS
========================================================= */

.team-member-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.team-member-actions .team-member-edit-btn,
.team-member-actions .team-member-remove-btn {
  position: static;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 950;
  cursor: pointer;
}

.team-member-actions .team-member-edit-btn {
  background: rgba(8, 196, 100, 0.1);
  color: var(--green);
}

.team-member-actions .team-member-edit-btn:hover {
  background: rgba(8, 196, 100, 0.16);
}

.team-member-actions .team-member-remove-btn {
  background: rgba(12, 33, 66, 0.07);
  color: var(--muted);
}

.team-member-actions .team-member-remove-btn:hover {
  background: rgba(157, 51, 40, 0.1);
  color: #9d3328;
}

.modal-danger-btn {
  border: 0;
  border-radius: 999px;
  min-height: 42px;
  padding: 10px 16px;
  background: rgba(157, 51, 40, 0.1);
  color: #9d3328;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.modal-danger-btn:hover {
  background: rgba(157, 51, 40, 0.16);
}

.modal-actions {
  align-items: center;
}

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

@media (max-width: 640px) {
  .team-member-actions {
    flex-direction: column;
  }

  .team-member-actions .team-member-edit-btn,
  .team-member-actions .team-member-remove-btn {
    width: 100%;
  }

  .modal-actions .modal-danger-btn {
    width: 100%;
    margin-right: 0;
  }
}

@media (max-width: 900px) {
  .profile-page-tabs {
    grid-template-columns: 1fr;
    flex-direction: column;
    padding: 12px;
  }

  .profile-page-tab {
    min-height: 66px;
  }

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

  .product-preview-action-row {
    justify-content: stretch;
  }

  .product-preview-action-row .builder-secondary-btn {
    width: 100%;
  }
}

/* =========================================================
   GALLERY MANAGER MODAL
========================================================= */

.gallery-heading-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gallery-manage-btn {
  background: rgba(8, 196, 100, 0.1);
  color: var(--green);
}

.gallery-manage-btn:hover {
  background: rgba(8, 196, 100, 0.16);
}

.gallery-manager-card {
  width: min(1120px, 96vw);
  max-height: min(92vh, 900px);
  gap: 22px;
}

.gallery-manager-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: start;
  padding-right: 42px;
}

.gallery-upload-main-btn {
  white-space: nowrap;
  align-self: center;
}

.gallery-manager-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.75fr);
  gap: 22px;
  align-items: start;
}

.gallery-manager-order-panel,
.gallery-selected-panel {
  border: 1px solid rgba(12, 33, 66, 0.08);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 10%, rgba(8, 196, 100, 0.045), transparent 30%),
    rgba(255, 255, 255, 0.72);
  padding: 22px;
}

.gallery-manager-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.gallery-manager-section-title h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.08rem;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.gallery-manager-section-title span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
}

.gallery-manager-note {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 760;
  line-height: 1.45;
}

.gallery-manager-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 14px;
}

.gallery-manager-tile {
  position: relative;
  min-height: 150px;
  aspect-ratio: 16 / 10;
  border: 1px dashed rgba(12, 33, 66, 0.16);
  border-radius: 20px;
  background:
    radial-gradient(circle at 24% 20%, rgba(8, 196, 100, 0.06), transparent 30%),
    rgba(12, 33, 66, 0.035);
  color: var(--muted);
  font: inherit;
  font-weight: 900;
  overflow: hidden;
  cursor: pointer;
}

.gallery-manager-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-manager-tile.is-selected {
  border: 3px solid rgba(8, 196, 100, 0.82);
  box-shadow: 0 14px 34px rgba(8, 196, 100, 0.15);
}

.gallery-manager-tile.is-empty {
  display: grid;
  place-items: center;
  text-align: center;
  cursor: pointer;
}

.gallery-manager-order-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 950;
  box-shadow: 0 8px 20px rgba(20, 50, 92, 0.12);
}

.gallery-manager-caption-badge {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 8px 20px rgba(20, 50, 92, 0.12);
}

.selected-gallery-preview {
  min-height: 260px;
  border-radius: 24px;
  border: 1px dashed rgba(12, 33, 66, 0.16);
  background:
    radial-gradient(circle at 30% 20%, rgba(8, 196, 100, 0.07), transparent 30%),
    rgba(12, 33, 66, 0.035);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
  margin-top: 16px;
}

.selected-gallery-preview img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  display: block;
}

.gallery-caption-field {
  margin-top: 16px;
}

.gallery-selected-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.gallery-selected-controls button {
  min-height: 42px;
}

.gallery-selected-controls .modal-danger-btn {
  grid-column: span 2;
}

.gallery-manager-footer {
  border-top: 1px solid rgba(12, 33, 66, 0.08);
  padding-top: 4px;
}

@media (max-width: 900px) {
  .gallery-manager-header,
  .gallery-manager-layout {
    grid-template-columns: 1fr;
  }

  .gallery-upload-main-btn {
    justify-self: start;
  }
}

@media (max-width: 620px) {
  .gallery-manager-card {
    padding: 26px 18px;
  }

  .gallery-manager-grid {
    grid-template-columns: 1fr;
  }

  .gallery-selected-controls {
    grid-template-columns: 1fr;
  }

  .gallery-selected-controls .modal-danger-btn {
    grid-column: auto;
  }
}

.gallery-manager-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  align-self: start;
}

.gallery-manager-header-actions .builder-secondary-btn,
.gallery-manager-header-actions .builder-primary-btn {
  white-space: nowrap;
}

.gallery-manager-footer {
  justify-content: flex-start;
}

.gallery-manager-footer .modal-actions {
  display: none;
}

.profile-gallery-frame {
  position: relative;
}

.gallery-scroll-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(20, 50, 92, 0.14);
  display: grid;
  place-items: center;
}

.gallery-scroll-arrow:hover {
  background: white;
  transform: translateY(-50%) scale(1.04);
}

.gallery-scroll-arrow-left {
  left: 18px;
}

.gallery-scroll-arrow-right {
  right: 18px;
}

.gallery-empty-state ~ .gallery-scroll-arrow,
.profile-gallery-frame:has(.gallery-empty-state) .gallery-scroll-arrow {
  display: none;
}

.gallery-inline-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 14px 24px 14px 0;
}

.gallery-inline-manage-btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  background: var(--navy);
  color: white;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(20, 50, 92, 0.18);
}

.gallery-inline-manage-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(20, 50, 92, 0.24);
}

@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.76rem;
  }
}

/* =========================================================
   Mini animation for switch
========================================================= */

.profile-builder-page .profile-mode-switch {
  animation: modeSwitchIntro 1.15s ease 0.55s 1 both;
}

@keyframes modeSwitchIntro {
  0% {
    transform: translateY(0);
  }

  28% {
    transform: translateY(-2px);
  }

  56% {
    transform: translateY(0);
  }

  78% {
    transform: translateY(-1px);
  }

  100% {
    transform: translateY(0);
  }
}

.profile-builder-page .profile-mode-switch .mode-switch-track {
  animation: modeSwitchGlow 1.15s ease 0.55s 1 both;
}

@keyframes modeSwitchGlow {
  0%,
  100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.88),
      0 14px 32px rgba(20, 50, 92, 0.08);
  }

  45% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.88),
      0 18px 42px rgba(8, 196, 100, 0.18);
  }
}

/* =========================
   PROFILE SETUP TRANSITION MODAL
========================= */

.setup-transition-card {
  width: min(860px, 94vw);
  max-width: 860px;
  padding: 42px 46px 38px;
  gap: 24px;
}

.setup-transition-step {
  display: grid;
  gap: 22px;
}

.setup-transition-card h2 {
  max-width: 700px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(2.1rem, 4vw, 3.05rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.setup-transition-card .modal-helper-text {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 780;
  line-height: 1.58;
}

.setup-transition-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 2px;
}

.setup-transition-summary div,
.setup-choice-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: 26px;
  border: 1px solid rgba(12, 33, 66, 0.08);
  background:
    radial-gradient(circle at 16% 18%, rgba(8, 196, 100, 0.07), transparent 32%),
    rgba(255, 255, 255, 0.74);
}

.setup-transition-summary strong,
.setup-choice-card strong {
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.setup-transition-summary span,
.setup-choice-card span,
.setup-transition-note {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 780;
  line-height: 1.55;
}

.setup-transition-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 6px;
}

.setup-transition-actions > span {
  max-width: 360px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 820;
  line-height: 1.45;
}

.setup-transition-actions .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
}

.setup-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.setup-choice-card {
  min-height: 178px;
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.setup-choice-card:hover {
  transform: translateY(-2px);
  border-color: rgba(8, 196, 100, 0.2);
  box-shadow: 0 18px 42px rgba(20, 50, 92, 0.1);
}

.setup-choice-card.primary {
  border-color: rgba(8, 196, 100, 0.2);
  background:
    radial-gradient(circle at 86% 18%, rgba(8, 196, 100, 0.14), transparent 34%),
    rgba(244, 255, 247, 0.94);
}

.setup-choice-card.primary strong {
  color: var(--green);
}

.setup-transition-note {
  margin: 0;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(8, 196, 100, 0.08);
  color: var(--navy);
}

@media (max-width: 760px) {
  .setup-transition-card {
    padding: 30px 22px 24px;
  }

  .setup-transition-summary,
  .setup-choice-grid,
  .setup-transition-actions {
    grid-template-columns: 1fr;
  }

  .setup-transition-actions .modal-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .setup-transition-actions .modal-actions button {
    width: 100%;
  }
}

.profile-product-preview-section.has-products .section-status-pill {
  background: rgba(8, 196, 100, 0.1);
  color: var(--green);
}

.product-preview-tile.real-product {
  min-height: 0;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border-style: solid;
  border-color: rgba(12, 33, 66, 0.08);
  background: rgba(255, 255, 255, 0.78);
  text-align: left;
  box-shadow: 0 16px 36px rgba(20, 50, 92, 0.06);
}

.product-preview-tile.real-product.is-featured {
  border-color: rgba(238, 181, 42, 0.42);
  box-shadow:
    0 16px 36px rgba(20, 50, 92, 0.06),
    0 0 0 4px rgba(238, 181, 42, 0.07),
    0 0 26px rgba(238, 181, 42, 0.14);
}

.product-preview-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 22%, rgba(8, 196, 100, 0.1), transparent 32%),
    linear-gradient(135deg, rgba(239, 246, 236, 0.98), rgba(255, 252, 245, 0.98));
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 950;
}

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

.product-preview-tile.real-product strong {
  font-size: 1.05rem;
  line-height: 1.1;
}

.product-preview-tile.real-product span {
  max-width: none;
  margin: 0;
  font-size: 0.82rem;
}

.product-preview-meta {
  display: grid;
  gap: 4px;
  margin-top: 2px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(12, 33, 66, 0.045);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 900;
}

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

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

/* =========================
   FIX ORDERING GUIDELINES EDITOR OVERFLOW
========================= */

.profile-story-grid {
  align-items: stretch;
  overflow: visible;
}

.story-side-panel[data-editing="true"] {
  position: relative;
  z-index: 3;
  display: grid;
  align-content: start;
  overflow: visible;
  background:
    radial-gradient(circle at 10% 16%, rgba(8, 196, 100, 0.045), transparent 32%),
    rgba(8, 196, 100, 0.018);
}

.story-side-panel[data-editing="true"] .compact-display-shell {
  height: auto;
  min-height: 0;
}

.story-side-panel[data-editing="true"] .section-editor-shell {
  position: relative;
  z-index: 4;
  padding: 0 28px 30px;
}

.story-side-panel[data-editing="true"] .section-editor-shell textarea {
  min-height: 220px;
  max-height: 340px;
  resize: vertical;
  overflow-y: auto;
}

.story-side-panel[data-editing="true"] .section-action-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  padding-top: 4px;
}

.story-side-panel[data-editing="true"] .section-editor-actions {
  width: 100%;
  justify-content: flex-start;
}

.story-side-panel[data-editing="true"] .builder-mini-btn {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .story-side-panel[data-editing="true"] .section-editor-shell {
    padding: 0 24px 28px;
  }

  .story-side-panel[data-editing="true"] .section-editor-shell textarea {
    min-height: 190px;
    max-height: 300px;
  }
}
