/* HP carousel — full-bleed horizontal preview of templates. */

.hp-carousel {
    position: relative;
    margin-top: 2.5rem;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 0 80px;
}
.hp-carousel__viewport {
    position: relative;
    overflow: hidden;
    padding: 2rem 0 2.5rem;
}
.hp-carousel__track {
    display: flex;
    gap: 3rem;
    transition: transform .42s cubic-bezier(.4, .0, .2, 1);
    will-change: transform;
    padding: 0 1rem;
}

.hp-tcard {
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    transition: opacity .35s ease,
                transform .35s cubic-bezier(.34,1.56,.64,1);
    opacity: 0.55;
    --card-accent: #1f2937;
}
.hp-tcard__shell {
    position: relative;
    display: block;
    width: 100%;
    height: 310px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 2px 14px rgba(15, 23, 42, .06);
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow .3s ease, border-color .25s;
}

.hp-tcard--center {
    opacity: 1;
    transform: scale(1.16);
    z-index: 2;
}
.hp-tcard--center .hp-tcard__shell {
    box-shadow: 0 20px 50px color-mix(in srgb, var(--card-accent) 45%, transparent);
    border-color: color-mix(in srgb, var(--card-accent) 30%, #cbd5e1);
}
.hp-tcard--center .hp-tcard__overlay { opacity: 1; }
.hp-tcard--near { opacity: 0.82; }

.hp-tcard:not(.hp-tcard--center):hover {
    transform: translateY(-3px);
    cursor: pointer;
}
.hp-tcard:not(.hp-tcard--center):hover .hp-tcard__shell {
    box-shadow: 0 8px 22px rgba(15, 23, 42, .1);
    border-color: #cbd5e1;
}

.hp-tcard__preview-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #fff;
}
.hp-tcard__iframe {
    display: block;
    border: 0;
    pointer-events: none;
    transform-origin: top left;
    transform: scale(0.277);
    width: 794px;
    height: 1120px;
}

.hp-tcard__loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    transition: opacity .25s;
    pointer-events: none;
}
.hp-tcard__loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: hp-spinner-rot .9s linear infinite;
}
@keyframes hp-spinner-rot { to { transform: rotate(360deg); } }

.hp-tcard__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(15,23,42,0) 60%, rgba(15,23,42,.55) 100%);
    opacity: 0;
    transition: opacity .2s;
}
.hp-tcard:not(.hp-tcard--center) .hp-tcard__shell:hover {
    transform: translateY(-3px);
    cursor: pointer;
}
.hp-tcard__overlay-btn {
    background: #2563eb;
    color: #fff;
    padding: .55rem 1.2rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: .85rem;
    box-shadow: 0 6px 18px rgba(37,99,235,.4);
}
.hp-tcard__free-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(22, 163, 74, .35);
    z-index: 3;
}
.hp-tcard__paid-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 23, 42, .82);
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .03em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(2px);
    z-index: 3;
}
.hp-tcard__paid-badge i { font-size: .7rem; }

.hp-tcard__info { padding: .85rem .25rem 0; }
.hp-tcard__name {
    font-weight: 800;
    color: #0f172a;
    font-size: 1rem;
    margin: 0 0 .15rem;
}
.hp-tcard__role {
    color: #64748b;
    font-size: .78rem;
    margin: 0 0 .55rem;
}
.hp-tcard__colors {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.hp-tcolor {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #cbd5e1;
    cursor: pointer;
    padding: 0;
    transition: transform .15s, box-shadow .15s;
}
.hp-tcolor:hover { transform: scale(1.18); }
.hp-tcolor--active {
    box-shadow: 0 0 0 2px #0f172a;
    transform: scale(1.15);
}

.hp-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #2563eb;
    background: #fff;
    color: #2563eb;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(37, 99, 235, .22);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .18s;
}
.hp-carousel__arrow:hover {
    background: #2563eb;
    color: #fff;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 12px 28px rgba(37, 99, 235, .35);
}
.hp-carousel__arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.hp-carousel__arrow--prev { left: 16px; }
.hp-carousel__arrow--next { right: 16px; }

.hp-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: .5rem;
}
.hp-carousel__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 0;
    background: #cbd5e1;
    cursor: pointer;
    padding: 0;
    transition: all .15s;
}
.hp-carousel__dot--active {
    background: #2563eb;
    width: 24px;
    border-radius: 4px;
}

.hp-carousel__cta {
    text-align: center;
    margin: 1.5rem 0 0;
    font-size: .9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .8rem;
    flex-wrap: wrap;
    color: #475569;
}
.hp-carousel__cta a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 700;
}
.hp-carousel__cta a:hover { text-decoration: underline; }
.hp-carousel__cta-sep { color: #cbd5e1; }
.hp-carousel__cta-feature {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .82rem;
}
.hp-carousel__cta-feature i { color: #16a34a; }

@media (max-width: 768px) {
    .hp-carousel { padding: 0 8px; }
    .hp-carousel__arrow { display: none; }
    .hp-tcard {
        flex-basis: 70vw;
        opacity: 1;
    }
    .hp-tcard--center { transform: scale(1); }
    .hp-tcard__shell { height: 380px; }
}
