/* kudikiuprekes.lt - product page v2 (additions on top of css/v3/home.css). 2026-09-23 */
/* metric-matched fallback so the Nunito swap does not move the layout (CLS) */
@font-face { font-family: "Nunito Fallback"; src: local("Arial"), local("Liberation Sans"), local("Helvetica"), local("Roboto"); size-adjust: 86%; ascent-override: 117.5%; descent-override: 41%; line-gap-override: 0%; }
body.pdp { --font: "Nunito", "Nunito Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.muted { color: var(--muted); }
.req { color: var(--danger); }

/* ---------- breadcrumbs ---------- */
.crumbs { padding-top: 12px; padding-bottom: 4px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; font-size: 13px; }
.crumbs ol::-webkit-scrollbar { display: none; }
.crumbs li { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.crumbs li + li::before { content: "›"; color: #b5bec6; }
.crumbs a { color: var(--ink-soft) !important; font-weight: 600; display: inline-flex; align-items: center; min-height: 32px; }
.crumbs li[aria-current] span { max-width: 60vw; overflow: hidden; text-overflow: ellipsis; }

/* ---------- top: gallery + buy box ---------- */
.pdp-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 8px; padding-bottom: 16px; }

.gal { min-width: 0; }
.gal-main { position: relative; background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.gal-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.gal-track::-webkit-scrollbar { display: none; }
.gal-slide {
    flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 1 / 1; margin: 0; padding: 16px;
    border: 0; background: #fff; cursor: zoom-in; display: flex; align-items: center; justify-content: center;
}
.gal-slide img { width: 100%; height: 100%; object-fit: contain; }
.gal-badge { top: 14px; left: 14px; font-size: 15px; padding: 5px 12px; }
.gal-count { position: absolute; right: 12px; bottom: 12px; padding: 3px 10px; border-radius: var(--pill); background: rgba(54, 54, 54, .72); color: #fff; font-size: 12px; font-weight: 700; }
.gal-zoom { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .9); box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; color: var(--ink-soft); pointer-events: none; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); display: none; }
.gal-prev { left: 10px; }
.gal-next { right: 10px; }
.gal-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.gal-thumb {
    flex: none; width: 64px; height: 64px; padding: 4px; border: 2px solid var(--line); border-radius: var(--r-sm);
    background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.gal-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gal-thumb.is-active { border-color: var(--brand); }
.gal-more { font-weight: 800; color: var(--primary); background: var(--sky); }

/* ---------- buy box ---------- */
.buy { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.buy-brand { align-self: flex-start; font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--primary) !important; min-height: 44px; display: inline-flex; align-items: center; }
.buy h1 { font-size: clamp(22px, 5.4vw, 30px); font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.buy-rating a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; color: var(--ink) !important; font-size: 14px; }
.buy-rating a.muted { color: var(--muted) !important; font-weight: 600; }
.buy-price { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.buy-now { font-size: 34px; font-weight: 800; line-height: 1.1; color: var(--ink); }
.buy-now.is-sale { color: #b3261e; }
.buy-old { font-size: 18px; color: var(--muted); }
.buy-badge { padding: 4px 12px; border-radius: var(--pill); background: var(--accent); color: var(--ink); font-weight: 800; font-size: 15px; }

.variants { display: flex; flex-direction: column; gap: 12px; }
.vgroup { border: 0; margin: 0; padding: 0; min-width: 0; }
.vgroup legend { padding: 0; margin-bottom: 8px; font-weight: 800; font-size: 15px; }
.vgroup-val { font-weight: 600; color: var(--ink-soft); }
.vopts { display: flex; flex-wrap: wrap; gap: 8px; }
.vopt {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; max-width: 100%;
    border: 2px solid var(--line); border-radius: var(--pill); background: var(--surface);
    color: var(--ink); font-weight: 700; font-size: 14px; line-height: 1.25; text-align: left; cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
.vopt span { overflow-wrap: anywhere; }
.vopt:hover { border-color: #bfe3f5; }
.vopt[aria-pressed="true"] { border-color: var(--primary); background: var(--sky); color: var(--primary); }
.vopt[disabled] { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.swatch { flex: none; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.variants.is-missing .vgroup-val { color: var(--danger); }
.vmsg { margin: 0; color: var(--danger); font-weight: 700; font-size: 14px; }

.stock { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: var(--r); background: var(--mint); }
.stock-line { display: flex; align-items: center; gap: 8px; font-size: 15px; line-height: 1.35; color: var(--ink-soft); }
.stock-line svg { flex: none; color: var(--primary); }
.stock-line.ok strong { color: #16703c; } /* 5.6:1 on --mint (--ok #1f8a4c was 4.0:1) */
.stock-line.no strong { color: var(--danger); }
.stock.is-out { background: var(--blush); }

.buy-actions { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.qty { display: inline-flex; align-items: center; height: 52px; border: 2px solid var(--line); border-radius: var(--pill); background: #fff; }
.qty-btn { width: 44px; height: 48px; border: 0; background: transparent; font-size: 22px; font-weight: 700; color: var(--ink); cursor: pointer; border-radius: var(--pill); }
.qty-btn:hover { background: var(--sky); }
.qty input { width: 40px; height: 48px; border: 0; text-align: center; font: 800 17px var(--font); color: var(--ink); background: transparent; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-btn { width: 100%; min-height: 52px; padding: 12px 8px; gap: 6px; font-size: 16px; font-weight: 800; }
.buy-btn span { white-space: nowrap; }
.buy-actions { gap: 8px; }
.qty-btn { width: 44px; }
.qty input { width: 30px; }
.wish { width: 52px; height: 52px; color: var(--ink-soft) !important; }
.wish.is-on { color: #d64561 !important; }

.notify, .pdrop form { display: flex; flex-direction: column; gap: 8px; }
.notify { padding: 14px; border-radius: var(--r); background: var(--butter); }
.notify-h { margin: 0; font-size: 15px; }
.field-row { display: flex; flex-direction: column; gap: 8px; }
.field-row input, .field-grid input, .field textarea {
    width: 100%; min-height: 48px; padding: 10px 16px; border: 2px solid var(--line); border-radius: var(--r-sm);
    background: #fff; font: 600 16px var(--font); color: var(--ink);
}
.field-row input { border-radius: var(--pill); padding: 10px 18px; }
.field-row input:focus, .field-grid input:focus, .field textarea:focus { outline: none; border-color: var(--brand); }
.form-msg { margin: 0; font-weight: 700; font-size: 14px; min-height: 1.2em; }
.form-msg:empty { display: none; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--danger); }
.pdrop summary { cursor: pointer; font-weight: 700; color: var(--link); min-height: 44px; display: flex; align-items: center; list-style: none; }
.pdrop summary::-webkit-details-marker { display: none; }
.pdrop summary::before { content: ""; width: 18px; height: 18px; margin-right: 8px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' d='M4 6h16v12H4z M4 7l8 6 8-6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' d='M4 6h16v12H4z M4 7l8 6 8-6'/%3E%3C/svg%3E") center / contain no-repeat; }

.trust-mini { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.trust-mini li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-soft); line-height: 1.35; }
.trust-mini svg { flex: none; color: var(--primary); }
.other-vol ul { display: grid; gap: 4px; margin-top: 6px; }
.other-vol li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.admin-link { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- info (accordion / tabs) ---------- */
.info { padding-top: 8px; padding-bottom: 8px; }
.acc { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-sm); margin-bottom: 10px; }
.acc > summary {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 12px 18px;
    font-size: 17px; font-weight: 800; cursor: pointer; list-style: none; border-radius: var(--r);
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary); transform: rotate(45deg); margin-top: -4px; transition: transform .15s ease; }
.acc[open] > summary::after { transform: rotate(225deg); margin-top: 4px; }
.acc-body { padding: 0 18px 18px; min-width: 0; }
.pdp-desc { overflow-wrap: anywhere; color: var(--ink); }
.pdp-desc img, .pdp-desc iframe, .pdp-desc video { max-width: 100% !important; height: auto !important; }
.pdp-desc table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.pdp-desc td, .pdp-desc th { border: 1px solid var(--line); padding: 6px 8px; }
.pdp-desc p { margin: 0 0 12px; }
.pdp-desc ul { list-style: disc; padding-left: 22px; margin: 0 0 12px; }
.pdp-desc ol { padding-left: 22px; margin: 0 0 12px; }
.pdp-desc * { font-family: inherit !important; max-width: 100%; }
.specs { width: 100%; border-collapse: collapse; font-size: 15px; }
.specs th, .specs td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.specs th { width: 42%; color: var(--ink-soft); font-weight: 700; }
.specs tr:nth-child(odd) { background: #fafcfd; }
.ship-info p { margin: 0 0 12px; }
.ship-list { display: grid; gap: 10px; margin-bottom: 12px; }
.ship-list li { display: flex; gap: 12px; align-items: flex-start; }
.ship-list svg { flex: none; color: var(--primary); margin-top: 2px; }
.ship-list strong { display: block; }
.ship-list span { color: var(--ink-soft); font-size: 14px; }
.ship-links { font-weight: 700; }
.info-tabs { display: flex; gap: 6px; margin-bottom: 12px; border-bottom: 2px solid var(--line); }
.info-tab {
    min-height: 48px; padding: 10px 18px; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px;
    background: transparent; font-weight: 800; font-size: 16px; color: var(--ink-soft); cursor: pointer; border-radius: var(--r-sm) var(--r-sm) 0 0;
}
.info-tab:hover { background: var(--sky); }
.info-tab[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }
.info.is-tabs .acc { display: none; box-shadow: none; background: transparent; margin: 0; }
.info.is-tabs .acc.is-current { display: block; }
.info.is-tabs .acc > summary { display: none; }
.info.is-tabs .acc-body { padding: 8px 0 12px; }

/* reviews */
.rev-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rev-head p { margin: 0; }
.rev-score { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.rev-list { display: grid; gap: 10px; }
.rev-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 14px; }
.rev-meta cite { font-style: normal; font-weight: 800; color: var(--ink); }
.rev-meta time { color: var(--muted); }
.rev-list p { margin: 0; overflow-wrap: anywhere; }
.rev-form { display: flex; flex-direction: column; gap: 12px; padding: 16px; margin-bottom: 16px; border-radius: var(--r); background: var(--sky); }
.rev-form .btn { align-self: flex-start; }
.rate { border: 0; margin: 0; padding: 0; }
.rate legend { padding: 0; font-weight: 800; margin-bottom: 4px; }
.rate-stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.rate-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate-stars label { width: 44px; height: 44px; cursor: pointer; background: #cfd6db;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.8l2.8 5.8 6.3.9-4.6 4.4 1.1 6.3L12 17.2l-5.6 3 1.1-6.3L2.9 9.5l6.3-.9z'/%3E%3C/svg%3E") center / 34px no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.8l2.8 5.8 6.3.9-4.6 4.4 1.1 6.3L12 17.2l-5.6 3 1.1-6.3L2.9 9.5l6.3-.9z'/%3E%3C/svg%3E") center / 34px no-repeat; }
.rate-stars input:checked ~ label, .rate-stars label:hover, .rate-stars label:hover ~ label { background: var(--accent); }
.rate-stars input:focus-visible + label { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
.field-grid { display: grid; gap: 12px; }
.field-grid label, .field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; }
.field textarea { resize: vertical; min-height: 110px; }

/* ---------- sticky add-to-cart (mobile) ---------- */
.sticky-buy {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97); box-shadow: 0 -6px 24px rgba(20, 60, 90, .12); border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.sticky-info { display: flex; flex-direction: column; min-width: 0; }
.sticky-title { font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-info strong { font-size: 19px; font-weight: 800; }
.sticky-buy .btn { flex: none; min-height: 48px; padding: 10px 22px; font-weight: 800; }
body.has-sticky .toast { bottom: 88px; }
/* keep the footer bottom visible above the fixed bar (bar = 48px button + 2 x 10px padding) */
@media (max-width: 1023.98px) {
    body.has-sticky { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
    body.has-sticky .preview-flag { bottom: 80px; }
}

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 80; background: rgba(20, 28, 36, .94); display: flex; align-items: center; justify-content: center; }
.lb-stage { width: 100%; height: 100%; overflow: auto; display: flex; align-items: center; justify-content: center; overscroll-behavior: contain; touch-action: pan-x pan-y pinch-zoom; }
.lb-stage img { max-width: min(100vw, 1200px); max-height: 100vh; width: auto; height: auto; object-fit: contain; cursor: zoom-in; background: #fff; }
.lb.is-zoom .lb-stage { display: block; }
.lb.is-zoom .lb-stage img { max-width: none; max-height: none; width: 1200px; cursor: zoom-out; }
.lb-close { position: absolute; top: 12px; right: 12px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-count { position: absolute; top: 20px; left: 16px; color: #fff; font-weight: 700; font-size: 14px; }
body.lb-open { overflow: hidden; }

/* ---------- >= 480px ---------- */
@media (min-width: 480px) {
    .buy-btn { font-size: 17px; padding: 12px 20px; }
    .buy-actions { gap: 10px; }
    .field-row { flex-direction: row; }
    .field-row input { flex: 1; }
    .field-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- >= 768px ---------- */
@media (min-width: 768px) {
    .pdp-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
    .gal { position: sticky; top: 96px; }
    .gal-thumb { width: 76px; height: 76px; }
    .gal-nav { display: inline-flex; }
    .acc > summary { padding: 14px 22px; }
    .acc-body { padding: 0 22px 22px; }
}

/* ---------- >= 1024px ---------- */
@media (min-width: 1024px) {
    .pdp-top { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 40px; align-items: start; padding-top: 12px; padding-bottom: 28px; }
    .buy { padding: 4px 0; }
    .buy-now { font-size: 38px; }
    .info { max-width: var(--wrap); }
    .info.is-tabs { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 8px 28px 16px; }
    .sticky-buy { display: none !important; }
    .pdp-desc { max-width: 860px; }
}

/* description: readable plain-text formatting + collapse (2026-09-23) */
.pdp-desc-h { font-size: 16px; font-weight: 800; margin: 16px 0 6px; }
.pdp-desc-body > .pdp-desc-h:first-child { margin-top: 0; }
.pdp-desc-body li { margin: 2px 0; }
.pdp-desc-body.is-clamped { max-height: 17em; overflow: hidden; position: relative; }
.pdp-desc-body.is-clamped::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5em; background: linear-gradient(rgba(255, 255, 255, 0), var(--surface, #fff)); pointer-events: none; }
.pdp-desc-more { margin-top: 12px; min-height: 44px; }
