/* ==============================================
   INTECH POPUP — PUBLIC STYLES
   ============================================== */

/* ── In-Content Ad Banner ──────────────────── */
.intech-ica {
    position: relative;
    margin: 24px 0;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

.intech-ica__label {
    display: block;
    background: #ee4d2d;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 4px 12px;
    margin: 0;
}

.intech-ica__link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    text-decoration: none;
    color: inherit;
    transition: background .2s;
}

.intech-ica__link:hover {
    background: #fff8f6;
}

.intech-ica__img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.intech-ica__body {
    flex: 1;
    min-width: 0;
}

.intech-ica__title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.intech-ica__price {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: #ee4d2d;
}

.intech-ica__btn {
    display: inline-block;
    background: #ee4d2d;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 4px;
}

@media (max-width: 480px) {
    .intech-ica__link {
        gap: 10px;
        padding: 10px;
    }
    .intech-ica__img {
        width: 72px;
        height: 72px;
    }
    .intech-ica__title {
        font-size: 13px;
    }
}

/* ── Floating Widget ────────────────────────── */
#intech-fw {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    width: 220px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,.18);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.intech-fw__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ee4d2d;
    padding: 8px 12px;
}

.intech-fw__headtitle {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.intech-fw__close {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    opacity: .8;
}

.intech-fw__close:hover {
    opacity: 1;
}

.intech-fw__slides {
    position: relative;
}

.intech-fw__slide {
    display: none;
}

.intech-fw__slide--active {
    display: block;
}

.intech-fw__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.intech-fw__img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.intech-fw__info {
    padding: 10px 12px;
}

.intech-fw__title {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 600;
    color: #222;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.intech-fw__price {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #ee4d2d;
}

.intech-fw__cta {
    display: block;
    text-align: center;
    background: #ee4d2d;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 7px;
    border-radius: 4px;
}

.intech-fw__link:hover .intech-fw__cta {
    background: #d73a1a;
}

.intech-fw__dots {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 8px 0;
    background: #f9f9f9;
}

.intech-fw__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background .2s;
}

.intech-fw__dot--active {
    background: #ee4d2d;
}

@media (max-width: 480px) {
    #intech-fw {
        width: 180px;
        bottom: 12px;
        right: 12px;
    }
    .intech-fw__img {
        height: 130px;
    }
}

/* ── Exit Intent Popup ──────────────────────── */
#intech-exit {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.intech-exit__box {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 28px 24px 24px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
}

.intech-exit__close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 0;
}

.intech-exit__badge {
    display: inline-block;
    background: #fff0ed;
    color: #ee4d2d;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin: 0 0 16px;
}

.intech-exit__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.intech-exit__img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.intech-exit__title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    line-height: 1.4;
}

.intech-exit__price {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 700;
    color: #ee4d2d;
}

.intech-exit__btn {
    display: block;
    background: #ee4d2d;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 11px;
    border-radius: 6px;
    transition: background .2s;
}

.intech-exit__link:hover .intech-exit__btn {
    background: #d73a1a;
}

/* ── Side Banner (Left / Right) ─────────────── */
.intech-side {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9998;
    width: 140px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 28px rgba(0,0,0,.18);
    overflow: visible;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.intech-side--left  { left: 10px; }
.intech-side--right { right: 10px; }

/* Close button — big enough to tap comfortably */
.intech-side__close {
    position: absolute;
    top: -13px;
    right: -13px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0,0,0,.65);
    border: 2px solid #fff;
    color: #fff;
    font-size: 14px;
    line-height: 26px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    z-index: 2;
    transition: background .2s;
}

.intech-side__close:hover { background: rgba(0,0,0,.9); }

.intech-side__link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 10px;
    overflow: hidden;
}

.intech-side__img {
    width: 140px;
    height: 210px;
    object-fit: cover;
    display: block;
}

.intech-side__price {
    margin: 0;
    padding: 7px 6px 4px;
    font-size: 13px;
    font-weight: 700;
    color: #ee4d2d;
    text-align: center;
    background: #fff;
}

.intech-side__btn {
    display: block;
    background: #ee4d2d;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    padding: 8px 6px;
    letter-spacing: .3px;
}

.intech-side__link:hover .intech-side__btn { background: #d73a1a; }

/* Mobile: nhỏ lại, đặt ở góc dưới để không che nội dung */
@media (max-width: 1023px) {
    .intech-side {
        width: 75px;
        top: auto;
        bottom: 90px;   /* trên floating widget */
        transform: none;
    }
    .intech-side--left  { left: 4px; }
    .intech-side--right { right: 4px; }

    .intech-side__img {
        width: 75px;
        height: 105px;
    }
    .intech-side__price {
        font-size: 10px;
        padding: 4px 3px 2px;
    }
    .intech-side__btn {
        font-size: 10px;
        padding: 5px 3px;
    }
    /* Touch-friendly close button */
    .intech-side__close {
        width: 26px;
        height: 26px;
        line-height: 22px;
        font-size: 13px;
        top: -11px;
        right: -11px;
    }
}
