/* ═══════════════════════════════════════════════════════════════════════════
   TABUTECH Home Hero v12.5.0
   კატეგორიების სვეტი + hover პანელი + ჰერო სლაიდერი + პატარა ბანერები
   ═══════════════════════════════════════════════════════════════════════════ */

.tbh {
    --tbh-accent: #6366f1;
    --tbh-col: 290px;
    --tbh-h: 540px;
    --tbh-gap: 16px;
    --tbh-radius: 16px;
    --tbh-promo: 240px;
    --tbh-cols: 2;
    --tbh-ink: #22254a;
    --tbh-muted: #7c8099;
    --tbh-line: #e6e8f2;
    --tbh-soft: #eef0ff;
    --tbh-shadow: 0 8px 28px rgba(23, 26, 58, 0.08);

    width: 100%;
    max-width: calc(var(--tb-maxw, 2000px) + 2 * var(--tb-pad, 40px));
    margin-left: auto;
    margin-right: auto;
    padding: 0 var(--tb-pad, 40px);
    font-family: var(--tabutech-font-family, 'IBM Plex Sans Georgian', 'IBM Plex Sans', system-ui, sans-serif);
    box-sizing: border-box;
}

@supports (background: color-mix(in srgb, red 10%, white)) {
    .tbh { --tbh-soft: color-mix(in srgb, var(--tbh-accent) 10%, #ffffff); }
}

.tbh *,
.tbh *::before,
.tbh *::after {
    box-sizing: inherit;
}

.tbh a { text-decoration: none; }

.tbh__row {
    position: relative;
    display: flex;
    gap: var(--tbh-gap);
    height: var(--tbh-h);
}

/* ── კატეგორიების სვეტი ── */
.tbh__cats {
    flex: 0 0 var(--tbh-col);
    width: var(--tbh-col);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--tbh-radius);
    box-shadow: var(--tbh-shadow);
    overflow: hidden;
}

.tbh__listwrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
}

.tbh__listwrap::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 40px;
    background: linear-gradient(to top, #fff, rgba(255, 255, 255, 0));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.tbh__listwrap.is-scrollable:not(.is-end)::after { opacity: 1; }

.tbh__list {
    list-style: none;
    margin: 0;
    padding: 8px;
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cfd2e6 transparent;
}

.tbh__list::-webkit-scrollbar { width: 6px; }
.tbh__list::-webkit-scrollbar-thumb { background: #cfd2e6; border-radius: 3px; }

.tbh__item { margin: 0; padding: 0; }

.tbh__link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 5px 10px;
    border-radius: 12px;
    color: var(--tbh-ink);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.28;
    transition: background-color 0.15s, color 0.15s;
}

.tbh__ico {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #f1f2f8;
    color: #8a90b8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: background-color 0.15s, color 0.15s;
}

.tbh__ico img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.tbh__name {
    flex: 1;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

.tbh__chev {
    flex-shrink: 0;
    color: #a3a8c6;
    transition: transform 0.15s, color 0.15s;
}

.tbh__item.is-active > .tbh__link,
.tbh__link:hover,
.tbh__link:focus-visible {
    background: var(--tbh-soft);
    color: var(--tbh-accent);
}

.tbh__link:focus-visible {
    outline: 2px solid var(--tbh-accent);
    outline-offset: -2px;
}

.tbh__item.is-active > .tbh__link .tbh__ico,
.tbh__link:hover .tbh__ico {
    background: #fff;
    color: var(--tbh-accent);
}

.tbh__item.is-active > .tbh__link .tbh__chev,
.tbh__link:hover .tbh__chev {
    color: var(--tbh-accent);
    transform: translateX(2px);
}

.tbh__all {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 18px;
    border-top: 1px solid var(--tbh-line);
    color: var(--tbh-accent);
    font-size: 13.5px;
    font-weight: 600;
    transition: background-color 0.15s;
}

.tbh__all:hover,
.tbh__all:focus-visible { background: var(--tbh-soft); }

/* ── Flyout პანელები ── */
.tbh__flys {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--tbh-col);
    right: calc(var(--tbh-promo) + var(--tbh-gap));
    z-index: 6;
    pointer-events: none;
}

.tbh--nopromo .tbh__flys { right: 0; }

.tbh__fly {
    position: absolute;
    inset: 0;
    padding-left: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-8px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
    pointer-events: none;
}

.tbh__fly.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    transition-delay: 0s;
}

.tbh__panel {
    height: 100%;
    padding: 24px 28px;
    background: #fff;
    border-radius: var(--tbh-radius);
    box-shadow: 0 18px 44px rgba(23, 26, 58, 0.18);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cfd2e6 transparent;
}

.tbh__panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.tbh__panel-title {
    color: var(--tbh-ink);
    font-size: 18px;
    font-weight: 700;
}

.tbh__panel-title:hover { color: var(--tbh-accent); }

.tbh__panel-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--tbh-accent);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.tbh__sublist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(var(--tbh-cols), minmax(0, 1fr));
    gap: 4px 20px;
}

.tbh__sub {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 10px;
    border-radius: 12px;
    color: var(--tbh-ink);
    font-size: 14px;
    transition: background-color 0.15s, color 0.15s;
}

.tbh__sub:hover,
.tbh__sub:focus-visible {
    background: var(--tbh-soft);
    color: var(--tbh-accent);
}

.tbh__sub:focus-visible { outline: 2px solid var(--tbh-accent); outline-offset: -2px; }

