/**
 * HBP single-product styles
 * Optimized for the custom WooCommerce template used by Hello Biz child themes.
 * Plain CSS only — no framework dependency.
 */

:root {
    --hbp-blue: #075eae;
    --hbp-blue-dark: #064e91;
    --hbp-blue-soft: #eaf4fd;
    --hbp-yellow: #ffc400;
    --hbp-ink: #262626;
    --hbp-text: #444b52;
    --hbp-muted: #717980;
    --hbp-line: #e1e7ed;
    --hbp-surface: #ffffff;
    --hbp-soft: #f6f8fa;
    --hbp-danger: #a63333;
    --hbp-success: #16794a;
    --hbp-radius-sm: 8px;
    --hbp-radius-md: 12px;
    --hbp-radius-lg: 16px;
    --hbp-shadow-sm: 0 6px 20px rgb(13 54 93 / 7%);
    --hbp-shadow-md: 0 16px 44px rgb(13 54 93 / 9%);
    --hbp-container: 1440px;
    --hbp-sticky-offset: 112px;

    --wc-notice-primary: #0b5fa5;
    --wc-notice-primary-hover: #084a80;
    --wc-notice-success: #16794a;
    --wc-notice-success-bg: #eaf7f0;
    --wc-notice-info: #0b5fa5;
    --wc-notice-info-bg: #eaf3fb;
    --wc-notice-warning: #8a5a00;
    --wc-notice-warning-bg: #fff7df;
    --wc-notice-danger: #b42318;
    --wc-notice-danger-bg: #fff0ef;
    --wc-notice-text: #17202a;
    --wc-notice-border: #dce3ea;
    --border-radius-1: 8px;
}

/* --------------------------------------------------------------------------
   Page foundation
   -------------------------------------------------------------------------- */

body.hbp-single-product {
    background: var(--hbp-surface);
}

body.hbp-single-product .site-main,
body.hbp-single-product main,
body.hbp-single-product #primary,
body.hbp-single-product .content-area {
    width: 100%;
    max-width: none;
}

.hbp-product-shell {
    width: min(calc(100% - 48px), var(--hbp-container));
    margin-inline: auto;
    padding-top: clamp(24px, 3vw, 42px) clamp(72px, 8vw, 116px);
    color: var(--hbp-ink);
    direction: rtl;
}

.hbp-product-shell,
.hbp-product-shell *,
.hbp-product-shell *::before,
.hbp-product-shell *::after {
    box-sizing: border-box;
}

.hbp-product-shell :where(img, video, iframe) {
    max-width: 100%;
}

.hbp-product-shell a {
    color: inherit;
    text-decoration: none;
}

.hbp-product-shell :where(button, input, select, textarea) {
    font: inherit;
}

.hbp-product-shell :where(a, button, input, select, textarea):focus-visible {
    outline: 3px solid rgb(7 94 174 / 32%);
    outline-offset: 3px;
}

.hbp-product-layout {
    width: 100%;
}

/* The PHP template has one content wrapper (gallery + tabs) beside summary. */
.product-main-view {
    display: grid;
    grid-template-columns: minmax(300px, 0.86fr) minmax(0, 1.64fr);
    grid-template-areas: "summary content";
    gap: clamp(28px, 3.5vw, 54px);
    align-items: start;
    direction: ltr;
}

.product-main-view > div:first-child {
    grid-area: content;
    min-width: 0;
    direction: rtl;
}

.hbp-product-gallery,
.hbp-product-summary,
.hbp-product-tabs,
.hbp-product-recommendations {
    min-width: 0;
    direction: rtl;
}

.hbp-product-gallery {
    grid-area: gallery;
}

.hbp-product-summary {
    grid-area: summary;
}

.hbp-product-tabs {
    grid-area: tabs;
    margin-top: clamp(44px, 6vw, 84px);
}

.hbp-product-recommendations {
    margin-top: clamp(56px, 7vw, 88px);
}

/* --------------------------------------------------------------------------
   Notices
   -------------------------------------------------------------------------- */

.hbp-product-shell .woocommerce-notices-wrapper {
    width: 100%;
    margin: 0 0 24px;
}

.hbp-product-shell :where(
    .woocommerce-message,
    .woocommerce-info,
    .woocommerce-error,
    .woocommerce-warning,
    .wc-block-components-notice-banner
) {
    position: relative;
    display: flow-root;
    width: 100%;
    margin: 0 0 16px;
    padding: 15px 18px;
    border: 1px solid var(--wc-notice-border);
    border-inline-start-width: 4px;
    border-radius:0
    background: #fff;
    box-shadow: none;
    color: var(--wc-notice-text);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.9;
    list-style: none;
    text-align: start;
}

.hbp-product-shell :where(
    .woocommerce-message,
    .woocommerce-info,
    .woocommerce-error
)::before {
    display: none;
}

