:root {
  --blue: #0563c8;
  --blue-dark: #024d9f;
  --ink: #152033;
  --muted: #68758a;
  --line: #dce3ec;
  --surface: #ffffff;
  --soft: #f5f7fa;
  --shadow: 0 12px 32px rgba(20, 37, 63, .12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
.site-header {
  height: 72px;
  padding: 0 clamp(18px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(255,255,255,.15);
  background: var(--blue-dark);
  color: white;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(18px, 2vw, 23px);
  letter-spacing: -.02em;
}
.brand-mark { font-size: 24px; }
.brand strong { font-weight: 800; }
.login-button {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 9px;
  font-weight: 700;
  transition: background .18s ease, transform .18s ease;
}
.login-button:hover { background: rgba(255,255,255,.12); transform: translateY(-1px); }
.login-button svg { width: 20px; height: 20px; fill: currentColor; }
.hero {
  padding: clamp(56px, 9vw, 116px) 20px;
  background:
    radial-gradient(circle at 82% 16%, rgba(255,255,255,.14), transparent 28%),
    linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: white;
}
.hero-inner { width: min(1020px, 100%); margin: 0 auto; text-align: center; }
.eyebrow, .section-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0 auto;
  max-width: 850px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -.045em;
}
.hero-copy {
  max-width: 760px;
  margin: 20px auto 30px;
  color: rgba(255,255,255,.82);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.6;
}
.hero-search {
  width: min(800px, 100%);
  min-height: 62px;
  margin: 0 auto;
  padding: 6px 6px 6px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0,0,0,.18);
}
.hero-search svg { width: 24px; height: 24px; fill: #63758a; flex: 0 0 auto; }
.hero-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-size: 17px;
}
.hero-search button {
  align-self: stretch;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: var(--blue);
  font-weight: 800;
  cursor: pointer;
}
.catalog { width: min(1500px, 100%); margin: 0 auto; padding: 42px clamp(16px, 3vw, 42px) 64px; }
.catalog-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.section-kicker { color: var(--blue); }
.catalog h2 { margin: 0; font-size: clamp(25px, 3vw, 36px); letter-spacing: -.025em; }
.result-count { color: var(--muted); font-size: 14px; white-space: nowrap; }
.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 10px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}
.filters label { display: grid; gap: 5px; }
.filters label span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.filters select {
  width: 100%;
  height: 42px;
  padding: 0 34px 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: white;
}
.clear-filters {
  align-self: end;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--blue-dark);
  background: white;
  font-weight: 700;
  cursor: pointer;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.photo-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  box-shadow: 0 3px 14px rgba(31,48,72,.06);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.photo-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.photo-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e9eef4;
}
.photo-frame img { width: 100%; height: 100%; display: block; object-fit: cover; user-select: none; }
.preview-mark {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 7px;
  border-radius: 999px;
  color: white;
  background: rgba(12,29,51,.68);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
}
.photo-meta { padding: 11px 12px 12px; }
.photo-title {
  margin: 0 0 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.photo-author {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.empty-state {
  padding: 60px 20px;
  display: grid;
  gap: 6px;
  place-items: center;
  text-align: center;
  color: var(--muted);
}
.empty-state strong { color: var(--ink); font-size: 18px; }
.load-more-wrap { display: flex; justify-content: center; padding-top: 28px; }
.load-more {
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--blue);
  border-radius: 10px;
  color: var(--blue);
  background: white;
  font-weight: 800;
  cursor: pointer;
}
.photo-dialog {
  width: min(1000px, calc(100vw - 30px));
  max-height: calc(100dvh - 30px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
}
.photo-dialog::backdrop { background: rgba(4,16,31,.72); }
.photo-dialog[open] { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, .75fr); }
.dialog-preview { min-height: 360px; display: grid; place-items: center; background: #101722; }
.dialog-preview img { width: 100%; height: 100%; max-height: 78dvh; object-fit: contain; user-select: none; }
.dialog-info { padding: 34px 28px; display: flex; flex-direction: column; justify-content: center; }
.dialog-info h2 { margin: 5px 0 8px; overflow-wrap: anywhere; font-size: 25px; }
.dialog-info p { color: var(--muted); line-height: 1.55; }
.preview-badge { margin: 0 !important; color: var(--blue) !important; font-size: 11px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.dialog-note { margin-top: 24px; font-size: 13px; }
.dialog-login { margin-top: 10px; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: white; background: var(--blue); font-weight: 800; }
.dialog-close {
  position: absolute;
  right: 12px;
  top: 10px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  color: var(--ink);
  font-size: 25px;
  cursor: pointer;
}
.site-footer {
  min-height: 72px;
  padding: 18px clamp(18px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #7b8798;
  background: #111b29;
  font-size: 13px;
}
@media (max-width: 900px) {
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clear-filters { width: 100%; }
  .photo-dialog[open] { grid-template-columns: 1fr; overflow-y: auto; }
  .dialog-preview { min-height: 260px; max-height: 52dvh; }
  .dialog-info { padding: 24px 20px; }
}
@media (max-width: 600px) {
  .site-header { height: 62px; padding: 0 14px; }
  .brand strong { display: none; }
  .login-button { min-height: 38px; padding: 0 12px; }
  .hero { padding: 46px 14px 50px; }
  .hero-search { min-height: 56px; padding-left: 14px; gap: 8px; }
  .hero-search button { padding: 0 14px; }
  .catalog { padding: 28px 10px 48px; }
  .catalog-head { align-items: start; flex-direction: column; gap: 7px; }
  .filters { grid-template-columns: 1fr 1fr; padding: 10px; }
  .clear-filters { grid-column: 1 / -1; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .photo-meta { padding: 8px 9px 9px; }
  .site-footer { align-items: flex-start; flex-direction: column; }
}

/* ===== Public Fotobanka v2 ===== */
.brand-nav { display:flex; align-items:center; gap:14px; min-width:0; }
.app-brand, .bank-brand { display:inline-flex; align-items:center; text-decoration:none; }
.header-logo {
  display:block;
  width:auto;
  object-fit:contain;
  background:transparent;
  border-radius:0;
}
.header-logo-desktop { height:56px; }
.header-logo-photobank { height:52px; }
.bank-brand { opacity:.96; }
.bank-brand:hover { opacity:1; }
.login-button { border:0; cursor:pointer; font:inherit; }
.photo-meta { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.photo-meta-text { min-width:0; }
.photo-number { margin:4px 0 0; color:var(--muted); font-size:12px; font-weight:700; letter-spacing:.02em; }
.photo-buy {
  flex:0 0 auto; min-height:34px; padding:7px 12px; border:0; border-radius:8px;
  background:var(--blue); color:#fff; font:inherit; font-size:13px; font-weight:800; cursor:pointer;
}
.photo-buy:hover { background:var(--blue-dark); }
.dialog-login { border:0; cursor:pointer; font:inherit; padding:0 18px; }

.form-dialog {
  width:min(480px, calc(100vw - 28px)); max-height:calc(100dvh - 28px); padding:0;
  border:1px solid var(--line); border-radius:16px; background:#fff; color:var(--ink);
  box-shadow:0 28px 80px rgba(12,32,58,.28); overflow:auto;
}
.form-dialog::backdrop { background:rgba(4,16,31,.62); backdrop-filter:blur(2px); }
.form-dialog .dialog-close { position:sticky; top:8px; float:right; margin:8px 8px -52px 0; z-index:2; }
.dialog-form { padding:30px; display:grid; gap:16px; }
.dialog-form h2 { margin:0 38px 2px 0; font-size:24px; }
.dialog-form label { display:grid; gap:6px; color:var(--ink); font-size:13px; font-weight:700; }
.dialog-form input {
  width:100%; min-height:44px; box-sizing:border-box; border:1px solid var(--line); border-radius:9px;
  padding:10px 12px; background:#fff; color:var(--ink); font:inherit; font-weight:400;
}
.dialog-form input:focus { outline:2px solid rgba(5,99,200,.2); border-color:var(--blue); }
.primary-action { min-height:46px; border:0; border-radius:10px; background:var(--blue); color:#fff; font:inherit; font-weight:800; cursor:pointer; }
.primary-action:hover { background:var(--blue-dark); }
.form-status { min-height:18px; color:var(--muted); font-size:13px; line-height:1.45; }

.purchase-dialog { width:min(620px, calc(100vw - 28px)); }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.form-grid .span-2 { grid-column:1 / -1; }
.payment-methods { margin:0; padding:14px; border:1px solid var(--line); border-radius:10px; display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.payment-methods legend { padding:0 6px; font-weight:800; }
.payment-methods label { display:flex; align-items:center; gap:8px; min-height:36px; cursor:pointer; }
.payment-methods input { width:auto; min-height:0; }

@media (max-width: 720px) {
  /* Match the Desktop logo start: 12px edge + 36px menu + 8px gap = 56px. */
  .site-header { gap:10px; padding-left:56px; padding-right:12px; }
  .brand-nav { gap:7px; }
  .header-logo-desktop { height:48px; }
  .header-logo-photobank { height:44px; }
  .login-button { padding:8px 10px; font-size:13px; }
  .login-button svg { display:none; }
  .form-grid, .payment-methods { grid-template-columns:1fr; }
  .form-grid .span-2 { grid-column:auto; }
  .dialog-form { padding:24px 18px 20px; }
}
@media (max-width: 420px) {
  .header-logo-desktop { height:42px; }
  .header-logo-photobank { height:38px; max-width:92px; }
}

/* Embedded Photo Library view inside the FullCator browser shell. */
body.fc-embed .site-header,
body.fc-embed .hero {
  display: none;
}
body.fc-embed main {
  min-height: 100vh;
}
body.fc-embed .catalog {
  padding-top: 18px;
}

/* ===== Public Fotobanka v3 — unified with the new FullCator PL layout ===== */
.pl-header {
  height:auto;
  min-height:0;
  padding:14px clamp(18px,3vw,42px) 16px;
  display:block;
  background:linear-gradient(180deg,#4285F4 0%,#041C56 100%);
  color:#fff;
  box-shadow:none;
}
.pl-header-row {
  width:min(1500px,100%);
  margin:0 auto;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:18px;
}
.pl-header-title {
  min-width:0;
  text-align:center;
  color:#fff;
  font:700 24px/1.1 Arial,sans-serif;
}
.pl-header .login-button {
  color:#fff;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.34);
}
.pl-header .login-button:hover { background:rgba(255,255,255,.22); }
.pl-search {
  width:min(1100px,100%);
  min-height:50px;
  margin:14px auto 0;
  padding:4px 5px 4px 15px;
  border-radius:8px;
  box-shadow:none;
}
.pl-search input { font-size:16px; }
.pl-search button { min-width:112px; border-radius:6px; }
.pl-main { min-height:calc(100dvh - 150px); background:#F5F6F8; }
.pl-main .catalog {
  width:min(1500px,100%);
  padding:24px clamp(14px,2.4vw,34px) 48px;
}
.pl-main .catalog-head { margin-bottom:16px; }
.pl-main .filters {
  margin-bottom:18px;
  padding:10px;
  border-radius:10px;
  background:#fff;
}
.pl-main .gallery {
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
}
.pl-main .photo-card { border-radius:10px; box-shadow:none; }
body.fc-embed .pl-header { display:none!important; }
body.fc-embed .pl-main { min-height:100vh; }
body.fc-embed .pl-main .catalog { padding-top:18px; }

@media (max-width:1100px) {
  .pl-main .gallery { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (max-width:820px) {
  .pl-header { padding:10px 12px 12px; }
  .pl-header-row { gap:10px; }
  .pl-header-title { font-size:20px; }
  .header-logo-desktop { height:46px; }
  .header-logo-photobank { height:42px; }
  .pl-main .gallery { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:600px) {
  .pl-header { padding:8px 10px 10px; }
  .pl-header-row { grid-template-columns:minmax(0,1fr) auto; }
  .pl-header-title { display:none; }
  .brand-nav { gap:6px; }
  .header-logo-desktop { height:40px; }
  .header-logo-photobank { height:36px; max-width:88px; }
  .pl-header .login-button { min-height:36px; padding:0 9px; font-size:12px; }
  .pl-search { min-height:44px; margin-top:8px; padding-left:10px; }
  .pl-search svg { width:20px; height:20px; }
  .pl-search input { font-size:14px; }
  .pl-search button { min-width:76px; padding:0 10px; font-size:13px; }
  .pl-main .catalog { padding:14px 8px 32px; }
  .pl-main .catalog-head { margin-bottom:10px; }
  .pl-main .catalog h2 { font-size:22px; }
  .pl-main .filters { grid-template-columns:1fr 1fr; gap:7px; margin-bottom:10px; padding:8px; }
  .pl-main .gallery { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .site-footer { display:none; }
}

/* ===== PL standalone shell chrome v7: desktop = FCDB, mobile = FCMA ===== */
.pl-shell-chrome{position:relative;width:100%;height:138.66px;min-height:138.66px;box-sizing:border-box;overflow:visible;background:linear-gradient(180deg,#4285F4 0%,#041C56 100%)}
.pl-fcdb-bg{display:block;position:absolute;inset:0 0 auto 0;width:100%;height:138.66px;object-fit:fill;pointer-events:none;user-select:none;z-index:0}
.pl-fcma-art{display:none}
.pl-shell-toprow,.pl-shell-searchrow{position:absolute;left:0;width:100%;padding:0;margin:0;background:transparent;z-index:2}
.pl-shell-toprow{top:0;height:63px}
.pl-shell-icon{position:absolute;top:12.88px;width:66.66px;height:50.01px;min-width:0;margin:0;padding:0;border:0;border-radius:5.5px;background:rgba(254,254,254,.40);box-shadow:none;text-decoration:none;display:flex;align-items:center;justify-content:center;font:700 46.3px/50.01px Arial,sans-serif;box-sizing:border-box}
.pl-shell-icon:hover,.pl-shell-icon:focus-visible{background:rgba(254,254,254,.52)}
.pl-account{left:18.44px}.pl-fc{left:103.54px}.pl-pl{left:188.44px}.pl-globe{left:273.54px}.pl-plus{right:97.98px}.pl-count{right:12.88px}
.pl-shell-label span{display:inline-block;background:linear-gradient(180deg,#041C56 0%,#4285F4 100%);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}
.pl-account img{width:45.46px;height:45.46px;object-fit:contain}.pl-login-label{display:none}
.pl-globe img{width:51.58px;height:44.44px;object-fit:fill}
.pl-shell-searchrow{top:75.77px;height:50.01px}
.pl-shell-menu{position:absolute;left:18.44px;top:0;width:61.1px;height:50.01px;padding:0;border:0;border-radius:5px;color:transparent;background:linear-gradient(#FEFEFE,#FEFEFE) center 29%/55% 3.47px no-repeat,linear-gradient(#FEFEFE,#FEFEFE) center 50%/55% 3.47px no-repeat,linear-gradient(#FEFEFE,#FEFEFE) center 71%/55% 3.47px no-repeat;box-shadow:none}
.pl-shell-search{position:absolute;left:99.49px;right:97.98px;top:0;height:50.01px;margin:0}
.pl-shell-search input{width:100%;height:50.01px;margin:0;padding:0 14px;border:3px solid #B4C3D8;border-radius:7px;outline:0;background:#FEFEFE;color:#041C56;caret-color:#041C56;box-shadow:none;box-sizing:border-box;font:400 23.15px/1 Arial,sans-serif}
.pl-shell-search input::placeholder{color:#041C56;opacity:1}
.pl-shell-refresh{display:block;position:absolute;right:12.88px;top:0;width:66.66px;height:50.01px;margin:0;padding:0;border:0;border-radius:5.5px;background:rgba(254,254,254,.40);box-shadow:none;cursor:pointer}
.pl-shell-refresh img{display:block;width:100%;height:100%;object-fit:fill}
.pl-main{min-height:calc(100vh - 138.66px)}

@media (max-width:600px){
  .pl-shell-chrome{height:22.222222vw;min-height:22.222222vw;background:linear-gradient(180deg,#4285F4 0%,#041C56 100%)}
  .pl-fcdb-bg{display:none}
  .pl-fcma-art{display:block;position:absolute;inset:0 auto auto 0;width:100vw;height:22.222222vw;overflow:hidden;pointer-events:none;z-index:0;background-image:url('/assets/fcma-svg/top/locked.svg?v=1'),url('/assets/fcma-svg/top/fc.svg?v=1'),url('/assets/fcma-svg/top/pl.svg?v=1'),url('/assets/fcma-svg/top/globe.svg?v=4'),url('/assets/fcma-svg/top/plus.svg?v=1'),none,url('/assets/fcma-svg/top/hamburger.svg?v=1'),url('/assets/fcma-svg/top/search.svg?v=1');background-repeat:no-repeat;background-size:100vw auto;background-position:-42.129630vw -102.314815vw,-28.240741vw -102.314815vw,-14.351852vw -102.314815vw,14.351852vw -102.314815vw,28.240741vw -102.314815vw,42.129630vw -102.314815vw,-42.129630vw -92.129630vw,6.944444vw -92.129630vw}
  .pl-shell-toprow{position:relative;top:0;height:8.333333vw;padding:0;margin:1.851852vw 0 0}
  .pl-shell-icon{top:0;width:10.185185vw;height:8.333333vw;border:0;border-radius:.925926vw;background:transparent;color:transparent;box-shadow:none;font-size:0}
  .pl-account{left:2.777778vw}.pl-fc{left:16.666667vw}.pl-pl{left:30.555556vw}.pl-globe{left:59.259259vw}.pl-plus{left:73.148148vw;right:auto}.pl-count{left:87.037037vw;right:auto}
  .pl-shell-icon>img,.pl-shell-icon>span{opacity:0}.pl-shell-label span{font-size:0}
  .pl-shell-searchrow{position:relative;top:0;height:8.333333vw;margin-top:1.851852vw;padding:0 1.851852vw 0 2.777778vw;display:flex;align-items:flex-start;gap:2.777778vw;box-sizing:border-box}
  .pl-shell-menu{position:relative;left:auto;top:auto;flex:0 0 10.185185vw;width:10.185185vw;height:8.333333vw;border:0;background:transparent;color:transparent;box-shadow:none}
  .pl-shell-search{position:relative;left:auto;right:auto;top:auto;flex:1 1 auto;min-width:0;height:8.333333vw;margin:0}
  .pl-shell-search input{width:100%;height:8.333333vw;min-height:0;margin:0;padding:0 3.769444vw;border:.277778vw solid #B4C3D8;border-radius:.810185vw/1.111111vw;background:#fff;color:#041C56;caret-color:#041C56;font:400 3.858333vw/1 Arial,sans-serif;box-sizing:border-box}
  .pl-shell-refresh{display:none}
  .pl-main{min-height:calc(100vh - 22.222222vw)}
}
body.fc-embed .pl-shell-chrome{display:none!important}
body.fc-embed .pl-main{min-height:100vh}
