/* ============================================================
   Product Page — New Design (opttile.ru)
   Based on design_handoff_product_page
   Separate from main.css; loaded only on /product-new/<slug>/
   ============================================================ */

:root {
    --pn-navy: #2b2c7c;
    --pn-navy-dark: #1e1f56;
    --pn-navy-light: #ebeffc;
    --pn-green: #32cc82;
    --pn-red: #f1336c;
    --pn-text: #1a1b2e;
    --pn-muted: #4d5469;
    --pn-faint: #9ca3af;
    --pn-border: #e8eaef;
    --pn-bg: #f5f7fd;
    --pn-page-bg: #f8f9fc;
    --pn-white: #fff;
    --pn-ease: cubic-bezier(0.32, 0.72, 0.24, 1);
}

/* Wrapper lives INSIDE the site's .container — no own width/bg/padding. */
.pn-page { color: var(--pn-text); margin-top: 8px; }
.pn-page * { box-sizing: border-box; }

/* Old sanitary layout: thumbnails moved below the main image */
#product-product .goods-view {
    flex-direction: column;
    align-items: stretch;
    margin-right: 17px;
}
#product-product .goods-view .goods-top {
    width: 100%;
}

/* Main photo: locked 4:3 frame so all products have a consistent gallery block.
   Smaller / off-aspect images are letterboxed with white bars instead of resizing the frame. */
#product-product .goods-for {
    aspect-ratio: 4 / 3;
    width: 100%;
    background: #fff;
    overflow: hidden;
}
#product-product .goods-for .slick-list,
#product-product .goods-for .slick-track {
    height: 100% !important;
}
#product-product .goods-for .slick-track {
    align-items: stretch;
}
#product-product .goods-for__slide,
#product-product .goods-for .slick-slide {
    height: 100%;
    align-self: stretch;
}
#product-product .goods-for__item {
    width: 100%;
    height: 100%;
    padding: 12px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}
#product-product .goods-for__item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 0;
}
#product-product .goods-for__item img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    margin: 0;
}

/* Sanitary: thumb slider under image */
#product-product .goods-view .goods-for {
    margin-bottom: 8px;
}
#product-product .goods-view .goods-vertical {
    width: 100%;
    margin: 0;
    padding: 0 48px;
    position: relative;
}
#product-product .goods-view .goods-vertical__slide {
    margin: 0 4px;
}
#product-product .goods-view .goods-vertical__item {
    padding: 4px;
}
#product-product .goods-view .goods-vertical .slick-arrow {
    top: 0;
    bottom: 0;
    left: auto;
    width: 40px;
    height: 100%;
    background: #f6f7fe;
    border-radius: 10px;
    border: none;
    transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s var(--pn-ease);
}
#product-product .goods-view .goods-vertical .slick-arrow:hover {
    background: #e8eaf7;
}
#product-product .goods-view .goods-vertical .slick-arrow > * {
    display: none;
}
#product-product .goods-view .goods-vertical .slick-arrow::before {
    content: "";
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b2c7c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 6 15 12 9 18'/></svg>") center/contain no-repeat;
}
#product-product .goods-view .goods-vertical .slick-prev {
    left: 0;
}
#product-product .goods-view .goods-vertical .slick-prev::before {
    transform: rotate(180deg);
}
#product-product .goods-view .goods-vertical .slick-next {
    right: 0;
}
#product-product .goods-view .goods-vertical .slick-disabled {
    opacity: 0.45;
    cursor: default;
}

/* Main row */
.pn-main { display: flex; gap: 28px; align-items: flex-start; }
.pn-page--tile .pn-main { gap: 24px; }

/* Gallery — takes ~55% of the row, info column gets the rest */
.pn-gallery { flex: 0 0 55%; max-width: 55%; }
.pn-page--tile .pn-gallery { flex: 0 0 55%; max-width: 55%; }

.pn-gallery__main {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--pn-border);
    background: var(--pn-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.pn-page--tile .pn-gallery__main {
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    background: var(--pn-white);
}
.pn-gallery__main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.pn-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
}
.pn-thumb {
    width: 96px;
    height: 96px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--pn-border);
    background: var(--pn-bg);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: border-color 0.15s;
}
.pn-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pn-thumb.is-active { border: 2px solid var(--pn-navy); }

/* Info column */
.pn-info { flex: 1; min-width: 0; }

.pn-h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--pn-text);
    line-height: 1.3;
    margin: 0 0 16px;
}
.pn-page--tile .pn-h1 { font-size: 30px; margin-bottom: 8px; }

.pn-subtitle {
    font-size: 16px;
    color: var(--pn-muted);
    margin-bottom: 16px;
}

