/* =========================================================================
   Karta produktu vo výpise kategórie – redesign 2026-11
   View: app/Views/product/index.php · prefix .pc-*
   Tokeny zhodné s .pd (assets/css/product-detail.css)
   ========================================================================= */
.pc {
    --pc-ink: #0f172a;
    --pc-text: #334155;
    --pc-muted: #64748b;
    --pc-border: #e2e8f0;
    --pc-fill: #f1f5f9;
    --pc-navy: #1e2348;
    --pc-navy-hover: #2c3366;
    --pc-ok: #166534;
    --pc-warn: #92400e;
    --pc-err: #991b1b;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--pc-border);
    border-radius: 18px;
    color: var(--pc-ink);
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s;
}
.pc *, .pc *::before, .pc *::after { box-sizing: border-box; }
.pc:hover { border-color: #cbd5e1; box-shadow: 0 14px 32px rgba(15, 23, 42, .1); }

/* Odznaky */
.pc-badges { position: absolute; top: 10px; left: 10px; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; pointer-events: none; }
.pc-badge { font-size: 11px; font-weight: 700; line-height: 1; padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
.pc-badge--top { background: #fef3c7; color: var(--pc-warn); }
.pc-badge--sale { background: #dc2626; color: #fff; }
.pc-badge--new { background: #2563eb; color: #fff; }
.pc-badge--clear { background: var(--pc-ink); color: #fff; }
.pc-badge--thumb { background: #f0fdf4; color: var(--pc-ok); }
.pc-badge--gift { background: #fce7f3; color: #9d174d; }

/* Obrázok + prepínanie */
.pc-media { display: block; }
.pc-stage { position: relative; height: 200px; padding: 14px; transition: padding .15s; overflow: hidden; border-radius: 18px 18px 0 0; background: #fff; touch-action: pan-y; }
.pc-stage > a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.pc-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pc-nav { position: absolute; top: 50%; width: 32px; height: 32px; margin-top: -16px; padding: 0; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 3px 12px rgba(15, 23, 42, .18); color: var(--pc-ink); font-size: 12px; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s; z-index: 2; }
.pc-nav--prev { left: 8px; }
.pc-nav--next { right: 8px; }
.pc-stage:hover .pc-nav, .pc-nav:focus-visible { opacity: 1; }
.pc-dots { position: absolute; left: 0; right: 0; bottom: 4px; display: flex; justify-content: center; z-index: 2; }
.pc-dots button { width: 18px; height: 18px; padding: 0; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.pc-dots button::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: #cbd5e1; transition: width .15s, background .15s; }
.pc-dots button.is-on::before { width: 14px; background: var(--pc-navy); }
@media (hover: none) { .pc-nav { display: none; } }

/* Varianty – v pokoji štítok s počtom, panel nad spodkom fotky pri hoveri karty */
.pc-chip { position: absolute; top: 10px; right: 10px; z-index: 4; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border: 1px solid var(--pc-border); border-radius: 999px; background: #fff; color: var(--pc-text); font-size: 12px; font-weight: 600; line-height: 1; }
.pc-chip > i { font-size: 10px; color: var(--pc-muted); }
.pc-chip-dots { display: inline-flex; }
.pc-chip-dots i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid #fff; box-shadow: 0 0 0 1px rgba(15, 23, 42, .12); }
.pc-chip-dots i + i { margin-left: -4px; }
.pc-vars { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 7px 14px 4px; background: #fff; cursor: default; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; }
.pc-media.is-open .pc-vars { opacity: 1; visibility: visible; transform: none; }
.pc-media.is-open.has-vars .pc-stage { padding-bottom: 68px; }
.pc-media.is-open.has-vars .pc-dots { bottom: 62px; }
.pc-media.is-open.has-vars .pc-nav { margin-top: -44px; }
@media (hover: hover) {
    .pc:hover .pc-vars { opacity: 1; visibility: visible; transform: none; }
    .pc:hover .has-vars .pc-stage { padding-bottom: 68px; }
    .pc:hover .has-vars .pc-dots { bottom: 62px; }
    .pc:hover .has-vars .pc-nav { margin-top: -44px; }
}
.pc-vars-label { font-size: 12px; line-height: 1.3; color: var(--pc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.pc-vars-label strong { color: var(--pc-ink); font-weight: 600; }
.pc-vars-label .is-ok { color: var(--pc-ok); }
.pc-vars-label .is-no { color: var(--pc-err); }
.pc-vars-list { display: flex; align-items: center; gap: 5px; min-height: 34px; }
.pc-dot { position: relative; flex: 0 0 auto; width: 26px; height: 26px; padding: 4px; border-radius: 50%; border: 1.5px solid transparent; display: block; }
.pc-dot > span { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .18); }
.pc-dot:hover, .pc-dot:focus-visible { border-color: #94a3b8; }
.pc-dot.is-current { border-color: var(--pc-navy); }
.pc-thumb { position: relative; flex: 0 1 34px; min-width: 0; width: 34px; height: 34px; padding: 2px; border-radius: 9px; border: 1.5px solid var(--pc-border); background: #fff; display: flex; align-items: center; justify-content: center; }
.pc-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pc-thumb:hover, .pc-thumb:focus-visible { border-color: #94a3b8; }
.pc-thumb.is-current { border-color: var(--pc-navy); }
.pc-dot.is-out > span, .pc-thumb.is-out img { opacity: .4; }
.pc-dot.is-out::after, .pc-thumb.is-out::after { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 1.5px; background: #64748b; transform: rotate(-45deg); }
.pc-more { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--pc-muted); text-decoration: none; padding: 0 2px; }
.pc-more:hover { color: var(--pc-ink); }

/* Telo */
.pc-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px 0; flex: 1 1 auto; }
.pc-title { margin: 0; font-size: 14px; line-height: 1.35; font-weight: 500; min-height: 38px; }
.pc-title a { color: var(--pc-ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.pc:hover .pc-title a { text-decoration: underline; text-underline-offset: 2px; }
.pc-code { font-size: 12px; color: var(--pc-muted); }

/* Extra body */
.pc-points { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; align-self: flex-start; max-width: 100%; padding: 4px 10px 4px 4px; border-radius: 14px; background: #fdf3d0; color: #4a3600; font-size: 12px; line-height: 1.25; }
.pc-points-num { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 999px; background: #e4ab00; color: #1f1500; font-weight: 800; font-size: 12px; white-space: nowrap; }
.pc-points-num i { font-size: 10px; }

/* Sklad */
.pc-stock { display: flex; gap: 7px; font-size: 12px; line-height: 1.35; font-weight: 500; }
.pc-stock::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: currentColor; }
.pc-stock--ok { color: var(--pc-ok); }
.pc-stock--wait { color: var(--pc-warn); }
.pc-stock small { display: block; font-size: 11px; font-weight: 400; color: var(--pc-text); }

/* Cena */
.pc-price { margin-top: auto; padding-top: 4px; }
.pc-price-old { font-size: 12px; color: var(--pc-muted); line-height: 1.2; }
.pc-price-now { font-size: 25px; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
.pc-price-now small { font-size: 15px; font-weight: 600; letter-spacing: 0; }
.pc-price-ask { font-size: 16px; font-weight: 700; }
.pc-price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
.pc-price-unit { font-size: 12px; color: var(--pc-muted); }

/* Nákup */
.pc-buy { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px 14px; cursor: default; }
.pc-qty { flex: 1 1 86px; display: flex; align-items: center; height: 40px; border: 1px solid var(--pc-border); border-radius: 12px; background: #fff; }
.pc-qty button { flex: 0 0 27px; height: 38px; padding: 0; border: 0; border-radius: 11px; background: transparent; color: var(--pc-ink); font-size: 12px; }
.pc-qty button:hover { background: var(--pc-fill); }
.pc-qty input { flex: 1 1 28px; width: 28px; min-width: 0; padding: 0; border: 0; background: transparent; text-align: center; font-size: 15px; font-weight: 600; color: var(--pc-ink); -moz-appearance: textfield; }
.pc-qty input::-webkit-outer-spin-button, .pc-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pc-qty input:disabled { color: var(--pc-ink); opacity: 1; -webkit-text-fill-color: var(--pc-ink); }
.pc-cta { flex: 1 1 82px; height: 40px; padding: 0 6px; border: 0; border-radius: 12px; background: var(--pc-navy); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; transition: background .15s; }
.pc-cta:hover { background: var(--pc-navy-hover); color: #fff; }
.pc-qty:focus-within, .pc-cta:focus-visible, .pc-nav:focus-visible, .pc-dots button:focus-visible, .pc-dot:focus-visible, .pc-thumb:focus-visible, .pc-chip:focus-visible { outline: 2px solid #6366f1; outline-offset: 1px; }

.pc-alert { margin: 10px 14px 0; padding: 8px 10px; border-radius: 12px; font-size: 12px; line-height: 1.35; }
.pc-alert strong { display: block; }
.pc-alert:last-child { margin-bottom: 14px; }
.pc-alert--err { background: #fef2f2; color: var(--pc-err); }
.pc-alert--warn { background: #fffbeb; color: var(--pc-warn); }

/* Neprihlásený */
.pc-guest { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 8px; cursor: default; }
.pc-guest .pc-cta { flex: 0 0 auto; width: 100%; }
.pc-guest-reg { font-size: 12px; text-align: center; color: var(--pc-muted); text-decoration: none; }
.pc-guest-reg:hover { color: var(--pc-ink); text-decoration: underline; }

/* Interné info (org. 6000) */
.pc-internal { padding: 6px 14px 0; font-size: 12px; cursor: default; }
.pc-internal div { background: var(--pc-navy); color: #fff; padding: 3px 8px; border-radius: 6px; margin-top: 2px; }

@media (max-width: 575.98px) {
    .pc { border-radius: 14px; }
    .pc-stage { height: 160px; padding: 10px; border-radius: 14px 14px 0 0; }
    .pc-vars, .pc-body, .pc-guest, .pc-buy { padding-left: 10px; padding-right: 10px; }
    .pc-alert { margin-left: 10px; margin-right: 10px; }
    .pc-price-now { font-size: 22px; }
    .pc-title { font-size: 13px; }
    .pc-title a { -webkit-line-clamp: 5; }
    .pc-vars-list { gap: 3px; }
    .pc-dot { width: 22px; height: 22px; padding: 3px; flex-shrink: 1; }
}
@media (prefers-reduced-motion: reduce) { .pc, .pc * { transition: none !important; } }

/* =========================================================================
   Dlaždice podkategórií nad výpisom · prefix .sc-*
   ========================================================================= */
.sc { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0 0; }
.sc *, .sc *::before { box-sizing: border-box; }
.sc-tile { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 72px; padding: 8px 14px 8px 8px; border: 1px solid #e2e8f0; border-radius: 16px; background: #f6f8fb; color: #0f172a; text-decoration: none; transition: border-color .15s, background .15s, box-shadow .15s; }
.sc-tile:hover { color: #0f172a; background: #fff; border-color: #1e2348; box-shadow: 0 8px 20px rgba(15, 23, 42, .08); }
.sc-tile:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.sc-img { flex: 0 0 56px; width: 56px; height: 56px; padding: 4px; border-radius: 11px; background: #fff; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 20px; }
.sc-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sc-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sc-name { font-size: 14px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.sc-count { font-size: 12px; color: #64748b; }
.sc-tile--best { background: #fdf3d0; border-color: #f0d58a; }
.sc-tile--best:hover { background: #fff8e1; border-color: #e4ab00; }
.sc-tile--best .sc-name i { color: #b98900; font-size: 12px; }
.sc-tile--best .sc-count { color: #6b5200; }
.sc-more { justify-content: center; padding: 8px 14px; background: #fff; border-style: dashed; border-color: #cbd5e1; font-size: 14px; font-weight: 600; cursor: pointer; }
.sc-more i { font-size: 11px; margin-left: 4px; }
.sc-more-less, .sc.is-open .sc-more-all { display: none; }
.sc.is-open .sc-more-less { display: inline; }
@media (min-width: 768px) {
    .sc--collapse:not(.is-open) .sc-tile:nth-child(n+8):not(.sc-more) { display: none; }
}
@media (max-width: 1199.98px) { .sc { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767.98px) {
    .sc { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; margin: 12px -15px 0; padding: 2px 15px 8px; scroll-padding: 0 15px; scrollbar-width: none; }
    .sc::-webkit-scrollbar { display: none; }
    .sc-tile { flex: 0 0 200px; scroll-snap-align: start; min-height: 64px; }
    .sc-img { flex-basis: 46px; width: 46px; height: 46px; }
    .sc-more { display: none; }
}
