/**
 * Detail produktu ako predajná stránka (template-parts/product-story.php).
 *
 * Farebný akcent je iba tu a iba pre daný produkt: Instagram má svoj gradient,
 * Google modrú → zelenú. Zvyšok webu ostáva indigo. Akcent sa nastaví
 * premennými na `.tk-story--*`, sekcie ich len používajú.
 *
 * Načítava sa len na detaile produktu (inc/enqueue.php).
 */

.tk-story {
    --tk-story-accent: var(--tk-indigo);
    --tk-story-grad: linear-gradient(90deg, var(--tk-indigo), var(--tk-indigo-hover));
    /* Tlačidlá majú vlastný, tmavší gradient: biely text na 15 px potrebuje kontrast 4,5. */
    --tk-story-grad-btn: linear-gradient(90deg, var(--tk-indigo), var(--tk-indigo-hover));
    --tk-story-tint: var(--tk-indigo-tint);
    --tk-story-tint-grad: linear-gradient(135deg, #EEF2FF, #F5F3FF);
    display: flex;
    flex-direction: column;
    gap: 72px;
    padding-bottom: 24px;
}

/*
 * Farby značiek sú zámerne natvrdo. Konce gradientov sú tmavšie než oficiálne
 * odtiene (Instagram oranžová #F58529 má s bielym textom kontrast len 2,5),
 * aby biely text na páse a v nadpise prešiel AA pre veľké písmo.
 */
.tk-story--instagram {
    --tk-story-accent: #DD2A7B;
    --tk-story-grad: linear-gradient(90deg, #7B2CBF 0%, #C2185B 55%, #E8590C 100%);
    --tk-story-grad-btn: linear-gradient(90deg, #7B2CBF 0%, #C2185B 100%);
    --tk-story-tint: #FDF2F8;
    --tk-story-tint-grad: linear-gradient(135deg, #F3E8FF 0%, #FCE7F3 50%, #FFEDD5 100%);
}

.tk-story--duo {
    --tk-story-accent: var(--tk-indigo);
    --tk-story-grad: linear-gradient(90deg, #1A73E8 0%, #4F46E5 45%, #C2185B 100%);
    --tk-story-grad-btn: linear-gradient(90deg, #1A73E8 0%, #4F46E5 60%, #C2185B 100%);
    --tk-story-tint: var(--tk-indigo-tint);
    --tk-story-tint-grad: linear-gradient(135deg, #E8F0FE 0%, #EEF2FF 50%, #FCE7F3 100%);
}

.tk-story--google {
    --tk-story-accent: #1A73E8;
    --tk-story-grad: linear-gradient(90deg, #1A73E8 0%, #1E8E3E 100%);
    --tk-story-grad-btn: linear-gradient(90deg, #1A73E8 0%, #1E8E3E 100%);
    --tk-story-tint: #E8F0FE;
    --tk-story-tint-grad: linear-gradient(135deg, #E8F0FE 0%, #E6F4EA 100%);
}

/* Zvýraznené slovo v nadpise – text vyplnený gradientom. V H1 na vlastnom riadku ako na skici. */
.tk-story__title .tk-story__hl { display: block; }

.tk-story__hl {
    background: var(--tk-story-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tk-story__h2 {
    margin: 0 0 16px;
    font-size: 34px;
    line-height: 1.15;
    font-weight: var(--tk-fw-black);
    letter-spacing: -.02em;
    color: var(--tk-text);
}

.tk-story__p {
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
    color: var(--tk-text-soft);
}

/* ------------------------------------------------------------------ */
/*  Hero                                                               */
/* ------------------------------------------------------------------ */

.tk-story__hero {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 48px;
    align-items: center;
    margin-top: 8px;
}

.tk-story__eyebrow {
    font-size: 11.5px;
    font-weight: var(--tk-fw-heavy);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--tk-story-accent);
    margin-bottom: 14px;
}

.tk-story__title {
    margin: 0 0 18px;
    font-size: 48px;
    line-height: 1.08;
    font-weight: var(--tk-fw-black);
    letter-spacing: -.025em;
    color: var(--tk-text);
}

.tk-story__lead {
    margin: 0 0 28px;
    max-width: 480px;
    font-size: 17px;
    line-height: 1.6;
    color: var(--tk-text-soft);
}

/* Tlačidlo v hero nesie farbu produktu – jediné miesto, kde CTA nie je indigo. */
.tk-story__cta,
.tk-story__cta:hover {
    background: var(--tk-story-grad-btn);
    color: #fff;
    padding: 16px 26px;
    font-size: 15px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .18);
}

/* `.tk-btn--primary:hover` z base.css by inak prepísal gradient na indigo. */
.tk-story__cta:hover { filter: brightness(1.06); transform: translateY(-1px); }

.tk-story__hero-media {
    border-radius: var(--tk-r-panel);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--tk-bg-tint);
}

.tk-story__hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ------------------------------------------------------------------ */
/*  Nákupná karta                                                      */
/* ------------------------------------------------------------------ */

.tk-story__buy {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 36px 40px;
    border: 1px solid var(--tk-border);
    border-radius: var(--tk-r-panel);
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .06);
    /* Kotva #kupit: odsadenie pod lepivú hlavičku. */
    scroll-margin-top: 96px;
}

.tk-story__product-name {
    margin: 0;
    font-size: 24px;
    font-weight: var(--tk-fw-heavy);
    letter-spacing: -.01em;
    color: var(--tk-text);
}

.tk-story__buy .tk-product__price { margin-top: 12px; }
.tk-story__buy .tk-product__assurances { margin-top: 24px; }

/* Krokovač množstva na predajnej stránke nie je – množstvo sa mení v košíku. */
.tk-story__buy .tk-product__qty-label,
.tk-story__buy .quantity { display: none; }

.tk-story__buy .single_add_to_cart_button { margin-top: 0; }

/* Ponuka setu: pridajte aj druhú tabuľku. */
.tk-story__upsell {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    background: var(--tk-story-tint-grad);
}

.tk-story__upsell-plates {
    flex: none;
    position: relative;
    width: 76px;
    height: 64px;
}

.tk-story__upsell-plates img {
    position: absolute;
    width: 52px;
    height: 52px;
    border-radius: 6px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, .18);
}

.tk-story__upsell-plates img:first-child { top: 0; left: 0; transform: rotate(-8deg); }
.tk-story__upsell-plates img:last-child { top: 10px; left: 22px; transform: rotate(6deg); }

.tk-story__upsell-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.tk-story__upsell-eyebrow {
    font-size: 11px;
    font-weight: var(--tk-fw-heavy);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--tk-story-accent);
}

.tk-story__upsell-title {
    font-size: 15.5px;
    font-weight: var(--tk-fw-heavy);
    line-height: 1.35;
    color: var(--tk-text);
}

.tk-story__upsell-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--tk-text-soft);
}

.tk-story__upsell-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
}

.tk-story__upsell-btn {
    padding: 11px 18px;
    font-size: 13.5px;
    background: var(--tk-story-grad-btn);
    color: #fff;
}

.tk-story__upsell-btn:hover { filter: brightness(1.06); }

.tk-story__upsell-link {
    font-size: 13.5px;
    font-weight: var(--tk-fw-bold);
    color: var(--tk-story-accent);
}

.tk-story__buy-note {
    margin: 18px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--tk-text-faint);
}

.tk-story__buy-note a { color: var(--tk-story-accent); }

/* ------------------------------------------------------------------ */
/*  Materiál                                                           */
/* ------------------------------------------------------------------ */

.tk-story__material {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}

/* Fakty namiesto vaty – odrážky na skenovanie očami (WEB-COPY-LANDING-PAGES.md). */
.tk-story__facts {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tk-story__fact {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.tk-story__fact-icon {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--tk-story-tint);
    color: var(--tk-story-accent);
}

.tk-story__fact-icon svg { width: 20px; height: 20px; }

.tk-story__fact-body { display: flex; flex-direction: column; gap: 3px; }

.tk-story__fact-title {
    font-size: 15px;
    font-weight: var(--tk-fw-heavy);
    color: var(--tk-text);
}

.tk-story__fact-text {
    font-size: 14px;
    line-height: 1.55;
    color: var(--tk-text-soft);
}

/* Príbehový scenár pod krokmi – jeden konkrétny podnik, nie všeobecný sľub. */
.tk-story__scenario {
    margin-top: 36px;
    padding: 24px 28px;
    border-left: 3px solid transparent;
    border-image: var(--tk-story-grad) 1;
    background: var(--tk-bg-alt);
}

.tk-story__scenario-label {
    font-size: 11px;
    font-weight: var(--tk-fw-heavy);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--tk-story-accent);
    margin-bottom: 8px;
}

.tk-story__scenario-text {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--tk-text-body);
    max-width: 720px;
}

/* ------------------------------------------------------------------ */
/*  Ako to funguje                                                     */
/* ------------------------------------------------------------------ */

.tk-story__steps {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.tk-story__step {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Šípka medzi krokmi – len na šírke, kde stoja vedľa seba. */
.tk-story__step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 36px;
    right: -22px;
    width: 12px;
    height: 12px;
    border-top: 2px solid var(--tk-border-muted, #CBD5E1);
    border-right: 2px solid var(--tk-border-muted, #CBD5E1);
    transform: rotate(45deg);
}

.tk-story__step-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--tk-story-tint);
    color: var(--tk-text);
}

.tk-story__step-icon svg { width: 34px; height: 34px; }

.tk-story__step-num {
    position: absolute;
    top: -6px;
    left: -6px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--tk-story-grad);
    color: #fff;
    font-size: 12.5px;
    font-weight: var(--tk-fw-heavy);
}

.tk-story__step-body { display: flex; flex-direction: column; gap: 6px; }

.tk-story__step-title {
    font-size: 18px;
    font-weight: var(--tk-fw-heavy);
    color: var(--tk-text);
}

.tk-story__step-text {
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--tk-text-soft);
    max-width: 260px;
}

