/* Витрина каталога (issue #83) — в духе FreshCart: светлые скруглённые
   карточки, мягкие тени, зелёный акцент. Скомпилированный theme.min.css
   содержит только классы блога, поэтому раскладка витрины — здесь. */

:root {
  --pc-green: #0aad0a;
  --pc-green-dark: #088a08;
  --pc-green-soft: #e7f7e7;
  --pc-text: #1f2937;
  --pc-muted: #6b7280;
  --pc-line: #e5e7eb;
  --pc-bg-soft: #f6f7f9;
  --pc-red: #dc3545;
  --pc-radius: 12px;
}

.pc-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--pc-muted); margin: 16px 0 8px; }
.pc-crumbs a { color: var(--pc-green); }
.pc-crumbs a:hover { text-decoration: underline; }
.pc-crumbs span.sep { color: #c0c4cc; }

.pc-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin: 8px 0 20px; }
.pc-head h1 { font-size: 28px; font-weight: 700; color: var(--pc-text); line-height: 1.2; }
.pc-head .pc-count { color: var(--pc-muted); font-size: 14px; }

/* плитки категорий */
.pc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 28px; }
.pc-tile { display: flex; flex-direction: column; justify-content: space-between; min-height: 84px; padding: 14px 16px; border: 1px solid var(--pc-line); border-radius: var(--pc-radius); background: #fff; transition: box-shadow .15s, border-color .15s; }
.pc-tile:hover { border-color: var(--pc-green); box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.pc-tile b { font-weight: 600; color: var(--pc-text); line-height: 1.3; }
.pc-tile small { color: var(--pc-muted); font-size: 13px; margin-top: 6px; }

/* раскладка листинга */
.pc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.pc-layout > * { min-width: 0; }
@media (min-width: 1024px) { .pc-layout { grid-template-columns: 270px 1fr; gap: 32px; } }

/* сайдбар фильтров */
.pc-filters { align-self: start; }
@media (min-width: 1024px) { .pc-filters { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding-right: 4px; } }
.pc-filters-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--pc-line); border-radius: 8px; background: #fff; font-weight: 500; cursor: pointer; }
@media (min-width: 1024px) { .pc-filters-toggle { display: none; } }
.pc-filters-body { display: none; margin-top: 12px; }
.pc-filters-body.open { display: block; }
@media (min-width: 1024px) { .pc-filters-body { display: block; margin-top: 0; } }
.pc-subcats { margin-bottom: 18px; }
.pc-subcats h3, .pc-facet summary { font-weight: 600; font-size: 15px; color: var(--pc-text); }
.pc-subcats ul { margin-top: 8px; }
.pc-subcats li a { display: flex; justify-content: space-between; padding: 5px 0; color: var(--pc-text); font-size: 14px; }
.pc-subcats li a:hover { color: var(--pc-green); }
.pc-subcats li a span { color: var(--pc-muted); font-size: 13px; }
.pc-facet { border-top: 1px solid var(--pc-line); padding: 12px 0; }
.pc-facet summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.pc-facet summary::-webkit-details-marker { display: none; }
.pc-facet summary::after { content: "+"; color: var(--pc-muted); font-weight: 400; font-size: 18px; }
.pc-facet[open] summary::after { content: "−"; }
.pc-facet .pc-values { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.pc-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--pc-text); cursor: pointer; }
.pc-check input { width: 16px; height: 16px; accent-color: var(--pc-green); }
.pc-check .n { margin-left: auto; color: var(--pc-muted); font-size: 12px; }
.pc-check.zero { color: #b0b4ba; }
.pc-range { display: flex; gap: 8px; margin-top: 10px; }
.pc-range input { width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid var(--pc-line); border-radius: 8px; font-size: 14px; }
.pc-range input:focus { outline: none; border-color: var(--pc-green); }
.pc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 8px; background: var(--pc-green); color: #fff; font-weight: 600; font-size: 15px; border: 0; cursor: pointer; transition: background .15s; }
.pc-btn:hover { background: var(--pc-green-dark); color: #fff; }
.pc-btn.block { width: 100%; }
.pc-btn.ghost { background: #fff; color: var(--pc-text); border: 1px solid var(--pc-line); }
.pc-btn.ghost:hover { border-color: var(--pc-green); color: var(--pc-green); }
.pc-reset { display: block; text-align: center; margin-top: 8px; font-size: 14px; color: var(--pc-muted); }
.pc-reset:hover { color: var(--pc-red); }

/* панель над сеткой */
.pc-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.pc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--pc-green-soft); color: var(--pc-green-dark); font-size: 13px; }
.pc-chip:hover { background: #d4f0d4; }
.pc-chip i { font-style: normal; font-weight: 700; }
.pc-sort select { padding: 7px 10px; border: 1px solid var(--pc-line); border-radius: 8px; font-size: 14px; background: #fff; }

/* сетка карточек */
.pc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .pc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.pc-grid.wide { }
@media (min-width: 1280px) { .pc-grid.wide { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pc-card { position: relative; display: flex; flex-direction: column; height: 100%; padding: 12px; border: 1px solid var(--pc-line); border-radius: var(--pc-radius); background: #fff; transition: box-shadow .15s, transform .15s; }
.pc-card:hover { box-shadow: 0 10px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.pc-card .pc-img { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; border-radius: 8px; background: #fff; overflow: hidden; margin-bottom: 10px; }
.pc-card .pc-img img { width: 100%; height: 100%; object-fit: contain; }
.pc-card .pc-img .pc-noimg { color: #c0c4cc; font-size: 40px; }
.pc-badge { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 2px 8px; border-radius: 6px; background: var(--pc-green); color: #fff; font-size: 12px; font-weight: 600; }
.pc-card .pc-brand { font-size: 12px; color: var(--pc-muted); margin-bottom: 4px; }
.pc-card .pc-name { font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--pc-text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pc-card .pc-name:hover { color: var(--pc-green); }
.pc-card .pc-price { margin-top: auto; padding-top: 10px; font-size: 18px; font-weight: 700; color: var(--pc-text); }
.pc-card .pc-price small { font-size: 13px; font-weight: 400; color: var(--pc-muted); }
.pc-empty { padding: 48px 16px; text-align: center; color: var(--pc-muted); border: 1px dashed var(--pc-line); border-radius: var(--pc-radius); }

/* карточка товара */
.pc-product { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 12px; }
@media (min-width: 1024px) { .pc-product { grid-template-columns: 1fr 1fr; gap: 48px; } }
.pc-gallery-main { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; border: 1px solid var(--pc-line); border-radius: var(--pc-radius); background: #fff; overflow: hidden; }
.pc-gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.pc-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pc-thumbs button { width: 68px; height: 68px; padding: 3px; border: 1px solid var(--pc-line); border-radius: 8px; background: #fff; cursor: pointer; }
.pc-thumbs button.active, .pc-thumbs button:hover { border-color: var(--pc-green); }
.pc-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pc-info h1 { font-size: 24px; font-weight: 700; line-height: 1.3; color: var(--pc-text); }
.pc-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 14px; color: var(--pc-muted); }
.pc-meta a { color: var(--pc-green); }
.pc-bigprice { margin-top: 18px; font-size: 30px; font-weight: 700; color: var(--pc-text); }
.pc-bigprice small { font-size: 16px; font-weight: 400; color: var(--pc-muted); }
.pc-variants { margin-top: 16px; }
.pc-variants label.t { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.pc-variant-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-variant-list label { cursor: pointer; }
.pc-variant-list input { position: absolute; opacity: 0; pointer-events: none; }
.pc-variant-list span { display: inline-block; padding: 7px 12px; border: 1px solid var(--pc-line); border-radius: 8px; font-size: 14px; }
.pc-variant-list input:checked + span { border-color: var(--pc-green); background: var(--pc-green-soft); color: var(--pc-green-dark); }
.pc-variant-list .out span { color: #9ca3af; text-decoration: line-through; }
.pc-stock { margin-top: 8px; font-size: 13px; }
.pc-stock.in { color: var(--pc-green-dark); }
.pc-stock.out { color: var(--pc-red); }
.pc-cta { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.pc-note { margin-top: 10px; font-size: 13px; color: var(--pc-muted); }
.pc-section { margin-top: 44px; }
.pc-section h2 { font-size: 20px; font-weight: 700; margin-bottom: 14px; color: var(--pc-text); }
.pc-specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.pc-specs td { padding: 9px 12px; border-bottom: 1px solid var(--pc-line); vertical-align: top; }
.pc-specs tr:nth-child(odd) td { background: var(--pc-bg-soft); }
.pc-specs td:first-child { color: var(--pc-muted); width: 45%; }
.pc-desc { font-size: 15px; line-height: 1.7; color: #374151; max-width: 820px; }
.pc-desc p { margin-bottom: 12px; }
.pc-articles li { padding: 6px 0; }
.pc-articles a { color: var(--pc-green); }
.pc-articles a:hover { text-decoration: underline; }

/* форма заявки */
.pc-inquiry { max-width: 560px; padding: 20px; border: 1px solid var(--pc-line); border-radius: var(--pc-radius); background: var(--pc-bg-soft); }
.pc-inquiry .row { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .pc-inquiry .row { grid-template-columns: 1fr 1fr; } }
.pc-inquiry input, .pc-inquiry textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--pc-line); border-radius: 8px; font-size: 15px; background: #fff; }
.pc-inquiry input:focus, .pc-inquiry textarea:focus { outline: none; border-color: var(--pc-green); }
.pc-inquiry textarea { margin-top: 10px; min-height: 80px; }
.pc-inquiry .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pc-alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
.pc-alert.ok { background: var(--pc-green-soft); color: var(--pc-green-dark); }
.pc-alert.err { background: #fdecee; color: #b02a37; }

/* автодополнение в шапке */
.pc-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 50; background: #fff; border: 1px solid var(--pc-line); border-radius: 10px; box-shadow: 0 12px 28px rgba(0,0,0,.12); overflow: hidden; }
.pc-suggest a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--pc-text); font-size: 14px; }
.pc-suggest a:hover, .pc-suggest a.active { background: var(--pc-bg-soft); }
.pc-suggest img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.pc-suggest .p { margin-left: auto; font-weight: 600; white-space: nowrap; }
.pc-suggest .all { justify-content: center; color: var(--pc-green); font-weight: 500; border-top: 1px solid var(--pc-line); }
