:root {
  --producer-bg: #fbf7f2;
  --producer-surface: #ffffff;
  --producer-text: #221816;
  --producer-muted: #756763;
  --producer-brand: #8f1f1f;
  --producer-brand-dark: #5f1212;
  --producer-brand-soft: #fff0e8;
  --producer-line: #eadbd2;
  --producer-shadow: 0 18px 45px rgba(64, 28, 20, 0.12);
}

* { box-sizing: border-box; }
html { background: var(--producer-bg); }
body.producer-public-page {
  margin: 0;
  min-width: 0;
  color: var(--producer-text);
  background:
    radial-gradient(circle at top left, #ffe4d6 0, transparent 34rem),
    linear-gradient(180deg, #fffaf5 0%, var(--producer-bg) 48%, #f7efe8 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

.producer-page-main { padding: 24px 18px 48px; }
.producer-page-wrap { width: min(1180px, 100%); margin: 0 auto; }
.producer-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--producer-muted);
  font-size: 0.92rem;
}
.producer-breadcrumb a { color: var(--producer-brand-dark); font-weight: 850; text-decoration: none; }
.producer-breadcrumb a:hover, .producer-breadcrumb a:focus-visible { text-decoration: underline; }

.producer-profile {
  overflow: hidden;
  border: 1px solid var(--producer-line);
  border-radius: 28px;
  background: var(--producer-surface);
  box-shadow: var(--producer-shadow);
}
.producer-profile-banner-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 8 / 3;
  min-height: 220px;
  max-height: 440px;
  overflow: hidden;
  background: #eadbd2;
}
.producer-profile-banner {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.producer-profile-banner-placeholder {
  position: absolute;
  inset: auto 18px 18px 18px;
  width: fit-content;
  max-width: calc(100% - 36px);
  padding: 10px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(34, 24, 22, 0.76);
  backdrop-filter: blur(8px);
  font-weight: 850;
}
.producer-profile-content { padding: clamp(20px, 4vw, 38px); }
.producer-profile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.producer-profile-heading { min-width: 0; }
.producer-profile-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.producer-profile-eyebrow span {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--producer-brand-dark);
  background: var(--producer-brand-soft);
  font-size: 0.82rem;
  font-weight: 900;
}
.producer-profile h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: clamp(2rem, 6vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.055em;
  overflow-wrap: anywhere;
}
.producer-trusted {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid #d7b96a;
  border-radius: 999px;
  background: #fff8dc;
}
.producer-trusted img { display: block; width: 23px; height: 23px; }
.producer-type { margin: 10px 0 0; color: var(--producer-muted); font-size: 1.05rem; }
.producer-profile-logo-wrap {
  flex: 0 0 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 130px;
  padding: 14px;
  border: 1px solid var(--producer-line);
  border-radius: 22px;
  background: #fffdfb;
}
.producer-profile-logo { display: block; max-width: 100%; max-height: 115px; object-fit: contain; }

.producer-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
}
.producer-action-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--producer-line);
  border-radius: 999px;
  color: var(--producer-text);
  background: #fff;
  box-shadow: 0 8px 18px rgba(64, 28, 20, 0.08);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.producer-action-button:hover, .producer-action-button:focus-visible {
  transform: translateY(-1px);
  border-color: #d5b7a8;
  background: #fffaf6;
  outline: none;
}
.producer-action-button img { width: 19px; height: 19px; object-fit: contain; }
.producer-action-button strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 25px;
  min-height: 25px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #fff;
  background: var(--producer-brand);
  font-size: 0.78rem;
}
.producer-action-button.is-liked, .producer-action-button.is-copied {
  border-color: #b7cbb9;
  background: #eff8f0;
  color: #355a3a;
}
.producer-action-button:disabled { cursor: default; opacity: 0.84; transform: none; }

