/**
 * Sticky Add to Cart bar.
 *
 * Fixed to the bottom of the viewport, hidden (slid down) until JS reveals it once
 * the real add-to-cart button scrolls out of view. --ih-sac-offset is set by JS to
 * the height of the theme's own fixed bottom bars (e.g. WoodMart .wd-toolbar) so the
 * bar sits just above them; it falls back to 0. The accent inherits WoodMart's
 * --wd-primary-color when present, and falls back to the brand blue elsewhere.
 */
.ih-sac {
    --ih-sac-accent: var(--wd-primary-color, #234aa5);
    --ih-sac-accent-hover: var(--btn-accented-bgcolor-hover, #1c3c85);
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--ih-sac-offset, 0px);
    z-index: 998;
    background: #fff;
    box-shadow: 0 -3px 14px rgba(0, 0, 0, 0.14);
    transform: translateY(110%);
    transition: transform 0.25s ease;
    will-change: transform;
}

.ih-sac.is-visible {
    transform: translateY(0);
}

.ih-sac__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 16px;
    box-sizing: border-box;
}

.ih-sac__info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
}

.ih-sac__thumb {
    flex: 0 0 auto;
    line-height: 0;
}

.ih-sac__thumb img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.ih-sac__meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ih-sac__title {
    max-width: 100%;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ih-sac__price {
    font-size: 14px;
    font-weight: 700;
    color: var(--ih-sac-accent);
}

.ih-sac__price del {
    color: #999;
    font-weight: 400;
    margin-right: 6px;
}

.ih-sac__button {
    flex: 0 0 auto;
    padding: 13px 28px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    background: var(--ih-sac-accent);
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ih-sac__button:hover,
.ih-sac__button:focus {
    background: var(--ih-sac-accent-hover);
    color: #fff;
}

@media (max-width: 768px) {
    .ih-sac__inner {
        gap: 10px;
        padding: 8px 12px;
    }

    /* Drop the thumbnail and price on narrow screens so the title + button always
       fit; the price is still visible in the product summary above. */
    .ih-sac__thumb,
    .ih-sac__price {
        display: none;
    }

    .ih-sac__title {
        font-size: 13px;
    }

    .ih-sac__button {
        padding: 11px 16px;
        font-size: 13px;
        white-space: nowrap;
    }
}
