/* BC Product Info + Page Layout (v1.6.1) */

/* ─── 3-column layout: Main image | Gallery scroll | Info panel ─── */
.bc-product-page {
    display: flex;
    gap: 0;
    width: 100% !important;
    max-width: var(--bc-page-max-width, none);
    min-height: 100vh;
    overflow: visible;
    margin: 0;
    margin-left: var(--bc-page-margin-left, auto);
    margin-right: var(--bc-page-margin-right, auto);
    padding: 0;
    position: relative;
    align-items: stretch;
}

/* Gallery wrapper becomes transparent so its children are direct flex items */
.bc-product-page__gallery {
    display: contents;
}
.bc-product-page .bc-gallery--editorial {
    display: contents;
}

/* LEFT column — Main image (sticky, full height) */
.bc-product-page .bc-gallery__main {
    width: var(--bc-main-image-width, 45%);
    flex: 0 0 var(--bc-main-image-width, 45%);
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    align-items: flex-start;
    align-self: flex-start;
    flex-shrink: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}
.bc-product-page .bc-gallery__main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* MIDDLE column — Gallery scroll with relative positioning for float button */
.bc-product-page .bc-gallery__scroll {
    width: var(--bc-gallery-width, 22%);
    flex: 0 0 var(--bc-gallery-width, 22%);
    min-height: auto;
    height: auto;
    position: relative;
    top: auto;
    align-self: flex-start;
    display: block;
    overflow: visible;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}
.bc-product-page .bc-gallery__scroll-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: top center;
    cursor: pointer;
    margin: 0;
    padding: 0;
    min-height: 0;
}
.bc-product-page .bc-gallery__scroll-img:hover { opacity: 0.9; }

/* Disable forced equal-height blocks from previous broken version */
.bc-product-page .bc-gallery__scroll--single,
.bc-product-page .bc-gallery__scroll--pair,
.bc-product-page .bc-gallery__scroll--stack {
    overflow: visible;
}
.bc-product-page .bc-gallery__scroll--single .bc-gallery__scroll-img,
.bc-product-page .bc-gallery__scroll--pair .bc-gallery__scroll-img,
.bc-product-page .bc-gallery__scroll--stack .bc-gallery__scroll-img {
    height: auto;
    flex: none;
}

/* RIGHT column — Info panel */
.bc-product-page .bc-csp-info-shell {
    width: var(--bc-info-panel-width, 33%);
    flex: 0 0 var(--bc-info-panel-width, 33%);
    position: sticky;
    top: 0;
    height: auto;
    max-height: none;
    align-self: flex-start;
    overflow: visible;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

.bc-product-page .csp-info {
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
    display: block;
    padding: 32px 40px 40px;
    box-sizing: border-box;
    pointer-events: auto;
}

/* ─── Info components ─── */
.bc-product-info {
    display: flex;
    flex-direction: column;
    gap: var(--bc-widget-spacing, 0px);
    min-height: max-content;
    padding-bottom: 56px;
}

.bc-product-info > * {
    flex-shrink: 0;
}

/* ─── SKU ─── */
.bc-product-sku {
    margin-bottom: 6px;
}
.bc-product-sku__value {
    font-size: var(--bc-sku-font-size, 11px);
    font-weight: var(--bc-sku-font-weight, 400);
    text-transform: var(--bc-sku-text-transform, uppercase);
    color: var(--bc-sku-color, #999999);
    letter-spacing: 0.08em;
}

/* ─── Title ─── */
.bc-product-title {
    margin-bottom: 8px;
}
.bc-product-title__text {
    font-size: var(--bc-title-font-size, 22px);
    font-weight: var(--bc-title-font-weight, 600);
    text-transform: var(--bc-title-text-transform, none);
    color: var(--bc-title-color, #1a1a1a);
    line-height: 1.2;
    margin: 0;
    padding: 0;
}

/* ─── Price ─── */
.bc-product-price {
    margin-bottom: 16px;
}
.bc-product-price__value {
    font-size: var(--bc-price-font-size, 16px);
    font-weight: var(--bc-price-font-weight, 500);
    text-transform: var(--bc-price-text-transform, none);
    color: var(--bc-price-color, #1a1a1a);
}
.bc-product-price__value del {
    color: var(--bc-muted, #666666);
    font-weight: 400;
    margin-right: 6px;
}
.bc-product-price__value ins {
    text-decoration: none;
}

/* ─── Description ─── */
.bc-product-description {
    margin-bottom: 16px;
}
.bc-product-description__text {
    font-size: var(--bc-desc-font-size, 13px);
    font-weight: var(--bc-desc-font-weight, 400);
    color: var(--bc-desc-color, #666666);
    line-height: 1.6;
    font-family: var(--bc-body-font);
}
.bc-product-description__text p {
    margin: 0 0 8px;
}
.bc-product-description__text p:last-child {
    margin-bottom: 0;
}

/* ─── Floating Style It Button (anchored inside gallery scroll column) ─── */
.bc-gallery__scroll {
    position: relative; /* ensure positioning context */
}
.bc-style-it-float {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    color: #1a1a1a;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.bc-style-it-float:hover {
    border-color: var(--bc-primary, #C75E3D);
    color: var(--bc-primary, #C75E3D);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    background: #fff;
}
.bc-style-it-float svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
.bc-style-it-float__tooltip {
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: #1a1a1a;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    letter-spacing: 0.03em;
    z-index: 101;
}
.bc-style-it-float:hover .bc-style-it-float__tooltip {
    opacity: 1;
}

/* ─── Mobile: stacked layout (main → info → gallery) ─── */
@media (max-width: 768px) {
    .bc-product-page {
        flex-direction: column;
        height: auto;
        overflow: visible;
        max-width: none;
        margin: 0;
        align-items: stretch;
    }
    .bc-product-page__gallery {
        display: flex;
        flex-direction: column;
        width: 100%;
        order: 1;
    }
    .bc-product-page .bc-gallery--editorial {
        display: contents;
    }
    .bc-product-page .bc-gallery__main {
        width: 100%;
        height: auto;
        position: relative;
        order: 1;
    }
    .bc-product-page .bc-gallery__main-img {
        height: auto;
    }
    .bc-product-page .bc-gallery__scroll {
        width: 100%;
        height: auto;
        position: relative;
        overflow: visible;
        order: 3;
        gap: 4px;
    }
    .bc-product-page .bc-gallery__scroll-img {
        flex: none;
        height: auto !important;
    }
    .bc-product-page .bc-csp-info-shell {
        width: 100%;
        position: relative !important;
        top: auto !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        order: 2;
    }
    .bc-product-page .csp-info {
        height: auto !important;
        max-height: none !important;
        overflow-y: visible !important;
        overscroll-behavior: auto;
        padding: 20px 16px;
    }
    .bc-style-it-float {
        position: absolute;
        top: 12px;
        right: 12px;
        width: 42px;
        height: 42px;
    }
    .bc-style-it-float__tooltip {
        display: none;
    }
}