.hbp-product-shell :where(
    .woocommerce-message,
    .woocommerce-notice--success,
    .wc-block-components-notice-banner.is-success
) {
    border-color: #b9dfca;
    border-inline-start-color: var(--wc-notice-success);
    background: var(--wc-notice-success-bg);
}

.hbp-product-shell :where(
    .woocommerce-info,
    .wc-block-components-notice-banner.is-info
) {
    border-color: #bed9ee;
    border-inline-start-color: var(--wc-notice-info);
    background: var(--wc-notice-info-bg);
}

.hbp-product-shell :where(
    .woocommerce-warning,
    .wc-block-components-notice-banner.is-warning
) {
    border-color: #ead597;
    border-inline-start-color: var(--wc-notice-warning);
    background: var(--wc-notice-warning-bg);
}

.hbp-product-shell :where(
    .woocommerce-error,
    .woocommerce-notice--error,
    .wc-block-components-notice-banner.is-error
) {
    border-color: #efc2bd;
    border-inline-start-color: var(--wc-notice-danger);
    background: var(--wc-notice-danger-bg);
}

.hbp-product-shell .woocommerce-error li {
    margin: 0;
    padding: 0;
}

.hbp-product-shell .woocommerce-error li + li {
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px solid rgb(180 35 24 / 14%);
}

.hbp-product-shell .wc-block-components-notice-banner__content {
    color: inherit;
    line-height: inherit;
}

.hbp-product-shell .wc-block-components-notice-banner > svg {
    flex: 0 0 auto;
    margin-inline: 0 12px;
}

.hbp-product-shell :where(
    .woocommerce-message,
    .woocommerce-info,
    .woocommerce-error,
    .woocommerce-warning,
    .wc-block-components-notice-banner
) a:not(.button) {
    color: var(--wc-notice-primary);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hbp-product-shell :where(
    .woocommerce-message,
    .woocommerce-info,
    .woocommerce-error,
    .woocommerce-warning,
    .wc-block-components-notice-banner
) :where(.button, button) {
    float: none;
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    margin: 0;
    margin-inline-end: 12px;
    padding: 8px 16px;
    border: 1px solid var(--wc-notice-primary);
    border-radius: 0;
    background: var(--wc-notice-primary);
    box-shadow: none;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease;
}

.hbp-product-shell :where(
    .woocommerce-message,
    .woocommerce-info,
    .woocommerce-error,
    .woocommerce-warning,
    .wc-block-components-notice-banner
) :where(.button, button):hover {
    border-color: var(--wc-notice-primary-hover);
    background: var(--wc-notice-primary-hover);
    color: #fff;
}

/* Optional pulse remains opt-in and no longer affects every WooCommerce button. */
.hbp-product-shell .pulse-button {
    --pulse-color: var(--wc-notice-success);
    position: relative;
    isolation: isolate;
    overflow: visible;
}

.hbp-product-shell .pulse-button::after {
    position: absolute;
    inset: -3px;
    border: 2px solid var(--pulse-color);
    border-radius: inherit;
    content: "";
    opacity: 0;
    pointer-events: none;
    animation: hbp-button-pulse 1.8s ease-out infinite;
}

@keyframes hbp-button-pulse {
    0% {
        opacity: 0.75;
        transform: scale(1);
    }
    70%,
    100% {
        opacity: 0;
        transform: scale(1.2);
    }
}

/* --------------------------------------------------------------------------
   Breadcrumbs and product gallery
   -------------------------------------------------------------------------- */

.hbp-breadcrumbs {
    min-height: 30px;
    margin-bottom: 14px;
}

.hbp-breadcrumbs .woocommerce-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #596168;
    font-size: 13px;
    line-height: 1.8;
}

.hbp-breadcrumbs .woocommerce-breadcrumb a {
    color: #596168;
    transition: color 160ms ease;
}

.hbp-breadcrumbs .woocommerce-breadcrumb a:hover {
    color: var(--hbp-blue);
}

.hbp-breadcrumb-separator {
    width: 17px;
    height: 17px;
    color: #899097;
    font-size: 15px;
    line-height: 1;
}

.hbp-gallery-stage {
    position: relative;
}

.hbp-gallery-stage .onsale {
    position: absolute;
    z-index: 6;
    inset: 16px 16px auto auto;
    display: grid;
    min-width: 54px;
    min-height: 54px;
    place-items: center;
    margin: 0;
    padding: 8px;
    border: 0;
    border-radius: 50%;
    background: var(--hbp-blue);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
}

.hbp-product-gallery .woocommerce-product-gallery {
    position: relative;
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
}

.hbp-product-gallery .woocommerce-product-gallery__wrapper {
    margin: 0;
}

.hbp-product-gallery .woocommerce-product-gallery__image > a {
    display: flex;
    width: 100%;
    aspect-ratio: 1.48 / 1;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #eceff2;
    border-radius:0;
    background: #f2f3f4;
}