.producer-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  gap: 26px;
  align-items: start;
}
.producer-profile-main-column, .producer-profile-side-column { min-width: 0; }
.producer-profile-side-column { display: grid; gap: 14px; }
.producer-section {
  padding: 0 0 24px;
  margin: 0 0 24px;
  border-bottom: 1px solid var(--producer-line);
}
.producer-section:last-child { margin-bottom: 0; border-bottom: 0; }
.producer-section h2, .producer-info-card h2 {
  margin: 0 0 12px;
  color: var(--producer-text);
  font-size: 1.18rem;
  letter-spacing: -0.025em;
}
.producer-section p { margin: 0; color: #463633; white-space: normal; overflow-wrap: anywhere; }
.producer-section p + p { margin-top: 12px; }
.producer-seasonal-section h2 { display: flex; align-items: center; gap: 8px; }
.producer-seasonal-section h2 img { width: 23px; height: 23px; }
.producer-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.producer-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid #efd6ca;
  border-radius: 999px;
  color: var(--producer-brand-dark);
  background: #fff6f1;
  font-size: 0.85rem;
  font-weight: 900;
  text-decoration: none;
}
a.producer-chip:hover, a.producer-chip:focus-visible { background: #ffebe0; outline: none; }
.producer-info-card {
  padding: 18px;
  border: 1px solid var(--producer-line);
  border-radius: 20px;
  background: #fffdfb;
  box-shadow: 0 10px 24px rgba(64, 28, 20, 0.06);
}
.producer-info-row { display: grid; gap: 4px; }
.producer-info-row + .producer-info-row { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--producer-line); }
.producer-info-row strong { font-size: 0.8rem; color: var(--producer-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.producer-info-row a, .producer-text-link { color: var(--producer-brand-dark); font-weight: 850; text-decoration: none; overflow-wrap: anywhere; }
.producer-info-row a:hover, .producer-info-row a:focus-visible, .producer-text-link:hover, .producer-text-link:focus-visible { text-decoration: underline; }
.producer-link-list { display: grid; gap: 8px; }
.producer-link-list a, .producer-link-list span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 8px 11px;
  border-radius: 12px;
  color: var(--producer-brand-dark);
  background: #fff4ee;
  font-weight: 850;
  text-decoration: none;
}
.producer-link-list a:hover, .producer-link-list a:focus-visible { background: #ffe7dc; outline: none; }
.producer-primary-button, .producer-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--producer-brand), var(--producer-brand-dark));
  box-shadow: 0 12px 26px rgba(95, 18, 18, 0.2);
  font-weight: 900;
  text-decoration: none;
}
.producer-secondary-button {
  margin-top: 16px;
  color: var(--producer-brand-dark);
  background: #f8e9e1;
  box-shadow: none;
}
.producer-homepage-button { width: 100%; text-align: center; }
.producer-primary-button:hover, .producer-primary-button:focus-visible { filter: brightness(1.05); outline: none; }
.producer-social-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.producer-social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #dcc385;
  border-radius: 12px;
  color: #60470e;
  background: linear-gradient(135deg, #fff9d9, #f0d47f);
  font-size: 0.83rem;
  font-weight: 900;
  text-decoration: none;
}
.producer-social-link.is-secondary {
  border-color: #c8ccd1;
  color: #444b52;
  background: linear-gradient(135deg, #fff, #dfe3e7);
}
.producer-social-link img { flex: 0 0 auto; width: 20px; height: 20px; }
.producer-social-link span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.producer-directory-note, .producer-updated { margin: 0; color: var(--producer-muted); font-size: 0.86rem; }
.producer-updated { text-align: right; }
.producer-not-found {
  max-width: 760px;
  margin: 44px auto;
  padding: 28px;
  border: 1px solid var(--producer-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--producer-shadow);
  text-align: center;
}
.producer-not-found h1 { margin: 0 0 10px; font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -0.05em; }
.producer-not-found p { margin: 0 0 22px; color: var(--producer-muted); }
.producer-page-footer { padding: 4px 18px 34px; color: var(--producer-muted); text-align: center; font-size: 0.88rem; }
.producer-page-footer a { color: var(--producer-brand-dark); font-weight: 800; text-decoration: none; }
.producer-page-footer div + div { margin-top: 4px; }


.producer-gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.producer-gallery-item {
  appearance: none;
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--producer-line);
  border-radius: 14px;
  background: #f3ece7;
  box-shadow: 0 8px 20px rgba(64, 28, 20, 0.08);
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.producer-gallery-item:hover,
.producer-gallery-item:focus-visible {
  z-index: 2;
  transform: translateY(-3px) scale(1.025);
  border-color: #cda99a;
  box-shadow: 0 14px 30px rgba(64, 28, 20, 0.18);
  outline: none;
}
.producer-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.producer-gallery-item-caption {
  position: absolute;
  inset: auto 0 0;
  padding: 24px 9px 8px;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(12, 8, 7, 0.84));
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.producer-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(28, 23, 21, 0.72);
  backdrop-filter: blur(8px);
}
.producer-gallery-lightbox[hidden] { display: none; }
.producer-gallery-modal {
  display: flex;
  flex-direction: column;
  width: min(1400px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.48);
}
.producer-gallery-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 88px;
  padding: 17px 20px 17px 26px;
  border-bottom: 1px solid #ebe4df;
  background: #fff;
}
.producer-gallery-modal-heading {
  min-width: 0;
}
.producer-gallery-modal-heading > span {
  display: block;
  margin-bottom: 2px;
  color: var(--producer-muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.producer-gallery-modal-heading h2 {
  margin: 0;
  color: #2a2321;
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.producer-gallery-lightbox-close {
  appearance: none;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid #ded6d1;
  border-radius: 999px;
  color: #322b29;
  background: #f8f5f3;
  font: inherit;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.producer-gallery-lightbox-close:hover,
.producer-gallery-lightbox-close:focus-visible {
  transform: scale(1.05);
  background: #eee8e4;
  outline: 3px solid rgba(143,31,31,.2);
}
.producer-gallery-modal-body {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 0;
  height: min(760px, calc(100vh - 136px));
}
.producer-gallery-modal-thumbs {
  min-width: 0;
  overflow-y: auto;
  padding: 16px;
  border-right: 1px solid #e8dfda;
  background: #f8f5f3;
  scrollbar-width: thin;
}
.producer-gallery-modal-thumb {
  appearance: none;
  display: block;
  width: 100%;
  margin: 0 0 11px;
  padding: 3px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  box-shadow: 0 5px 14px rgba(46,31,25,.08);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.producer-gallery-modal-thumb:last-child { margin-bottom: 0; }
.producer-gallery-modal-thumb:hover,
.producer-gallery-modal-thumb:focus-visible {
  transform: translateY(-1px);
  border-color: #cbb7ad;
  outline: none;
}
.producer-gallery-modal-thumb.is-active,
.producer-gallery-modal-thumb[aria-current="true"] {
  border-color: #376ee6;
  box-shadow: 0 0 0 2px rgba(55,110,230,.16), 0 8px 18px rgba(46,31,25,.14);
}
.producer-gallery-modal-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.producer-gallery-modal-stage {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 28px 70px;
  background: #111;
}
.producer-gallery-modal-stage > img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 5px;
  box-shadow: 0 18px 55px rgba(0,0,0,.34);
}
.producer-gallery-modal-arrow {
  appearance: none;
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  padding: 0 0 4px;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 999px;
  color: #fff;
  background: rgba(20,20,20,.66);
  font: inherit;
  font-size: 2.35rem;
  line-height: 1;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.producer-gallery-modal-arrow:hover,
.producer-gallery-modal-arrow:focus-visible {
  transform: scale(1.06);
  background: rgba(20,20,20,.9);
  outline: 3px solid rgba(255,255,255,.24);
}
.producer-gallery-modal-arrow.is-previous { left: 16px; }
.producer-gallery-modal-arrow.is-next { right: 16px; }
.producer-gallery-modal-counter {
  position: absolute;
  right: 16px;
  bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0,0,0,.58);
  font-size: .82rem;
  font-weight: 900;
}
.producer-gallery-lightbox.has-single-image .producer-gallery-modal-arrow,
.producer-gallery-lightbox.has-single-image .producer-gallery-modal-counter { display: none; }
body.producer-gallery-open { overflow: hidden; }

@media (max-width: 820px) {
  .producer-page-main { padding: 14px 10px 34px; }
  .producer-profile { border-radius: 20px; }
  /* Mobiilissa bannerin koko kuva näytetään ilman sivujen rajautumista. */
  .producer-profile-banner-wrap {
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
  }
  .producer-profile-banner {
    width: 100%;
    height: auto;
    object-fit: contain;
  }
  .producer-profile-content { padding: 18px 15px 24px; }
  .producer-profile-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .producer-profile-logo-wrap { width: 105px; min-height: 82px; padding: 8px; border-radius: 16px; }
  .producer-profile-logo { max-height: 74px; }
  .producer-profile h1 { font-size: clamp(1.8rem, 9vw, 3rem); }
  .producer-trusted { width: 34px; height: 34px; }
  .producer-trusted img { width: 19px; height: 19px; }
  .producer-profile-grid { grid-template-columns: 1fr; gap: 8px; }
  .producer-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .producer-gallery-lightbox { padding: 10px; }
  .producer-gallery-modal { max-height: calc(100vh - 20px); border-radius: 17px; }
  .producer-gallery-modal-header { min-height: 76px; padding: 13px 14px 13px 18px; }
  .producer-gallery-lightbox-close { width: 42px; height: 42px; }
  .producer-gallery-modal-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; height: calc(100vh - 96px); }
  .producer-gallery-modal-stage { grid-row: 1; padding: 18px 54px; }
  .producer-gallery-modal-thumbs {
    grid-row: 2;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 104px;
    gap: 9px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px;
    border-top: 1px solid #e8dfda;
    border-right: 0;
  }
  .producer-gallery-modal-thumb { width: 104px; margin: 0; }
  .producer-profile-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .producer-action-button { min-width: 0; padding: 8px 7px; font-size: 0.78rem; }
  .producer-action-button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .producer-action-button strong { min-width: 22px; min-height: 22px; padding: 2px 5px; }
  .producer-profile-side-column { gap: 10px; }
  .producer-updated { text-align: left; }
}

@media (max-width: 520px) {
  .producer-profile-header { grid-template-columns: 1fr; }
  .producer-profile-logo-wrap { width: 130px; justify-self: start; }
  .producer-profile-actions { grid-template-columns: 1fr; }
  .producer-action-button { justify-content: flex-start; padding-inline: 13px; font-size: 0.88rem; }
  .producer-social-links { grid-template-columns: 1fr; }
  .producer-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .producer-gallery-lightbox { padding: 0; }
  .producer-gallery-modal { width: 100%; max-height: 100vh; min-height: 100vh; border: 0; border-radius: 0; }
  .producer-gallery-modal-header { min-height: 72px; padding: 11px 12px 11px 15px; }
  .producer-gallery-modal-heading > span { font-size: .68rem; }
  .producer-gallery-modal-heading h2 { font-size: .98rem; }
  .producer-gallery-modal-body { height: calc(100vh - 72px); }
  .producer-gallery-modal-stage { padding: 14px 45px; }
  .producer-gallery-modal-arrow { width: 40px; height: 40px; margin-top: -20px; font-size: 2rem; }
  .producer-gallery-modal-arrow.is-previous { left: 6px; }
  .producer-gallery-modal-arrow.is-next { right: 6px; }
  .producer-gallery-modal-thumbs { grid-auto-columns: 88px; }
  .producer-gallery-modal-thumb { width: 88px; }
  .producer-profile-banner-placeholder { inset: auto 10px 10px 10px; max-width: calc(100% - 20px); border-radius: 14px; font-size: 0.78rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
