/* JB product card — variation tiles,price,quantity and gallery. Written for the JB Toolkit "product-card" module;the mockup uses it as is. Visual tokens are read off the live Divi product template (07-10-2026): thumbnail shadow 0 12px 18px -6px rgba(76,29,161,.2),radius 5px on small items and 10px on modules and buttons,button Inter 700 14px uppercase with 1.4px tracking,hover #4C1DA1 plus Divi's sliding arrow, 0.2s transitions. */

.jbpc,
.jbpc-gallery {
    --jbpc-accent: #4c1da1;
    --jbpc-accent-weak: #f3effb;
    --jbpc-ink: #121212;
    --jbpc-muted: #6b6475;
    --jbpc-line: #d9d4e1;
    --jbpc-tile-bg: #ffffff;
    --jbpc-off-line: #e8e5ec;
    --jbpc-off-ink: #a7a1b0;
    --jbpc-shadow: 0 12px 18px -6px rgba(76, 29, 161, .2);
    --jbpc-shadow-hover: 0 14px 24px -6px rgba(76, 29, 161, .4);
    --jbpc-shadow-photo: 0 2px 8px rgba(0, 0, 0, .18);   /* buttons and badge sitting on the photo */
    --jbpc-btn-bg: #000000;
    --jbpc-btn-ink: #ffffff;
    --jbpc-btn-hover: #4c1da1;
    --jbpc-field-bg: #ffffff;
    --jbpc-field-ink: #121212;
    --jbpc-field-line: #666666;
    --jbpc-stock: #91ff00;
    --jbpc-alert: #c62828;
    --jbpc-radius: 10px;
    --jbpc-radius-sm: 5px;
    --jbpc-thumb: 76px;
    font-family: "Open Sans", Arial, sans-serif;
    color: var(--jbpc-ink);
}

/* ── price range (top) and the chosen option's price (by the quantity) ── */ .jbpc-range{margin: 0;font-family: Bayon,"Arial Narrow",sans-serif;font-size: 52px;font-weight: 400;line-height: 1;color: var(--jbpc-accent);}.jbpc-range__note{margin: 6px 0 0;font-size: 13px;font-weight: 600;color: var(--jbpc-muted);}.jbpc-buy__price{display: flex;flex-wrap: wrap;align-items: baseline;gap: 4px 14px;margin: 0 0 12px;}.jbpc-buy__price[hidden]{display: none;}.jbpc-price{margin: 0;font-family: Bayon,"Arial Narrow",sans-serif;font-size: 44px;font-weight: 400;line-height: 1;color: var(--jbpc-accent);}.jbpc-price__regular{margin-left: .3em;font-size: .55em;color: var(--jbpc-muted);}/* stock note in the UI's own grey; the status is the brand lime dot (logo green),
   not the olive the live template uses */
.jbpc-stock {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--jbpc-muted);
}
.jbpc-stock::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--jbpc-stock);
    box-shadow: 0 0 0 2px rgba(145, 255, 0, .25);
}
.jbpc-stock:empty { display: none; }
.jbpc-stock--out::before { background: var(--jbpc-alert); box-shadow: none; }

/* ── option axes ── */
.jbpc-axis {
    margin: 22px 0 0;
    padding: 0;
    border: 0;
    min-width: 0;
}
.jbpc-axis__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    margin: 0 0 9px;
    padding: 0;
}
.jbpc-axis__label {
    font-family: Bayon, "Arial Narrow", sans-serif;
    font-size: 24px;
    line-height: 1;
    text-transform: uppercase;
    color: var(--jbpc-ink);
}
.jbpc-axis__value {
    font-size: 15px;
    font-weight: 600;
    color: var(--jbpc-accent);
}
.jbpc-axis__need {
    font-size: 14px;
    font-weight: 600;
    color: var(--jbpc-alert);
}
.jbpc-axis--missing .jbpc-axis__label { color: var(--jbpc-alert); }

