/**
 * TNTBook homepage collections v4
 * Native responsive grid; no carousel dependency.
 */
.home .tntb-collection {
    width:100%;
    max-width:none;
    min-width:0;
    flex:0 0 100%;
    box-sizing:border-box;
    margin:0 0 20px;
    padding:0 16px;
}
.tntb-collection *, .tntb-collection *::before,
.tntb-collection *::after { box-sizing:border-box; }
.tntb-collection__wrap {
    width:100%;
    background:#fff;
    border:1px solid #e6e9ed;
    border-radius:16px;
    overflow:hidden;
}
.tntb-collection__header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:20px 22px;
    border-bottom:1px solid #edf0f3;
}
.tntb-collection__header h2 {
    margin:0;
    color:#172b40;
    font-size:clamp(17px,1.5vw,22px);
    font-weight:800;
    line-height:1.6;
}
.tntb-collection a { text-decoration:none; }
.tntb-collection__more {
    flex-shrink:0;
    color:#176477;
    font-size:13px;
    font-weight:600;
    padding:10px 0;
}
.tntb-collection__more span { margin-inline-start:8px; }
.tntb-collection__grid {
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:0;
    padding:8px;
}
.home .tntb-collection article.tntb-book {
    display:flex;
    flex-direction:column;
    min-width:0;
    margin:0 !important;
    padding:14px !important;
    background:#fff !important;
    border:1px solid transparent;
    border-radius:10px;
}
.tntb-book__cover {
    display:flex;
    align-items:center;
    justify-content:center;
    aspect-ratio:4/5;
    overflow:hidden;
    padding:10px;
    border-radius:8px;
    background:#f6f7f8;
}
.tntb-book__cover img {
    display:block;
    width:100%;
    height:100%;
    max-height:100%;
    object-fit:contain;
    margin:0;
}
.tntb-book__body {
    display:flex;
    flex:1;
    flex-direction:column;
    padding-top:14px;
}
.tntb-book__title {
    font-size:14px;
    line-height:1.9;
    font-weight:700;
    margin:0 0 7px;
}
.tntb-book__title a {
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
    min-height:3.8em;
    color:#172b40;
}
.tntb-book__publisher {
    margin:0 0 12px;
    font-size:12px;
    line-height:1.8;
    color:#626d79;
}
.tntb-book__publisher a { color:inherit; }
.tntb-book__purchase { margin-top:auto; padding-top:8px; }
.tntb-book__price {
    font-size:14px;
    font-weight:700;
    color:#172b40;
    line-height:1.9;
}
.tntb-book__price del {
    display:block;
    color:#697482;
    font-size:12px;
    font-weight:400;
}
.tntb-book__price ins { background:transparent; text-decoration:none; }
.tntb-book__status {
    display:block;
    margin-top:4px;
    font-size:11px;
    color:#23704a;
}
.tntb-book__status.is-unavailable { color:#697482; }
.tntb-book__details {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    min-height:44px;
    margin-top:12px;
    padding:8px 12px;
    border:1px solid #e0e6ec;
    border-radius:8px;
    background:#f8fafc;
    color:#213b54;
    font-size:12px;
    font-weight:600;
}
.tntb-collection a:focus-visible {
    outline:3px solid #b67514;
    outline-offset:3px;
}
@media(hover:hover) {
    .home .tntb-collection article.tntb-book:hover { border-color:#dce3ea; }
    .tntb-collection a:hover { color:#965b13; }
    .tntb-book__details:hover { background:#fff4de; border-color:#e5c68d; }
}
@media(max-width:1099px) {
    .tntb-collection__grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:599px) {
    .home .tntb-collection { padding:0 10px; margin-bottom:14px; }
    .tntb-collection__wrap { border-radius:12px; }
    .tntb-collection__header { padding:13px 14px; gap:10px; }
    .tntb-collection__header h2 { font-size:16px; }
    .tntb-collection__more { font-size:11px; }
    .tntb-collection__more span { margin-inline-start:3px; }
    .tntb-collection__grid { grid-template-columns:repeat(2,minmax(0,1fr)); padding:4px; }
    .home .tntb-collection article.tntb-book { padding:9px !important; }
    .tntb-book__title { font-size:13px; }
    .tntb-book__price { font-size:13px; }
    .tntb-book__details { padding:8px; font-size:11px; }
}


/* Reference cards: compact prices and native purchase links. */
.tntb-collection__grid { gap:12px; padding:16px; }
.home .tntb-collection article.tntb-book {
    border:1px solid #dfe7ed;
    border-radius:18px;
    padding:14px !important;
    overflow:hidden;
}
.tntb-book__cover { background:#fff; padding:0 6px; border-radius:4px; }
.tntb-book__title { font-size:13px; font-weight:600; }
.tntb-book__publisher {
    font-size:11px;
    min-height:1.8em;
    margin-bottom:12px;
}
.tntb-book__commerce {
    border-top:1px solid #f0f2f4;
    padding-top:12px;
}
.tntb-book__discount-slot {
    display:flex;
    justify-content:flex-end;
    min-height:30px;
    margin-bottom:4px;
}
.tntb-book__discount {
    display:inline-flex;
    direction:ltr;
    align-items:stretch;
    overflow:hidden;
    border-radius:3px;
    background:#ffd6da;
    font-size:11px;
}
.tntb-book__discount del {
    display:flex;
    align-items:center;
    padding:4px 8px;
    color:#57616b;
}
.tntb-book__discount del .woocommerce-Price-currencySymbol { display:none; }
.tntb-book__discount > span {
    display:flex;
    align-items:center;
    padding:4px 6px;
    background:#ce0000;
    color:#fff;
    font-weight:800;
}
.tntb-book__bottom {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:6px;
}
.tntb-book__actions { display:flex; flex-shrink:0; gap:6px; }
.tntb-collection .tntb-book__icon {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:38px;
    height:40px;
    border:1.5px solid #007eae;
    border-radius:10px;
    color:#007eae;
    background:#fff;
}
.tntb-book__icon svg { display:block; flex-shrink:0; }
.tntb-book__bottom .tntb-book__price {
    min-width:0;
    font-size:12px;
    color:#203f72;
    font-weight:800;
    line-height:1.8;
    text-align:left;
}
.tntb-book__price .woocommerce-Price-currencySymbol {
    font-size:10px;
    font-weight:400;
    color:#536775;
}
.tntb-book__price .woocommerce-Price-amount { display:inline-block; }
.tntb-book__availability { display:block; color:#b34242; font-size:11px; margin-top:5px; }
@media(hover:hover) {
    .tntb-collection .tntb-book__icon:hover {
        background:#edf8fc;
        color:#00638a;
    }
}
@media(min-width:1100px) and (max-width:1350px) {
    .tntb-book__bottom { flex-wrap:wrap; }
    .tntb-book__bottom .tntb-book__price { margin-inline-start:auto; }
}
@media(max-width:599px) {
    .tntb-collection__grid { gap:8px; padding:8px; }
    .home .tntb-collection article.tntb-book { padding:10px !important; border-radius:14px; }
    .tntb-book__bottom { flex-wrap:wrap; row-gap:8px; }
    .tntb-book__bottom .tntb-book__price { margin-inline-start:auto; }
    .tntb-collection .tntb-book__icon { width:38px; height:40px; }
}

/* TNTB_CARD_POLISH_1 */
.tntb-book__title { font-weight:700; }
.tntb-book__publisher { font-weight:600; }
.tntb-book__bottom .tntb-book__price { font-size:13px; }
.tntb-book__price .woocommerce-Price-currencySymbol {
    font-size:11px;
    font-weight:700;
}
.tntb-book__icon svg { stroke-width:2; }

@media (min-width:1100px) {
.tntb-collection__grid:not(:has(> .tntb-book:nth-child(n+1):nth-child(-n+6) .tntb-book__discount)) > .tntb-book:nth-child(n+1):nth-child(-n+6) .tntb-book__discount-slot { min-height:0; margin-bottom:0; height:0; }
}

@media (min-width:600px) and (max-width:1099px) {
.tntb-collection__grid:not(:has(> .tntb-book:nth-child(n+1):nth-child(-n+3) .tntb-book__discount)) > .tntb-book:nth-child(n+1):nth-child(-n+3) .tntb-book__discount-slot { min-height:0; margin-bottom:0; height:0; }
.tntb-collection__grid:not(:has(> .tntb-book:nth-child(n+4):nth-child(-n+6) .tntb-book__discount)) > .tntb-book:nth-child(n+4):nth-child(-n+6) .tntb-book__discount-slot { min-height:0; margin-bottom:0; height:0; }
}

@media (max-width:599px) {
.tntb-collection__grid:not(:has(> .tntb-book:nth-child(n+1):nth-child(-n+2) .tntb-book__discount)) > .tntb-book:nth-child(n+1):nth-child(-n+2) .tntb-book__discount-slot { min-height:0; margin-bottom:0; height:0; }
.tntb-collection__grid:not(:has(> .tntb-book:nth-child(n+3):nth-child(-n+4) .tntb-book__discount)) > .tntb-book:nth-child(n+3):nth-child(-n+4) .tntb-book__discount-slot { min-height:0; margin-bottom:0; height:0; }
.tntb-collection__grid:not(:has(> .tntb-book:nth-child(n+5):nth-child(-n+6) .tntb-book__discount)) > .tntb-book:nth-child(n+5):nth-child(-n+6) .tntb-book__discount-slot { min-height:0; margin-bottom:0; height:0; }
}

/* TNTB_CARD_ALIGNMENT_2 */
.home .tntb-collection article.tntb-book {
    padding:10px !important;
    container-type:inline-size;
}
.tntb-collection .tntb-book__bottom {
    display:grid;
    grid-template-columns:max-content minmax(0,1fr);
    align-items:center;
    gap:4px;
    min-height:40px;
    flex-wrap:nowrap;
}
.tntb-collection .tntb-book__actions {
    display:flex;
    align-items:center;
    gap:4px;
}
.tntb-collection .tntb-book__icon {
    width:32px;
    height:38px;
    border-radius:9px;
}
.tntb-collection .tntb-book__bottom .tntb-book__price {
    margin:0;
    font-size:13px;
    font-size:clamp(10px,7.5cqi,13px);
    line-height:1.7;
    text-align:left;
    white-space:nowrap;
}
.tntb-collection .tntb-book__price .woocommerce-Price-currencySymbol {
    font-size:11px;
    font-size:clamp(9px,6.2cqi,11px);
    font-weight:700;
}
.tntb-collection .tntb-book__price .woocommerce-Price-amount {
    white-space:nowrap;
}
.tntb-collection .tntb-book__icon svg { stroke-width:2; }
@container (max-width:155px) {
    .tntb-collection .tntb-book__icon { width:28px; height:36px; }
    .tntb-collection .tntb-book__actions { gap:3px; }
    .tntb-collection .tntb-book__bottom { gap:3px; }
}
@media(max-width:359px) {
    .home .tntb-collection article.tntb-book { padding:6px !important; }
    .tntb-collection .tntb-book__icon { width:24px; height:34px; }
    .tntb-collection .tntb-book__icon svg { width:20px; height:20px; }
    .tntb-collection .tntb-book__actions { gap:2px; }
}

/* TNTB_SECTION_IDENTITIES_1 */
.tntb-section-omoomi {
    --tntb-accent:#176477;
    --tntb-tint:#edf6f8;
}
.tntb-section-koodak {
    --tntb-accent:#a34f16;
    --tntb-tint:#fff4e8;
}
.tntb-section-komakdarsi {
    --tntb-accent:#28704b;
    --tntb-tint:#edf7f0;
}
.tntb-section-daneshgahi {
    --tntb-accent:#70458e;
    --tntb-tint:#f5eff9;
}
.home .tntb-collection { margin-bottom:28px; }
.tntb-collection .tntb-collection__header {
    background:var(--tntb-tint,#edf6f8);
    border-bottom:1px solid #e5eaf0;
}
.tntb-collection .tntb-collection__header h2 {
    position:relative;
    padding-inline-start:16px;
    color:#172b40;
}
.tntb-collection .tntb-collection__header h2::before {
    content:"";
    position:absolute;
    inset-inline-start:0;
    top:50%;
    transform:translateY(-50%);
    width:4px;
    height:26px;
    border-radius:4px;
    background:var(--tntb-accent,#176477);
}
.tntb-collection .tntb-collection__more {
    color:var(--tntb-accent,#176477);
    font-weight:700;
}
@media(hover:hover) {
    .tntb-collection .tntb-collection__more:hover {
        text-decoration:underline;
        text-underline-offset:4px;
    }
}
@media(max-width:599px) {
    .home .tntb-collection { margin-bottom:20px; }
    .tntb-collection .tntb-collection__header h2 {
        padding-inline-start:12px;
    }
    .tntb-collection .tntb-collection__header h2::before {
        width:3px;
        height:22px;
    }
}

/* TNTB_OUTLINED_SECTION_TITLES_1 */
.tntb-collection .tntb-collection__header {
    position:relative;
    isolation:isolate;
    background:#fff;
    border-bottom:0;
    padding:18px 22px 16px;
    gap:12px;
}
.tntb-collection .tntb-collection__header::after {
    content:"";
    position:absolute;
    inset-inline:22px;
    bottom:16px;
    height:1px;
    background:var(--tntb-accent,#176477);
    z-index:-1;
}
.tntb-collection .tntb-collection__header h2 {
    margin:0;
    padding:8px 14px;
    border:1px solid var(--tntb-accent,#176477);
    border-radius:0;
    background:var(--tntb-tint,#edf6f8);
    color:var(--tntb-accent,#176477);
}
.tntb-collection .tntb-collection__header h2::before {
    content:none;
    display:none;
}
.tntb-collection .tntb-collection__more {
    align-self:center;
    background:#fff;
    padding:6px 0;
    margin-bottom:4px;
}
@media(max-width:599px) {
    .tntb-collection .tntb-collection__header {
        padding:14px 12px 12px;
        gap:8px;
    }
    .tntb-collection .tntb-collection__header::after {
        inset-inline:12px;
        bottom:12px;
    }
    .tntb-collection .tntb-collection__header h2 {
        padding:7px 9px;
        font-size:15px;
    }
}

/* TNTB_PRICE_READABILITY_1 */
.tntb-collection .tntb-book__bottom .tntb-book__price {
    font-size:14px;
    font-size:clamp(11px,8cqi,14px);
    font-weight:800;
    font-variant-numeric:tabular-nums;
}
.tntb-collection .tntb-book__price .woocommerce-Price-currencySymbol {
    font-size:12px;
    font-size:clamp(10px,6.8cqi,12px);
    font-weight:800;
}
.tntb-collection .tntb-book__discount del {
    font-size:12px;
    font-weight:700;
    padding:4px 7px;
}
.tntb-collection .tntb-book__discount del .woocommerce-Price-amount {
    font-size:inherit;
    font-weight:inherit;
}
.tntb-collection .tntb-book__discount > span {
    font-family:Tahoma,Arial,sans-serif;
    font-size:13px;
    font-weight:700;
    direction:ltr;
    unicode-bidi:isolate;
    white-space:nowrap;
    line-height:1.5;
    padding:4px 6px;
}
.tntb-collection .tntb-book__bottom {
    grid-template-columns:max-content minmax(0,1fr);
    gap:3px;
}
@container (max-width:170px) {
    .tntb-collection .tntb-book__icon { width:28px; }
    .tntb-collection .tntb-book__actions { gap:3px; }
}
@media(max-width:359px) {
    .tntb-collection .tntb-book__icon { width:24px; }
    .tntb-collection .tntb-book__actions { gap:2px; }
}
