:root {
  --bg: #f4f5ef;
  --bg-soft: #eceee5;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --line: rgba(29, 67, 82, 0.12);
  --text: #18313c;
  --muted: #5f7a83;
  --accent: #0f95b8;
  --accent-strong: #0b7691;
  --success: #8cf0c5;
  --shadow: 0 20px 50px rgba(44, 64, 73, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Outfit", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(15, 149, 184, 0.1), transparent 30%),
    radial-gradient(circle at bottom right, rgba(15, 149, 184, 0.08), transparent 28%),
    linear-gradient(180deg, #fbfcf8 0%, #f1f3ec 100%);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

img {
  max-width: 100%;
  display: block;
}

.rotate-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(15, 149, 184, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(251, 252, 248, 0.98), rgba(241, 243, 236, 0.98));
}

.rotate-overlay-card {
  width: min(92vw, 460px);
  padding: 28px 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(24, 49, 60, 0.1);
  box-shadow: var(--shadow);
  text-align: center;
}

.rotate-overlay-card h2 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.rotate-overlay-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.rotate-device-icon {
  width: 78px;
  height: 54px;
  margin: 0 auto 18px;
  border: 3px solid var(--accent);
  border-radius: 14px;
  position: relative;
  transform: rotate(-90deg);
}

.rotate-device-icon::before {
  content: "";
  position: absolute;
  right: -10px;
  top: 50%;
  width: 6px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent);
  transform: translateY(-50%);
}

.shell,
.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-content: start;
  position: relative;
  padding-top: 92px;
}

.category-grid,
.category-panel,
.detail-shell {
  grid-column: 1;
}

.category-panel,
.detail-shell,
.admin-panel,
.auth-panel,
.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-panel h1,
.category-panel h2,
.detail-copy h3,
.admin-panel h3 {
  margin: 8px 0 0;
  font-size: clamp(1.5rem, 2vw, 2.15rem);
}

.brand-badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 0.74rem;
}

.auth-meta,
.detail-tabs,
.badge-row,
.panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-subcopy,
.auth-note,
.model-card-copy span,
.spec-item span,
.mini-row span,
.empty-text,
.price-card span {
  color: var(--muted);
}

.ghost-btn,
.detail-tabs button,
.auth-tabs button {
  background: rgba(126, 176, 195, 0.08);
  color: var(--text);
  border: 1px solid rgba(126, 176, 195, 0.16);
  border-radius: 999px;
  padding: 12px 18px;
}

.ghost-btn.small {
  padding: 9px 14px;
}

.primary-btn,
.category-tile,
.model-card {
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #04202d;
  font-weight: 700;
  border-radius: 16px;
  padding: 14px 18px;
}

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

.category-grid.is-immersive {
  min-height: calc(100vh - 48px);
  min-height: calc(100dvh - 48px);
  grid-auto-rows: minmax(0, 1fr);
}

.category-grid.is-immersive .category-tile {
  min-height: calc((100vh - 84px) / 2);
  min-height: calc((100dvh - 84px) / 2);
}

.category-grid.is-compact .category-tile {
  min-height: 230px;
}

.category-tile {
  position: relative;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid rgba(24, 49, 60, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 247, 242, 0.98)),
    rgba(255, 255, 255, 0.9);
  color: var(--text);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.category-tile-media {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 0;
}

.category-tile-media img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.32));
}

.category-tile-media img.is-cutout-on-white {
  mix-blend-mode: multiply;
}

.category-tile-copy {
  display: grid;
  gap: 6px;
}

.category-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: #0f95b8;
  color: #fff;
  box-shadow: 0 10px 18px rgba(15, 149, 184, 0.24);
}

.category-badge.is-new {
  background: linear-gradient(135deg, #ff8f3d 0%, #ffb15d 100%);
  color: #fff;
  box-shadow: 0 12px 22px rgba(255, 143, 61, 0.28);
}

.category-tile.is-selected {
  border-color: rgba(127, 224, 245, 0.52);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(231, 245, 248, 0.98)),
    rgba(127, 224, 245, 0.08);
}