.jbpc-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.jbpc-tile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 64px;
    min-height: 44px;
    margin: 0;
    padding: 8px 14px;
    border: 1px solid var(--jbpc-line);
    border-radius: var(--jbpc-radius-sm);
    background: var(--jbpc-tile-bg);
    color: var(--jbpc-ink);
    font: 600 14px/1.2 "Open Sans", Arial, sans-serif;
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.jbpc-tile:hover { border-color: var(--jbpc-accent); }
.jbpc-tile:focus-visible {
    outline: 2px solid rgba(76, 29, 161, .45);
    outline-offset: 2px;
}
/* not available with the current choice: still clickable, it only reads quieter */
.jbpc-tile--na {
    border-color: var(--jbpc-off-line);
    color: var(--jbpc-off-ink);
}
.jbpc-tile--na:hover {
    border-color: #bdb6c8;
    color: var(--jbpc-muted);
}
/* struck through as well, so "not with your current choice" reads at a glance (owner 07-10) */
.jbpc-tile--na .jbpc-tile__text {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    text-decoration-color: currentColor;
}
.jbpc-tile[aria-pressed="true"] {
    border-color: var(--jbpc-accent);
    background: var(--jbpc-accent-weak);
    color: var(--jbpc-accent);
    box-shadow: var(--jbpc-shadow);
}
.jbpc-tile__swatch {
    flex: none;
    width: 34px;
    height: 34px;
    margin: -4px 0 -4px -8px;
    border-radius: 4px;
    object-fit: cover;
    background: #f4f4f4;
}
.jbpc-tile--na .jbpc-tile__swatch {
    opacity: .45;
    filter: grayscale(1);
}

.jbpc-clear {
    margin: 12px 0 0;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--jbpc-accent);
    font: 600 14px "Open Sans", Arial, sans-serif;
    text-decoration: underline;
    cursor: pointer;
}
.jbpc-clear[hidden] { display: none; }

/* ── quantity + add to basket ── */
.jbpc-buy { margin: 26px 0 0; }
.jbpc-buy__row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 14px;
}
.jbpc-qty {
    display: inline-flex;
    align-items: stretch;
    gap: 8px;
}
.jbpc-qty__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 0;
    border-radius: var(--jbpc-radius);
    background: var(--jbpc-btn-bg);
    color: var(--jbpc-btn-ink);
    cursor: pointer;
    transition: all .2s;
}
.jbpc-qty__btn svg { display: block; }
.jbpc-qty__btn:hover:not(:disabled) {
    background: var(--jbpc-btn-hover);
    box-shadow: var(--jbpc-shadow-hover);
}
.jbpc-qty__input:hover,
.jbpc-qty__input:focus { box-shadow: var(--jbpc-shadow); outline: 0; }
.jbpc-qty__btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}
.jbpc-qty__input {
    width: 130px;
    height: 56px;
    margin: 0;
    padding: 0 6px;
    border: 1px solid var(--jbpc-field-line);
    border-radius: var(--jbpc-radius);
    background: var(--jbpc-field-bg);
    color: var(--jbpc-field-ink);
    font: 700 24px/1 Inter, Helvetica, Arial, sans-serif;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}
.jbpc-qty__input::-webkit-outer-spin-button,
.jbpc-qty__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Add to basket: the live Divi button, state for state.
   inactive  #000, opacity .5, not-allowed, no hover change
   active    #000, opacity 1, pointer
   hover     #4C1DA1, padding-right 14px -> 28px, Divi arrow slides in
             (margin-left -1em -> 0, opacity 0 -> 1), everything 0.2s */