.hbp-product-gallery .woocommerce-product-gallery__image img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 650px;
    margin: 0;
    object-fit: contain;
}

.hbp-product-gallery .woocommerce-product-gallery__trigger {
    position: absolute;
    z-index: 8;
    inset: 16px auto auto 16px;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgb(7 94 174 / 9%);
    border-radius: 0px;
    background: rgb(255 255 255 / 94%);
    box-shadow: var(--hbp-shadow-sm);
    color: transparent;
    font-size: 0;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.hbp-product-gallery .woocommerce-product-gallery__trigger:hover {
    box-shadow: var(--hbp-shadow-md);
    transform: translateY(-1px);
}

.hbp-product-gallery .woocommerce-product-gallery__trigger::before,
.hbp-product-gallery .woocommerce-product-gallery__trigger::after {
    display: none !important;
}

.hbp-product-gallery .woocommerce-product-gallery__trigger::before {
    position: static;
    display: block !important;
    width: 22px;
    height: 22px;
    color: #4c545c;
    content: "\f211";
    font-family: dashicons;
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
}

.hbp-product-gallery .flex-control-thumbs {
    display: flex;
    gap: 14px;
    margin: 18px 0 0 !important;
    padding: 4px 2px 8px !important;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    list-style: none;
    scrollbar-color: #b9c5d0 transparent;
    scrollbar-width: thin;
    scroll-snap-type: inline proximity;
}

.hbp-product-gallery .flex-control-thumbs li {
    flex: 0 0 96px;
    width: 96px !important;
    margin: 0 !important;
    scroll-snap-align: start;
}

.hbp-product-gallery .flex-control-thumbs img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 0.8;
    border: 2px solid transparent;
    border-radius: 0px;
    background: #f0f1f2;
    object-fit: cover;
    opacity: 1 !important;
    cursor: pointer;
    transition: border-color 180ms ease, transform 180ms ease;
}

.hbp-product-gallery .flex-control-thumbs img:hover {
    transform: translateY(-2px);
}

.hbp-product-gallery .flex-control-thumbs img.flex-active {
    border-color: var(--hbp-blue);
}

.hbp-gallery-nav {
    position: absolute;
    z-index: 7;
    top: 50%;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 1px solid rgb(7 94 174 / 8%);
    border-radius: 50%;
    background: rgb(255 255 255 / 94%);
    box-shadow: var(--hbp-shadow-sm);
    color: #545a60;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color 180ms ease, transform 180ms ease;
}

.hbp-gallery-nav:hover,
.hbp-gallery-nav:focus-visible {
    color: var(--hbp-blue);
    transform: translateY(-50%) scale(1.05);
}

.hbp-gallery-nav .dashicons {
    width: 22px;
    height: 22px;
    font-size: 22px;
}

.hbp-gallery-nav--previous {
    right: 16px;
}

.hbp-gallery-nav--next {
    left: 16px;
}

/* --------------------------------------------------------------------------
   Product summary and purchase card
   -------------------------------------------------------------------------- */

.hbp-product-summary.summary {
    position: sticky;
    top: var(--hbp-sticky-offset);
    float: none !important;
    width: auto !important;
    margin: 44px 0 0 !important;
    align-self: start;
    z-index:10;
}

.hbp-product-summary .product_title {
    margin: 0 0 12px;
    overflow-wrap: anywhere;
    color: var(--hbp-ink);
    font-size: clamp(23px, 1.65vw, 32px);
    font-weight: 800;
    line-height: 1.55;
}

.hbp-product-summary .woocommerce-product-details__short-description {
    margin: 0 0 14px;
    color: var(--hbp-muted);
    font-size: 14px;
    line-height: 2;
}

.hbp-product-summary .woocommerce-product-details__short-description > :first-child {
    margin-top: 0;
}

.hbp-product-summary .woocommerce-product-details__short-description > :last-child {
    margin-bottom: 0;
}

.hbp-product-summary .woocommerce-product-rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin: 0 0 14px;
    font-size: 13px;
}

.hbp-product-summary .star-rating,
.hbp-product-summary .star-rating span::before {
    color: var(--hbp-yellow);
}

.hbp-product-summary .woocommerce-review-link {
    color: var(--hbp-muted);
}

.hbp-product-summary > .price {
    display: block;
    margin: 0 0 22px;
    color: var(--hbp-blue) !important;
    font-size: clamp(21px, 1.5vw, 29px) !important;
    font-weight: 900;
    line-height: 1.6;
}

.hbp-product-summary .price del {
    margin-inline-end: 8px;
    color: #92979c;
    font-size: 0.72em;
    font-weight: 500;
    opacity: 1;
}

.hbp-product-summary .price ins {
    color: var(--hbp-blue);
    text-decoration: none;
}

.hbp-product-summary .stock {
    margin: 10px 0;
    font-size: 13px;
    font-weight: 700;
}