/* ------------------------------------------------------------------ */
/*  Portál                                                             */
/* ------------------------------------------------------------------ */

.tk-story__portal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}

.tk-story__portal-media {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    border-radius: var(--tk-r-panel);
    background: var(--tk-story-tint-grad);
}

.tk-story__code-card {
    width: min(100%, 320px);
    padding: 24px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 20px 40px rgba(15, 23, 42, .12);
}

.tk-story__code-label {
    font-size: 11px;
    font-weight: var(--tk-fw-heavy);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--tk-text-faint);
    margin-bottom: 10px;
}

.tk-story__code {
    padding: 12px 14px;
    border-radius: var(--tk-r-input);
    background: var(--tk-story-tint);
    font-size: 18px;
    font-weight: var(--tk-fw-heavy);
    letter-spacing: .06em;
    color: var(--tk-text);
}

.tk-story__code-rows {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tk-story__code-rows li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: var(--tk-fw-semi, 600);
    color: var(--tk-text-body);
}

.tk-story__code-rows li::before {
    content: '';
    flex: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--tk-green-bg, #ECFDF5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* ------------------------------------------------------------------ */
/*  Farebný pás s výzvou                                               */
/* ------------------------------------------------------------------ */

.tk-story__band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 36px 40px;
    border-radius: var(--tk-r-panel);
    background: var(--tk-story-grad);
    color: #fff;
}