.tbh__subimg {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: #f1f2f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tbh__subimg img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.tbh__subname { min-width: 0; }

/* ── ჰერო სლაიდერი ── */
.tbh__hero {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    border-radius: var(--tbh-radius);
    background: #1d2145;
    box-shadow: var(--tbh-shadow);
    overflow: hidden;
}

.tbh__slides,
.tbh__slide {
    position: absolute;
    inset: 0;
}

.tbh__slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}

.tbh__slide.is-active {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.tbh__slide-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tbh__slide.has-text::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 17, 45, 0.72) 0%, rgba(15, 17, 45, 0.28) 55%, rgba(15, 17, 45, 0) 100%);
    pointer-events: none;
}

.tbh__slide-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.tbh__slide-body {
    position: absolute;
    left: 56px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    max-width: min(520px, 60%);
    color: #fff;
}

.tbh__slide-body small {
    display: block;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    opacity: 0.85;
}

.tbh__slide-body b {
    display: block;
    font-size: clamp(26px, 2.6vw, 42px);
    font-weight: 700;
    line-height: 1.22;
}

.tbh__cta {
    display: inline-block;
    margin-top: 26px;
    padding: 13px 26px;
    border-radius: 12px;
    background: #fff;
    color: #171a3a;
    font-size: 14px;
    font-weight: 700;
    transition: transform 0.15s, box-shadow 0.15s;
}

.tbh__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.tbh__arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #171a3a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
}

.tbh__arrow--prev { left: 16px; transform: translateX(-6px); }
.tbh__arrow--next { right: 16px; transform: translateX(6px); }

.tbh__hero:hover .tbh__arrow,
.tbh__hero:focus-within .tbh__arrow {
    opacity: 1;
    transform: none;
}

.tbh__arrow:hover { background: #fff; }
.tbh__arrow:focus-visible { outline: 3px solid var(--tbh-accent); outline-offset: 2px; }

.tbh__dots {
    position: absolute;
    left: 56px;
    bottom: 24px;
    z-index: 3;
    display: flex;
    gap: 8px;
}

.tbh__dot {
    width: 24px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: width 0.25s, background-color 0.25s;
}

.tbh__dot.is-active {
    width: 38px;
    background: #fff;
}

.tbh__dot:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ── პატარა ბანერები ── */
.tbh__promos {
    flex: 0 0 var(--tbh-promo);
    width: var(--tbh-promo);
    display: flex;
    flex-direction: column;
    gap: var(--tbh-gap);
}

.tbh__promo {
    position: relative;
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
    border-radius: var(--tbh-radius);
    background: #e9ebf6;
    box-shadow: var(--tbh-shadow);
    overflow: hidden;
    color: #fff;
}

.tbh__promo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 17, 45, 0.7) 0%, rgba(15, 17, 45, 0) 60%);
    pointer-events: none;
}

.tbh__promo-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

a.tbh__promo:hover .tbh__promo-img { transform: scale(1.05); }
a.tbh__promo:focus-visible { outline: 3px solid var(--tbh-accent); outline-offset: 2px; }

.tbh__promo-text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tbh__promo-text em {
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.85;
}

.tbh__promo-text strong {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
}

/* ── მობილური: ჰერო + პატარა ბანერები ერთ ბანერ-სლაიდერად (სუფთა ფოტოები, ეკრანის ბოლომდე) ── */
.tbh__mslider { display: none; }

/* Elementor-ის `.elementor img { height:auto; max-width:100% }` სურათებს ავსებას უშლიდა — სპეციფიკურობით ვჯობნით */
.tbh .tbh__slide-img,
.tbh .tbh__promo-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

@media (max-width: 768px) {
    .tbh--mhidden { display: none; }
    .tbh__row { display: none; }
    .tbh:not(.tbh--mslider) { display: none; }

    /* Elementor-ის კონტეინერის padding-ის მიუხედავად — ეკრანის ორივე კიდემდე */
    .tbh.tbh--mslider {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: 0;
        padding: 0;
    }

    .tbh__mslider {
        display: block;
        position: relative;
        margin: 0;
        line-height: 0;
    }

    .tbh__mtrack {
        display: flex;
        gap: 0;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        border-radius: 0;
    }
    .tbh__mtrack::-webkit-scrollbar { display: none; }

    .tbh__mslide {
        position: relative;
        flex: 0 0 100%;
        width: 100%;
        aspect-ratio: var(--tbh-mratio, 16 / 7);
        scroll-snap-align: start;
        scroll-snap-stop: always;
        border-radius: 0;
        overflow: hidden;
        background: #1d2145;
        display: block;
        box-shadow: none;
        -webkit-tap-highlight-color: transparent;
    }

    .tbh .tbh__mimg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        max-width: none;
        object-fit: cover;
        object-position: center;
        display: block;
        border-radius: 0;
    }

    /* წერტილები — სლაიდერის შიგნით, სურათის ქვედა ნაწილში */
    .tbh__mdots {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 10px;
        z-index: 2;
        display: flex;
        justify-content: center;
        gap: 6px;
        margin: 0;
        pointer-events: none;
    }
    .tbh__mdot {
        width: 6px;
        height: 6px;
        padding: 0;
        border: 0;
        border-radius: 3px;
        background: rgba(255, 255, 255, 0.6);
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
        transition: width 0.25s ease, background-color 0.25s ease;
    }
    .tbh__mdot.is-active { width: 20px; background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
    .tbh *,
    .tbh *::before,
    .tbh *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ჰედერის „კატეგორიები“ ღილაკზე კლიკი ანათებს ღია სვეტს */
.tbh__cats.is-pulse { animation: tbh-pulse 1s ease-out; }
@keyframes tbh-pulse {
    0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tbh-accent) 55%, transparent), var(--tbh-shadow); }
    100% { box-shadow: 0 0 0 16px transparent, var(--tbh-shadow); }
}
