.wt-gift-bar {
    position: relative;
    display: block;
    width: 100%;
}

.ordering-process .wt-gift-bar {
    order: 4;
    margin-top: 16px;
}

.wt-gift-bar__inner {
    position: relative;
    display: block;
    width: 100%;
    height: 36px;
    padding: 0 20px;
    background-color: #E8E5DD;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
}

.wt-gift-bar__progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 0;
    background-color: #5E9B82;
    transition: width 0.3s ease;
}

.wt-gift-bar__track {
    position: absolute;
    top: 50%;
    z-index: 50;
    width: 77px;
    height: 57px;
    transform: translate(-50%, -45%);
}

.wt-gift-bar__icon {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wt-gift-bar__text {
    position: absolute;
    top: 50%;
    margin-left: 30px;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: calc(100% - 44px);
    transform: translateY(-50%);
    white-space: nowrap;
    color: #1A1937;
}

.wt-gift-bar__info {
    display: inline-flex;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    border: none;
    background: none;
}

.wt-gift-bar__info img {
    display: block;
    width: 100%;
    height: 100%;
}

.wt-gift-bar__link {
    color: #000;
    font-weight: 700;
    text-decoration: underline;
}

.wt-gift-bar__link:hover,
.wt-gift-bar__link:focus {
    text-decoration: none;
}

.wt-gift-bar__amount {
    font-weight: 700;
}

.wt-gift-bar--reached .wt-gift-bar__inner {
    background-color: #5E9B82;
}

.wt-gift-bar__reached-text {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: calc(100% - 88px);
    transform: translate(-50%, -50%);
    white-space: nowrap;
    color: #ffffff;
}

.wt-gift-bar__track--reached {
    position: relative;
    top: auto;
    left: auto;
    flex: 0 0 auto;
    transform: none;
    margin-right: 4px;
}

.wt-gift-bar__close {
    position: absolute;
    top: 50%;
    right: 20px;
    z-index: 1;
    display: inline-flex;
    width: 16px;
    height: 16px;
    padding: 0;
    border: none;
    background: none;
    transform: translateY(-50%);
    cursor: pointer;
}

.wt-gift-bar__close img {
    display: block;
    width: 100%;
    height: 100%;
}

.wt-gift-bar__tooltip {
    position: absolute;
    left: 0;
    z-index: 20;
    display: flex;
    gap: 12px;
    width: 320px;
    max-width: calc(100vw - 40px);
    padding: 16px;
    background-color: #313131;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.wt-gift-bar__tooltip[hidden] {
    display: none;
}

.wt-gift-bar__tooltip-image {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.wt-gift-bar__tooltip-title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
}

.wt-gift-bar__tooltip .wt-gift-bar__tooltip-link,
.wt-gift-bar__tooltip .wt-gift-bar__tooltip-link:link,
.wt-gift-bar__tooltip .wt-gift-bar__tooltip-link:visited {
    color: #ffffff !important;
    text-decoration: underline;
}

.wt-gift-bar__tooltip .wt-gift-bar__tooltip-link:hover,
.wt-gift-bar__tooltip .wt-gift-bar__tooltip-link:focus {
    color: #ffffff !important;
    text-decoration: none;
}

.wt-gift-bar__tooltip-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #E8E5DD;
}

@media (max-width: 767px) {
    /* Na mobilu opustíme absolutní pixel-layout (JS nastavuje left v px podle
       šířky a track jede za progressem) – text se pak nevejde na jeden řádek
       a přetéká. Ikonu ukotvíme staticky vlevo a text necháme zalomit. */
    .wt-gift-bar__inner {
        height: auto;
        min-height: 44px;
        padding: 8px 16px;
    }

    .wt-gift-bar__progress-fill {
        top: 0;
        bottom: 0;
        height: auto;
    }

    /* Ikona dárku ukotvená vlevo, nezávisle na dopočítané pozici z JS. */
    .wt-gift-bar__track {
        top: 50%;
        left: 8px !important;
        width: 44px;
        height: 33px;
        transform: translateY(-50%);
    }

    /* Text zůstane absolutní a vertikálně centrovaný, ale s pevným left
       (místo pixelu dopočteného z JS) a se zalomením místo nowrap. */
    .wt-gift-bar__text {
        left: 56px !important;
        margin-left: 0;
        max-width: calc(100% - 72px);
        font-size: 12px;
        white-space: normal;
    }

    .wt-gift-bar__reached-text {
        font-size: 12px;
        max-width: calc(100% - 76px);
    }

    .wt-gift-bar__close {
        right: 16px;
    }
}

.wt-product-tip {
    display: flex;
    order: 8;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.wt-product-tip__icon {
    display: block;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.wt-product-tip__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #1A1937;
}

.wt-product-tip__text strong {
    font-weight: 700;
}

.wt-cart-widget-bar {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 0;
}

.wt-cart-widget-bar__icon {
    display: block;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.wt-cart-widget-bar__text-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.wt-cart-widget-bar__text {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.4;
}

.wt-cart-widget-bar__amount {
    font-weight: 700;
}

.wt-cart-widget-bar__progress {
    height: 6px;
    border-radius: 3px;
    background-color: #E8E5DD;
    overflow: hidden;
}

.wt-cart-widget-bar__progress-fill {
    height: 100%;
    border-radius: 3px;
    background-color: #5E9B82;
    transition: width 0.3s ease;
}

.wt-cart-widget-bar--reached {
    align-items: center;
}

.wt-cart-widget-bar--reached .wt-cart-widget-bar__text {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.wt-cart-widget-bar__firework {
    display: block;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    object-fit: contain;
}