.hbp-product-summary .stock.in-stock {
    color: var(--hbp-success);
}

.hbp-product-summary .stock.out-of-stock {
    color: var(--hbp-danger);
}

.hbp-product-summary .product_meta {
    display: grid;
    gap: 5px;
    margin: 16px 0 0;
    color: var(--hbp-muted);
    font-size: 12px;
    line-height: 1.8;
}

.hbp-product-summary .product_meta a {
    color: var(--hbp-blue);
}

.hbp-purchase-card {
    padding: 22px 18px 16px;
    border: 1px solid var(--hbp-line);
    border-radius:var(--border-radius-1);
    background: var(--hbp-surface);
    box-shadow: var(--hbp-shadow-sm);
}

.hbp-purchase-card__intro {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}

.hbp-purchase-card__icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    color: #363d44;
    font-size: 27px;
}

.hbp-purchase-card__intro h2 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.6;
}

.hbp-purchase-card__intro p {
    margin: 0;
    color: var(--hbp-muted);
    font-size: 12px;
    line-height: 1.8;
}

.hbp-purchase-card form.cart {
    margin: 0;
}

.hbp-purchase-card table.variations {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    border: 0;
}

.hbp-purchase-card table.variations tbody {
    display: grid;
    gap: 10px;
}

.hbp-purchase-card table.variations tr {
    display: grid;
    grid-template-columns: minmax(82px, auto) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 58px;
    padding: 7px 10px;
    border: 1px solid rgb(7 94 174 / 48%);
    border-radius: 0px;
    background: var(--hbp-blue-soft);
}

.hbp-purchase-card table.variations th,
.hbp-purchase-card table.variations td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: start;
}

.hbp-purchase-card table.variations th.label label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #2e3338;
    font-size: 13px;
    font-weight: 800;
}

.hbp-purchase-card table.variations td.value {
    position: relative;
    width: 100%;
}

.hbp-purchase-card table.variations tr svg {
    width: 20px;
    height: 20px;
}

.hbp-variation-row-icon {
    display: inline-flex;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    font-size: 19px;
}

.hbp-variation-remove {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-end;
    padding: 6px 0 0;
}

.hbp-purchase-card table.variations select {
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 6px 12px 6px 34px;
    border: 1px solid transparent;
    border-radius: 0px;
    outline: 0;
    background-color: rgb(255 255 255 / 42%);
    color: #343a40;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: none;
}

.hbp-purchase-card table.variations select:focus-visible {
    border-color: rgb(7 94 174 / 35%);
    outline: 2px solid rgb(7 94 174 / 24%);
    outline-offset: 1px;
}

/* Smart Variation Swatches: keep its form behavior and only normalize sizing. */
.hbp-purchase-card table.variations .svsw-control,
.hbp-purchase-card table.variations .svsw-modal-trigger {
    width: 100%;
    max-width: none;
    min-width: 0;
}

