/* Danh sách mẫu website (SP Page Builder addon "website_templates") */
.wt {
    --wt-ink: #0f1b2d;
    --wt-muted: #5b6676;
    --wt-line: #e4e8ee;
    --wt-soft: #f5f7fa;
    --wt-brand: #f14833;
    --wt-brand-dark: #d83a26;
    --wt-radius: 16px;
    color: var(--wt-ink);
    padding: 8px 0 24px;
}
.wt *,
.wt *::before,
.wt *::after { box-sizing: border-box; }
.wt a { text-decoration: none; }

.wt-heading { margin: 0 0 24px; }

/* ---- layout ---- */
.wt-layout { display: block; }
.wt-layout--filter {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

/* ---- sidebar ---- */
.wt-side {
    position: sticky;
    top: 110px;
    display: grid;
    gap: 16px;
}
.wt-panel {
    min-width: 0;
    margin: 0;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--wt-line);
    border-radius: var(--wt-radius);
}
.wt-panel__title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--wt-muted);
}
.wt-cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.wt-cats li { margin: 0; padding: 0; }
.wt-cats li::before { display: none; }
.wt.sppb-addon a.wt-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.35;
    color: var(--wt-ink);
    transition: background .2s, color .2s;
}
.wt-cat::after {
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-top: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: .35;
}
.wt.sppb-addon a.wt-cat:hover,
.wt.sppb-addon a.wt-cat:focus-visible { background: var(--wt-soft); color: var(--wt-brand); }
.wt.sppb-addon a.wt-cat.is-active { background: rgba(241, 72, 51, .08); color: var(--wt-brand); font-weight: 700; }
.wt-cat.is-active::after { opacity: 1; }

.wt-tagpick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
    margin: 0 -4px 16px 0;
    padding-right: 4px;
}
.wt-tagpick__item { margin: 0; cursor: pointer; font-weight: 400; }
.wt-tagpick__item input { position: absolute; opacity: 0; pointer-events: none; }
.wt-tagpick__item span {
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid var(--wt-line);
    border-radius: 999px;
    font-size: 13px;
    line-height: 1.3;
    color: var(--wt-muted);
    background: #fff;
    transition: border-color .2s, color .2s, background .2s;
}
.wt-tagpick__item:hover span { border-color: var(--wt-brand); color: var(--wt-brand); }
.wt-tagpick__item input:focus-visible + span { outline: 2px solid var(--wt-brand); outline-offset: 2px; }
.wt-tagpick__item input:checked + span { background: var(--wt-brand); border-color: var(--wt-brand); color: #fff; }

/* ---- buttons ---- */
.wt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.wt-btn--block { display: flex; width: 100%; }
.wt .wt-btn--primary { background: var(--wt-brand); color: #fff; }
.wt .wt-btn--primary:hover,
.wt .wt-btn--primary:focus-visible { background: var(--wt-brand-dark); color: #fff; }
.wt.sppb-addon a.wt-btn--ghost { background: #fff; border-color: var(--wt-brand); color: var(--wt-brand); }
.wt.sppb-addon a.wt-btn--ghost:hover,
.wt.sppb-addon a.wt-btn--ghost:focus-visible { background: var(--wt-brand); color: #fff; }

/* ---- grid ---- */
.wt-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}
.wt-card {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid var(--wt-line);
    border-radius: var(--wt-radius);
    overflow: hidden;
    transition: box-shadow .25s, transform .25s, border-color .25s;
}
.wt-card::before { display: none; }
.wt-card:hover {
    border-color: transparent;
    box-shadow: 0 16px 40px rgba(15, 27, 45, .12);
    transform: translateY(-4px);
}

/* The thumbnail is a full-page screenshot: show the top, scroll down it on hover. */
.wt-card__shot {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    background: var(--wt-soft);
    border-bottom: 1px solid var(--wt-line);
    overflow: hidden;
}
.wt-card__img {
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-size: 100% auto;
    background-position: center top;
    transition: background-position 4s ease-in-out;
}
.wt-card:hover .wt-card__img,
.wt-card__shot:focus-visible .wt-card__img { background-position: center bottom; }
@media (prefers-reduced-motion: reduce) {
    .wt-card,
    .wt-card__img { transition: none; }
    .wt-card:hover { transform: none; }
}
.wt-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--wt-brand);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    box-shadow: 0 4px 12px rgba(241, 72, 51, .35);
}

.wt-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px 18px;
}
.wt .wt-card__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
}
.wt.sppb-addon .wt-card__title a { color: var(--wt-ink); }
.wt.sppb-addon .wt-card__title a:hover { color: var(--wt-brand); }
.wt-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.wt.sppb-addon a.wt-tag {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--wt-soft);
    color: var(--wt-muted);
    font-size: 12px;
    line-height: 1.4;
    transition: background .2s, color .2s;
}
.wt.sppb-addon a.wt-tag:hover { background: rgba(241, 72, 51, .1); color: var(--wt-brand); }
.wt-card__foot { margin-top: auto; display: grid; gap: 12px; padding-top: 4px; }
.wt-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.wt-price__sale { font-size: 20px; font-weight: 700; color: var(--wt-brand); white-space: nowrap; }
.wt-price__root { font-size: 14px; color: #8a94a3; white-space: nowrap; }

.wt-empty {
    margin: 0;
    padding: 40px 24px;
    text-align: center;
    color: var(--wt-muted);
    background: var(--wt-soft);
    border-radius: var(--wt-radius);
}

/* ---- pagination (Joomla's markup varies by template, so style it loosely) ---- */
.wt-pager { margin-top: 36px; }
.wt-pager ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.wt-pager li { margin: 0; padding: 0; float: none; }
.wt-pager li::before { display: none; }
.wt.sppb-addon .wt-pager li a,
.wt.sppb-addon .wt-pager li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--wt-line);
    border-radius: 999px;
    background: #fff;
    color: var(--wt-ink);
    font-weight: 600;
    float: none;
    margin: 0;
}
.wt.sppb-addon .wt-pager li a[href]:hover { border-color: var(--wt-brand); color: var(--wt-brand); }
.wt.sppb-addon .wt-pager li.active a,
.wt.sppb-addon .wt-pager li.active span { background: var(--wt-brand); border-color: var(--wt-brand); color: #fff; }

/* ---- responsive ---- */
@media (max-width: 991px) {
    .wt-layout--filter { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .wt-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .wt-side { grid-template-columns: minmax(0, 1fr); }
    .wt-tagpick { max-height: 132px; }
    .wt-cats { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
    .wt.sppb-addon a.wt-cat { border: 1px solid var(--wt-line); border-radius: 999px; padding: 8px 14px; white-space: nowrap; }
    .wt-cat::after { display: none; }
    .wt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .wt-card__body { padding: 12px; gap: 8px; }
    .wt .wt-card__title { font-size: 15px; }
    .wt-price__sale { font-size: 16px; }
    .wt-price__root { font-size: 12px; }
    .wt-card__tags { display: none; }
    .wt-btn { min-height: 38px; padding: 8px 12px; font-size: 14px; }
}
@media (max-width: 360px) {
    .wt-grid { grid-template-columns: 1fr; }
}