/* Labels row (sanitary) */
.pn-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.pn-label {
    padding: 6px 14px;
    border-radius: 6px;
    background: var(--pn-bg);
    color: var(--pn-muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
}
.pn-label--green {
    background: rgba(50, 204, 130, 0.12);
    color: var(--pn-green);
    font-weight: 600;
}

/* Country + status row (tile) */
.pn-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.pn-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 8px;
    border-radius: 20px;
    background: var(--pn-white);
    border: 1px solid var(--pn-border);
    font-size: 14px;
    color: var(--pn-muted);
}
.pn-pill img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.pn-pill--status {
    padding: 6px 14px;
    background: rgba(50, 204, 130, 0.12);
    color: var(--pn-green);
    font-size: 14px;
    font-weight: 600;
    border: none;
}

/* Chips row (tile) */
.pn-chips {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.pn-chip {
    font-size: 13px;
    color: var(--pn-muted);
    background: var(--pn-bg);
    border-radius: 6px;
    padding: 5px 12px;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}
.pn-chip:hover { color: var(--pn-navy); }

/* KeyFacts grid 2x2 */
.pn-keyfacts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.pn-keyfact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--pn-bg);
    border-radius: 10px;
    min-width: 0;
}
.pn-keyfact__icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--pn-white);
    border: 1px solid var(--pn-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pn-keyfact__icon img { width: 22px; height: 22px; object-fit: contain; }
.pn-keyfact__body { min-width: 0; flex: 1; }
.pn-keyfact__label {
    font-size: 12px;
    color: var(--pn-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.pn-keyfact__value {
    font-size: 15px;
    color: var(--pn-text);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pn-keyfacts-link {
    margin-top: 12px;
    background: none;
    border: none;
    color: var(--pn-navy);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    padding: 4px 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}
.pn-keyfacts-link:hover { text-decoration: underline; }

/* Price */
.pn-price {
    margin-bottom: 16px;
}
.pn-price__top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    min-height: 18px;
}
.pn-price__old {
    font-size: 16px;
    color: var(--pn-muted);
    text-decoration: line-through;
    font-weight: 500;
}
.pn-price__badge {
    background: var(--pn-red);
    color: var(--pn-white);
    font-size: 14px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
}
.pn-price__main {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.pn-price__amount {
    font-size: 40px;
    font-weight: 800;
    line-height: 1;
    color: var(--pn-text);
}
.pn-price__currency {
    font-size: 22px;
    font-weight: 700;
    color: var(--pn-text);
}
.pn-price__unit {
    font-size: 14px;
    color: var(--pn-muted);
}
.pn-price.is-discount .pn-price__amount,
.pn-price.is-discount .pn-price__currency {
    color: var(--pn-red);
}

/* Cart row (sanitary) */
.pn-cart-row {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--pn-border);
}
.pn-cart-row__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.pn-cart-row__inner .pn-price { margin-bottom: 0; }
.pn-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1;
    min-width: 0;
}
.pn-actions__cart-wrap { flex: 1; min-width: 200px; }

/* Cart button (animated) */
.pn-cart-btn {
    position: relative;
    width: 100%;
    height: 56px;
    border-radius: 10px;
    background: var(--pn-navy);
    overflow: hidden;
    flex-shrink: 0;
    transition: background 0.3s var(--pn-ease);
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--pn-white);
    display: block;
}
.pn-cart-btn.is-in-cart { background: var(--pn-navy-dark); cursor: default; }

.pn-cart-btn__idle,
.pn-cart-btn__active {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    transition: opacity 0.18s ease, transform 0.45s var(--pn-ease);
}
.pn-cart-btn__idle {
    justify-content: center;
    gap: 10px;
    color: var(--pn-white);
    font-weight: 700;
    font-size: 16px;
    transform: translateX(0);
    opacity: 1;
}
.pn-cart-btn.is-in-cart .pn-cart-btn__idle {
    opacity: 0;
    transform: translateX(60%);
    pointer-events: none;
}
.pn-cart-btn__active {
    justify-content: space-between;
    padding: 0 10px 0 9px;
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.5s var(--pn-ease);
}
.pn-cart-btn.is-in-cart .pn-cart-btn__active {
    transform: translateX(0);
    opacity: 1;
    transition-delay: 0.1s, 0s;
    pointer-events: auto;
}
.pn-cart-btn__qty {
    display: flex;
    align-items: center;
    gap: 2px;
}
.pn-cart-btn__qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.16);
    color: var(--pn-white);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.pn-cart-btn__qty-btn:hover { background: rgba(255, 255, 255, 0.28); }
.pn-cart-btn__qty-val {
    min-width: 24px;
    text-align: center;
    color: var(--pn-white);
    font-weight: 700;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}
.pn-cart-btn__active-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 6px;
    color: var(--pn-white);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.01em;
}