.hbp-purchase-card table.variations .svsw-modal-trigger {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.hbp-purchase-card table.variations .svsw-items {
    margin: 0;
}

.hbp-purchase-card .reset_variations {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    margin: 6px 0 0;
    padding: 4px 11px;
    border: 1px solid var(--hbp-danger);
    border-radius: 0px;
    color: var(--hbp-danger);
    font-size: 11px;
    transition: background-color 180ms ease, color 180ms ease;
}

.hbp-purchase-card .reset_variations:hover {
    background: var(--hbp-danger);
    color: #fff;
}

.hbp-purchase-card .single_variation_wrap {
    margin-top: 5px;
}

.hbp-purchase-card :where(
    .woocommerce-variation-description,
    .woocommerce-variation-availability
) {
    color: #596168;
    font-size: 12px;
    line-height: 1.8;
}

.hbp-purchase-card .woocommerce-variation-price {
    margin: 8px 0 12px;
    color: var(--hbp-blue);
    font-size: 20px;
    font-weight: 800;
}

.hbp-purchase-card .woocommerce-variation-add-to-cart,
.hbp-purchase-card form.cart:not(.variations_form) {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hbp-purchase-card .quantity {
    flex: 0 0 68px;
    margin: 0 !important;
}

.hbp-purchase-card .quantity .qty {
    width: 68px;
    height: 52px;
    padding: 5px;
    border: 1px solid #cfd8e2;
    border-radius:var(--border-radius-1);
    background: #fff;
    color: var(--hbp-ink);
    text-align: center;
}

.hbp-purchase-card .single_add_to_cart_button {
    position: relative;
    display: inline-flex !important;
    flex: 1 1 190px;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 12px 48px 12px 20px !important;
    border: 0 !important;
    border-radius: var(--border-radius-1) !important;
    background: var(--hbp-blue) !important;
    box-shadow: 0 8px 18px rgb(7 94 174 / 18%) !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
    cursor: pointer;
    transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.hbp-purchase-card .single_add_to_cart_button::before {
    position: absolute;
    top: 50%;
    right: 18px;
    width: 20px;
    height: 20px;
    content: "\f174";
    font-family: dashicons;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    transform: translateY(-50%);
}

.hbp-purchase-card .single_add_to_cart_button::after {
    display: none;
    content: none;
}

.hbp-purchase-card .single_add_to_cart_button:hover:not(:disabled) {
    background: var(--hbp-blue-dark) !important;
    box-shadow: 0 10px 22px rgb(7 94 174 / 25%) !important;
    transform: translateY(-1px);
}

.hbp-purchase-card .single_add_to_cart_button:where(.disabled, :disabled) {
    cursor: not-allowed;
    opacity: 0.48;
}

.hbp-purchase-card table.group_table {
    width: 100%;
    margin-bottom: 14px;
    border-collapse: collapse;
}

.hbp-purchase-card table.group_table td {
    padding: 10px 6px;
    border-bottom: 1px solid var(--hbp-line);
    vertical-align: middle;
}

.hbp-purchase-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 18px;
    margin-top: 16px;
    color: #5f666c;
    font-size: 12px;
    width:100%;
}
.add-to-cart-wrapper{
    display: flex;
    justify-content: center;
    align-items: center;
    position: sticky;
    bottom: 0;
    background: #fff;
    width: 100%;
    padding: 64px 32px;
    left: 0;
    gap:8px;
    flex-wrap: wrap;
    z-index: 100000;
}
.related.products{position:relative; background:#fff;}
.hbp-purchase-card__meta a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: color 160ms ease;
}

.hbp-purchase-card__meta a:hover {
    color: var(--hbp-blue);
}

.hbp-purchase-card__support-icon {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.hbp-purchase-card__divider {
    width: 1px;
    height: 24px;
    background: #d8dde2;
}

.hbp-benefits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
    overflow: hidden;
    border: 1px solid var(--hbp-line);
    border-radius:var(--border-radius-1);
    background: #fff;
}

.hbp-benefit {
    display: flex;
    min-width: 0;
    min-height: 78px;
    align-items: center;
    gap: 10px;
    padding: 12px;
}

.hbp-benefit + .hbp-benefit {
    border-inline-start: 1px solid var(--hbp-line);
}

.hbp-benefit__icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    color: var(--hbp-blue);
    font-size: 36px;
    line-height: 1;
}

.hbp-benefit div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.hbp-benefit strong {
    color: var(--hbp-blue);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.hbp-benefit span {
    color: var(--hbp-muted);
    font-size: 10px;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Product tabs, attributes, reviews and video
   -------------------------------------------------------------------------- */

.hbp-product-tabs .woocommerce-tabs {
    padding: clamp(24px, 3.4vw, 44px);
    border: 1px solid var(--hbp-line);
    border-radius:var(--border-radius-1);
    background: #fbfcfd;
}

.hbp-product-tabs .woocommerce-tabs ul.tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin: 0 0 clamp(28px, 4vw, 48px) !important;
    padding: 0 0 14px !important;
    overflow: visible !important;
    border: 0 !important;
    border-bottom: 1px solid #b7c3cf !important;
    list-style: none;
}

.hbp-product-tabs .woocommerce-tabs ul.tabs::before,
.hbp-product-tabs .woocommerce-tabs ul.tabs::after,
.hbp-product-tabs .woocommerce-tabs ul.tabs li::before,
.hbp-product-tabs .woocommerce-tabs ul.tabs li::after {
    display: none !important;
    content: none !important;
}

.hbp-product-tabs .woocommerce-tabs ul.tabs li {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: var(--hbp-radius-sm) !important;
    background: transparent !important;
    text-align: center;
}

.hbp-product-tabs .woocommerce-tabs ul.tabs li a {
    display: flex !important;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    padding: 10px 12px !important;
    border-radius:var(--border-radius-1);
    color: #31363b !important;
    font-size: 14px;
    font-weight: 800 !important;
    line-height: 1.5;
    transition: background-color 180ms ease, color 180ms ease;
}

.hbp-product-tabs .woocommerce-tabs ul.tabs li a:hover {
    color: var(--hbp-blue) !important;
}

.hbp-product-tabs .woocommerce-tabs ul.tabs li.active a {
    background: var(--hbp-blue);
    color: #fff !important;
}

.hbp-product-tabs .woocommerce-tabs .panel {
    margin: 0 !important;
    color: var(--hbp-text);
    font-size: 14px;
    line-height: 2.05;
    overflow-wrap: anywhere;
}

.hbp-product-tabs .woocommerce-tabs .panel > :first-child {
    margin-top: 0;
}

.hbp-product-tabs .woocommerce-tabs .panel > :last-child {
    margin-bottom: 0;
}

.hbp-product-tabs .woocommerce-tabs .panel :where(h2, h3, h4) {
    color: var(--hbp-ink);
    line-height: 1.65;
}

.hbp-product-tabs .woocommerce-tabs .panel a {
    color: var(--hbp-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hbp-product-tabs table.woocommerce-product-attributes {
    width: min(100%, 760px);
    margin: 0 auto;
    border: 0;
    border-collapse: separate;
    border-spacing: 0 9px;
}

.hbp-product-tabs table.woocommerce-product-attributes tr {
    background: #eef1f4;
}

.hbp-product-tabs table.woocommerce-product-attributes tr:nth-child(even) {
    background: #fff;
}

.hbp-product-tabs table.woocommerce-product-attributes th,
.hbp-product-tabs table.woocommerce-product-attributes td {
    padding: 13px 18px;
    border: 0;
    background: transparent;
    text-align: start;
    vertical-align: middle;
}

.hbp-product-tabs table.woocommerce-product-attributes th {
    width: 42%;
    color: #30343a;
    font-weight: 800;
}

.hbp-product-tabs table.woocommerce-product-attributes td {
    color: #555c63;
}

.hbp-product-tabs table.woocommerce-product-attributes p {
    margin: 0;
}

.hbp-product-tabs #reviews #comments,
.hbp-product-tabs #reviews #review_form_wrapper {
    float: none;
    width: 100%;
}

.hbp-product-tabs #reviews #comments {
    margin-bottom: 36px;
}

.hbp-product-tabs #reviews #comments h2,
.hbp-product-tabs .comment-reply-title {
    display: block;
    margin: 0 0 18px;
    color: var(--hbp-blue);
    font-size: clamp(18px, 1.5vw, 24px);
    font-weight: 700;
    line-height: 1.7;
}

.hbp-product-tabs #reviews .commentlist {
    margin: 0;
    padding: 0;
}

.hbp-product-tabs #reviews #comments ol.commentlist li {
    margin-bottom: 14px;
    padding: 4px;
    border-radius: var(--hbp-radius-md);
    background: #fff;
}

