/* =========================================================================
   Product details — reference layout (123456789.png, 2026-11-22).
   Three separate cards: gallery | details (+ specs table + seller card) | buy box.
   Calm palette: white cards, hairline borders, 12px cards / 10px controls,
   one soft shadow (buy box only). Brand brown for the main button & links,
   near-black for "buy now".
   Loaded after the inline bp- styles. Mirror to public/themes/... after editing.
   ========================================================================= */

.bp-scope {
    --bp-radius: 10px;
    --bp-radius-sm: 8px;
    --bp-radius-lg: 12px;
    --bp-shadow-sm: none;
    --bp-shadow: none;
    --bp-shadow-lg: none;
    --bpx-accent: #9a5a2a;          /* links / store name (the orange in the reference) */
    --bpx-tile: #f7efe6;            /* icon tiles */
    --bpx-dark: #1c1613;            /* buy now */
    background-image: none !important;
}
body:not([theme="dark"]) .bp-scope {
    --bp-bg-tint: #f5f5f4;
    --bp-line: #e5e5e5;
    --bp-line-soft: #eeeeee;
    --bp-muted: #6b6b6b;
    --bp-ink-soft: #3d3d3d;
    --bp-accent-soft: #f4efe9;
    --bp-success: #1e7a3a;
    --bp-success-soft: #eef7f1;
    --bp-danger: #b42318;
    --bp-danger-soft: #fdf3f2;
}
body[theme="dark"] .bp-scope { --bpx-accent: #d9a46c; --bpx-tile: #2a221a; --bpx-dark: #f1eadf; }

.bp-scope *:not(.bp-buybox), .bp-scope *::before, .bp-scope *::after { box-shadow: none !important; }
.bp-scope .bp-gallery-main:hover, .bp-scope .bp-btn:hover, .bp-scope .product:hover { transform: none !important; }
.bp-scope .bp-breadcrumb .bp-current { color: var(--bpx-accent); }

/* ---- Hero: three cards. The info wrappers + form are display:contents so
        their children become grid items; the DOM (and every JS hook) is unchanged. ---- */
.bp-scope .bp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) 330px;
    gap: 22px;
    align-items: start;
    background: none;
    border: 0;
    border-radius: 0;
    overflow: visible;
}
.bp-scope .bp-info,
.bp-scope .bp-info > .product-cart-option-container,
.bp-scope .bp-info form { display: contents; }

/* Gallery card */
.bp-scope .bp-gallery {
    background: var(--bp-surface);
    border: 1px solid var(--bp-line);
    border-radius: 12px;
    padding: 22px;
    gap: 14px;
}
.bp-scope .bp-gallery::before { display: none; }
.bp-scope .bp-gallery-main { max-width: none; border-radius: 8px; border: 0; }
.bp-scope .bp-gallery-main img { border-radius: 8px; }
.bp-scope .bp-gallery-badge, .bp-scope .bp-discount-badge { border-radius: 6px; }
.bp-scope .bp-ga-btn { border: 1px solid var(--bp-line); background: var(--bp-surface); }
.bp-scope .bp-thumb { border-radius: 8px; }
.bp-zoom-hint {
    position: absolute; z-index: 3; inset-block-end: 12px; inset-inline-start: 50%; transform: translateX(-50%);
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
    background: rgba(255, 255, 255, .95); border: 1px solid var(--bp-line); border-radius: 999px;
    font-size: 12px; color: var(--bp-ink); pointer-events: none; white-space: nowrap;
}
[dir="rtl"] .bp-zoom-hint { transform: translateX(50%); }
@media (hover: none) { .bp-zoom-hint { display: none; } }

