/* =========================================================
   Punta v2 — Ürünler (liste + filtre) sayfası
   style-v2.css + urun.css üzerine
   ========================================================= */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.l-hero { padding: calc(var(--utility-h) + var(--header-h) + 20px) 0 clamp(28px, 4vw, 44px); }
.l-head { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; margin-bottom: clamp(24px, 3vw, 36px); }
.l-title { font-size: clamp(2.6rem, 5vw, 4.2rem); }
.l-lead { color: var(--ink-2); font-size: 1.08rem; max-width: 50ch; }

/* Grup kısayolları */
.gtiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gtile {
  position: relative; display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center;
  padding: 8px 18px 8px 8px; border-radius: 999px; background: var(--white); text-align: left;
  border: 1.5px solid transparent;
  transition: border-color var(--dur-micro) var(--ease-out-quart), background-color var(--dur-micro) var(--ease-out-quart);
}
.gtile img { width: 56px; height: 56px; border-radius: 50%; object-fit: contain; background: var(--panel); mix-blend-mode: multiply; }
.gtile-t { font-weight: 600; font-size: 0.95rem; line-height: 1.2; }
.gtile-n { min-width: 30px; padding: 3px 8px; border-radius: 999px; background: var(--bg); font-size: 0.8rem; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.gtile[aria-pressed="true"] { background: var(--dot); }
.gtile[aria-pressed="true"] .gtile-n { background: rgba(255,255,255,0.6); }
@media (hover: hover) and (pointer: fine) { .gtile:hover { border-color: var(--ink); } }

/* Gövde */
.l-body { padding-bottom: clamp(64px, 8vw, 110px); }
.l-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }

/* ---------- Filtre paneli ---------- */
.fpanel { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); display: flex; flex-direction: column; background: var(--white); border-radius: var(--r-md); }
.fp-sheet-head { display: none; }
.fp-scroll { overflow-y: auto; padding: 18px 18px 8px; overscroll-behavior: contain; }
.fp-foot { display: flex; gap: 8px; padding: 12px 18px 18px; border-top: 1px solid var(--line-soft); }
.fp-foot .btn { flex: 1; justify-content: center; }
.fp-apply { display: none; }

.fsearch { position: relative; display: block; margin-bottom: 10px; }
.fsearch svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.fsearch input {
  width: 100%; padding: 12px 14px 12px 40px; border: 1.5px solid var(--line-soft); border-radius: 999px; background: var(--panel);
  font: inherit; font-size: 0.95rem; color: var(--ink);
  transition: border-color var(--dur-micro) var(--ease-out-quart), background-color var(--dur-micro) var(--ease-out-quart);
}
.fsearch input:focus { outline: none; border-color: var(--ink); background: var(--white); }
.fsearch-sm input { padding-top: 9px; padding-bottom: 9px; font-size: 0.88rem; }

.fgroup { border-top: 1px solid var(--line-soft); padding: 4px 0; }
.fgroup:first-of-type { border-top: 0; }
.fgroup summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 2px; font-weight: 600; font-size: 0.95rem;
}
.fgroup summary::-webkit-details-marker { display: none; }
.fgroup summary small { margin-left: 6px; font-weight: 400; font-size: 0.72rem; color: var(--muted); }
.fgroup summary::after {
  content: ""; width: 26px; height: 26px; border-radius: 50%; flex: none; margin-left: auto;
  background: var(--bg) no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5 6 8.5l4-4' fill='none' stroke='%231d2025' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  transition: transform 200ms var(--ease-out-quart);
}
.fgroup[open] summary::after { transform: rotate(180deg); }
.fgroup > :not(summary) { margin-bottom: 12px; }