/* Icon-only buttons (heart, compare) */
.pn-icon-btn {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    border: 1.5px solid var(--pn-border);
    background: var(--pn-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s;
    padding: 0;
}
.pn-icon-btn:hover { border-color: var(--pn-navy); }
.pn-icon-btn.is-active { border-color: var(--pn-navy); background: var(--pn-navy-light); }

/* Tile price card */
.pn-pricecard {
    margin-top: 20px;
    background: var(--pn-white);
    border-radius: 16px;
    border: 1.5px solid var(--pn-border);
    padding: 20px 22px;
}

/* Tile calculator */
.pn-calc {
    background: var(--pn-navy-light);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 16px;
}
.pn-calc__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--pn-navy);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pn-calc__row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.pn-calc__label {
    font-size: 14px;
    color: var(--pn-muted);
    white-space: nowrap;
}
.pn-calc__stepper {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--pn-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--pn-white);
}
.pn-calc__stepper button {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--pn-navy);
    font-weight: 700;
    font-size: 16px;
}
.pn-calc__stepper input {
    width: 56px;
    height: 32px;
    border: none;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--pn-text);
    background: transparent;
    -moz-appearance: textfield;
    font-family: inherit;
}
.pn-calc__stepper input::-webkit-outer-spin-button,
.pn-calc__stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.pn-calc__summary {
    display: flex;
    gap: 18px;
    font-size: 14px;
    flex-wrap: wrap;
    color: var(--pn-muted);
}
.pn-calc__summary b { color: var(--pn-text); font-weight: 700; }
.pn-calc__summary .pn-calc__total b { color: var(--pn-navy); font-size: 16px; }

/* Quantity input (tile) */
.pn-qty {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--pn-border);
    border-radius: 10px;
    overflow: hidden;
    height: 56px;
    flex-shrink: 0;
}
.pn-qty button {
    width: 52px;
    height: 56px;
    border: none;
    background: var(--pn-bg);
    cursor: pointer;
    font-size: 20px;
    color: var(--pn-navy);
    font-weight: 700;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pn-qty input {
    width: 52px;
    height: 56px;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    color: var(--pn-text);
    border: none;
    background: var(--pn-white);
    -moz-appearance: textfield;
    font-family: inherit;
}
.pn-qty input::-webkit-outer-spin-button,
.pn-qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pn-pricecard__actions {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.pn-pricecard__actions .pn-cart-btn { border-radius: 12px; }
.pn-pricecard__actions .pn-icon-btn { border-radius: 12px; }

/* Characteristics block */
.pn-chars {
    margin-top: 36px;
}
.pn-chars__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--pn-text);
    flex-wrap: wrap;
    gap: 12px;
}
.pn-chars__title {
    font-size: 26px;
    font-weight: 800;
    color: var(--pn-text);
    letter-spacing: -0.01em;
    margin: 0;
}
.pn-chars__sku {
    font-size: 14px;
    color: var(--pn-muted);
}

.pn-chargroup {
    margin-bottom: 24px;
}
.pn-chargroup__title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.pn-chargroup__title {
    font-size: 13px;
    font-weight: 800;
    color: var(--pn-navy);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.pn-chargroup__line {
    flex: 1;
    height: 1px;
    background: var(--pn-border);
}
.pn-chargroup__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
}
.pn-chargroup__col {
    display: flex;
    flex-direction: column;
}
.pn-charrow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid var(--pn-border);
    gap: 16px;
}
.pn-charrow__label {
    font-size: 15px;
    color: var(--pn-muted);
}
.pn-charrow__value {
    font-size: 15px;
    color: var(--pn-text);
    font-weight: 600;
    text-align: right;
}

/* Description + Files */
.pn-bottom-grid {
    margin-top: 32px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    align-items: start;
}
.pn-bottom-grid:not(:has(.pn-files)) {
    grid-template-columns: 1fr;
}
.pn-bottom-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--pn-text);
    margin: 0;
}
.pn-bottom-section__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.pn-description__body {
    font-size: 16px;
    color: var(--pn-muted);
    line-height: 1.75;
}
.pn-description__body p { margin: 0 0 12px; }
.pn-description__body p:last-child { margin-bottom: 0; }