.jbpc-atc {
    position: relative;
    flex: 1 1 220px;
    min-height: 56px;
    padding: 16px 14px;
    border: 0;
    border-radius: var(--jbpc-radius);
    background: var(--jbpc-btn-bg);
    color: var(--jbpc-btn-ink);
    font: 700 14px/23.8px Inter, Helvetica, Arial, Lucida, sans-serif;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .2s;
}
.jbpc-atc::after {
    content: "5";
    position: absolute;
    margin-left: -1em;
    font-family: ETmodules;
    font-size: 1.6em;
    font-weight: 400;
    line-height: 1em;
    letter-spacing: 0;
    text-transform: none;
    opacity: 0;
    transition: all .2s;
}
.jbpc-atc:not([aria-disabled="true"]):hover {
    padding-right: 28px;
    background: var(--jbpc-btn-hover);
    box-shadow: var(--jbpc-shadow-hover);   /* added on top of the Divi look (owner 07-10) */
}
.jbpc-atc:not([aria-disabled="true"]):hover::after {
    margin-left: 0;
    opacity: 1;
}
.jbpc-atc[aria-disabled="true"] {
    opacity: .5;
    cursor: not-allowed;
}
/* off the shop there is no Divi icon font: draw the same arrow, same motion */
.jbpc-no-etmodules .jbpc-atc::after {
    content: "";
    width: 1em;
    height: 1em;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M12 8l8 8-8 8' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

.jbpc-hint {
    margin: 10px 0 0;
    font-size: 14px;
    color: var(--jbpc-muted);
}
.jbpc-hint:empty { display: none; }

/* Express checkout row. The buttons themselves are the payment plugin's cross-origin frames (Revolut: Apple Pay,Google Pay);only the frame around them is ours — side by side,the main button's height and corners. On the
   shop the same rules apply to .wc-revolut-payment-request-instance. */
.jbpc-express {
    display: flex;
    gap: 14px;
    margin: 14px 0 0;
}
.jbpc-express:empty { display: none; }
.jbpc-express > * {
    flex: 1 1 0;
    min-width: 0;
    height: 56px;
    overflow: hidden;
    border-radius: var(--jbpc-radius);
    transition: box-shadow .2s, transform .2s;
}
/* hover lives on our frame: a cross-origin button cannot be styled inside, but its
   wrapper is :hover whenever the pointer is over it */
.jbpc-express > *:hover {
    box-shadow: var(--jbpc-shadow-hover);
    transform: translateY(-1px);
}

/* ── gallery: main image + thumbnail slider ── */
.jbpc-gallery__main {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: var(--jbpc-radius);
    background: #ffffff;
    box-shadow: var(--jbpc-shadow);
    touch-action: pan-y;
}
.jbpc-gallery__main img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
}
.jbpc-gallery__zoomimg {
    position: absolute;
    top: 0;
    left: 0;
    max-width: none;
    background: #ffffff;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}
.jbpc-gallery__main.is-zooming .jbpc-gallery__zoomimg { opacity: 1; }
/* arrows and counter only show while the pointer is over the photo (or focus is in it) */
/* every button on the gallery: white with a dark icon, purple with a white icon
   and a stronger shadow on hover; icons are SVG, centred by flex, not glyphs */
.jbpc-gallery__arrow,
.jbpc-thumbs__nav,
.jbpc-gallery__zoom {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: #ffffff;
    color: var(--jbpc-ink);
    cursor: pointer;
    transition: opacity .2s, background-color .2s, color .2s, box-shadow .2s;
}
.jbpc-gallery__arrow svg,
.jbpc-thumbs__nav svg { display: block; }
.jbpc-gallery__arrow:hover,
.jbpc-thumbs__nav:hover:not(:disabled),
.jbpc-gallery__zoom:hover {
    background: var(--jbpc-accent);
    color: #ffffff;
    box-shadow: var(--jbpc-shadow-hover);
}
.jbpc-gallery__arrow {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .8);   /* buttons over the photo: 80% white on a 6px blur */
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: var(--jbpc-shadow-photo);
    opacity: 0;
    transform: translateY(-50%);
}
.jbpc-gallery__arrow--prev { left: 14px; }
.jbpc-gallery__arrow--next { right: 14px; }
.jbpc-gallery__count {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 3px 9px;
    border-radius: 12px;
    background: rgba(0, 0, 0, .45);
    -webkit-backdrop-filter: blur(6px);   /* same frosted glass as the buttons on the photo */
    backdrop-filter: blur(6px);
    box-shadow: var(--jbpc-shadow-photo);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: opacity .2s;
}
.jbpc-gallery__main:hover .jbpc-gallery__arrow,
.jbpc-gallery__main:hover .jbpc-gallery__count,
.jbpc-gallery__main:focus-within .jbpc-gallery__arrow,
.jbpc-gallery__main:focus-within .jbpc-gallery__count { opacity: 1; }
/* the magnifier, drawn exactly like the live WooCommerce trigger */
.jbpc-gallery__zoom {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 100%;
    background: rgba(255, 255, 255, .2);   /* photo not hovered: frosted glass (owner 07-10) */
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: var(--jbpc-shadow-photo);
    color: #000000;
}
/* photo hovered: 80% white on the blur, like the arrows that appear with it; the button itself hovered: purple */
.jbpc-gallery__main:hover .jbpc-gallery__zoom,
.jbpc-gallery__main:focus-within .jbpc-gallery__zoom {
    background: rgba(255, 255, 255, .8);
    box-shadow: var(--jbpc-shadow-photo);
}
.jbpc-gallery__main .jbpc-gallery__zoom:hover {
    background: var(--jbpc-accent);
    color: #ffffff;
    box-shadow: var(--jbpc-shadow-hover);
}
.jbpc-gallery__zoom::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 9px;
    width: 10px;
    height: 10px;
    border: 2px solid currentColor;
    border-radius: 100%;
    box-sizing: content-box;
}
.jbpc-gallery__zoom::after {
    content: "";
    position: absolute;
    top: 19px;
    left: 22px;
    width: 2px;
    height: 8px;
    border-radius: 6px;
    background: currentColor;
    transform: rotate(-45deg);
}
/* full-screen viewer behind the magnifier */
.jbpc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .9);
}
.jbpc-lightbox[hidden] { display: none; }
.jbpc-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    user-select: none;
}
.jbpc-lightbox__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: absolute;
    border: 0;
    background: rgba(255, 255, 255, .12);
    color: #ffffff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}
