/* Desen kütüphanesi: liste, kart, detay ve "yakından incele" ekranı */

.field select {
  width: 100%; padding: .9em 1em; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.field select:focus, .field input[type='search']:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(6, 75, 141, .15); }
.field input[type='search'] { width: 100%; padding: .9em 1em; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- Liste ---------- */
.lib { padding-bottom: clamp(4rem, 8vw, 7rem); }
.lib-head { display: grid; grid-template-columns: 1fr minmax(0, 26rem); gap: 1.5rem clamp(2rem, 6vw, 6rem); align-items: end; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.lib-head h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: 1.02; }
.lib-head__aside p { color: var(--muted); }
.lib-head__aside .lib-meta { margin-top: 1rem; font: italic 600 .85rem/1 var(--label); letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }

.lib-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(max-content, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.lib-tabs::-webkit-scrollbar { display: none; }
.lib-tab { display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; padding: 1.4rem 1.3rem; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: background .25s, border-color .25s; }
.lib-tab + .lib-tab { border-inline-start: 1px solid var(--line); }
.lib-tab small { color: var(--muted); font-size: .8rem; }
.lib-tab:hover { background: rgba(6, 75, 141, .05); }
.lib-tab[aria-current='true'] { border-bottom-color: var(--red); font-weight: 600; }

.lib-filter { display: flex; flex-wrap: wrap; gap: 1rem 1.2rem; align-items: flex-end; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.lib-filter__q { flex: 1 1 260px; max-width: 420px; }
.lib-filter__c { flex: 0 1 220px; }
.lib-filter .link-arrow { margin-inline-start: auto; }

.lib-bar { display: flex; justify-content: space-between; gap: 1rem; padding: 1.4rem 0 1.8rem; color: var(--muted); font-size: .95rem; }
.lib-bar span:first-child { color: var(--ink); }

.lib-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.8rem, 3.2vw, 2.8rem) clamp(1rem, 2vw, 1.8rem); }

/* Kart */
.pcard { display: grid; gap: .65rem; align-content: start; }
.pcard__media { position: relative; display: block; }
.pcard__frame { display: grid; place-items: center; aspect-ratio: 1 / .94; padding: 10% 10% 16%; background: var(--paper-2); overflow: hidden; }
.pcard__frame img { width: 100%; height: 100%; object-fit: contain; transition: transform .7s var(--ease), opacity .25s; }
.pcard__frame img.is-swap { opacity: 0; }
.pcard__media:hover img { transform: scale(1.04); }
.pcard__go { position: absolute; inset-inline-end: 7%; bottom: 6%; width: 34px; height: 34px; display: grid; place-items: center; background: #fff; font-size: .95rem; transition: background .25s, color .25s; }
.pcard__media:hover .pcard__go, .pcard__media:focus-visible .pcard__go { background: var(--red); color: #fff; }
.pcard__row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: .45rem; }
.pcard__row h3 { font-size: clamp(1.25rem, 1.8vw, 1.55rem); }
.pcard__row h3 a:hover { color: var(--red); }
.pcard__count { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.pcard .dots { margin-top: .15rem; gap: .55rem; }
.pcard .dot { width: 26px; height: 26px; }
.pcard__color { font-size: .82rem; color: var(--muted); min-height: 1.2em; }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
.pager a { min-width: 2.7rem; padding: .75em .95em; text-align: center; border: 1px solid var(--line); background: #fff; font: italic 600 .95rem/1 var(--label); letter-spacing: .1em; transition: border-color .2s; }
.pager a:hover { border-color: var(--blue); }
.pager a[aria-current='page'] { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- Detay ---------- */
.pd-wrap { padding-bottom: clamp(4rem, 8vw, 7rem); }
.crumbs { display: flex; flex-wrap: wrap; gap: .55rem; padding-top: clamp(1.6rem, 3vw, 2.6rem); font-size: .82rem; color: var(--muted); }
.crumbs a:hover { color: var(--red); }
.crumbs [aria-current] { color: var(--ink); }
.pd-back { margin: 1.6rem 0 1.5rem; font-size: .95rem; }
.pd-back a:hover { color: var(--red); }

.pd { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.pd__stage { position: relative; background: var(--paper-2); padding: clamp(1rem, 3vw, 2.4rem); display: grid; place-items: center; }
.pd__stage img { width: 100%; max-height: min(72vh, 780px); object-fit: contain; transition: opacity .25s; }
.pd__zoom { position: absolute; inset-inline-end: 1rem; bottom: 1rem; border: 0; background: #fff; padding: .8em 1.1em; font: italic 600 .9rem/1 var(--label); letter-spacing: .12em; text-transform: uppercase; transition: background .25s, color .25s; }
.pd__zoom:hover { background: var(--red); color: #fff; }
.pd__cap { display: flex; justify-content: space-between; gap: 1rem; margin-top: .9rem; font-size: .85rem; color: var(--muted); }

.pd__info { display: grid; gap: 1.1rem; align-content: start; }
.pd__code { font-size: clamp(3rem, 7vw, 6rem); line-height: 1; }
.pd__color { font: 500 clamp(1.2rem, 1.8vw, 1.6rem)/1.2 var(--serif); color: var(--red); }
.pd__desc { color: var(--muted); max-width: 46ch; }
.pd__choose { margin-top: .6rem; font-size: .92rem; font-weight: 500; }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.swatch { display: grid; gap: .5rem; padding: .5rem; background: #fff; border: 1px solid var(--line); font-size: .8rem; transition: border-color .2s, background .2s; }
.swatch img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.swatch:hover { border-color: var(--blue); }
.swatch.is-on { border-color: var(--ink); background: var(--paper-2); }
.swatch.is-on span::after { content: ' ✓'; }
.pd__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .8rem; }
.pd__spec { margin: 1.2rem 0 0; border-top: 1px solid var(--line); }
.pd__spec > div { display: flex; justify-content: space-between; gap: 1.5rem; padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.pd__spec dt { color: var(--muted); }
.pd__spec dd { margin: 0; text-align: end; font-weight: 500; }
.pd__note { font-size: .78rem; color: var(--muted); max-width: 58ch; }

.pd-similar { margin-top: clamp(3.5rem, 7vw, 6rem); padding-top: clamp(2rem, 4vw, 3.5rem); border-top: 1px solid var(--line); }
.pd-similar__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.pd-similar__head p { color: var(--muted); max-width: 26rem; font-size: .95rem; }

/* ---------- Yakından incele ---------- */
body.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 300; background: #23272f; color: #fff; display: grid; grid-template-rows: auto 1fr auto; }
.lb[hidden] { display: none; }
.lb__top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: .6rem clamp(1rem, 2.5vw, 2rem); border-bottom: 1px solid rgba(255, 255, 255, .12); }
.lb__logo { height: clamp(54px, 5.2vw, 72px); width: auto; filter: brightness(0) invert(1); opacity: .96; }   /* şeffaf logo, koyu zeminde hero'daki gibi beyaz tek renk */
.lb__title { display: grid; text-align: center; }
.lb__title small { font: italic 600 .75rem/1 var(--label); letter-spacing: .2em; text-transform: uppercase; opacity: .7; }
.lb__title strong { font: 500 1.55rem/1.2 var(--serif); }
.lb__close { justify-self: end; width: 46px; height: 46px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%; background: transparent; color: #fff; font-size: 1.05rem; transition: background .2s, color .2s; }
.lb__close:hover { background: #fff; color: #23272f; }

.lb__stage { position: relative; overflow: hidden; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.lb__stage.is-drag { cursor: grabbing; }
.lb__img { position: absolute; left: 50%; top: 50%; width: 92%; height: 92%; object-fit: contain; transform: translate(-50%, -50%); transform-origin: center; will-change: transform; filter: drop-shadow(0 12px 32px rgba(0, 0, 0, .45)); pointer-events: none; }

.lb__bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem 2rem; padding: .9rem clamp(1rem, 2.5vw, 2rem) .7rem; border-top: 1px solid rgba(255, 255, 255, .12); }
.lb__colors small { display: block; font: italic 600 .72rem/1 var(--label); letter-spacing: .2em; text-transform: uppercase; opacity: .65; margin-bottom: .35rem; }
.lb__colors strong { font: 500 1.2rem/1.1 var(--serif); }
.lb__dots { margin: 0; gap: .6rem; }
.lb .dot { width: 34px; height: 34px; border-color: transparent; box-shadow: none; }
.lb .dot.is-on { box-shadow: 0 0 0 2px #23272f, 0 0 0 4px #fff; }
.lb__zoom { display: flex; align-items: stretch; border: 1px solid rgba(255, 255, 255, .25); direction: ltr; }   /* − 100% + her dilde aynı sırada */
.lb__zoom button, .lb__zoom span { display: grid; place-items: center; min-width: 2.6rem; padding: .6rem .8rem; background: transparent; color: #fff; border: 0; font-size: .85rem; }
.lb__zoom button { font-size: 1.15rem; }
.lb__zoom button:hover { background: rgba(255, 255, 255, .12); }
.lb__zoom span { min-width: 3.6rem; font-variant-numeric: tabular-nums; border-inline: 1px solid rgba(255, 255, 255, .15); }
.lb__zoom .lb__fit { font-size: .8rem; border-inline-start: 1px solid rgba(255, 255, 255, .15); opacity: .85; }
.lb__hint { grid-column: 1 / -1; margin: 0; text-align: end; font-size: .72rem; opacity: .55; }

/* ---------- Duyarlı ---------- */
@media (max-width: 1100px) { .lib-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 960px) {
  .lib-head, .pd { grid-template-columns: 1fr; }
  .pd-similar__head { flex-direction: column; align-items: flex-start; gap: .6rem; }
  .lb__bar { grid-template-columns: 1fr; justify-items: start; }
  .lb__hint { text-align: start; }
  .lb__top { grid-template-columns: auto 1fr auto; }
  .lb__title strong { font-size: 1.2rem; }
}
@media (max-width: 720px) {
  .lib-grid { grid-template-columns: repeat(2, 1fr); }
  .lib-filter .link-arrow { margin-inline-start: 0; }
  .pcard__row { flex-direction: column; gap: .15rem; }
  .pcard .dot { width: 24px; height: 24px; }
  .lb__hint { display: none; }
}