.category-tile strong {
  font-size: clamp(1.35rem, 2.2vw, 2.3rem);
  max-width: 12ch;
}

.view-home .category-tile strong {
  max-width: none;
  white-space: nowrap;
  font-size: clamp(1.1rem, 1.65vw, 1.75rem);
}

.company-levande-interior.view-home .category-tile,
.company-florami.view-home .category-tile {
  position: relative;
}

.company-levande-interior.view-home .category-tile::after,
.company-florami.view-home .category-tile::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.86) 56%, rgba(255, 255, 255, 0.98));
  pointer-events: none;
}

.company-levande-interior.view-home .category-tile-media,
.company-florami.view-home .category-tile-media {
  padding-bottom: 10px;
}

.company-levande-interior.view-home .category-tile-copy,
.company-florami.view-home .category-tile-copy {
  position: relative;
  z-index: 2;
  padding: 2px 6px 0;
}

.tile-kicker {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

.category-panel,
.detail-shell,
.admin-panel,
.auth-panel,
.auth-card {
  border-radius: var(--radius-xl);
}

.category-panel,
.detail-shell,
.admin-panel {
  padding: 22px;
}

.category-panel-fullscreen {
  min-height: calc(100vh - 48px);
  min-height: calc(100dvh - 48px);
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: start;
}

.panel-header-fullscreen {
  padding-right: 88px;
}

.panel-header-minimal {
  align-items: center;
}

.panel-header,
.detail-top,
.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.panel-header p,
.brand-block p {
  margin-bottom: 0;
  max-width: 60ch;
  color: var(--muted);
}

.model-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
  align-content: start;
  min-height: calc(100vh - 220px);
  min-height: calc(100dvh - 220px);
}

.model-card {
  background: rgba(247, 249, 245, 0.96);
  border: 1px solid rgba(24, 49, 60, 0.08);
  border-radius: 20px;
  padding: 18px;
  color: var(--text);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.model-card img {
  width: 100%;
  height: clamp(260px, 48vh, 520px);
  object-fit: contain;
  object-position: center center;
  border-radius: 14px;
}

.model-card-copy {
  display: grid;
  gap: 6px;
  padding: 18px 4px 4px;
}

.model-card-copy strong {
  font-size: clamp(1.2rem, 1.8vw, 1.7rem);
}

.status-banner {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  background: #0f95b8;
  color: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 18px rgba(15, 149, 184, 0.24);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 8px;
  background: rgba(15, 149, 184, 0.12);
  color: var(--accent);
  border: 1px solid rgba(15, 149, 184, 0.2);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 700;
}

.model-card.is-selected,
.category-tile:hover,
.model-card:hover,
.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.28);
}

.model-card.is-selected,
.detail-tabs button.is-active,
.auth-tabs button.is-active {
  border-color: rgba(127, 224, 245, 0.52);
  background: rgba(127, 224, 245, 0.12);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  margin-top: 20px;
}

.detail-shell-fullscreen {
  min-height: calc(100vh - 48px);
  min-height: calc(100dvh - 48px);
}

.detail-top-fullscreen {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 14px;
}

.detail-copy {
  min-width: 0;
}

.detail-tabs {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.detail-nav {
  display: flex;
  align-items: center;
}

.hero-card,
.spec-card,
.environment-card,
.fish-card,
.price-card,
.notes-card {
  background: rgba(247, 249, 245, 0.96);
  border: 1px solid rgba(24, 49, 60, 0.08);
  border-radius: 24px;
}

.hero-card img,
.environment-card img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 24px;
}

.spec-card,
.notes-card {
  padding: 22px;
}

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

.spec-item {
  background: rgba(242, 245, 239, 0.96);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 6px;
}

.soft-badge {
  background: rgba(15, 149, 184, 0.08);
  border: 1px solid rgba(15, 149, 184, 0.14);
  color: var(--accent);
  padding: 10px 14px;
  border-radius: 999px;
}

.color-badge {
  cursor: pointer;
}