.hbp-product-tabs #reviews #comments ol.commentlist li ul li {
    border-radius: var(--hbp-radius-md);
    background: #f1f3f5;
}

.hbp-product-tabs #reviews .comment_container {
    padding: 16px;
    border-radius: 0px;
}

.hbp-product-tabs #reviews #comments ol.commentlist li .comment-text {
    margin-inline-start: 70px;
    border: 0;
}

.hbp-product-tabs .comment-form-rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hbp-product-tabs .comment-form-rating label {
    margin: 0;
}

.hbp-product-tabs .woocommerce p.stars a::before,
.hbp-product-tabs .star-rating span::before {
    color: var(--hbp-yellow);
}

.hbp-product-tabs #reviews :where(
    textarea,
    input[type="text"],
    input[type="email"]
) {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #cfd6dd;
    border-radius:var(--border-radius-1);
    background: #fff;
    color: var(--hbp-ink);
}

.hbp-product-tabs #reviews textarea {
    min-height: 140px;
    resize: vertical;
}

.hbp-product-tabs #reviews input[type="submit"] {
    min-height: 44px;
    padding: 10px 28px;
    border: 0;
    border-radius:var(--border-radius-1)!important;
    background: var(--hbp-blue);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 180ms ease;
}

.hbp-product-tabs #reviews input[type="submit"]:hover {
    background: var(--hbp-blue-dark);
}

.hbp-video-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.hbp-video-card h3 {
    margin: 0 0 10px;
    font-size: 15px;
}

.hbp-video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 0px;
    background: #111;
}

.hbp-video-frame :where(iframe, video) {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
}

.hbp-video-fallback {
    position: absolute;
    inset: 50% auto auto 50%;
    padding: 11px 22px;
    border-radius:0
    background: var(--hbp-blue);
    color: #fff !important;
    white-space: nowrap;
    transform: translate(-50%, -50%);
}

/* --------------------------------------------------------------------------
   Upsells and related products
   -------------------------------------------------------------------------- */

.hbp-product-recommendations {
    padding-top: 32px;
    border-top: 1px solid var(--hbp-line);
}

.hbp-product-recommendations > section {
    margin: 0 0 48px;
}

.hbp-product-recommendations > section:last-child {
    margin-bottom: 0;
}

.hbp-product-recommendations h2 {
    margin: 0 0 24px;
    color: var(--hbp-ink);
    font-size: clamp(20px, 2vw, 27px);
    font-weight: 800;
    line-height: 1.6;
    text-align: start;
}

.hbp-product-recommendations ul.products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(14px, 2vw, 22px);
    margin: 0;
    padding: 0;
}

.hbp-product-recommendations ul.products::before,
.hbp-product-recommendations ul.products::after {
    display: none;
    content: none;
}