.pn-files-count {
    font-size: 11px;
    font-weight: 700;
    color: var(--pn-muted);
    background: var(--pn-bg);
    padding: 2px 8px;
    border-radius: 20px;
    font-variant-numeric: tabular-nums;
}
.pn-file {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border: 1px solid var(--pn-border);
    border-radius: 10px;
    margin-bottom: 8px;
    text-decoration: none;
    background: var(--pn-white);
    transition: border-color 0.15s, background 0.15s;
}
.pn-file:hover {
    border-color: var(--pn-navy);
    background: #fafbff;
}
.pn-file__icon {
    width: 40px;
    height: 48px;
    border-radius: 6px;
    background: var(--pn-navy-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}
.pn-file__ext {
    position: absolute;
    bottom: 4px;
    font-size: 8px;
    font-weight: 800;
    color: var(--pn-navy);
    letter-spacing: 0.04em;
}
.pn-file__name {
    flex: 1;
    min-width: 0;
}
.pn-file__name-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--pn-text);
}
.pn-file__meta {
    font-size: 14px;
    color: var(--pn-muted);
    margin-top: 2px;
}
.pn-file__download {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--pn-navy);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 991px) {
    .pn-main { flex-direction: column; gap: 20px; }
    .pn-gallery,
    .pn-page--tile .pn-gallery { flex: 1 1 100%; max-width: 100%; }
    .pn-bottom-grid { grid-template-columns: 1fr; gap: 24px; }
    .pn-chargroup__grid { grid-template-columns: 1fr; gap: 0; }
    .pn-cart-row__inner { flex-direction: column; align-items: stretch; gap: 16px; }
    .pn-actions { width: 100%; }
}

@media (max-width: 575px) {
    .pn-keyfacts { grid-template-columns: 1fr; }
    .pn-h1 { font-size: 19px; }
    .pn-page--tile .pn-h1 { font-size: 20px; }
    .pn-price__amount { font-size: 30px; }
    .pn-pricecard__actions { flex-wrap: wrap; }
    .pn-pricecard__actions .pn-qty { order: 1; }
    .pn-pricecard__actions .pn-cart-btn { order: 2; flex: 1; min-width: 160px; }
    .pn-pricecard__actions .pn-icon-btn { order: 3; }
}

/* =================================================================
   Lightbox image gallery (custom, no library)
   ================================================================= */
body.lightbox-open { overflow: hidden; }

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(28, 28, 28, 0.96);
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.lightbox.is-open { opacity: 1; }

/* Square close button — top-right corner */
.lightbox__close {
    position: absolute;
    top: 0;
    right: 0;
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.32);
    border: 0;
    cursor: pointer;
    z-index: 5;
    padding: 0;
    transition: background 0.2s ease;
}
.lightbox__close:hover { background: rgba(0, 0, 0, 0.5); }
.lightbox__close::before,
.lightbox__close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 2px;
    background: #fff;
}
.lightbox__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.lightbox__close::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* Side navigation bands — full height, chevrons centered */
.lightbox__nav {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 56px;
    background: rgba(0, 0, 0, 0.32);
    border: 0;
    cursor: pointer;
    z-index: 4;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}
.lightbox__nav:hover { background: rgba(0, 0, 0, 0.5); }
.lightbox__nav--prev { left: 0; }
.lightbox__nav--next { right: 0; }
.lightbox__nav::before {
    content: "";
    width: 24px;
    height: 24px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}
.lightbox__nav--prev::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='15 18 9 12 15 6'/></svg>");
}
.lightbox__nav--next::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>");
}

/* Photo stage — fills space between bands and thumb strip */
.lightbox__stage {
    position: absolute;
    top: 0;
    left: 56px;
    right: 56px;
    bottom: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.lightbox__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform 0.18s ease, opacity 0.18s ease;
}
.lightbox__img--leave-left  { transform: translateX(-40px); opacity: 0; }
.lightbox__img--leave-right { transform: translateX( 40px); opacity: 0; }
.lightbox__img--enter-from-right { transform: translateX( 40px); opacity: 0; transition: none; }
.lightbox__img--enter-from-left  { transform: translateX(-40px); opacity: 0; transition: none; }

/* Thumb strip — centered when fits, scrolls horizontally when overflows */
.lightbox__thumbs {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 110px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
}
.lightbox__thumb {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.08);
    background-size: cover;
    background-position: center;
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
    transition: border-color 0.2s ease;
}
.lightbox__thumb:first-child { margin-left: auto; }
.lightbox__thumb:last-child  { margin-right: auto; }
.lightbox__thumb:hover { border-color: rgba(255, 255, 255, 0.4); }
.lightbox__thumb.is-active { border-color: #fff; }

@media (max-width: 600px) {
    /* Match close button width to side band so its left edge doesn't poke past the band */
    .lightbox__close { width: 40px; height: 40px; }
    .lightbox__close::before, .lightbox__close::after { width: 16px; }
    .lightbox__nav { width: 40px; }
    .lightbox__nav::before { width: 20px; height: 20px; }
    .lightbox__stage { left: 40px; right: 40px; bottom: 90px; padding: 8px; }
    .lightbox__thumbs { height: 90px; padding: 10px; gap: 6px; }
    .lightbox__thumb { width: 64px; height: 64px; }
}
