/* Магазин (sh.) и пожертвования (dn.). Плитки ps-* берутся из p-support.css */

/* ---------- Витрина ---------- */
.sp-filter { margin-bottom: 20px; }
.sp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; grid-auto-flow: dense; }
.sp-card { display: flex; flex-direction: column; min-width: 0; padding: 0; border: 0; text-align: left; border-radius: 18px; overflow: hidden; background: var(--bg-2); color: var(--ink); transition: transform .25s, box-shadow .25s; }
.sp-card:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -24px rgba(13,24,32,.45); }
.sp-card--big { grid-column: span 2; grid-row: span 2; }
.sp-card__pic { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: #fff; }
.sp-card--big .sp-card__pic { aspect-ratio: auto; flex: 1; min-height: 320px; }
.sp-card__pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.sp-card:hover .sp-card__pic img { transform: scale(1.03); }
.sp-card.is-out .sp-card__pic img { filter: grayscale(1); opacity: .7; }
.sp-card__body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; }
.sp-card__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sp-card__name { font-weight: 600; font-size: 17px; line-height: 1.3; letter-spacing: -.012em; }
.sp-card--big .sp-card__name { font-size: clamp(20px, 1.8vw, 26px); font-weight: 500; letter-spacing: -.025em; }
.sp-card__price { font-weight: 600; font-size: 17px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sp-card--big .sp-card__price { font-size: clamp(20px, 1.8vw, 26px); }
.sp-card__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--ink-3); align-items: center; }
.sp-badge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 100px; font-size: 13px; font-weight: 600; }
.sp-badge--out { background: var(--ink); color: #fff; }
.sp-badge--in { background: var(--sun-soft); color: var(--ink); }
.sp-src { margin-top: 20px; font-size: 14px; max-width: 70ch; }

/* ---------- Карточка товара ---------- */
.sp-box { width: min(1080px, 100%); padding: 0; overflow: auto; }
.sp-box .modal__x { z-index: 3; }
.sp-view { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 10fr); }
.sp-gal { background: var(--bg-2); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sp-stage { position: relative; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: #fff; }
.sp-stage img { width: 100%; height: 100%; object-fit: contain; }
.sp-arr { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 100px; border: 0; background: rgba(255,255,255,.92); box-shadow: 0 4px 14px -6px rgba(0,0,0,.35); font-size: 18px; }
.sp-arr:hover { background: #fff; }
.sp-arr--l { left: 10px; } .sp-arr--r { right: 10px; }
.sp-arr[hidden] { display: none; }
.sp-count { position: absolute; left: 12px; bottom: 12px; background: rgba(13,24,32,.75); color: #fff; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 100px; font-variant-numeric: tabular-nums; }
.sp-count:empty { display: none; }
.sp-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.sp-thumbs:empty { display: none; }
.sp-thumbs button { flex: 0 0 64px; height: 64px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #fff; opacity: .6; box-shadow: inset 0 0 0 2px transparent; transition: opacity .15s; }
.sp-thumbs button[aria-current="true"] { opacity: 1; outline: 2px solid var(--ink); outline-offset: -2px; }
.sp-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.sp-info { padding: clamp(24px, 3.4vw, 40px); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sp-info h2 { font-size: clamp(26px, 2.6vw, 34px) !important; padding-right: 40px; }
.sp-price { font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sp-short, .sp-desc { color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.sp-short p + p, .sp-desc p + p { margin-top: 10px; }
.sp-desc ul { padding-left: 20px; margin: 8px 0; }
.sp-form { margin-top: 6px; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-size { min-width: 52px; height: 44px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: 15px; }
.sp-size:hover { border-color: var(--ink-3); }
.sp-size[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.sp-size:disabled { color: var(--ink-3); background: var(--bg-2); border-color: var(--bg-2); text-decoration: line-through; cursor: not-allowed; }
.sp-note { font-size: 13px; color: var(--ink-3); }
.field > span small { font-weight: 400; color: var(--ink-3); }
.sp-total b { height: 50px; display: flex; align-items: center; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sp-send { width: 100%; }
.sp-hint { margin-top: 12px; font-size: 14px; color: var(--ink-3); }
.sp-hint a { color: var(--ink); }
.sp-more { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.sp-more:empty { display: none; }
.sp-more h3 { font-size: 17px; }
.sp-dl { margin: 0; display: grid; gap: 8px; }
.sp-dl div { display: grid; grid-template-columns: minmax(90px, 30%) 1fr; gap: 12px; font-size: 15px; }
.sp-dl dt { color: var(--ink-3); }
.sp-dl dd { margin: 0; }

/* ---------- Пожертвования ---------- */
.dn-amounts { display: flex; flex-wrap: wrap; gap: 8px; }
.dn-amounts .btn { min-width: 0; }
.dn-req { margin: 0; display: grid; gap: 6px; font-size: 15px; }
.dn-req div { display: grid; grid-template-columns: 70px 1fr; gap: 12px; }
.dn-req dt { color: var(--ink-3); font-weight: 600; }
.dn-req dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dn-list { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 10px; counter-reset: dn; }
.dn-list li { counter-increment: dn; padding-left: 34px; position: relative; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.dn-list li::before { content: counter(dn); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 100px; background: var(--sun); color: var(--ink); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.ps-t--navy .dn-list li { color: rgba(255,255,255,.78); }
.dn-soon { border: 2px dashed var(--line-2); background: #fff; }
.dn-soon .ps-k { color: var(--ink-2); }
.dn-tag { align-self: flex-start; display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 100px; background: var(--bg-2); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ps-t--navy .dn-tag { background: rgba(255,255,255,.1); color: #fff; }
.dn-sum { font-size: clamp(36px, 4vw, 56px); font-weight: 500; letter-spacing: -.045em; line-height: 1; }
.dn-tb { display: grid; gap: 12px; margin-top: 4px; }
.dn-tb__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dn-tb__in { width: 100%; height: 46px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; font-size: 15px; }
.dn-tb__in:focus { outline: 2px solid var(--navy); outline-offset: 1px; border-color: transparent; }
.dn-tb__go { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
@media (max-width: 640px) { .dn-tb__row { grid-template-columns: 1fr; } }

@media (max-width: 1100px) {
  .sp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sp-view { grid-template-columns: 1fr; }
  .sp-stage { aspect-ratio: 1 / 1; }
  .sp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-card--big { grid-row: auto; }
  .sp-card--big .sp-card__pic { aspect-ratio: 4 / 3; min-height: 0; flex: none; }
}
@media (max-width: 560px) {
  .sp-grid { gap: 10px; }
  .sp-card__body { padding: 14px 14px 16px; }
  .sp-card__top { flex-direction: column; gap: 4px; }
  .sp-card__name, .sp-card__price { font-size: 15px; }
  .sp-card__meta { font-size: 13px; }
  .modal.sp-modal { padding: 0; align-items: stretch; }
  .sp-box { border-radius: 0; max-height: 100vh; height: 100%; }
  .sp-gal { padding: 10px; }
  .sp-dl div { grid-template-columns: 1fr; gap: 2px; }
  .sp-modal .row2 { grid-template-columns: 1fr; }
}
.sp-modal .row2 { align-items: end; }
.ps-t.ps-t--navy .ps-mid, .ps-t.ps-t--navy h3 { color: #fff; }
.ps-t.ps-t--navy .ps-mid a { color: #fff; text-decoration-color: rgba(255,255,255,.4); }
.ps-t.ps-t--navy .ps-mid a:hover { color: var(--sun); }
@media (max-width: 560px) { .sp-modal .row2.sp-row-q { grid-template-columns: 1fr 1fr; } }