.hbp-product-recommendations ul.products li.product {
    display: flex;
    float: none;
    width: auto;
    min-width: 0;
    height: 100%;
    flex-direction: column;
    margin: 0;
    padding: 14px;
    overflow: hidden;
    border: 1px solid var(--hbp-line);
    border-radius:var(--border-radius-1)!important;
    background: #fff;
    box-shadow: 0 8px 26px rgb(13 54 93 / 5%);
    text-align: center;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.hbp-product-recommendations ul.products li.product:hover {
    border-color: rgb(7 94 174 / 22%);
    box-shadow: var(--hbp-shadow-md);
    transform: translateY(-3px);
}

.hbp-product-recommendations ul.products li.product a.woocommerce-LoopProduct-link {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.hbp-product-recommendations ul.products li.product img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 0.86;
    margin: 0 0 14px;
    border-radius:var(--border-radius-1)!important;
    background: var(--hbp-soft);
    object-fit: contain;
}

.hbp-product-recommendations ul.products li.product .woocommerce-loop-product__title {
    padding: 0;
    color: var(--hbp-ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.8;
    text-align: center;
}

.hbp-product-recommendations ul.products li.product .price {
    display: block;
    margin-top: auto;
    padding-top: 8px;
    color: var(--hbp-blue);
    font-size: 16px;
    font-weight: 800;
}

.hbp-product-recommendations .woocommerce-Price-currencySymbol {
    font-size: 0.8em;
    font-weight: 500;
}

.hbp-product-recommendations .star-rating {
    margin: 8px auto 0;
    color: var(--hbp-yellow);
}

.hbp-product-recommendations .star-rating::before,
.hbp-product-recommendations .star-rating span::before {
    color: var(--hbp-yellow);
}

.hbp-product-recommendations ul.products li.product .button {
    display: inline-flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    padding: 10px 14px;
    border: 1px solid var(--hbp-blue);
    border-radius:var(--border-radius-1)!important;
    background: var(--hbp-blue);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    transition: background-color 180ms ease, border-color 180ms ease;
}

.hbp-product-recommendations ul.products li.product .button:hover {
    border-color: var(--hbp-blue-dark);
    background: var(--hbp-blue-dark);
}

/* --------------------------------------------------------------------------
   Responsive: compact desktop / landscape tablet
   -------------------------------------------------------------------------- */

@media (max-width: 1200px) {
    .product-main-view {
        grid-template-columns: minmax(285px, 0.88fr) minmax(0, 1.4fr);
        gap: 30px;
    }

    .hbp-product-summary.summary {
        margin-top: 38px !important;
    }

    .hbp-product-gallery .woocommerce-product-gallery__image > a {
        aspect-ratio: 1.32 / 1;
    }

    .hbp-product-recommendations ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    :root {
        --hbp-sticky-offset: 92px;
    }

    .hbp-product-shell {
        width: min(calc(100% - 32px), var(--hbp-container));
    }

    .product-main-view {
        grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
        gap: 26px;
    }

    .hbp-product-tabs .woocommerce-tabs {
        padding: 28px 24px 34px;
    }

    .hbp-purchase-card table.variations tr {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .hbp-benefits {
        grid-template-columns: 1fr;
    }

    .hbp-benefit + .hbp-benefit {
        border-block-start: 1px solid var(--hbp-line);
        border-inline-start: 0;
    }
}

/* --------------------------------------------------------------------------
   Responsive: portrait tablet and mobile
   display:contents allows gallery -> summary -> tabs without changing PHP.
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
    .hbp-product-shell {
        width: min(calc(100% - 28px), 760px);
        padding-top: 20px;
        padding-bottom: 72px;
    }

    .product-main-view {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "gallery"
            "summary"
            "tabs";
        gap: 36px;
    }

    .product-main-view > div:first-child {
        display: contents;
    }

    .hbp-product-summary.summary {
        position: static;
        width: 100% !important;
        margin: 0 !important;
    }

    .hbp-product-tabs {
        margin-top: 0;
    }

    .hbp-product-gallery .woocommerce-product-gallery__image > a {
        aspect-ratio: 1.4 / 1;
    }

    .hbp-product-tabs .woocommerce-tabs ul.tabs {
        display: flex;
        gap: 7px;
        margin-bottom: 30px !important;
        padding-bottom: 10px !important;
        overflow-x: auto !important;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
        scroll-snap-type: inline proximity;
    }

    .hbp-product-tabs .woocommerce-tabs ul.tabs li {
        flex: 0 0 auto;
        min-width: 132px;
        scroll-snap-align: start;
    }

    .hbp-benefits {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hbp-benefit + .hbp-benefit {
        border-block-start: 0;
        border-inline-start: 1px solid var(--hbp-line);
    }

    .hbp-product-recommendations {
        margin-top: 64px;
    }

    .hbp-product-recommendations ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .add-to-cart-wrapper{
        width:100%;
    }
    
}
@media (max-width: 768px) {
    .add-to-cart-wrapper{
        position:static;
        width:100%;
        z-index: 0;
    }
    .hbp-purchase-card .single_add_to_cart_button{
        display:none!important;
    }
    .hbp-purchase-card .quantity {
    flex-grow: 2;
}
.hbp-purchase-card .quantity .qty{width:100%;}
}
@media (max-width: 640px) {
    .hbp-product-shell {
        width: min(calc(100% - 20px), 600px);
    }

    .product-main-view {
        gap: 30px;
    }

    .hbp-product-shell :where(
        .woocommerce-message,
        .woocommerce-info,
        .woocommerce-error,
        .woocommerce-warning,
        .wc-block-components-notice-banner
    ) {
        padding: 13px 14px;
        font-size: 13px;
        line-height: 1.85;
    }
.woocommerce ul.products[class*=columns-] li.product, .woocommerce-page ul.products[class*=columns-] li.product{
    width: 80%;
    margin: 0 auto;
}
    .hbp-product-shell :where(
        .woocommerce-message,
        .woocommerce-info,
        .woocommerce-error,
        .woocommerce-warning,
        .wc-block-components-notice-banner
    ) :where(.button, button) {
        display: flex;
        width: 100%;
        margin: 0 0 10px;
    }

    .hbp-breadcrumbs {
        overflow: hidden;
    }

    .hbp-breadcrumbs .woocommerce-breadcrumb {
        flex-wrap: nowrap;
        padding-bottom: 4px;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: thin;
    }

    .hbp-product-gallery .woocommerce-product-gallery__image > a {
        aspect-ratio: 1 / 1;
    }

    .hbp-product-gallery .flex-control-thumbs {
        gap: 10px;
        margin-top: 12px !important;
    }

    .hbp-product-gallery .flex-control-thumbs li {
        flex-basis: 76px;
        width: 76px !important;
    }

    .hbp-gallery-stage .onsale {
        inset: 10px 10px auto auto;
        min-width: 48px;
        min-height: 48px;
        font-size: 12px;
    }

    .hbp-product-gallery .woocommerce-product-gallery__trigger {
        inset: 10px auto auto 10px;
        width: 40px;
        height: 40px;
    }

    .hbp-gallery-nav {
        width: 38px;
        height: 38px;
    }

    .hbp-gallery-nav--previous {
        right: 9px;
    }

    .hbp-gallery-nav--next {
        left: 9px;
    }

    .hbp-product-summary .product_title {
        font-size: clamp(21px, 6vw, 25px);
    }

    .hbp-purchase-card {
        padding: 18px 13px 14px;
    }

    .hbp-purchase-card table.variations tr {
        padding: 8px;
    }

    .hbp-purchase-card .woocommerce-variation-add-to-cart,
    .hbp-purchase-card form.cart:not(.variations_form) {
        align-items: stretch;
    }

    .hbp-product-tabs .woocommerce-tabs {
        padding: 20px 14px 28px;
    }

    .hbp-product-tabs table.woocommerce-product-attributes,
    .hbp-product-tabs table.woocommerce-product-attributes tbody,
    .hbp-product-tabs table.woocommerce-product-attributes tr,
    .hbp-product-tabs table.woocommerce-product-attributes th,
    .hbp-product-tabs table.woocommerce-product-attributes td {
        display: block;
        width: 100%;
    }

    .hbp-product-tabs table.woocommerce-product-attributes {
        border-spacing: 0 10px;
    }

    .hbp-product-tabs table.woocommerce-product-attributes tr {
        padding: 11px 13px;
        border-radius:0
    }

    .hbp-product-tabs table.woocommerce-product-attributes th,
    .hbp-product-tabs table.woocommerce-product-attributes td {
        padding: 2px 0;
    }

    .hbp-product-tabs #reviews #comments ol.commentlist li .comment-text {
        margin: 12px 0 0;
    }

    .hbp-video-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .hbp-purchase-card .quantity {
        flex-basis: 64px;
    }

   

    .hbp-purchase-card .single_add_to_cart_button {
        flex-basis: calc(100% - 74px);
        padding-inline: 44px 14px !important;
    }

    .hbp-purchase-card__meta {
        gap: 10px;
        font-size: 11px;
    }

    .hbp-benefits {
        grid-template-columns: 1fr;
    }

    .hbp-benefit + .hbp-benefit {
        border-block-start: 1px solid var(--hbp-line);
        border-inline-start: 0;
    }

    .hbp-product-recommendations ul.products {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 380px) {
    .hbp-product-shell {
        width: min(calc(100% - 16px), 360px);
    }

    .hbp-purchase-card .quantity,
    .hbp-purchase-card .quantity .qty,
    .hbp-purchase-card .single_add_to_cart_button {
        width: 100%;
        flex-basis: 100%;
    }

    .hbp-purchase-card__divider {
        display: none;
    }

    .hbp-purchase-card__meta {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hbp-product-shell *,
    .hbp-product-shell *::before,
    .hbp-product-shell *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .hbp-product-shell .pulse-button::after {
        animation: none;
    }
}
