:root {
  color-scheme: light;
  --items-red: #dc2626;
  --items-red-dark: #b91c1c;
  --items-ink: #0f172a;
  --items-muted: #64748b;
  --items-border: #e2e8f0;
  --items-bg: #f6f7fb;
  --items-soft-red: #fff1f2;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--items-ink); font-family: Inter, Arial, sans-serif; }
[hidden] { display: none !important; }

.scnauto-skip-link { position: fixed; top: 12px; left: 12px; z-index: 9999; transform: translateY(-160%); border: 3px solid var(--items-red); border-radius: 999px; background: #fff; color: #111827; padding: 10px 16px; font-weight: 800; text-decoration: none; }
.scnauto-skip-link:focus { transform: translateY(0); }
:where(a, button, input, select, textarea):focus-visible { outline: 3px solid var(--items-red) !important; outline-offset: 3px !important; }
.items-wrap { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }

.items-accent { height: 24px; background: linear-gradient(90deg, #120817 0%, #32101b 55%, #a8171d 100%); }
.items-main { padding: 30px 0 58px; }
.items-needs { margin-bottom: 20px; }
.items-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 20px; }
.items-section-heading h1 { margin: 5px 0 0; font-size: clamp(28px, 3vw, 38px); line-height: 1.12; letter-spacing: -.028em; }
.items-section-heading > p { max-width: 450px; margin: 0; color: var(--items-muted); line-height: 1.55; text-align: right; }
.items-section-kicker { color: var(--items-red-dark); font-size: 12px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }

.items-need-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.items-need-card { display: flex; min-width: 0; min-height: 82px; align-items: center; gap: 14px; border: 1px solid var(--items-border); border-radius: 15px; background: #fff; color: var(--items-ink); padding: 14px 16px; font: inherit; text-align: left; box-shadow: 0 5px 16px rgba(15,23,42,.035); cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease; }
.items-need-card:hover { transform: translateY(-2px); border-color: #fca5a5; box-shadow: 0 10px 24px rgba(15,23,42,.08); }
.items-need-card.is-active { border-color: #ef4444; background: #fff7f7; box-shadow: 0 0 0 3px rgba(239,68,68,.08); }
.items-need-card > span:last-child { min-width: 0; }
.items-need-card strong, .items-need-card small { display: block; }
.items-need-card strong { font-size: 14px; line-height: 1.3; }
.items-need-card small { margin-top: 4px; color: var(--items-muted); font-size: 12px; line-height: 1.35; }
.items-need-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 12px; background: var(--items-soft-red); color: var(--items-red); }
.items-need-icon svg { width: 27px; height: 27px; }

.items-toolbar { margin-bottom: 22px; border: 1px solid var(--items-border); border-radius: 20px; background: #fff; padding: 18px; box-shadow: 0 8px 24px rgba(15,23,42,.045); }
.items-controls { display: grid; grid-template-columns: minmax(280px, 1.7fr) minmax(170px, .7fr) minmax(160px, .65fr); gap: 12px; }
.items-field { display: grid; gap: 7px; color: #475569; font-size: 12px; font-weight: 850; }
.items-field input, .items-field select, .admin-field input, .admin-field select, .admin-field textarea { min-height: 46px; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; color: #111827; padding: 10px 12px; font: inherit; }
.items-field input:focus, .items-field select:focus, .admin-field input:focus, .admin-field select:focus, .admin-field textarea:focus { border-color: var(--items-red); outline: none; box-shadow: 0 0 0 3px rgba(220,38,38,.08); }
.items-field input:disabled, .items-field select:disabled { cursor: wait; opacity: .65; }
.items-search-box { position: relative; display: block; }
.items-search-box svg { position: absolute; top: 50%; left: 14px; width: 19px; height: 19px; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.items-search-box input { width: 100%; padding-left: 42px; padding-right: 42px; }
.items-search-box button { position: absolute; top: 50%; right: 8px; display: grid; width: 30px; height: 30px; transform: translateY(-50%); place-items: center; border: 0; border-radius: 50%; background: #f1f5f9; color: #475569; font-size: 21px; line-height: 1; cursor: pointer; }
.items-search-box button:hover { background: #e2e8f0; color: #0f172a; }
.items-category-chips { display: flex; gap: 8px; margin: 15px -2px 0; overflow-x: auto; padding: 2px 2px 5px; scrollbar-width: thin; }
.items-category-chips button { flex: 0 0 auto; min-height: 34px; border: 1px solid var(--items-border); border-radius: 999px; background: #fff; color: #475569; padding: 6px 12px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.items-category-chips button:hover { border-color: #fca5a5; color: #991b1b; }
.items-category-chips button.is-active { border-color: #fecaca; background: var(--items-soft-red); color: #991b1b; }
.items-results-row { display: flex; min-height: 24px; align-items: center; justify-content: space-between; gap: 15px; margin-top: 11px; }
.items-count { margin: 0; color: var(--items-muted); font-size: 13px; }
.items-text-button { border: 0; background: transparent; color: #991b1b; padding: 2px; font: inherit; font-size: 13px; font-weight: 850; cursor: pointer; }
.items-text-button:hover { text-decoration: underline; }

.items-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.item-card { display: grid; min-width: 0; grid-template-columns: minmax(190px, 42%) minmax(0, 1fr); overflow: hidden; border: 1px solid var(--items-border); border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(15,23,42,.045); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.item-card:hover { transform: translateY(-3px); border-color: #cbd5e1; box-shadow: 0 18px 38px rgba(15,23,42,.1); }
.item-image-wrap { position: relative; display: block; min-height: 270px; overflow: hidden; border-right: 1px solid #f1f5f9; background: linear-gradient(135deg, #f8fafc, #eef2f7); text-decoration: none; }
.item-image { display: block; width: 100%; height: 100%; background: #fff; object-fit: contain; padding: 14px; opacity: 1; transition: opacity .2s ease, transform .25s ease; }
.item-image.is-loading { opacity: .25; }
.item-card:hover .item-image { transform: scale(1.025); }
.item-image-placeholder { display: grid; width: 100%; height: 100%; place-content: center; gap: 6px; color: #94a3b8; text-align: center; }
.item-image-placeholder strong { color: #cbd5e1; font-size: 20px; letter-spacing: .05em; }
.item-image-placeholder span { font-size: 12px; font-weight: 750; }
.item-featured { position: absolute; top: 12px; left: 12px; border-radius: 999px; background: #111827; color: #fff; padding: 6px 9px; font-size: 10px; font-weight: 900; letter-spacing: .06em; }
.item-body { display: flex; min-width: 0; flex-direction: column; padding: 17px; }
.item-meta { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; color: var(--items-muted); font-size: 11px; font-weight: 750; }
.item-category { display: inline-flex; min-width: 0; border-radius: 999px; background: var(--items-soft-red); color: #991b1b; padding: 5px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-store { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-card h3 { margin: 12px 0 9px; font-size: 16px; line-height: 1.34; letter-spacing: -.01em; }
.item-title-link { color: var(--items-ink); text-decoration: none; }
.item-title-link:hover { color: #991b1b; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.item-description { margin: 0 0 12px; color: #64748b; font-size: 13px; line-height: 1.5; }
.item-feature-list { display: grid; gap: 5px; margin: 0 0 14px; padding: 0; color: #64748b; font-size: 12px; line-height: 1.4; list-style: none; }
.item-feature-list li { display: flex; gap: 7px; }
.item-feature-list li::before { content: "✓"; flex: 0 0 auto; color: #475569; font-weight: 900; }
.item-purchase { display: flex; align-items: end; justify-content: flex-start; gap: 12px; margin-top: auto; border-top: 1px solid #f1f5f9; padding-top: 14px; }
.item-button { display: inline-flex; min-height: 42px; flex: 0 0 auto; align-items: center; justify-content: center; gap: 7px; border-radius: 999px; background: var(--items-red); color: #fff; padding: 9px 14px; font-size: 13px; font-weight: 900; text-decoration: none; }
.item-button:hover { background: var(--items-red-dark); }
.item-button-arrow { font-size: 16px; line-height: 1; }

.items-trust { margin-top: 30px; border: 1px solid var(--items-border); border-radius: 18px; background: linear-gradient(180deg, #fff, #fafbfc); padding: 20px; }
.items-trust h2 { margin: 0 0 18px; font-size: 14px; text-align: center; }
.items-trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.items-trust-item { display: flex; align-items: center; justify-content: center; gap: 13px; }
.items-trust-icon { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; color: #334155; }
.items-trust-icon svg { width: 30px; height: 30px; }
.items-trust-item strong, .items-trust-item small { display: block; }
.items-trust-item strong { font-size: 13px; }
.items-trust-item small { max-width: 220px; margin-top: 3px; color: var(--items-muted); font-size: 11px; line-height: 1.4; }

.items-status { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; border: 1px solid var(--items-border); border-radius: 18px; background: #fff; padding: 18px 20px; color: #475569; }
.items-status-icon { display: grid; flex: 0 0 38px; height: 38px; place-items: center; border-radius: 50%; background: #f1f5f9; color: #475569; font-weight: 900; }
.items-status strong { display: block; color: #1e293b; }
.items-status p { margin: 4px 0 0; font-size: 13px; }
.items-status .items-secondary-button { margin-left: auto; }
.items-status.is-error { border-color: #fecaca; background: #fff7f7; }
.items-status.is-error .items-status-icon { background: #fee2e2; color: #991b1b; }
.items-status.is-notice .items-status-icon { background: #fef3c7; color: #92400e; }
.items-empty { border: 1px dashed #cbd5e1; border-radius: 20px; background: #fff; padding: 42px 24px; color: #475569; text-align: center; }
.items-empty h2 { margin: 8px 0; color: #1e293b; }
.items-empty p { margin: 0 0 16px; }
.items-empty-icon { color: #94a3b8; font-size: 38px; }
.items-secondary-button { min-height: 40px; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; color: #334155; padding: 8px 14px; font: inherit; font-size: 13px; font-weight: 850; cursor: pointer; }
.items-secondary-button:hover { border-color: #94a3b8; background: #f8fafc; }

.item-skeleton { pointer-events: none; }
.item-skeleton-image, .item-skeleton-line { background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 45%, #eef2f7 65%); background-size: 250% 100%; animation: items-shimmer 1.3s infinite linear; }
.item-skeleton-image { aspect-ratio: 4 / 3; }
.item-skeleton-body { display: grid; gap: 12px; padding: 18px; }
.item-skeleton-line { display: block; height: 13px; border-radius: 999px; }
.item-skeleton-line.is-short { width: 34%; }
.item-skeleton-line.is-wide { width: 100%; }
.item-skeleton-line.is-medium { width: 62%; margin-top: 18px; }
@keyframes items-shimmer { to { background-position-x: -250%; } }

.items-disclosure { margin-top: 30px; border: 1px solid #fed7aa; border-radius: 18px; background: #fff7ed; padding: 17px 19px; color: #7c2d12; font-size: 13px; }
.items-disclosure p { margin: 6px 0 8px; line-height: 1.55; }
.items-disclosure a { color: #9a3412; font-weight: 900; }
.items-footer { border-top: 1px solid var(--items-border); background: #fff; padding: 24px 0; color: #64748b; font-size: 14px; }
.items-footer nav { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.items-footer a { color: #475569; font-size: 13px; font-weight: 800; text-decoration: none; }
.items-footer a:hover { text-decoration: underline; }

/* Admin */
.admin-main { padding: 34px 0 54px; }
.admin-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.admin-heading h1 { margin: 0 0 6px; font-size: clamp(30px, 4vw, 46px); }
.admin-heading p { margin: 0; color: var(--items-muted); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr); gap: 22px; align-items: start; }
.admin-card { border: 1px solid var(--items-border); border-radius: 22px; background: #fff; padding: 22px; box-shadow: 0 12px 32px rgba(15,23,42,.06); }
.admin-card h2 { margin: 0 0 7px; }
.admin-card > p { margin: 0 0 18px; color: var(--items-muted); line-height: 1.55; }
.admin-form { display: grid; gap: 15px; }
.admin-field { display: grid; gap: 6px; color: #475569; font-size: 13px; font-weight: 800; }
.admin-field textarea { min-height: 94px; resize: vertical; }
.admin-inline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admin-checkboxes { display: flex; flex-wrap: wrap; gap: 18px; color: #475569; font-size: 14px; font-weight: 800; }
.admin-checkboxes label { display: flex; align-items: center; gap: 8px; }
.admin-button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-button { min-height: 46px; border: 0; border-radius: 999px; background: var(--items-red); color: #fff; padding: 10px 18px; font: inherit; font-weight: 900; cursor: pointer; }
.admin-button:hover { background: var(--items-red-dark); }
.admin-button.secondary { background: #111827; }
.admin-button.ghost { border: 1px solid #cbd5e1; background: #fff; color: #334155; }
.admin-button.danger { background: #991b1b; }
.admin-button:disabled { cursor: wait; opacity: .55; }
.admin-message { margin: 0 0 18px; border-radius: 14px; background: #f1f5f9; padding: 12px 14px; color: #334155; font-size: 14px; }
.admin-message.is-success { background: #ecfdf5; color: #065f46; }
.admin-message.is-error { background: #fef2f2; color: #991b1b; }
.admin-preview-image { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--items-border); border-radius: 16px; background: #f8fafc; object-fit: contain; }
.admin-list { display: grid; max-height: 720px; gap: 12px; overflow: auto; }
.admin-list-item { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; border: 1px solid var(--items-border); border-radius: 16px; padding: 12px; }
.admin-list-item img, .admin-list-placeholder { width: 70px; height: 70px; border-radius: 11px; background: #f1f5f9; object-fit: contain; }
.admin-list-placeholder { display: grid; place-items: center; color: #94a3b8; font-size: 11px; }
.admin-list-copy { min-width: 0; }
.admin-list-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-list-copy small { display: block; margin: 4px 0 8px; color: var(--items-muted); }
.admin-list-actions { display: flex; gap: 8px; }
.admin-mini-button { border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; color: #334155; padding: 6px 9px; font-weight: 800; cursor: pointer; }
.admin-mini-button.danger { border-color: #fecaca; color: #991b1b; }
.admin-note { margin-top: 16px; border: 1px solid #bfdbfe; border-radius: 14px; background: #eff6ff; padding: 13px; color: #1e3a8a; font-size: 13px; line-height: 1.5; }

@media (max-width: 980px) {
  .items-need-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .items-grid { grid-template-columns: 1fr; }
  .item-card { grid-template-columns: minmax(220px, 34%) minmax(0, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .items-section-heading { display: block; }
  .items-section-heading > p { margin-top: 8px; text-align: left; }
  .items-controls { grid-template-columns: 1fr 1fr; }
  .items-search { grid-column: 1 / -1; }
  .items-trust-grid { grid-template-columns: 1fr; }
  .items-trust-item { justify-content: flex-start; }
}

@media (max-width: 620px) {
  .items-wrap { width: min(calc(100% - 28px), 1180px); }
  .items-accent { height: 16px; }
  .items-main { padding-top: 28px; }
  .items-need-grid, .items-controls, .items-grid, .admin-inline { grid-template-columns: 1fr; }
  .items-need-card { min-height: 74px; }
  .items-search { grid-column: auto; }
  .items-toolbar { margin-right: -4px; margin-left: -4px; padding: 14px; }
  .items-grid { gap: 16px; }
  .item-card { display: flex; flex-direction: column; }
  .item-image-wrap { min-height: auto; aspect-ratio: 16 / 10; border-right: 0; border-bottom: 1px solid #f1f5f9; }
  .item-description { min-height: auto; }
  .items-status { align-items: flex-start; flex-wrap: wrap; }
  .items-status .items-secondary-button { width: 100%; margin-left: 0; }
  .admin-heading { display: block; }
  .admin-heading .admin-button { margin-top: 14px; }
  .admin-card { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .item-card, .item-image { transition: none; }
  .item-skeleton-image, .item-skeleton-line { animation: none; }
}
