.supply-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-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-logo img {
  width: 160px;
  display: block;
}

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

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

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

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

.supply-primary-btn,
.supply-secondary-btn,
.supply-mini-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;
}

/* =========================
   SHELL
========================= */

.supply-shell {
  width: min(1160px, calc(100% - 44px));
  margin: 0 auto;
  padding: 28px 0 70px;
}

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

/* =========================
   TABS
========================= */

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

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

.supply-business-header {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding: 34px 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-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;
}

.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-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));
  grid-auto-flow: dense;
  gap: 18px;
  align-items: start;
}

.product-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 {
  position: relative;
  display: grid;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

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

.product-card.expanded {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  align-items: stretch;
}

.product-card.expanded .product-image-frame {
  height: auto;
  min-height: 360px;
  aspect-ratio: auto;
  margin: 14px 0 14px 14px;
}

.product-card.expanded .product-card-body {
  align-content: start;
  padding: 24px;
}

.product-card.expanded .product-card-heading h3 {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

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

.product-card.expanded .product-expanded-details {
  display: grid;
}

@media (max-width: 900px) {
  .product-card.expanded {
    grid-template-columns: 1fr;
  }

  .product-card.expanded .product-image-frame {
    min-height: 0;
    aspect-ratio: 16 / 10;
    margin: 14px 14px 0;
  }
}

.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-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-card.is-featured-card .product-image-frame {
  border-color: rgba(238, 181, 42, 0.28);
}

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

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

.product-expanded-details {
  display: none;
  gap: 14px;
  padding-top: 2px;
}

.product-card.expanded .product-expanded-details {
  display: grid;
}

.product-detail-block {
  display: grid;
  gap: 5px;
}

.product-detail-block span {
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.product-detail-block p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 780;
  line-height: 1.55;
}

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

.product-public-actions a {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(12, 33, 66, 0.07);
  color: var(--navy);
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 950;
}

.product-public-actions a.primary {
  background: var(--green);
  color: white;
}

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

.no-products-card strong {
  color: var(--navy);
  font-size: 1.2rem;
  font-weight: 950;
}

.no-products-card span {
  max-width: 320px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 780;
  line-height: 1.45;
}

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

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

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

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

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

  .supply-shell {
    width: min(100% - 28px, 1160px);
  }

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

  .supply-business-header {
    grid-template-columns: 1fr;
    padding: 28px 24px;
  }

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

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

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

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

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

/* =========================
   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;
  }
}


.product-expand-toggle {
  position: absolute;
  z-index: 8;
  right: 10px;
  top: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy);
  box-shadow: 0 10px 24px rgba(12, 33, 66, 0.12);
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition:
    transform 0.14s ease,
    background 0.14s ease,
    color 0.14s ease;
}

.product-expand-toggle:hover {
  transform: translateY(-1px);
  background: var(--navy);
  color: white;
}

.product-expand-toggle svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.product-card:not(.expanded) .product-badge-row {
  right: 58px;
}

.product-card.expanded .product-expand-toggle {
  top: 24px;
  right: 24px;
  width: 38px;
  height: 38px;
  background: var(--navy);
  color: white;
}

.product-expand-toggle:hover {
  transform: translateY(-1px);
  background: var(--navy);
  color: white;
}

.product-expand-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.product-card.expanded .product-expand-toggle {
  background: var(--navy);
  color: white;
}

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

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

/* =========================
   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.08);
  transform-origin: center;
}

.product-card.expanded .product-image-frame,
.product-card.expanded .product-image-frame.has-adaptive-image {
  height: auto !important;
  min-height: 360px;
}

.product-card.expanded .product-image-frame img,
.product-card.expanded .product-image-frame.has-adaptive-image img {
  transform: scale(1.03);
}

.hidden {
  display: none !important;
}