.color-badge.is-active {
  background: rgba(15, 149, 184, 0.18);
  border-color: rgba(15, 149, 184, 0.3);
}

.fish-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.fish-section {
  display: grid;
  gap: 18px;
}

.fish-set-switcher {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.fish-panel-switcher {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.fish-card {
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
}

.fish-card-media {
  height: clamp(110px, 16vh, 160px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  padding: 8px;
}

.fish-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  border-radius: 18px;
}

.fish-card div {
  display: grid;
  gap: 2px;
  min-height: 44px;
}

.fish-card strong {
  font-size: 0.92rem;
  line-height: 1.15;
}

.fish-card span {
  font-size: 0.82rem;
}

.saltwater-fish-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.saltwater-coral-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.saltwater-fish-card {
  padding: 8px;
}

.saltwater-fish-card .fish-card-media {
  height: clamp(180px, 28vh, 280px);
  padding: 4px;
}

.saltwater-coral-card {
  padding: 8px;
}

.saltwater-coral-card .fish-card-media {
  height: clamp(220px, 34vh, 340px);
  padding: 4px;
}

.saltwater-fish-card div:empty {
  display: none;
}

.saltwater-coral-card div:empty {
  display: none;
}

.price-layout {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.price-section {
  display: grid;
  gap: 10px;
}

.price-section-title {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}

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

.price-row-months {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-row-months.is-single {
  grid-template-columns: 1fr;
}

.price-row-secondary {
  grid-template-columns: 1fr;
}

.price-row-install {
  grid-template-columns: 1fr;
}

.price-card,
.notes-card {
  padding: 20px;
  min-height: 138px;
}

.price-card-primary {
  min-height: 176px;
}

.price-card strong {
  display: block;
  margin-top: 14px;
  font-size: 1.8rem;
}

.price-highlight {
  background: linear-gradient(145deg, rgba(127, 224, 245, 0.16), rgba(255, 255, 255, 0.05));
}

.price-card-with-note {
  display: grid;
  grid-template-columns: minmax(180px, 0.5fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.price-card-main {
  display: grid;
}

.price-card-note h4 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.price-card-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.admin-panel {
  position: fixed;
  top: 20px;
  right: 20px;
  width: min(420px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  z-index: 20;
}

.admin-panel.is-profile-only {
  width: min(360px, calc(100vw - 40px));
}

.profile-summary {
  margin-top: 18px;
}

.logout-inline {
  width: 100%;
  margin-top: 22px;
}

.global-actions {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 25;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.language-switcher {
  position: relative;
}

.language-trigger {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(24, 49, 60, 0.1);
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.language-flag {
  font-size: 1.3rem;
  line-height: 1;
}

.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 164px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(24, 49, 60, 0.1);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.language-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(126, 176, 195, 0.08);
  border: 1px solid rgba(126, 176, 195, 0.16);
  color: var(--text);
  text-align: left;
}

.language-option.is-active {
  background: rgba(127, 224, 245, 0.12);
  border-color: rgba(127, 224, 245, 0.52);
}

.company-switcher {
  position: fixed;
  top: 18px;
  left: 20px;
  z-index: 24;
  display: flex;
  align-items: center;
  gap: 10px;
}

.company-trigger {
  width: 58px;
  height: 58px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(24, 49, 60, 0.1);
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(18px);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.company-trigger img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.company-trigger.is-active {
  border-color: var(--company-ring, var(--accent));
  box-shadow:
    0 0 0 3px var(--company-ring, var(--accent)),
    var(--shadow);
}

.company-trigger:hover {
  transform: translateY(-1px);
}

.company-trigger[data-company-id="florami"] {
  background: #d98da8;
  border-color: rgba(217, 141, 168, 0.34);
}

.company-trigger[data-company-id="florami"] img {
  transform: scale(0.92);
}

.profile-trigger {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(24, 49, 60, 0.1);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-trigger {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(24, 49, 60, 0.1);
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-trigger-icon {
  position: relative;
  display: block;
  width: 26px;
  height: 24px;
}

.profile-trigger-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 9px;
  height: 9px;
  border: 2px solid var(--accent);
  border-radius: 999px;
  transform: translateX(-50%);
  background: transparent;
}

.profile-trigger-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 20px;
  height: 10px;
  transform: translateX(-50%);
  border: 2px solid var(--accent);
  border-top: 0;
  border-radius: 10px 10px 12px 12px;
}

.icon-nav-btn {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(24, 49, 60, 0.1);
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.bottom-back-btn {
  position: fixed;
  right: 36px;
  bottom: 28px;
  z-index: 26;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(24, 49, 60, 0.1);
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.back-home-arrow {
  font-size: 2.05rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  transform: translateX(-1px);
}

.home-icon {
  position: relative;
  width: 22px;
  height: 20px;
  display: inline-block;
  border: 2px solid var(--accent);
  border-top: 0;
  border-radius: 0 0 5px 5px;
  margin-top: 3px;
}

.home-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -9px;
  width: 14px;
  height: 14px;
  transform: translateX(-50%) rotate(45deg);
  border-left: 2px solid var(--accent);
  border-top: 2px solid var(--accent);
}

.profile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 49, 60, 0.12);
  z-index: 15;
}

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

.invite-form label,
.auth-form label {
  display: grid;
  gap: 8px;
}

.invite-form input,
.invite-form select,
.auth-form input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(24, 49, 60, 0.12);
  background: rgba(247, 249, 245, 0.96);
  color: var(--text);
}

.admin-section {
  margin-top: 26px;
}

.mini-list {
  display: grid;
  gap: 12px;
}

.mini-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(24, 49, 60, 0.08);
  border-radius: 18px;
  padding: 14px;
  background: rgba(247, 249, 245, 0.96);
}

.mini-row.is-static {
  justify-content: flex-start;
}

.empty-category-state {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: center;
  border: 1px solid rgba(24, 49, 60, 0.08);
  border-radius: 24px;
  padding: 20px;
  background: rgba(247, 249, 245, 0.96);
}

.empty-category-state img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.special-gallery-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-content: start;
}

.special-gallery-card {
  background: rgba(247, 249, 245, 0.96);
  border: 1px solid rgba(24, 49, 60, 0.08);
  border-radius: 24px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.special-gallery-card img {
  width: 100%;
  height: clamp(220px, 32vh, 320px);
  object-fit: cover;
  border-radius: 18px;
}

.environment-gallery-grid {
  min-height: calc(100vh - 230px);
  min-height: calc(100dvh - 230px);
}

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

.environment-gallery-grid.count-1 .special-gallery-card img {
  height: min(72vh, 760px);
  object-fit: contain;
}

.environment-gallery-grid.count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.environment-gallery-grid.count-2 .special-gallery-card img {
  height: min(62vh, 620px);
  object-fit: contain;
}

.environment-gallery-grid.count-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.environment-gallery-grid.count-3 .special-gallery-card img {
  height: min(52vh, 460px);
  object-fit: contain;
}

.environment-gallery-grid.count-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.environment-gallery-grid.count-4 .special-gallery-card img {
  height: min(38vh, 340px);
  object-fit: contain;
}

.special-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(24, 49, 60, 0.38);
  display: grid;
  place-items: center;
  z-index: 40;
  padding: 28px;
}

.overview-copy-card,
.factsheet-card p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 1rem;
}

.overview-extra-strip {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.overview-extra-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(24, 49, 60, 0.08);
  background: rgba(247, 249, 245, 0.96);
}

.overview-extra-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.overview-side-strip {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.overview-side-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(24, 49, 60, 0.08);
  background: rgba(247, 249, 245, 0.96);
}

.overview-side-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.overview-copy-card {
  display: grid;
  gap: 14px;
}

.overview-copy-card p {
  margin: 0;
}

.factsheet-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: stretch;
}

.factsheet-card,
.factsheet-preview-card {
  min-height: 100%;
}

.factsheet-open-btn {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.factsheet-switcher {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.factsheet-switcher-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.factsheet-frame {
  width: 100%;
  height: min(72vh, 860px);
  border: 0;
  border-radius: 20px;
  background: #fff;
}

@media (hover: none) and (pointer: coarse) {
  .model-card.is-selected,
  .category-tile:hover,
  .model-card:hover,
  .primary-btn:hover {
    transform: none;
    box-shadow: var(--shadow);
  }

  .ghost-btn,
  .detail-tabs button,
  .auth-tabs button,
  .soft-badge,
  .icon-nav-btn,
  .bottom-back-btn,
  .language-trigger,
  .profile-trigger,
  .home-trigger {
    min-height: 44px;
  }
}

@media (min-width: 768px) and (max-width: 1366px) and (orientation: landscape) {
  .shell,
  .auth-shell {
    padding: 12px 14px 14px;
  }

  .shell {
    gap: 10px;
    padding-top: 72px;
  }

  .global-actions {
    top: 10px;
    right: 14px;
    gap: 8px;
  }

  .company-switcher {
    top: 10px;
    left: 14px;
    gap: 8px;
  }

  .company-trigger {
    width: 48px;
    height: 48px;
    padding: 7px;
  }

  .profile-trigger,
  .language-trigger,
  .home-trigger,
  .icon-nav-btn,
  .bottom-back-btn {
    width: 48px;
    height: 48px;
  }

  .bottom-back-btn {
    right: 26px;
    bottom: 20px;
    width: 66px;
    height: 66px;
  }

  .category-grid {
    gap: 8px;
  }

  .category-grid.is-immersive {
    min-height: calc(100dvh - 18px);
  }

  .category-grid.is-immersive .category-tile {
    min-height: calc((100dvh - 82px) / 2);
  }

  .category-grid.is-compact .category-tile {
    min-height: 210px;
  }

  .category-tile {
    padding: 12px;
    gap: 8px;
    border-radius: 22px;
  }

  .category-badge {
    top: 10px;
    left: 10px;
    padding: 6px 10px;
    font-size: 0.72rem;
  }

  .category-tile strong {
    font-size: clamp(1.08rem, 1.65vw, 1.55rem);
    max-width: none;
  }

  .view-home .category-tile strong {
    white-space: nowrap;
    font-size: clamp(1.12rem, 1.65vw, 1.58rem);
  }

  .tile-kicker {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
  }

  .view-home .category-tile-copy {
    gap: 1px;
    position: relative;
    z-index: 2;
    background: transparent !important;
  }

  .view-home .category-tile {
    padding: 6px 8px 7px;
    gap: 2px;
  }

  .shell.view-home .category-grid.is-immersive {
    min-height: calc(100dvh - 72px);
    height: calc(100dvh - 72px);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    align-content: stretch;
  }

  .shell.view-home .category-grid.is-immersive.is-nine-grid {
    grid-template-rows: repeat(3, minmax(0, 1fr));
    min-height: calc(100dvh - 72px);
    height: calc(100dvh - 72px);
  }

  .shell.view-home .category-grid.is-immersive .category-tile {
    min-height: 0;
    height: 100%;
  }

  .view-home .category-tile-media {
    place-items: center;
    align-items: center;
    padding-bottom: 4px;
  }

  .view-home .category-tile-media img {
    width: auto;
    max-width: 100%;
    height: calc(100% - 4px);
    max-height: calc(100% - 4px);
    object-position: center center;
  }

  .view-home .tile-kicker,
  .view-home .category-tile-copy span:last-child {
    display: none;
  }

  .view-home .category-tile-copy {
    min-height: 0;
    background: transparent !important;
  }

  .view-home .category-tile-copy strong,
  .view-home .category-tile-copy span {
    background: transparent !important;
  }

  .view-home .category-grid.is-nine-grid .category-tile {
    padding: 7px 8px 8px;
  }

  .view-home .category-grid.is-nine-grid .category-tile-media {
    padding-bottom: 2px;
  }

  .view-home .category-grid.is-nine-grid .category-tile strong {
    font-size: clamp(0.95rem, 1.28vw, 1.22rem);
    white-space: normal;
    line-height: 1.05;
  }


  .view-home .category-badge {
    top: 6px;
    left: 6px;
    padding: 5px 9px;
  }

  .view-home .category-badge {
    top: 8px;
    left: 8px;
  }

  .category-panel,
  .detail-shell,
  .admin-panel {
    padding: 14px;
  }

  .category-panel-fullscreen,
  .detail-shell-fullscreen {
    min-height: calc(100dvh - 34px);
  }

  .panel-header-fullscreen {
    padding-right: 68px;
  }

  .panel-header,
  .detail-top,
  .admin-head {
    gap: 12px;
  }

  .auth-panel h1,
  .category-panel h2,
  .detail-copy h3,
  .admin-panel h3 {
    font-size: clamp(1.22rem, 1.8vw, 1.7rem);
  }

  .ghost-btn,
  .detail-tabs button,
  .auth-tabs button {
    padding: 10px 15px;
  }

  .model-strip {
    gap: 10px;
    margin-top: 10px;
    min-height: calc(100dvh - 142px);
  }

  .model-card {
    padding: 12px;
    border-radius: 18px;
  }

  .model-card img {
    height: clamp(180px, 28dvh, 280px);
  }

  .model-card-copy {
    gap: 3px;
    padding: 8px 2px 2px;
  }

  .model-card-copy strong {
    font-size: clamp(0.96rem, 1.3vw, 1.2rem);
    line-height: 1.12;
  }

  .model-card-copy span {
    font-size: 0.82rem;
  }

  .status-banner {
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    font-size: 0.72rem;
  }

  .detail-top-fullscreen {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
  }

  .detail-grid {
    grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
    gap: 14px;
    margin-top: 14px;
    align-items: start;
  }

  .hero-card img,
  .environment-card img {
    max-height: calc(100dvh - 220px);
  }

  .spec-card,
  .notes-card {
    padding: 18px;
  }

  .spec-grid {
    gap: 10px;
  }

  .spec-item {
    padding: 14px;
  }

  .badge-row,
  .detail-tabs,
  .panel-actions,
  .fish-set-switcher,
  .fish-panel-switcher {
    gap: 10px;
  }

  .fish-section {
    gap: 12px;
  }

  .fish-grid {
    margin-top: 8px;
    gap: 10px;
  }

  .fish-card {
    padding: 8px;
    gap: 6px;
  }

  .fish-card-media {
    height: clamp(100px, 14.5dvh, 136px);
    padding: 6px;
    border-radius: 18px;
  }

  .fish-card img {
    border-radius: 16px;
  }

  .fish-card div {
    min-height: 38px;
  }

  .fish-card strong {
    font-size: 0.88rem;
  }

  .fish-card span {
    font-size: 0.78rem;
  }

  .saltwater-fish-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .saltwater-fish-card .fish-card-media {
    height: clamp(150px, 24dvh, 220px);
    padding: 4px;
  }

  .saltwater-coral-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .saltwater-coral-card .fish-card-media {
    height: clamp(190px, 30dvh, 290px);
  }

  .price-layout {
    gap: 12px;
    margin-top: 14px;
  }

  .price-section {
    gap: 8px;
  }

  .price-section-title {
    font-size: 0.96rem;
  }

  .price-row {
    gap: 12px;
  }

  .price-row-months {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .price-row-months.is-single {
    grid-template-columns: 1fr;
  }

  .price-row-secondary {
    grid-template-columns: 1fr;
  }

  .price-card,
  .notes-card {
    min-height: 116px;
    padding: 16px;
  }

  .price-card-primary {
    min-height: 156px;
  }

  .price-card strong {
    margin-top: 10px;
    font-size: 1.45rem;
  }

  .special-gallery-grid {
    margin-top: 14px;
    gap: 14px;
  }

  .special-gallery-card {
    padding: 10px;
    border-radius: 20px;
  }

  .special-gallery-card img {
    height: clamp(180px, 27dvh, 260px);
    border-radius: 16px;
  }

  .environment-gallery-grid {
    min-height: calc(100dvh - 200px);
  }

  .environment-gallery-grid.count-1 .special-gallery-card img {
    height: min(70dvh, 700px);
  }

  .environment-gallery-grid.count-2 .special-gallery-card img {
    height: min(58dvh, 520px);
  }

  .environment-gallery-grid.count-3 .special-gallery-card img {
    height: min(46dvh, 380px);
  }

  .environment-gallery-grid.count-4 .special-gallery-card img {
    height: min(34dvh, 280px);
  }

  .special-lightbox {
    padding: 18px;
  }

  .special-lightbox-inner {
    width: min(95vw, 1240px);
    height: min(90dvh, 860px);
    padding: 18px;
  }

  .special-lightbox-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }

  .admin-panel {
    top: 14px;
    right: 18px;
    width: min(380px, calc(100vw - 36px));
    max-height: calc(100dvh - 28px);
  }

  .admin-panel.is-profile-only {
    width: min(330px, calc(100vw - 36px));
  }
}

.special-lightbox-inner {
  position: relative;
  width: min(92vw, 1400px);
  height: min(88vh, 920px);
  background: rgba(255, 255, 255, 0.98);
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.special-lightbox-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.special-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(24, 49, 60, 0.12);
  color: var(--accent);
  font-size: 1.8rem;
  line-height: 1;
}

.auth-shell {
  display: grid;
  place-items: center;
}

.auth-panel {
  width: min(1180px, 100%);
  padding: 26px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
}

.brand-block {
  display: grid;
  align-content: center;
  gap: 20px;
  padding: 28px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(24, 49, 60, 0.2)),
    url("../public_assets/ppt-media/image5.jpeg") center/contain no-repeat,
    #f4f5ef;
}

.brand-block h1 {
  max-width: 12ch;
}

.auth-meta {
  flex-wrap: wrap;
}

.auth-meta span {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 10px 14px;
}

.auth-card {
  padding: 22px;
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

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

  .model-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: auto;
  }

  .fish-grid,
  .price-layout,
  .detail-grid,
  .auth-panel {
    grid-template-columns: 1fr;
  }

  .fish-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .detail-top-fullscreen {
    grid-template-columns: 1fr;
  }

  .notes-card {
    grid-column: auto;
  }
}

@media (max-width: 820px) {
  .shell,
  .auth-shell {
    padding: 14px;
  }

  .panel-header,
  .detail-top {
    flex-direction: column;
  }

  .panel-header-fullscreen {
    padding-right: 0;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .category-grid.is-immersive {
    min-height: auto;
  }

  .category-grid.is-immersive .category-tile {
    min-height: 260px;
  }

  .model-strip {
    grid-template-columns: 1fr;
  }

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

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

body.has-image-viewer {
  overflow: hidden;
}

.special-lightbox {
  inset: 0;
  z-index: 120;
  grid-template-rows: auto 1fr;
  place-items: stretch;
  padding: 18px 18px 24px;
  background:
    radial-gradient(circle at top left, rgba(15, 149, 184, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(251, 252, 248, 0.98), rgba(241, 243, 236, 0.99));
}

.special-lightbox-bar {
  display: flex;
  align-items: center;
  padding-bottom: 12px;
}

.special-lightbox-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(24, 49, 60, 0.12);
  box-shadow: var(--shadow);
  color: var(--accent);
  font-weight: 700;
}

.special-lightbox-back-arrow {
  font-size: 1.5rem;
  line-height: 1;
}

.special-lightbox-stage {
  min-height: 0;
  display: grid;
}

.special-lightbox-inner {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(24, 49, 60, 0.08);
  padding: 18px;
}

.special-lightbox-inner img {
  width: 100%;
  height: 100%;
  max-height: calc(100dvh - 132px);
  object-fit: contain;
}

@media (max-width: 1180px) {
  .special-lightbox {
    padding: 14px 14px 18px;
  }

  .special-lightbox-inner {
    border-radius: 26px;
    padding: 14px;
  }

  .special-lightbox-inner img {
    max-height: calc(100dvh - 118px);
  }
}
