/* =========================================================
   TNTKala Hero Banner + Cards v2.0 - Amazon Style with Real Products
   ========================================================= */

/* ==================== HERO ==================== */
.tnt-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    direction: rtl;
    background: #131921;
    font-family: Vazirmatn, sans-serif;
}

.tnt-hero__viewport {
    position: relative;
    width: 100%;
    height: 460px;
    overflow: hidden;
}

.tnt-hero__track { position: relative; width: 100%; height: 100%; }

.tnt-hero__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease-in-out;
    overflow: hidden;
}

.tnt-hero__slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

/* Gradient های زیبا و یکدست */
.tnt-hero__slide--books {
    background: linear-gradient(120deg, #0F1A2A 0%, #1B3A5C 50%, #2C5C8E 100%);
}
.tnt-hero__slide--sale {
    background: linear-gradient(120deg, #6B0F0F 0%, #B12704 50%, #E0511A 100%);
}
.tnt-hero__slide--delivery {
    background: linear-gradient(120deg, #013220 0%, #006633 50%, #1B8E4A 100%);
}

/* محتوای داخل اسلاید */
.tnt-hero__inner {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

/* متن سمت راست */
.tnt-hero__text {
    color: #ffffff;
    text-align: right;
    padding-top: 20px;
    padding-bottom: 60px;
}

.tnt-hero__badge {
    display: inline-block;
    background: rgba(255,215,20,0.95);
    color: #131921;
    font-size: 13px;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 14px;
    letter-spacing: 0.3px;
}

.tnt-hero__title {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 14px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
    letter-spacing: -0.5px;
}

.tnt-hero__subtitle {
    font-size: 17px;
    font-weight: 500;
    line-height: 1.6;
    margin: 0 0 24px;
    color: #f0f0f0;
    text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

.tnt-hero__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 34px;
    font-size: 15px;
    font-weight: 700;
    color: #131921;
    background: linear-gradient(180deg, #FFD814 0%, #F7CA00 100%);
    border: 1px solid #FCD200;
    border-radius: 100px;
    text-decoration: none;
    cursor: pointer;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.5) inset,
        0 3px 8px rgba(0,0,0,0.25);
    transition: all 0.2s ease;
}

.tnt-hero__btn:hover {
    background: linear-gradient(180deg, #F7CA00 0%, #F0B400 100%);
    transform: translateY(-2px);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.5) inset,
        0 5px 14px rgba(0,0,0,0.3);
    color: #131921;
}

/* کتاب‌های سمت چپ */
.tnt-hero__books {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding-bottom: 50px;
    perspective: 1200px;
}

.tnt-hero__book {
    position: relative;
    width: 130px;
    height: 195px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow:
        0 10px 25px rgba(0,0,0,0.45),
        0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

.tnt-hero__book:nth-child(1) { transform: rotate(-6deg) translateY(8px); }
.tnt-hero__book:nth-child(2) { transform: rotate(-2deg) translateY(-4px); z-index: 3; }
.tnt-hero__book:nth-child(3) { transform: rotate(2deg) translateY(-4px); z-index: 2; }
.tnt-hero__book:nth-child(4) { transform: rotate(6deg) translateY(8px); }

.tnt-hero__book:hover {
    transform: translateY(-12px) scale(1.05) rotate(0deg) !important;
    z-index: 10;
    box-shadow: 0 18px 40px rgba(0,0,0,0.55);
}

.tnt-hero__book img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* فلش‌های ناوبری */
.tnt-hero__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #131921;
    font-size: 26px;
    font-weight: bold;
    transition: all 0.2s;
    box-shadow: 0 3px 12px rgba(0,0,0,0.3);
    line-height: 1;
}

.tnt-hero__nav:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.tnt-hero__nav--prev { right: 20px; }
.tnt-hero__nav--next { left: 20px; }

/* نقطه‌ها */
.tnt-hero__dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
}

.tnt-hero__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.25s;
}

.tnt-hero__dot.is-active {
    background: #FFD814;
    width: 30px;
    border-radius: 5px;
}

/* ==================== CATEGORY CARDS ==================== */
.tnt-catcards {
    position: relative;
    z-index: 5;
    margin: -130px auto 0;
    max-width: 1500px;
    padding: 0 16px 30px;
    direction: rtl;
    font-family: Vazirmatn, sans-serif;
}

.tnt-catcards__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.tnt-catcard {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    min-height: 350px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tnt-catcard:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.25);
}

.tnt-catcard__title {
    font-size: 17px;
    font-weight: 800;
    color: #0F1111;
    margin: 0 0 14px;
    line-height: 1.3;
    text-align: right;
}

.tnt-catcard__items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
    flex: 1;
}

.tnt-catcard__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: #0F1111;
    transition: transform 0.15s ease;
}

.tnt-catcard__item:hover {
    transform: translateY(-3px);
    color: #C7511F;
}

.tnt-catcard__item-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f4f6f8;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tnt-catcard__item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.tnt-catcard__item-name {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: #0F1111;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tnt-catcard__more {
    display: block;
    text-align: right;
    color: #007185;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 0 0;
    margin-top: auto;
}

.tnt-catcard__more:hover {
    color: #C7511F;
    text-decoration: underline;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .tnt-hero__viewport { height: 400px; }
    .tnt-hero__inner { padding: 0 25px; gap: 20px; }
    .tnt-hero__title { font-size: 30px; }
    .tnt-hero__subtitle { font-size: 15px; }
    .tnt-hero__book { width: 100px; height: 150px; }
    .tnt-catcards { margin-top: -100px; }
    .tnt-catcards__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .tnt-hero__viewport { height: 340px; }
    .tnt-hero__inner {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 0 20px;
    }
    .tnt-hero__text {
        text-align: center;
        padding: 30px 0 10px;
    }
    .tnt-hero__title { font-size: 22px; }
    .tnt-hero__subtitle { font-size: 13px; margin-bottom: 16px; }
    .tnt-hero__btn { padding: 11px 26px; font-size: 14px; }
    .tnt-hero__books { padding-bottom: 20px; gap: 6px; }
    .tnt-hero__book { width: 70px; height: 105px; }
    .tnt-hero__nav { width: 36px; height: 36px; font-size: 20px; }
    .tnt-hero__nav--prev { right: 8px; }
    .tnt-hero__nav--next { left: 8px; }
    .tnt-catcards { margin-top: -60px; padding: 0 10px 20px; }
    .tnt-catcards__grid { grid-template-columns: 1fr; gap: 12px; }
    .tnt-catcard { min-height: auto; padding: 16px; }
}

@media (max-width: 480px) {
    .tnt-hero__viewport { height: 320px; }
    .tnt-hero__title { font-size: 19px; }
    .tnt-hero__book { width: 60px; height: 90px; }
}

@media (prefers-reduced-motion: reduce) {
    .tnt-hero__slide, .tnt-hero__btn,
    .tnt-catcard, .tnt-catcard__item, .tnt-hero__book {
        transition: none !important;
    }
}

/* مخفی کردن کد قدیمی */
.tnt-hero-slider,
.tnt-category-banners {
    display: none !important;
}