/* Middle column (no card) */
.bp-scope .bp-info-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding-block-start: 4px; }
.bp-store-link { color: var(--bpx-accent) !important; font-size: 14px; font-weight: 500; }
.bp-store-link:hover { text-decoration: underline !important; }
.bp-scope .bp-category-tag { background: transparent; padding: 0; color: var(--bp-muted); font-weight: 500; border-radius: 0; }
.bp-scope .bp-category-tag::before { display: none; }
.bp-scope .bp-title { font-size: 28px; line-height: 1.35; }
.bp-scope .bp-discount-save { background: var(--bp-danger-soft); color: var(--bp-danger); border-radius: 6px; }
.bp-scope .bp-rating-row { border-block: 0; padding-block: 0 14px; border-block-end: 1px solid var(--bp-line); }
.bp-scope .bp-stars { color: #c58b00; }
.bp-scope .bp-price-stock { background: none; border: 0; padding: 0; }
.bp-scope .bp-price-label { display: none; }
.bp-scope .bp-price { font-size: 34px; }
.bp-scope .bp-series-banner { background: var(--bp-bg-tint); border: 1px solid var(--bp-line-soft); border-radius: 10px; }
.bp-proof { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--bp-ink-soft); }
.bp-proof i { color: var(--bp-muted); }

.bp-about { padding: 0; border: 0; }
.bp-about-title, .bp-specs-card .bp-specs-title h3 { font-size: 16px; font-weight: 700; margin: 0 0 6px; color: var(--bp-ink); }
.bp-about-text { margin: 0; font-size: 14px; line-height: 1.85; color: var(--bp-ink-soft); }
.bp-about-more { display: inline-block; margin-block-start: 4px; font-size: 13px; font-weight: 600; color: var(--bpx-accent) !important; }
.bp-about-more:hover { text-decoration: underline !important; }