.opts { display: grid; gap: 2px; }
.opts-scroll { max-height: 236px; overflow-y: auto; padding-right: 4px; }
.opts li[hidden] { display: none; }
.opt { position: relative; display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 10px; cursor: pointer; font-size: 0.92rem; transition: background-color var(--dur-micro) var(--ease-out-quart); }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt-box { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--white); position: relative; transition: background-color 150ms var(--ease-out-quart), border-color 150ms var(--ease-out-quart); }
.opt-box::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform 180ms var(--ease-out-quart); }
.opt input:checked + .opt-box { border-color: var(--ink); background: var(--dot); }
.opt input:checked + .opt-box::after { transform: scale(1); }
.opt input:focus-visible + .opt-box { outline: 2px solid var(--dot); outline-offset: 2px; }
.opt-n { min-width: 26px; padding: 1px 7px; border-radius: 999px; background: var(--bg); text-align: center; font-size: 0.74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.opt.is-zero { opacity: 0.45; }
@media (hover: hover) and (pointer: fine) { .opt:hover { background: var(--panel); } }

.cutlvl, .sizes-f { display: flex; flex-wrap: wrap; gap: 6px; }
.lvl { position: relative; cursor: pointer; }
.lvl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lvl span {
  display: grid; place-items: center; min-width: 42px; height: 38px; padding: 0 12px; border-radius: 999px;
  background: var(--bg); font-weight: 600; font-size: 0.88rem; font-variant-numeric: tabular-nums;
  transition: background-color var(--dur-micro) var(--ease-out-quart), color var(--dur-micro) var(--ease-out-quart);
}
.lvl input:checked + span { background: var(--ink); color: #fff; }
.lvl input:focus-visible + span { outline: 2px solid var(--dot); outline-offset: 2px; }
.lvl.is-zero span { opacity: 0.4; }
@media (hover: hover) and (pointer: fine) { .lvl:hover input:not(:checked) + span { background: var(--line-soft); } }
.fhint { font-size: 0.78rem; color: var(--muted); margin-top: 8px; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch-opt { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--bg); cursor: pointer; font-size: 0.86rem; transition: background-color var(--dur-micro) var(--ease-out-quart); }
.swatch-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch-opt span { width: 24px; height: 24px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.14); }
.swatch-opt em { font-style: normal; }
.swatch-opt:has(input:checked) { background: var(--ink); color: #fff; }
.swatch-opt input:focus-visible + span { outline: 2px solid var(--dot); outline-offset: 2px; }
.swatch-opt.is-zero { opacity: 0.45; }

/* ---------- Sonuçlar ---------- */
.toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.count { color: var(--muted); }
.count b { color: var(--ink); font-family: var(--f-head); font-size: 1.4rem; font-weight: 600; margin-right: 2px; font-variant-numeric: tabular-nums; }
.sort { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; font-size: 0.88rem; color: var(--muted); }
.sort select {
  appearance: none; -webkit-appearance: none; padding: 10px 40px 10px 16px; border: 0; border-radius: 999px; background: var(--white) no-repeat right 14px center / 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5 6 8.5l4-4' fill='none' stroke='%231d2025' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  font: inherit; font-size: 0.9rem; font-weight: 500; color: var(--ink); cursor: pointer;
}
.fp-open { display: none; }
.fp-open svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.fp-badge { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--dot); color: var(--ink); font-size: 0.78rem; }

.active-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; min-height: 0; }
.active-chips:empty { margin-bottom: 8px; }
.achip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 0.84rem; }
.achip small { color: rgba(255,255,255,0.6); font-size: 0.74rem; }
.achip button { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,0.16); color: #fff; font-size: 0.72rem; transition: background-color var(--dur-micro) var(--ease-out-quart); }
@media (hover: hover) and (pointer: fine) { .achip button:hover { background: var(--dot); color: var(--ink); } }
.aclear { padding: 6px 12px; border-radius: 999px; font-size: 0.84rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.list-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sheet-meta { display: flex; align-items: center; gap: 10px; font-size: 0.76rem; color: var(--muted); }
.sw { display: inline-flex; }
.sw i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15), 0 0 0 2px var(--white); }
.sw i + i { margin-left: -4px; }

.empty { padding: clamp(40px, 6vw, 72px) 24px; border-radius: var(--r-md); background: var(--white); text-align: center; }
.empty-dot { display: block; width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%; background: var(--dot); }
.empty h2 { font-family: var(--f-head); font-weight: 600; font-size: 1.5rem; margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 44ch; margin: 0 auto 22px; }
.empty-act { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }

.list-page .cta { background: var(--bg); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gtiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .l-head { grid-template-columns: 1fr; gap: 12px; }
  .l-grid { grid-template-columns: 1fr; }
  .fp-open { display: inline-flex; }

  /* Filtre paneli → alttan açılan sayfa */
  .fpanel {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 80;
    max-height: 86vh; border-radius: var(--r-lg) var(--r-lg) 0 0;
    transform: translateY(100%); visibility: hidden;
    transition: transform 400ms var(--ease-out-expo), visibility 0s linear 400ms;
  }
  .fp-open-state .fpanel { transform: none; visibility: visible; transition: transform 450ms var(--ease-out-expo); }
  .fp-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 4px; }
  .fp-sheet-head::before { content: ""; position: absolute; left: 50%; top: 8px; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--line); }
  .fp-title { font-family: var(--f-head); font-weight: 600; font-size: 1.3rem; }
  .fp-apply { display: inline-flex; }
  .fp-foot { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .fp-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(29,32,37,0.45); opacity: 0; transition: opacity 300ms var(--ease-out-quart); }
  .fp-open-state .fp-overlay { opacity: 1; }
  .fp-open-state { overflow: hidden; }
  .opts-scroll { max-height: none; }
}
@media (max-width: 560px) {
  .l-hero { padding-top: calc(var(--header-h) + 12px); }
  .gtiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .gtile { grid-template-columns: 40px 1fr; padding: 6px 12px 6px 6px; gap: 10px; }
  .gtile img { width: 40px; height: 40px; }
  .gtile-t { font-size: 0.82rem; }
  .gtile-n { display: none; }
  .toolbar { flex-wrap: wrap; gap: 10px; }
  .sort span { display: none; }
  .list-grid { gap: 10px; }
  .sheet-meta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fpanel, .fp-overlay { transition: none !important; }
}
