:root {
    --tp-primary: #e0241b;
    --tp-primary-d: #b81d15;
    --tp-dark: #111318;
    --tp-text: #1f2430;
    --tp-muted: #6b7280;
    --tp-line: #e5e7eb;
    --tp-bg: #f4f5f7;
    --tp-card: #fff;
    --tp-link: #0b63c5;
    --tp-ok: #16a34a;
    --tp-radius: 8px;
    --tp-wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--tp-bg);
    color: var(--tp-text);
    font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
img { max-width: 100%; height: auto; }
a { color: var(--tp-link); text-decoration: none; }
a:hover { color: var(--tp-primary); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--tp-link); outline-offset: 2px; }

.screen-reader-text {
    position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.tp-skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; }
.tp-skip:focus { left: 8px; top: 8px; }

.tp-wrap { max-width: var(--tp-wrap); margin: 0 auto; padding: 0 16px; }
.tp-main { display: block; padding: 14px 0 40px; min-height: 50vh; }
.tp-icon { flex: none; vertical-align: middle; }
.tp-empty { color: var(--tp-muted); padding: 24px 0; }

/* Nút */
.tp-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1px solid var(--tp-primary);
    border-radius: 999px; background: var(--tp-primary); color: #fff; font-weight: 600; line-height: 1.2;
}
.tp-btn:hover { background: var(--tp-primary-d); border-color: var(--tp-primary-d); color: #fff; }
.tp-btn--ghost { background: #fff; color: var(--tp-primary); }
.tp-btn--ghost:hover { background: var(--tp-primary); color: #fff; }
.tp-btn--light { background: #fff; border-color: #fff; color: var(--tp-dark); }
.tp-btn--light:hover { background: #ffe9a8; border-color: #ffe9a8; color: var(--tp-dark); }

/* Thanh trên cùng */
.tp-topbar { background: var(--tp-dark); color: #e5e7eb; font-size: 13px; }
.tp-topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 34px; }
.tp-topbar__list { display: flex; gap: 22px; margin: 0; padding: 0; list-style: none; overflow: hidden; white-space: nowrap; }
.tp-topbar__list li { display: flex; align-items: center; gap: 6px; }
.tp-topbar__list .tp-icon { color: #4ade80; }
.tp-topbar__hotline { display: flex; align-items: center; gap: 6px; color: #e5e7eb; white-space: nowrap; }
.tp-topbar__hotline strong { color: #fbbf24; }

/* Header */
.tp-header { background: #fff; }
.tp-header__in { display: flex; align-items: center; gap: 20px; padding: 14px 16px; }
.tp-burger { display: none; padding: 6px; border: 0; background: none; color: var(--tp-dark); }
.tp-logo { display: flex; align-items: center; gap: 10px; color: var(--tp-dark); flex: none; }
.tp-logo:hover { color: var(--tp-dark); }
.tp-logo__mark {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
    background: var(--tp-primary); color: #fff;
}
.tp-logo__text { display: flex; flex-direction: column; line-height: 1.2; }
.tp-logo__text strong { font-size: 20px; letter-spacing: -.2px; }
.tp-logo__text small { color: var(--tp-muted); font-size: 12px; }
.tp-logo__img { display: block; height: 54px; width: auto; }
.tp-logo__img--mobile { display: none; }

.tp-search { position: relative; flex: 1; max-width: 560px; margin: 0 auto; }
.tp-search input[type="search"] {
    width: 100%; height: 44px; padding: 0 52px 0 18px; border: 2px solid var(--tp-primary);
    border-radius: 999px; background: #fff; outline-offset: 3px; -webkit-appearance: none; appearance: none;
}
.tp-search button {
    position: absolute; right: 4px; top: 4px; width: 44px; height: 36px; border: 0; border-radius: 999px;
    background: var(--tp-primary); color: #fff; display: grid; place-items: center;
}

.tp-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.tp-action {
    position: relative; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px;
    border: 1px solid var(--tp-line); border-radius: 999px; color: var(--tp-dark); font-weight: 600; font-size: 14px; white-space: nowrap;
}
.tp-action:hover { border-color: var(--tp-primary); color: var(--tp-primary); }
.tp-action--wallet strong { color: var(--tp-primary); }
.tp-cart-count {
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--tp-primary);
    color: #fff; font-size: 12px; line-height: 20px; text-align: center;
}

/* Thanh điều hướng */
.tp-nav { background: var(--tp-primary); color: #fff; position: sticky; top: 0; z-index: 30; }
.tp-nav__in { display: flex; align-items: stretch; gap: 8px; }
.tp-cats { position: relative; flex: none; }
.tp-cats__btn {
    display: flex; align-items: center; gap: 10px; width: 230px; height: 46px; padding: 0 16px; border: 0;
    background: rgba(0, 0, 0, .18); color: #fff; font-weight: 700;
}
.tp-cats__list {
    position: absolute; left: 0; top: 100%; width: 260px; z-index: 40; display: none;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
}
.tp-cats:hover .tp-cats__list, .tp-cats:focus-within .tp-cats__list, .tp-cats.is-open .tp-cats__list { display: block; }
.tp-menu { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.tp-menu a { display: block; padding: 0 14px; line-height: 46px; color: #fff; font-weight: 600; font-size: 14.5px; }
.tp-menu a:hover, .tp-menu .current-menu-item > a { background: rgba(0, 0, 0, .16); color: #fff; }

.tp-catlist { margin: 0; padding: 0; list-style: none; background: #fff; border: 1px solid var(--tp-line); border-radius: 0 0 var(--tp-radius) var(--tp-radius); }
.tp-catlist li + li { border-top: 1px solid var(--tp-line); }
.tp-catlist a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--tp-text); font-size: 14.5px; }
.tp-catlist a:hover { color: var(--tp-primary); background: #fafafa; }
.tp-catlist .tp-icon { color: var(--tp-link); }

/* Thanh quản trị WordPress (chỉ người đã đăng nhập thấy) */
.admin-bar .tp-nav { top: 32px; }
.admin-bar .tp-drawer { top: 32px; }
@media (max-width: 782px) {
    .admin-bar .tp-drawer { top: 46px; }
}

/* Ngăn kéo menu di động */
.tp-drawer { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .45); }
.tp-drawer[hidden] { display: none; }
.tp-drawer__panel { width: min(320px, 86vw); height: 100%; overflow-y: auto; background: #fff; padding-bottom: 24px; }
.tp-drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--tp-primary); color: #fff; }
.tp-drawer__head button { border: 0; background: none; color: #fff; padding: 4px; }
.tp-drawer__menu, .tp-drawer .tp-menu { display: block; margin: 0; padding: 0; list-style: none; }
.tp-drawer__menu a, .tp-drawer .tp-menu a { display: block; padding: 11px 14px; line-height: 1.4; color: var(--tp-text); font-weight: 600; border-bottom: 1px solid var(--tp-line); }
.tp-drawer .tp-menu a:hover { background: #fafafa; color: var(--tp-primary); }
.tp-drawer__label { margin: 16px 14px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--tp-muted); }
.tp-drawer .tp-catlist { border-left: 0; border-right: 0; border-radius: 0; }

/* Trang chủ: hero */
.tp-hero { display: grid; grid-template-columns: 230px minmax(0, 1fr) 290px; gap: 12px; margin-top: -14px; padding-top: 12px; }
.tp-hero--nocats { grid-template-columns: minmax(0, 1fr) 290px; }
.tp-hero__cats .tp-catlist { height: 100%; border-radius: var(--tp-radius); }
.tp-slider { position: relative; min-height: 320px; border-radius: var(--tp-radius); overflow: hidden; background: var(--tp-dark); }
.tp-slide {
    position: absolute; inset: 0; display: flex; align-items: center; padding: 28px 44px; color: #fff;
    opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s;
}
.tp-slide.is-active { opacity: 1; visibility: visible; }
.tp-slide--1 { background: radial-gradient(120% 140% at 85% 20%, #ff6a3d 0%, #c2161c 42%, #2a0a12 100%); }
.tp-slide--2 { background: radial-gradient(120% 140% at 85% 20%, #3b82f6 0%, #1e3a8a 45%, #0b1024 100%); }
.tp-slide--3 { background: radial-gradient(120% 140% at 85% 20%, #22c55e 0%, #0f766e 45%, #06201d 100%); }
.tp-slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tp-slide > img + .tp-slide__text { background: linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0)); padding: 20px 60px 20px 20px; border-radius: var(--tp-radius); }
.tp-slide__text { position: relative; max-width: 460px; }
.tp-slide__title { margin: 0 0 8px; font-size: 32px; font-weight: 800; line-height: 1.15; letter-spacing: -.3px; }
.tp-slide__sub { margin: 0 0 18px; font-size: 16px; opacity: .92; }
.tp-slider__dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 8px; }
.tp-slider__dots button { width: 10px; height: 10px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: transparent; }
.tp-slider__dots button.is-active { background: #fff; }
.tp-hero__side { display: grid; grid-template-rows: 1fr 1fr; gap: 12px; }
.tp-banner {
    position: relative; display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 120px; padding: 18px 20px;
    border-radius: var(--tp-radius); overflow: hidden; color: #fff;
}
.tp-banner:hover { color: #fff; filter: brightness(1.06); }
.tp-banner--1 { background: linear-gradient(135deg, #0f3fae, #1d7af0); }
.tp-banner--2 { background: linear-gradient(135deg, #0f172a, #334155); }
.tp-banner strong { font-size: 19px; line-height: 1.25; }
.tp-banner span { font-size: 13.5px; opacity: .9; }
.tp-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* 4 ô cam kết */
.tp-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 12px 0 0; padding: 0; list-style: none; }
.tp-features li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--tp-card); border: 1px solid var(--tp-line); border-radius: var(--tp-radius); }
.tp-features .tp-icon { color: var(--tp-primary); }
.tp-features strong { display: block; font-size: 15px; }
.tp-features span { display: block; color: var(--tp-muted); font-size: 13px; line-height: 1.35; }

/* Dòng thông báo chạy */
.tp-notice { display: flex; align-items: stretch; margin-top: 12px; background: var(--tp-dark); color: #fff; border-radius: 4px; overflow: hidden; }
.tp-notice strong { flex: none; padding: 8px 16px; background: var(--tp-primary); text-transform: uppercase; font-size: 13.5px; }
.tp-notice__track { flex: 1; overflow: hidden; white-space: nowrap; padding: 8px 0; }
.tp-notice__track span { display: inline-block; padding-left: 100%; animation: tp-marquee 28s linear infinite; }
.tp-notice:hover .tp-notice__track span { animation-play-state: paused; }
@keyframes tp-marquee { to { transform: translateX(-100%); } }

/* Tiêu đề mục */
.tp-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 0 14px; border-bottom: 2px solid var(--tp-primary); }
.tp-title__text {
    margin: 0; padding: 9px 40px 8px 16px; background: var(--tp-primary); color: #fff; font-size: 16px; font-weight: 800;
    line-height: 1.3; text-transform: uppercase; letter-spacing: .3px; clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 100%, 0 100%);
}
.tp-title__more { padding-bottom: 6px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.tp-section { margin-top: 28px; }

/* Bán chạy / mới + tin tức */
.tp-featured { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; margin-top: 22px; align-items: start; }
.tp-featured--full { grid-template-columns: minmax(0, 1fr); }
.tp-tabs__nav { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 2px solid var(--tp-primary); }
.tp-tabs__nav button { padding: 9px 16px; border: 0; background: none; color: var(--tp-muted); font-weight: 800; font-size: 14px; text-transform: uppercase; }
.tp-tabs__nav button.is-active { background: var(--tp-primary); color: #fff; border-radius: 4px 4px 0 0; }
.tp-tabs__panel[hidden] { display: none; }
.tp-news__title { margin: 6px 0 14px; color: var(--tp-primary); font-size: 16px; text-transform: uppercase; }
.tp-news ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.tp-news a { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: center; color: var(--tp-text); font-size: 14.5px; line-height: 1.4; }
.tp-news a:hover { color: var(--tp-primary); }
.tp-news img, .tp-news .tp-cover { width: 92px; height: 64px; aspect-ratio: auto; object-fit: cover; border-radius: 6px; }

/* Lưới + thẻ sản phẩm */
.tp-grid, .woocommerce ul.products, .woocommerce-page ul.products {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none;
}
.tp-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.woocommerce ul.products.columns-5, .woocommerce-page ul.products.columns-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
/* Cùng độ ưu tiên với quy tắc chia cột (columns-N) của WooCommerce, nạp sau nên thắng. */
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product,
.woocommerce ul.products[class*="columns-"] li.product, .woocommerce-page ul.products[class*="columns-"] li.product { float: none; clear: none; width: auto; margin: 0; padding: 0; }
.tp-grid > li { min-width: 0; }
.tp-card { display: flex; flex-direction: column; height: 100%; padding: 10px; background: var(--tp-card); border: 1px solid var(--tp-line); border-radius: var(--tp-radius); transition: box-shadow .15s, border-color .15s; }
.tp-card:hover { border-color: #cfd4dc; box-shadow: 0 6px 18px rgba(17, 19, 24, .08); }
.tp-card__media { position: relative; display: block; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: #eef0f3; }
.tp-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0 !important; }
.tp-card__title { margin: 10px 0 6px; font-size: 14.5px; font-weight: 500; line-height: 1.4; }
.tp-card__title a { color: var(--tp-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.tp-card__title a:hover { color: var(--tp-primary); }
.tp-card__price { margin-top: auto; color: var(--tp-primary); font-weight: 800; font-size: 16px; }
.tp-card__price del { color: var(--tp-muted); font-weight: 400; font-size: 13px; margin-right: 6px; }
.tp-card__price ins { text-decoration: none; }
.tp-card__meta { margin-top: 4px; color: var(--tp-muted); font-size: 12.5px; }
.tp-contact-price { color: var(--tp-primary); font-weight: 800; }
.tp-card__media--badged .tp-cover__chip { max-width: calc(100% - 66px); }
.tp-badge { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; }
.tp-badge--sale { background: #f59e0b; color: #1f1300; }
.tp-badge--out { background: rgba(17, 19, 24, .8); }

/* Bìa thay ảnh */
.tp-cover { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; width: 100%; height: 100%; aspect-ratio: 1; padding: 14px; color: #fff; }
.tp-cover--1 { background: linear-gradient(150deg, #7c3aed, #3b1a78); }
.tp-cover--2 { background: linear-gradient(150deg, #0ea5e9, #0b3b8f); }
.tp-cover--3 { background: linear-gradient(150deg, #10b981, #0b5146); }
.tp-cover--4 { background: linear-gradient(150deg, #f43f5e, #7a1230); }
.tp-cover--5 { background: linear-gradient(150deg, #f59e0b, #9a3412); }
.tp-cover--6 { background: linear-gradient(150deg, #475569, #111827); }
.tp-cover__chip { align-self: flex-start; max-width: 100%; margin-bottom: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 9px; border: 1px solid rgba(255, 255, 255, .6); border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.tp-cover__title { font-size: 17px; font-weight: 800; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Về chúng tôi */
.tp-about__in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.tp-about__contact { padding: 18px; background: var(--tp-card); border: 1px solid var(--tp-line); border-radius: var(--tp-radius); }
.tp-about__contact p { margin: 0 0 12px; }
.tp-about__btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* Trang cửa hàng */
.tp-crumb { margin: 2px 0 14px; color: var(--tp-muted); font-size: 13.5px; }
.tp-crumb a { color: var(--tp-muted); }
.tp-crumb a:hover { color: var(--tp-primary); }
.tp-crumb__sep { margin: 0 6px; }
.tp-shop__in { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.tp-shop__sidetitle { margin: 0; padding: 10px 14px; background: var(--tp-primary); color: #fff; font-weight: 700; border-radius: var(--tp-radius) var(--tp-radius) 0 0; }
.tp-shop__content .page-title, .woocommerce-products-header__title { margin: 0 0 12px; font-size: 22px; line-height: 1.3; }
.woocommerce .woocommerce-result-count { margin: 8px 0 14px; color: var(--tp-muted); font-size: 13.5px; }
.woocommerce .woocommerce-ordering { margin: 0 0 14px; }
.woocommerce .woocommerce-ordering select { height: 38px; padding: 0 10px; border: 1px solid var(--tp-line); border-radius: 6px; background: #fff; }
.woocommerce nav.woocommerce-pagination { margin-top: 20px; }
.woocommerce nav.woocommerce-pagination ul { border: 0; }
.woocommerce nav.woocommerce-pagination ul li { border: 0; margin: 0 3px; }
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span { min-width: 36px; padding: 9px 10px; border: 1px solid var(--tp-line); border-radius: 6px; background: #fff; color: var(--tp-text); }
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--tp-primary); border-color: var(--tp-primary); color: #fff; }

/* Trang sản phẩm */
.tp-shop--single div.product { background: var(--tp-card); border: 1px solid var(--tp-line); border-radius: var(--tp-radius); padding: 20px; }
.tp-shop--single div.product::after { content: ""; display: table; clear: both; }
.woocommerce div.product div.images { width: 40%; margin-bottom: 20px; }
.woocommerce div.product div.summary { width: 56%; margin-bottom: 20px; }
.woocommerce div.product div.images img, .woocommerce div.product div.images .tp-cover { border-radius: var(--tp-radius); }
.woocommerce div.product div.images .tp-cover { padding: 28px; }
.woocommerce div.product div.images .tp-cover__title { font-size: 30px; }
.woocommerce div.product div.images .tp-cover__chip { font-size: 13px; padding: 4px 12px; }
.woocommerce div.product .product_title { margin: 0 0 10px; font-size: 24px; line-height: 1.3; }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--tp-primary); font-size: 26px; font-weight: 800; }
.woocommerce div.product p.price del { color: var(--tp-muted); font-size: 16px; font-weight: 400; opacity: 1; }
.woocommerce div.product p.price ins { text-decoration: none; }
.woocommerce div.product .woocommerce-product-details__short-description { margin: 12px 0; }
.woocommerce div.product .woocommerce-product-details__short-description ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.woocommerce div.product .woocommerce-product-details__short-description li { position: relative; padding: 10px 12px 10px 40px; background: #fafafa; border: 1px solid var(--tp-line); border-radius: var(--tp-radius); }
.woocommerce div.product .woocommerce-product-details__short-description li::before {
    content: "✓"; position: absolute; left: 12px; top: 10px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--tp-ok); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
}
.woocommerce div.product p.stock { margin: 8px 0; font-size: 14px; font-weight: 600; }
.woocommerce div.product p.stock.in-stock { color: var(--tp-ok); }
.woocommerce div.product form.cart { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.woocommerce div.product form.cart::before, .woocommerce div.product form.cart::after { display: none; }
.woocommerce div.product form.cart div.quantity { float: none; margin: 0; }
.woocommerce .quantity .qty { width: 76px; height: 48px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius); text-align: center; }
.woocommerce div.product form.cart .button { float: none; flex: 1; min-width: 200px; height: 48px; font-size: 16px; text-transform: uppercase; }
.tp-trust { margin: 14px 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
.tp-trust li { display: flex; gap: 8px; align-items: flex-start; }
.tp-trust .tp-icon { color: var(--tp-ok); margin-top: 3px; }
.woocommerce div.product .product_meta { color: var(--tp-muted); font-size: 13.5px; }
.woocommerce div.product .product_meta > span { display: block; }
.woocommerce div.product .woocommerce-tabs { clear: both; padding-top: 8px; }
.woocommerce div.product .woocommerce-tabs ul.tabs { margin: 0 0 16px; padding: 0; border-bottom: 2px solid var(--tp-primary); }
.woocommerce div.product .woocommerce-tabs ul.tabs::before { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { margin: 0 4px 0 0; padding: 0; border: 0; border-radius: 4px 4px 0 0; background: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { padding: 9px 16px; color: var(--tp-muted); font-weight: 800; font-size: 14px; text-transform: uppercase; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: var(--tp-primary); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: #fff; }
.woocommerce div.product .woocommerce-tabs .panel { margin: 0; }
.woocommerce .related.products, .woocommerce .upsells.products { clear: both; margin-top: 28px; }
.woocommerce .related.products > h2, .woocommerce .upsells.products > h2 {
    display: inline-block; margin: 0; padding: 9px 40px 8px 16px; background: var(--tp-primary); color: #fff; font-size: 16px;
    text-transform: uppercase; clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 100%, 0 100%);
}
.woocommerce .related.products > ul, .woocommerce .upsells.products > ul { padding-top: 14px; border-top: 2px solid var(--tp-primary); }

/* Nút + form WooCommerce */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt {
    padding: 12px 20px; border-radius: var(--tp-radius); background: var(--tp-primary); color: #fff; font-weight: 700; line-height: 1.2;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover { background: var(--tp-primary-d); color: #fff; }
.woocommerce button.button:disabled, .woocommerce button.button:disabled[disabled] { padding: 12px 20px; color: #fff; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select, .woocommerce-cart table.cart td.actions .coupon .input-text {
    min-height: 44px; padding: 8px 12px; border: 1px solid #cfd4dc; border-radius: 6px; background: #fff;
}
.woocommerce-cart table.cart td.actions .coupon .input-text { width: 180px; }
.woocommerce table.shop_table { background: #fff; border-color: var(--tp-line); border-radius: var(--tp-radius); }
.woocommerce .woocommerce-info, .woocommerce .woocommerce-message, .woocommerce .woocommerce-error { border-top-color: var(--tp-primary); background: #fff; border-radius: 0 0 var(--tp-radius) var(--tp-radius); }
.woocommerce .woocommerce-info::before, .woocommerce .woocommerce-message::before { color: var(--tp-primary); }
.woocommerce-checkout #payment { background: #fff; border: 1px solid var(--tp-line); border-radius: var(--tp-radius); }
.woocommerce-checkout #payment div.payment_box { background: #f3f4f6; }
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: #f3f4f6; }
.woocommerce-account .woocommerce-MyAccount-navigation ul { margin: 0; padding: 0; list-style: none; background: #fff; border: 1px solid var(--tp-line); border-radius: var(--tp-radius); }
.woocommerce-account .woocommerce-MyAccount-navigation li + li { border-top: 1px solid var(--tp-line); }
.woocommerce-account .woocommerce-MyAccount-navigation a { display: block; padding: 10px 14px; color: var(--tp-text); }
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a { color: var(--tp-primary); font-weight: 700; }

/* Trang ví (plugin TeraWallet): dùng màu chủ đạo của theme */
body .woo-wallet-my-wallet-container { --wallet-primary-color: var(--tp-primary); }
.woo-wallet-my-wallet-container a:hover { color: var(--tp-primary); }

/* Khung hướng dẫn thanh toán */
.tp-pay { margin: 0 0 24px; padding: 18px; background: #fff; border: 2px solid var(--tp-primary); border-radius: var(--tp-radius); }
.tp-pay .tp-pay__title { margin: 0 0 12px; font-size: 18px; }
.tp-pay__body { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.tp-pay__qr { width: 260px; height: auto; border: 1px solid var(--tp-line); border-radius: var(--tp-radius); }
.tp-pay__info { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; flex: 1; min-width: 240px; }
.tp-pay__info dt { color: var(--tp-muted); }
.tp-pay__info dd { margin: 0; word-break: break-all; }
.tp-pay__info code { padding: 2px 6px; background: #f3f4f6; border-radius: 4px; font-size: 14px; }
.tp-pay__hint { margin: 12px 0 0; color: var(--tp-muted); font-size: 14px; }
.tp-copy { margin-left: 6px; padding: 2px 10px; border: 1px solid var(--tp-line); border-radius: 999px; background: #fff; font-size: 12.5px; }
.tp-copy.is-done { border-color: var(--tp-ok); color: var(--tp-ok); }

/* Trang nội dung + bài viết */
.tp-page { padding-top: 6px; }
.tp-page--narrow { max-width: 860px; }
.tp-article, .tp-404 { background: var(--tp-card); border: 1px solid var(--tp-line); border-radius: var(--tp-radius); padding: 22px; }
.tp-article__title { margin: 0 0 6px; font-size: 26px; line-height: 1.3; }
.tp-article__thumb img { border-radius: var(--tp-radius); margin: 10px 0; }
.tp-content { font-size: 15.5px; line-height: 1.7; overflow-wrap: break-word; }
.tp-content h2 { margin: 1.4em 0 .5em; font-size: 20px; }
.tp-content h3 { margin: 1.2em 0 .4em; font-size: 17px; }
.tp-content img { border-radius: 6px; }
.tp-content table { width: 100%; border-collapse: collapse; }
.tp-content th, .tp-content td { padding: 8px 10px; border: 1px solid var(--tp-line); text-align: left; }
.tp-posts { display: grid; gap: 14px; }
.tp-post { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; padding: 12px; background: var(--tp-card); border: 1px solid var(--tp-line); border-radius: var(--tp-radius); }
.tp-post__media { display: block; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; }
.tp-post__media img, .tp-post__media .tp-cover { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
.tp-post__title { margin: 2px 0 4px; font-size: 18px; line-height: 1.35; }
.tp-post__title a { color: var(--tp-text); }
.tp-post__title a:hover { color: var(--tp-primary); }
.tp-post__date { margin: 0 0 8px; color: var(--tp-muted); font-size: 13px; }
.tp-post__body p:last-child { margin: 0; }
.navigation.pagination { margin-top: 18px; }
.navigation.pagination .nav-links { display: flex; gap: 6px; }
.navigation.pagination .page-numbers { min-width: 36px; padding: 7px 10px; border: 1px solid var(--tp-line); border-radius: 6px; background: #fff; color: var(--tp-text); text-align: center; }
.navigation.pagination .page-numbers.current { background: var(--tp-primary); border-color: var(--tp-primary); color: #fff; }

/* Chân trang */
.tp-footer { background: var(--tp-dark); color: #cbd0d8; font-size: 14.5px; }
.tp-footer__in { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; padding-top: 34px; padding-bottom: 28px; }
.tp-footer a { color: #cbd0d8; }
.tp-footer a:hover { color: #fff; }
.tp-footer__brand { margin: 0 0 8px; color: #fff; font-size: 20px; font-weight: 800; }
.tp-footer__title { margin: 0 0 10px; color: #fff; font-weight: 700; text-transform: uppercase; font-size: 14px; letter-spacing: .4px; }
.tp-footer__menu, .tp-footer__contact, .tp-footer__pay { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.tp-footer__contact li { display: flex; align-items: center; gap: 8px; }
.tp-footer__pay { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-footer__pay li { padding: 4px 10px; border: 1px solid #3a3f4b; border-radius: 6px; font-size: 13px; }
.tp-footer__bottom { border-top: 1px solid #262a33; padding: 14px 0; font-size: 13px; color: #9aa1ad; }

/* Nút nổi */
.tp-float { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: grid; gap: 10px; }
.tp-float__btn { display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; color: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .22); }
.tp-float__btn:hover { color: #fff; filter: brightness(1.08); }
.tp-float__btn[hidden] { display: none; }
.tp-float__btn b { font-size: 12px; }
.tp-float__btn--zalo { background: #0068ff; }
.tp-float__btn--messenger { background: #a033ff; }
.tp-float__btn--telegram { background: #229ed9; }
.tp-float__btn--top { background: var(--tp-primary); }

/* Màn hình vừa */
@media (max-width: 1100px) {
    .tp-hero, .tp-hero--nocats { grid-template-columns: 230px minmax(0, 1fr); }
    .tp-hero--nocats { grid-template-columns: minmax(0, 1fr); }
    .tp-hero__side { grid-column: 1 / -1; grid-template-rows: none; grid-template-columns: 1fr 1fr; }
    .tp-grid--6 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .tp-featured { grid-template-columns: minmax(0, 1fr); }
    .tp-news ul { grid-template-columns: 1fr 1fr; }
    .woocommerce ul.products.columns-5, .woocommerce-page ul.products.columns-5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .tp-action span { display: none; }
    .tp-action--wallet span { display: inline; }
}

/* Máy tính bảng + điện thoại */
@media (max-width: 900px) {
    .tp-topbar__list li:nth-child(n+3) { display: none; }
    .tp-burger { display: block; }
    .tp-nav { display: none; }
    .tp-header { position: sticky; top: 0; z-index: 30; box-shadow: 0 1px 0 var(--tp-line); }
    .admin-bar .tp-header { top: 32px; }
    .tp-header__in { flex-wrap: wrap; gap: 10px 12px; padding: 10px 16px; }
    .tp-logo { margin-right: auto; }
    .tp-logo__mark { width: 38px; height: 38px; border-radius: 10px; }
    .tp-logo__text strong { font-size: 17px; }
    .tp-logo__img { height: 40px; }
    .tp-search { order: 5; flex: 0 0 100%; max-width: none; }
    .tp-search input[type="search"] { height: 40px; }
    .tp-search button { height: 32px; }
    .tp-action { height: 40px; padding: 0 11px; }
    .tp-hero, .tp-hero--nocats { grid-template-columns: minmax(0, 1fr); }
    .tp-hero__cats { display: none; }
    .tp-slider { min-height: 240px; }
    .tp-slide { padding: 22px 26px 34px; }
    .tp-slide__title { font-size: 24px; }
    .tp-features { grid-template-columns: 1fr 1fr; }
    .tp-grid, .tp-grid--6, .woocommerce ul.products, .woocommerce-page ul.products,
    .woocommerce ul.products.columns-5, .woocommerce-page ul.products.columns-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tp-shop__in { grid-template-columns: minmax(0, 1fr); }
    .tp-shop__side { display: none; }
    .woocommerce div.product div.images, .woocommerce div.product div.summary { float: none; width: 100%; }
    .tp-about__in { grid-template-columns: minmax(0, 1fr); }
    .tp-footer__in { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 782px) {
    .admin-bar .tp-header { top: 46px; }
}

@media (max-width: 600px) {
    .admin-bar .tp-header { top: 0; }
    .tp-logo__img--mobile { display: block; height: 42px; }
    .tp-logo__img--desktop { display: none; }
    .tp-topbar__hotline { margin-left: auto; }
    .tp-topbar__list li:nth-child(n+2) { display: none; }
    .tp-hero__side { grid-template-columns: minmax(0, 1fr); }
    .tp-banner { min-height: 90px; }
    .tp-grid, .tp-grid--6, .woocommerce ul.products, .woocommerce-page ul.products,
    .woocommerce ul.products.columns-5, .woocommerce-page ul.products.columns-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .tp-card { padding: 8px; }
    .tp-card__price { font-size: 15px; }
    .tp-cover { padding: 10px; }
    .tp-cover__title { font-size: 14.5px; }
    .tp-news ul { grid-template-columns: minmax(0, 1fr); }
    .tp-title__text { font-size: 14.5px; padding-right: 34px; }
    .tp-shop--single div.product { padding: 12px; }
    .woocommerce div.product .product_title { font-size: 20px; }
    .woocommerce div.product div.images .tp-cover__title { font-size: 22px; }
    .tp-post { grid-template-columns: minmax(0, 1fr); }
    .tp-footer__in { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .tp-pay__qr { width: 100%; max-width: 300px; margin: 0 auto; }
    .tp-float { right: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .tp-slide { transition: none; }
    .tp-notice__track span { animation: none; padding-left: 12px; }
}
