/* Cronometrul de reducere din caseta de pret (herbal-sale-countdown) */

.hsc {
    --hsc-bg: #191a24;
    --hsc-ink: #ffffff;
    --hsc-dim: rgba(255, 255, 255, 0.72);
    --hsc-cell: rgba(255, 255, 255, 0.1);
    --hsc-accent: #ff4949;

    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 16px;
    border-radius: 12px;
    background: var(--hsc-bg);
    color: var(--hsc-ink);
}

.hsc__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 12px;
    line-height: 1.2;
}

.hsc__title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hsc__title::before {
    content: '';
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hsc-accent);
    animation: hsc-pulse 1.6s ease-in-out infinite;
}

.hsc__label {
    font-size: 13px;
    color: var(--hsc-dim);
}

.hsc__units {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.hsc__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    border-radius: 8px;
    background: var(--hsc-cell);
}

.hsc__num {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.hsc__name {
    font-size: 12px;
    line-height: 1.2;
    color: var(--hsc-dim);
}

.hsc__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

@keyframes hsc-pulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.35;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hsc__title::before {
        animation: none;
    }
}

/* ---------------------------------------------------------------------------
 * Popup-ul cu reducerile
 * ------------------------------------------------------------------------ */

html.hsc-pop-open {
    overflow: hidden;
}

.hsc-pop {
    --hsc-pop-bg: #ede7d8;
    --hsc-pop-fade: rgba(237, 231, 216, 0);
    --hsc-pop-ink: #191a24;
    --hsc-pop-text: #3f4147;
    --hsc-pop-cta: #567c55;
    --hsc-pop-cta-hover: #4a6b49;

    width: min(920px, calc(100% - 32px));
    max-width: none;
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    overflow: auto;
    border: 0;
    border-radius: 20px;
    background: var(--hsc-pop-bg);
    color: var(--hsc-pop-ink);
    box-shadow: 0 24px 64px rgba(25, 26, 36, 0.28);
    font-family: inherit;
}

.hsc-pop:focus {
    outline: none;
}

.hsc-pop::backdrop {
    background: rgba(25, 26, 36, 0.55);
}

.hsc-pop[open] {
    animation: hsc-pop-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hsc-pop[open]::backdrop {
    animation: hsc-fade-in 0.35s ease;
}

.hsc-pop__box {
    position: relative;
    display: flex;
    min-height: 420px;
}

/* pe desktop poza e fundalul, iar textul sta pe partea ei goala din stanga */
.hsc-pop__media {
    position: absolute;
    inset: 0;
}

.hsc-pop__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--hsc-pop-bg) 0%, var(--hsc-pop-bg) 30%, rgba(237, 231, 216, 0.75) 42%, var(--hsc-pop-fade) 56%);
}

.hsc-pop__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
}

.hsc-pop__body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    width: 46%;
    max-width: 420px;
    padding: 40px 24px 40px 40px;
}

.hsc-pop__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hsc-pop-ink);
}

.hsc-pop__eyebrow::before {
    content: '';
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4949;
    animation: hsc-pulse 1.6s ease-in-out infinite;
}

.hsc-pop__title {
    margin: 0;
    font-family: inherit;
    font-size: 40px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--hsc-pop-ink);
}

.hsc-pop__text {
    margin: 0;
    font-size: 16px;
    line-height: 1.45;
    color: var(--hsc-pop-text);
}

.hsc-pop .hsc {
    align-self: stretch;
    margin-top: 4px;
}

.hsc-pop__cta {
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    justify-content: center;
    min-height: 52px;
    padding: 0 24px;
    border-radius: 12px;
    background: var(--hsc-pop-cta);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.hsc-pop__cta:hover,
.hsc-pop__cta:focus-visible {
    background: var(--hsc-pop-cta-hover);
    color: #ffffff;
}

.hsc-pop__cta:focus-visible,
.hsc-pop__close:focus-visible {
    outline: 2px solid var(--hsc-pop-ink);
    outline-offset: 2px;
}

.hsc-pop__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--hsc-pop-ink);
    box-shadow: 0 2px 8px rgba(25, 26, 36, 0.14);
    cursor: pointer;
}

.hsc-pop__close:hover {
    background: #ffffff;
}

/* pe telefon poza sta deasupra, decupata pe produse si pe model */
@media (max-width: 719px) {
    .hsc-pop {
        width: min(440px, calc(100% - 32px));
        border-radius: 16px;
    }

    .hsc-pop__box {
        flex-direction: column;
        min-height: 0;
    }

    .hsc-pop__media {
        position: relative;
        inset: auto;
        aspect-ratio: 16 / 10;
    }

    .hsc-pop__media::after {
        background: linear-gradient(180deg, var(--hsc-pop-fade) 72%, var(--hsc-pop-bg) 100%);
    }

    .hsc-pop__media img {
        object-position: 78% 30%;
    }

    .hsc-pop__body {
        width: auto;
        max-width: none;
        gap: 10px;
        padding: 4px 20px 20px;
    }

    .hsc-pop__title {
        font-size: 30px;
    }

    .hsc-pop__text {
        font-size: 15px;
    }
}

@keyframes hsc-pop-in {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
}

@keyframes hsc-fade-in {
    from {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hsc-pop[open],
    .hsc-pop[open]::backdrop,
    .hsc-pop__eyebrow::before {
        animation: none;
    }
}
