/* =========================================================
   BOOK XE — ARCHIVE CSS v4
   Font: Montserrat | Layout: 3 cột
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&display=swap');

:root {
    --xe-font:     'Montserrat', sans-serif;
    --xe-green:    #16a34a;
    --xe-green-h:  #15803d;
    --xe-blue:     #2563eb;
    --xe-text:     #111827;
    --xe-muted:    #6b7280;
    --xe-border:   rgba(0,0,0,0.08);
    --xe-border-h: rgba(0,0,0,0.14);
    --xe-bg:       #f3f4f6;
    --xe-white:    #ffffff;
    --xe-radius:   16px;
    --xe-max:      1200px;
    --xe-trans:    all .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.tbx-xe-archive { background: var(--xe-bg); min-height: 100vh; font-family: var(--xe-font); }

.tbx-xe-archive-header { background: #111827; padding: 50px 24px 42px; text-align: center; }
.tbx-xe-archive-header__inner { max-width: var(--xe-max); margin: 0 auto; }
.tbx-xe-archive-title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 600; color: #fff; margin-bottom: 9px; letter-spacing: -0.3px;
}
.tbx-xe-archive-desc { font-size: 13px; color: rgba(255,255,255,0.5); line-height: 1.5; font-weight: 400; }

.tbx-xe-archive-content { max-width: var(--xe-max); margin: 0 auto; padding: 32px 24px 64px; }

/* === GRID 3 CỘT === */
.tbx-xe-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    align-items: start;
}
@media (max-width: 900px) { .tbx-xe-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tbx-xe-grid { grid-template-columns: 1fr; } }

/* === CARD === */
.tbx-xe-card {
    background: var(--xe-white);
    border-radius: var(--xe-radius);
    border: 0.5px solid var(--xe-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
    min-width: 0;
    width: 100%;
}
.tbx-xe-card:hover { transform: translateY(-5px); box-shadow: 0 16px 40px rgba(0,0,0,0.10); }

/* === IMAGE WRAP – padding-top trick cho aspect-ratio 4:3 === */
.tbx-xe-card__img-wrap {
    position: relative;
    display: block;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
    background: #e5e7eb;
    text-decoration: none;
    flex-shrink: 0;
}
.tbx-xe-card__img-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .4s ease;
}
.tbx-xe-card:hover .tbx-xe-card__img-wrap img { transform: scale(1.06); }

.tbx-xe-card__wish {
    position: absolute; top: 10px; right: 10px;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,0.88); backdrop-filter: blur(6px);
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 2; transition: var(--xe-trans); padding: 0;
}
.tbx-xe-card__wish:hover { background: #fff; transform: scale(1.1); }
.tbx-xe-card__wish svg { width: 15px; height: 15px; stroke: #9ca3af; fill: none; stroke-width: 2; transition: var(--xe-trans); }
.tbx-xe-card__wish.active svg { stroke: #ef4444; fill: #ef4444; }

.tbx-xe-card__badge {
    position: absolute; top: 10px; left: 10px;
    background: rgba(17,24,39,0.72); backdrop-filter: blur(4px);
    color: #fff; font-family: var(--xe-font);
    font-size: 11px; font-weight: 500;
    padding: 3px 10px; border-radius: 50px; z-index: 2;
}

.tbx-xe-card__body {
    padding: 14px 15px 16px;
    display: flex; flex-direction: column; flex: 1; gap: 8px;
}

.tbx-xe-card__hang {
    font-size: 10px; font-weight: 500; text-transform: uppercase;
    letter-spacing: 0.7px; color: var(--xe-blue);
}
.tbx-xe-card__title { font-size: 13.5px; font-weight: 500; color: var(--xe-text); line-height: 1.38; }
.tbx-xe-card__title a { color: inherit; text-decoration: none; }
.tbx-xe-card__title a:hover { color: var(--xe-green); }

.tbx-xe-card__toggle {
    display: flex; align-items: center; justify-content: center; gap: 5px;
    width: 100%; padding: 8px 14px;
    border-radius: 50px; border: 0.5px solid var(--xe-border-h);
    background: transparent; color: var(--xe-muted);
    font-family: var(--xe-font); font-size: 10px; font-weight: 400;
    letter-spacing: 0.8px; text-transform: uppercase;
    cursor: pointer; transition: var(--xe-trans);
}
.tbx-xe-card__toggle:hover { border-color: var(--xe-text); color: var(--xe-text); }
.tbx-xe-card__toggle svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.5; transition: transform .25s ease; flex-shrink: 0; }
.tbx-xe-card__toggle.open svg { transform: rotate(180deg); }

.tbx-xe-card__excerpt {
    font-size: 12px; color: var(--xe-muted); line-height: 1.5;
    font-weight: 400;
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height .35s ease, opacity .25s ease;
}
.tbx-xe-card__excerpt.open { max-height: 150px; opacity: 1; }

.tbx-xe-card__footer {
    display: flex; align-items: flex-end; justify-content: space-between;
    margin-top: auto; padding-top: 4px;
}
.tbx-xe-card__so-cho-row { display: flex; flex-direction: column; gap: 1px; }
.tbx-xe-card__so-cho-label { font-size: 10px; font-weight: 400; color: var(--xe-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.tbx-xe-card__so-cho-val { font-size: 13px; font-weight: 500; color: var(--xe-text); }
.tbx-xe-card__price { font-size: 18px; font-weight: 600; color: var(--xe-text); white-space: nowrap; }

.tbx-xe-card__btn-detail {
    display: block; width: 100%; padding: 10px 18px;
    background: var(--xe-green); color: #fff;
    border-radius: 50px; text-align: center;
    font-family: var(--xe-font); font-size: 12px; font-weight: 500;
    text-decoration: none; border: none; cursor: pointer;
    transition: background .2s ease, transform .15s ease;
    margin-top: 4px;
}
.tbx-xe-card__btn-detail:hover { background: var(--xe-green-h); transform: translateY(-1px); }

.tbx-xe-pagination { margin-top: 44px; display: flex; justify-content: center; }
.tbx-xe-pagination .page-numbers { display: inline-flex; gap: 5px; list-style: none; padding: 0; }
.tbx-xe-pagination .page-numbers li a,
.tbx-xe-pagination .page-numbers li span {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    font-family: var(--xe-font); font-size: 12px; font-weight: 400;
    text-decoration: none; color: var(--xe-text);
    background: var(--xe-white); border: 0.5px solid var(--xe-border-h);
    transition: var(--xe-trans);
}
.tbx-xe-pagination .page-numbers li a:hover { background: #111827; color: #fff; border-color: #111827; }
.tbx-xe-pagination .page-numbers li .current { background: var(--xe-green); color: #fff; border-color: var(--xe-green); }