.tk-story__band-text {
    display: flex;
    align-items: center;
    gap: 22px;
}

.tk-story__band-icon {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

.tk-story__band-icon svg { width: 28px; height: 28px; }

.tk-story__band-title {
    margin: 0;
    font-size: 26px;
    line-height: 1.2;
    font-weight: var(--tk-fw-black);
    letter-spacing: -.02em;
    color: #fff;
    max-width: 560px;
}

.tk-story__band-btn {
    flex: none;
    background: #fff;
    color: var(--tk-text);
    padding: 16px 26px;
    font-size: 15px;
}

.tk-story__band-btn:hover { background: var(--tk-bg-alt); }

/* ------------------------------------------------------------------ */
/*  Responzivita                                                       */
/* ------------------------------------------------------------------ */

@media (max-width: 980px) {
    .tk-story { gap: 56px; }
    .tk-story__title { font-size: 40px; }
    .tk-story__h2 { font-size: 30px; }
    .tk-story__buy { grid-template-columns: 1fr; gap: 28px; padding: 28px; }
    .tk-story__material,
    .tk-story__portal { grid-template-columns: 1fr; gap: 32px; }
    .tk-story__steps { grid-template-columns: 1fr; gap: 24px; }
    .tk-story__step { flex-direction: row; align-items: flex-start; }
    .tk-story__step::after { display: none; }
    .tk-story__step-icon { width: 64px; height: 64px; flex: none; }
    .tk-story__step-icon svg { width: 28px; height: 28px; }
    .tk-story__step-text { max-width: none; }
    .tk-story__band { flex-direction: column; align-items: flex-start; }
}

/*
 * Na telefóne je hero ako na skici: fotka cez celý panel, text na nej.
 * Fotka je stále <img> (zostáva v obsahu aj pre čítačky), len sa položí
 * pod text a dostane tmavý prechod, aby bol biely text čitateľný.
 */
@media (max-width: 760px) {
    .tk-story__hero {
        position: relative;
        display: block;
        min-height: 460px;
        border-radius: var(--tk-r-panel);
        overflow: hidden;
        background: var(--tk-navy);
    }

    .tk-story__hero-media {
        position: absolute;
        inset: 0;
        border-radius: 0;
        aspect-ratio: auto;
    }

    .tk-story__hero-media::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(10, 26, 53, .35) 0%, rgba(10, 26, 53, .6) 55%, rgba(10, 26, 53, .9) 100%);
    }

    .tk-story__hero-text {
        position: relative;
        z-index: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        min-height: 460px;
        padding: 28px 24px;
    }

    .tk-story__eyebrow { color: #fff; opacity: .85; }
    .tk-story__title { color: #fff; font-size: 34px; }
    /* Gradientový text na fotke nečitateľný – v hero je zvýraznenie biele, inde ostáva. */
    .tk-story__hero .tk-story__hl { display: inline; background: none; color: #fff; -webkit-text-fill-color: #fff; }
    .tk-story__lead { color: rgba(255, 255, 255, .85); font-size: 15px; margin-bottom: 20px; }
    .tk-story__cta { align-self: flex-start; }
    .tk-story__hero-media img { object-position: center 30%; }
}

@media (max-width: 640px) {
    .tk-story { gap: 44px; }
    .tk-story__buy { padding: 22px; }
    .tk-story__scenario { padding: 20px; }
    .tk-story__portal-media { padding: 28px; }
    .tk-story__band { padding: 28px 24px; }
    .tk-story__band-title { font-size: 22px; }
    .tk-story__band-btn { width: 100%; }
}
