/* HBT v5.5 — Sticky Add-to-Cart Bar (single-product) */

.hbt-sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: #fff;
    border-top: 1px solid #e2e2e2;
    box-shadow: 0 -4px 14px rgba(0, 0, 0, .08);
    transform: translateY(100%);
    transition: transform .25s ease-out;
    will-change: transform;
}

.hbt-sticky-bar.is-visible {
    transform: translateY(0);
}

.hbt-sticky-bar__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hbt-sticky-bar__thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.hbt-sticky-bar__meta {
    flex: 1 1 auto;
    min-width: 0;
}

.hbt-sticky-bar__name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hbt-sticky-bar__price {
    display: flex;
    gap: 8px;
    align-items: baseline;
    line-height: 1.1;
    margin-top: 2px;
}

.hbt-sticky-bar__price-gross {
    font-size: 15px;
    font-weight: 700;
    color: #7CB342; /* HBT brand */
}
.hbt-sticky-bar__price-gross .woocommerce-Price-amount {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.hbt-sticky-bar__price-net {
    font-size: 11px;
    color: #777;
}

.hbt-sticky-bar__qty {
    width: 56px;
    height: 38px;
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
    -moz-appearance: textfield;
}
.hbt-sticky-bar__qty::-webkit-outer-spin-button,
.hbt-sticky-bar__qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.hbt-sticky-bar__btn {
    background: #7CB342;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 9px 16px;
    height: 38px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background .15s;
}
.hbt-sticky-bar__btn:hover { background: #689F2F; }
.hbt-sticky-bar__btn:disabled,
.hbt-sticky-bar__btn.is-loading {
    opacity: .65;
    cursor: not-allowed;
}
.hbt-sticky-bar__btn.is-success { background: #2E7D32; }

/* Body padding so sticky bar nie przykrywa zawartości */
@media (max-width: 768px) {
    body.hbt-has-sticky-bar { padding-bottom: 80px; }
    .hbt-sticky-bar { transform: translateY(0); }
    .hbt-sticky-bar__name { font-size: 12px; }
    .hbt-sticky-bar__price-gross { font-size: 14px; }
    .hbt-sticky-bar__inner { gap: 8px; padding: 6px 10px; }
    .hbt-sticky-bar__btn { padding: 8px 12px; font-size: 12px; }
}

@media (min-width: 769px) {
    body.hbt-has-sticky-bar.hbt-sticky-active { padding-bottom: 80px; }
}

/* Skrywa się gdy body ma klasę .menu-open / podobne overlaye z theme'a */
body.menu-open .hbt-sticky-bar,
body.modal-open .hbt-sticky-bar { display: none; }