/* Specs: two-column table, label column tinted (as in the reference) */
.bp-specs-card { display: flex; flex-direction: column; gap: 8px; }
.bp-specs-card .bp-specs-title { padding: 0; border: 0; background: none; }
.bp-specs-card .bp-specs-title i { display: none; }
.bp-specs-card .bp-specs-list { padding: 0; border: 1px solid var(--bp-line); border-radius: 10px; overflow: hidden; }
.bp-specs-card .bp-spec-row { display: grid; grid-template-columns: 40% 1fr; gap: 0; padding: 0; border: 0; border-block-end: 1px solid var(--bp-line); align-items: stretch; }
.bp-specs-card .bp-spec-row:last-child { border-block-end: 0; }
.bp-specs-card .bp-spec-key { background: var(--bp-bg-tint); padding: 11px 16px; font-weight: 700; color: var(--bp-ink); font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.bp-specs-card .bp-spec-key i { display: none; }
.bp-specs-card .bp-spec-val { padding: 11px 16px; font-size: 13.5px; color: var(--bp-ink-soft); text-align: start; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.bp-specs-card .bp-spec-row[style*="column"] { display: block; padding: 11px 16px; }
.bp-specs-card .bp-spec-row[style*="column"] .bp-spec-key { background: none; padding: 0; }
.bp-specs-card .bp-specs-footer { background: none !important; border: 0; padding: 0; font-size: 12px; color: var(--bp-muted); }

/* Seller card */
.bp-scope .bp-gallery .bp-shop-card {
    margin: 0;
    border: 1px solid var(--bp-line);
    border-radius: 12px;
    background: var(--bp-surface);
    padding: 16px 18px;
}
.bp-scope .bp-gallery .bp-shop-avatar { border-radius: 10px; }
.bp-scope .bp-gallery .bp-shop-name { color: var(--bp-ink); }
.bp-scope .bp-gallery .bp-shop-actions .bp-btn-primary { background: transparent !important; color: var(--bpx-accent) !important; border: 0; padding-inline: 4px; }
.bp-scope .bp-gallery .bp-chat-btn { border: 1px solid var(--bp-line); border-radius: 8px; }

/* ---- Buy box ---- */
.bp-buybox {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--bp-line);
    border-radius: 12px;
    background: var(--bp-surface);
    box-shadow: 0 6px 24px -12px rgba(28, 22, 19, .14);
    overflow: hidden;
    position: sticky;
    top: 90px;
}
.bp-buybox > * { margin-inline: 20px; }
.bp-buybox-head { margin: 0; padding: 18px 20px 16px; background: #fafafa; border-block-end: 1px solid var(--bp-line-soft); text-align: start; }
body[theme="dark"] .bp-buybox-head { background: var(--bp-bg-tint); }
.bp-buybox-price { font-size: 32px; font-weight: 800; line-height: 1.2; color: var(--bp-ink); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; justify-content: flex-start; }
.bp-buybox-price del, .bp-buybox-price .product__old-price { font-size: 15px; font-weight: 400; color: var(--bp-muted); }
.bp-buybox-note { font-size: 13px; color: var(--bp-ink-soft); margin-block-start: 2px; }

.bp-buybox-lines { display: flex; flex-direction: column; gap: 14px; padding-block: 18px 4px; }
.bp-bline { display: flex; align-items: flex-start; gap: 12px; }
.bp-bline-icon { flex: 0 0 34px; inline-size: 34px; block-size: 34px; border-radius: 8px; background: var(--bpx-tile); color: var(--bpx-accent); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.bp-bline-title { font-weight: 700; font-size: 14px; color: var(--bp-ink); }
.bp-bline-sub { font-size: 13px; color: var(--bpx-accent); }
.bp-bline-sub strong { font-weight: 700; }
.bp-scope .bp-buybox .bp-stock-pill { background: none; padding: 0; font-size: 15px; font-weight: 700; color: var(--bp-success); display: inline-flex; align-items: center; gap: 8px; min-block-size: 34px; }
.bp-scope .bp-buybox .bp-stock-pill::before { display: inline-block; position: static; inline-size: 8px; block-size: 8px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(30, 122, 58, .18) !important; }
.bp-scope .bp-buybox .bp-stock-pill.bp-out { color: var(--bp-danger); }
.bp-line-low { color: var(--bp-danger); font-weight: 600; font-size: 13px; margin-block-start: -4px; }

.bp-scope .bp-buybox .bp-buy-row { display: flex; flex-direction: column; gap: 14px; padding-block: 16px; }
.bp-qty-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bp-qty-label { font-weight: 700; font-size: 14px; color: var(--bp-ink); }
.bp-scope .bp-buybox .bp-qty { border: 1px solid var(--bp-line); border-radius: 10px; overflow: hidden; background: var(--bp-surface); }
.bp-scope .bp-buybox .bp-qty .bp-qty-btn { background: #fafafa !important; border: 0 !important; border-radius: 0 !important; }
.bp-scope .bp-buybox .bp-total-pill { display: flex; flex-direction: column; gap: 0; background: var(--bp-bg-tint); border: 0; border-radius: 10px; padding: 12px 16px; }
.bp-scope .bp-buybox .bp-total-pill .bp-buy-summary-item:not(.bp-total) { display: none; }
.bp-scope .bp-buybox .bp-total-pill .bp-total { display: flex; flex-direction: row; justify-content: space-between; align-items: center; inline-size: 100%; }
.bp-scope .bp-buybox .bp-total-pill { align-items: stretch; }
.bp-scope .bp-buybox .bp-total-pill .bp-sum-label { font-size: 14px; color: var(--bp-ink-soft); text-transform: none; letter-spacing: 0; }
.bp-scope .bp-buybox .bp-total-pill .bp-sum-value { font-size: 18px; font-weight: 800; color: var(--bp-ink); }

.bp-scope .bp-buybox .bp-actions { display: flex; flex-direction: column; gap: 10px; }
.bp-scope .bp-buybox .bp-actions .bp-btn { inline-size: 100%; flex: 0 0 auto; min-block-size: 50px; font-size: 16px; font-weight: 700; border-radius: 10px; }
.bp-scope .bp-buybox .bp-btn-primary { background: var(--bp-brand) !important; color: #fff !important; border: 0; }
.bp-scope .bp-buybox .bp-btn-secondary { background: var(--bpx-dark) !important; color: #fff !important; border: 0; }
body[theme="dark"] .bp-scope .bp-buybox .bp-btn-secondary { color: #1c1613 !important; }
.bp-scope .bp-buybox .bp-btn-outline { border-radius: 10px; }

.bp-meta-rows { display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; margin: 0 20px; padding-block: 14px; border-block-start: 1px solid var(--bp-line-soft); font-size: 14px; }
.bp-meta-rows dt { font-weight: 500; color: var(--bp-ink); display: flex; align-items: center; gap: 8px; margin: 0; }
.bp-meta-rows dd { margin: 0; text-align: end; color: var(--bp-ink); }
.bp-meta-rows .bp-meta-accent { color: var(--bpx-accent); }

.bp-scope .bp-buybox .bp-btn-wish {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    min-block-size: 46px; margin-block-end: 18px;
    border: 1px solid var(--bp-line); border-radius: 10px; background: var(--bp-surface);
    color: var(--bp-ink) !important; font-weight: 600; font-size: 15px;
}
.bp-scope .bp-buybox .bp-btn-wish:hover { background: #fafafa; }
.bp-scope .bp-buybox .bp-btn-wish.wishlist_icon_active i::before { content: "\f415"; color: var(--bp-danger); } /* bi-heart-fill */

.bp-buybox-foot { margin: 0; display: flex; justify-content: space-between; gap: 8px; padding: 12px 20px; background: #fafafa; border-block-start: 1px solid var(--bp-line-soft); font-size: 12.5px; font-weight: 600; color: var(--bp-ink); }
body[theme="dark"] .bp-buybox-foot { background: var(--bp-bg-tint); }
.bp-buybox-foot span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.bp-buybox-foot i { color: var(--bpx-accent); }
.bp-scope .bp-buybox .bp-alert { margin-block-end: 14px; }

/* ---- Lower sections ---- */
.bp-scope .bp-details { grid-template-columns: 1fr; }
.bp-scope .bp-panel { border-radius: 12px; }
.bp-scope .bp-tabs-header { background: var(--bp-surface); background-image: none !important; }
.bp-scope .product { border-radius: 10px !important; }

/* ---- Responsive ---- */
@media (max-width: 1199.98px) {
    .bp-scope .bp-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
    .bp-buybox { grid-column: 2; position: static; }
    .bp-scope .bp-gallery { grid-row: span 2; }
}
@media (max-width: 960px) {
    .bp-scope .bp-hero { grid-template-columns: 1fr; gap: 16px; }
    .bp-buybox { grid-column: auto; }
    .bp-scope .bp-gallery { grid-row: auto; }
}
@media (max-width: 560px) {
    .bp-scope .bp-title { font-size: 22px; }
    .bp-scope .bp-price { font-size: 28px; }
    .bp-scope .bp-gallery { padding: 14px; }
    .bp-buybox > * { margin-inline: 16px; }
    .bp-buybox-head, .bp-buybox-foot { padding-inline: 16px; }
    .bp-meta-rows { margin-inline: 16px; }
    .bp-buybox-foot { font-size: 11.5px; }
    .bp-specs-card .bp-spec-key, .bp-specs-card .bp-spec-val { padding: 10px 12px; }
}

/* Seller card sits under the gallery (inside the gallery card), separated by a hairline */
.bp-scope .bp-gallery .bp-shop-card {
    position: relative; z-index: 1;
    border: 0; border-block-start: 1px solid var(--bp-line-soft); border-radius: 0;
    padding: 16px 0 0; margin-block-start: 4px;
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
}
.bp-scope .bp-gallery .bp-shop-avatar { inline-size: 52px; block-size: 52px; }
.bp-scope .bp-gallery .bp-shop-stats { gap: 4px 12px; font-size: 12px; }
.bp-scope .bp-gallery .bp-shop-actions { display: flex; align-items: center; gap: 6px; grid-column: auto; }

/* Desktop: the buy box beside the details already shows the price — don't repeat it in the middle.
   Below 1200px the buy box drops under the specs, so the middle price stays visible there. */
@media (min-width: 1200px) {
    .bp-scope .bp-info-main .bp-price-stock { display: none; }
}

/* Page width = the header's Bootstrap .container (same max-widths + 12px gutters),
   so the content's edges line up with the logo/menu at every screen size. */
.bp-scope .bp-page { inline-size: 100%; max-width: none; margin-inline: auto; padding-inline: 12px; }
@media (min-width: 576px)  { .bp-scope .bp-page { max-width: 540px; } }
@media (min-width: 768px)  { .bp-scope .bp-page { max-width: 720px; } }
@media (min-width: 992px)  { .bp-scope .bp-page { max-width: 960px; } }
@media (min-width: 1200px) { .bp-scope .bp-page { max-width: 1140px; } }
@media (min-width: 1400px) { .bp-scope .bp-page { max-width: 1320px; } }