.jbpc-lightbox__btn:hover { background: rgba(255, 255, 255, .25); }
.jbpc-lightbox__close { top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; }
.jbpc-lightbox__prev,
.jbpc-lightbox__next { top: 50%; width: 48px; height: 64px; border-radius: 8px; transform: translateY(-50%); }
.jbpc-lightbox__prev { left: 14px; }
.jbpc-lightbox__next { right: 14px; }
.jbpc-lightbox__count {
    position: absolute;
    top: 22px;
    left: 20px;
    color: rgba(255, 255, 255, .8);
    font-size: 13px;
}
.jbpc-thumbs {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 22px 0 0;
}
.jbpc-thumbs__track {
    display: flex;
    flex: 1;
    gap: 14px;
    min-width: 0;
    padding: 6px 12px 22px;      /* a scroll box clips on both axes: room for the 16px shadow below and at the ends */
    scroll-padding-inline: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.jbpc-thumbs__track::-webkit-scrollbar { display: none; }
/* thumbnails as on the live gallery: no outline at all, the photo just dims
   unless it is the one shown or under the pointer; 0.5s fade. The live .5
   reads too faint (owner 07-10), so the dimming is lighter: .7 */
.jbpc-thumb {
    flex: 0 0 var(--jbpc-thumb);
    height: var(--jbpc-thumb);
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 10px -6px rgba(76, 29, 161, .22);   /* tighter than the module shadow (owner 07-10) */
    scroll-snap-align: start;
    cursor: pointer;
    transition: box-shadow .2s;
}
.jbpc-thumb:hover { box-shadow: 0 9px 11px -6px rgba(76, 29, 161, .34); }
.jbpc-thumb[aria-current="true"] { box-shadow: 0 10px 12px -6px rgba(76, 29, 161, .5); }   /* the photo shown: clearest */
.jbpc-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .7;
    transition: opacity .5s;
}
.jbpc-thumb[aria-current="true"] img,
.jbpc-thumb:hover img { opacity: 1; }
.jbpc-thumb:focus-visible {
    outline: 2px solid rgba(76, 29, 161, .45);
    outline-offset: 1px;
}
.jbpc-thumbs__nav {
    flex: none;
    width: 34px;
    height: var(--jbpc-thumb);
    margin-top: 6px;             /* level with the thumbnails inside the padded track */
    border-radius: 8px;
    box-shadow: var(--jbpc-shadow);
}
.jbpc-thumbs__nav:disabled {
    opacity: .35;
    cursor: default;
}

@media (max-width: 767px) {
    .jbpc,
    .jbpc-gallery { --jbpc-thumb: 60px; }
    .jbpc-range { font-size: 32px; }
    .jbpc-price { font-size: 34px; }
    .jbpc-axis__label { font-size: 20px; }
    .jbpc-tile {
        min-height: 42px;
        padding: 7px 11px;
    }
    .jbpc-qty {
        flex: 1 1 100%;
        min-width: 0;
    }
    .jbpc-qty__input {
        flex: 1;
        width: auto;
        min-width: 0;   /* an input will not shrink below its default ~20-character width otherwise */
    }
    .jbpc-atc { flex-basis: 100%; }
    .jbpc-thumbs__nav { display: none; }
    .jbpc-gallery__arrow {
        width: 38px;
        height: 38px;
        font-size: 22px;
    }
}