.thoc-product-table-shortcode { padding-top: 36px; padding-bottom: 48px; }
.thoc-products {
    --thoc-primary: var(--primary-color, #0989ff);
    --thoc-ink: var(--tp-text-1, #010f1c);
    --thoc-border: #e8ebee;
    color: var(--thoc-ink);
    font-family: inherit;
    font-size: 14px;
    scroll-margin-top: 90px;
}
.thoc-products *, .thoc-products *::before, .thoc-products *::after { box-sizing: border-box; }
.thoc-products__heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.thoc-products .thoc-products__count { margin: 0; color: #626b75; font-size: 14px; }
.thoc-products__toolbar { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px 20px; }
.thoc-products__display { display: flex; align-items: center; min-width: 0; }
.thoc-products__views { flex-shrink: 0; }
.thoc-products__views .nav-tabs { flex-wrap: nowrap; margin: 0; padding: 0; list-style: none; }
.thoc-products__views .nav-item { list-style: none; }
.thoc-products__sort { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.thoc-products__sort label { margin: 0; color: #626b75; }
.thoc-products select.thoc-products__select { width: auto; min-width: 180px; height: 40px; padding: 0 25px; border: 1px solid #010f1c1a; border-radius: 0; background-color: #f9f9f9; color: var(--thoc-ink); font: inherit; }
.thoc-products__sort .nice-select:focus-visible { outline: 2px solid var(--thoc-primary); outline-offset: 3px; }
.thoc-products__filters { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 18px; }
.thoc-products__chips { display: flex; flex: 1; min-width: 0; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding: 5px; scrollbar-width: none; overscroll-behavior-x: contain; }
.thoc-products__chips::-webkit-scrollbar { display: none; }
.thoc-products .thoc-products__chip { flex: 0 0 auto; white-space: nowrap; padding: 6px 14px; border: 1px solid var(--thoc-border); border-radius: 20px; background: #fff; color: #495461; line-height: 1.5; font: inherit; transition: background-color .15s, border-color .15s; }
.thoc-products .thoc-products__scroll { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; border: 1px solid var(--thoc-border); border-radius: 50%; background: #fff; color: #495461; box-shadow: 0 2px 5px #010f1c08; }
.thoc-products__scroll svg { width: 18px; height: 18px; }
.thoc-products .thoc-products__scroll:hover:not(:disabled) { border-color: var(--thoc-primary); color: var(--thoc-primary); }
.thoc-products .thoc-products__scroll:disabled { opacity: .3; cursor: default; box-shadow: none; }
.thoc-products .thoc-products__chip:hover { border-color: var(--thoc-primary); color: var(--thoc-primary); }
.thoc-products .thoc-products__chip[aria-pressed="true"] { background: var(--thoc-primary); color: #fff; border-color: var(--thoc-primary); }
.thoc-products__search { position: relative; display: flex; align-items: center; margin-bottom: 24px; }
.thoc-products__search > svg { position: absolute; left: 16px; width: 20px; height: 20px; color: #7d8792; pointer-events: none; }
/* Keep the focus ring geometry fixed instead of inheriting the theme's transition: all. */
.thoc-products .thoc-products__search input { width: 100%; height: 48px; padding: 0 106px 0 46px; border: 1px solid var(--thoc-border); border-radius: 6px; outline: 2px solid transparent; outline-offset: 1px; box-shadow: 0 1px 2px #010f1c05; background: #fff; font: inherit; color: var(--thoc-ink); transition: border-color .15s ease, outline-color .15s ease; }
.thoc-products .thoc-products__search input:focus { outline-color: color-mix(in srgb, var(--thoc-primary) 25%, transparent); border-color: var(--thoc-primary); }
.thoc-products__loading { position: absolute; right: 16px; color: #626b75; font-size: 12px; }
.thoc-products__notice { padding: 12px 16px; margin-bottom: 16px; border-radius: 5px; background: #fff5df; color: #795617; }
.thoc-products__results { transition: opacity .15s; }
.thoc-products__results--loading { opacity: .55; }
/* Preserve keyboard access without keeping the hover actions open after a mouse click. */
.thoc-products__grid .tp-product-item:has(:focus-visible) .tp-product-action { right: 20px; visibility: visible; opacity: 1; }
.thoc-products__grid .tp-product-item:has(:focus-visible) .tp-product-add-cart-btn-large-wrapper { bottom: 0; visibility: visible; opacity: 1; }
.thoc-products__grid > .row { row-gap: 24px; }
.thoc-products__card { display: flex; flex-direction: column; height: 100%; min-width: 0; border: 1px solid var(--thoc-border); border-radius: 8px; background: #fff; }
.thoc-products__card:hover { box-shadow: 0 4px 10px #010f1c14; }
.thoc-products__card > :first-child { margin-bottom: 0; border: 0; box-shadow: none; background: transparent; }
.thoc-products__card :is(.tp-product-content, .tp-product-content-2, .tp-product-content-3, .tp-product-content-4, .tp-product-content-5) { padding: 12px 20px 8px; text-align: left; }
/* Show the complete package name without reserving an extra line for short names. */
.thoc-products__card :is(.tp-product-title, .tp-product-title-2, .tp-product-title-3, .tp-product-title-4) { display: block; -webkit-line-clamp: unset; min-height: 0; max-height: none; overflow: visible; overflow-wrap: anywhere; }
.thoc-products__card-details { display: flex; flex: 1; flex-direction: column; gap: 12px; padding: 0 20px 20px; }
.thoc-products .thoc-products__card-description { margin: 0; color: #626b75; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.thoc-products__card-warranty { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin-top: auto; color: #626b75; font-size: 12px; }
.thoc-products__package-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--thoc-primary); border-radius: 6px; background: var(--thoc-primary); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.5; text-align: center; text-decoration: none; }
.thoc-products__package-link:hover { background: var(--thoc-ink); border-color: var(--thoc-ink); color: #fff; }
.thoc-products .thoc-products__table { width: 100%; table-layout: fixed; border-collapse: collapse; border: 0; margin: 0; }
.thoc-products__table th, .thoc-products__table td { border: 0; border-bottom: 1px solid var(--thoc-border); padding: 16px 12px; vertical-align: middle; text-align: left; }
.thoc-products__table th { color: #626b75; background: #f8f9fb; padding-top: 12px; padding-bottom: 12px; font-size: 13px; font-weight: 500; }
.thoc-products__table th button { padding: 0; background: transparent; border: 0; font: inherit; color: inherit; }
.thoc-products__table th button span { display: inline-block; margin-left: 6px; }
.thoc-products__table tbody tr:hover { background: #fafbfc; }
.thoc-products__table .thoc-products__image-cell { width: 76px; padding-left: 12px; }
.thoc-products__image-cell img { display: block; width: 48px; height: 48px; max-width: 48px; object-fit: contain; border: 1px solid var(--thoc-border); border-radius: 8px; background: #fff; }
.thoc-products__name { font-size: 15px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; text-decoration: none; }
.thoc-products__name:hover { color: var(--thoc-primary); }
.thoc-products .thoc-products__description { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; margin: 5px 0 0; font-size: 13px; line-height: 1.5; color: #626b75; }
.thoc-products__table .thoc-products__price-cell { width: 150px; text-align: right; font-variant-numeric: tabular-nums; }
.thoc-products__price { display: block; color: var(--thoc-primary); font-weight: 600; font-size: 16px; white-space: nowrap; }
.thoc-products__old-price { display: block; font-size: 12px; color: #7d8792; white-space: nowrap; }
.thoc-products__table .thoc-products__warranty-cell { width: 145px; padding-left: 24px; }
.thoc-products__table .thoc-products__action-cell { width: 120px; text-align: right; }
.thoc-products__table .thoc-products__package-link { min-height: 36px; padding-top: 6px; padding-bottom: 6px; }
.thoc-products__warranty { display: inline-block; max-width: 100%; padding: 4px 8px; border-radius: 4px; background: #f1f5f9; color: #475569; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.thoc-products__warranty[data-warranty="1 tháng"] { background: #dcfce7; color: #166534; }
.thoc-products__warranty[data-warranty="2 tháng"] { background: #cffafe; color: #155e75; }
.thoc-products__warranty[data-warranty="3 tháng"] { background: #dbeafe; color: #1e40af; }
.thoc-products__warranty[data-warranty="6 tháng"] { background: #ede9fe; color: #5b21b6; }
.thoc-products__warranty:is([data-warranty="12 tháng"], [data-warranty="1 năm"]) { background: #fef3c7; color: #92400e; }
.thoc-products__warranty:is([data-warranty="24 tháng"], [data-warranty="2 năm"]) { background: #ffedd5; color: #9a3412; }
.thoc-products__warranty:is([data-warranty="36 tháng"], [data-warranty="3 năm"]) { background: #fce7f3; color: #9d174d; }
.thoc-products__warranty:is([data-warranty="48 tháng"], [data-warranty="4 năm"]) { background: #e0e7ff; color: #3730a3; }
.thoc-products__muted { color: #737d88; font-size: 12px; }
.thoc-products__unavailable { display: inline-block; margin-top: 6px; color: #b42318; font-size: 12px; }
.thoc-products__empty { text-align: center; padding: 56px 20px; border: 1px dashed var(--thoc-border); border-radius: 8px; }
.thoc-products__empty > svg { width: 32px; height: 32px; color: #7d8792; margin-bottom: 16px; }
.thoc-products__empty h3 { font-size: 20px; margin-bottom: 8px; }
.thoc-products__empty p { color: #626b75; font-size: 14px; }
.thoc-products__reset { padding: 10px 18px; border: 0; background: var(--thoc-primary); color: #fff; border-radius: 4px; }
.thoc-products__pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.thoc-products__pagination button { width: 40px; height: 40px; border: 1px solid var(--thoc-border); background: #fff; color: var(--thoc-ink); border-radius: 4px; }
.thoc-products__pagination button[aria-current="page"] { background: var(--thoc-primary); border-color: var(--thoc-primary); color: #fff; }
.thoc-products__pagination button:hover:not(:disabled):not([aria-current]) { border-color: var(--thoc-primary); color: var(--thoc-primary); }
.thoc-products__pagination button:disabled { opacity: .35; cursor: default; }
.thoc-products :is(button, a, select):focus-visible { outline: 2px solid var(--thoc-primary); outline-offset: 3px; }
.thoc-products__sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 767px) {
    .thoc-product-table-shortcode { padding-top: 24px; padding-bottom: 32px; }
    .thoc-products__heading { align-items: flex-start; gap: 16px; flex-direction: column; margin-bottom: 20px; }
    .thoc-products__toolbar { width: 100%; justify-content: space-between; }
    .thoc-products__sort { width: 100%; justify-content: space-between; }
    .thoc-products .thoc-products__select { max-width: 72%; }
    .thoc-products__filters { gap: 4px; }
    .thoc-products__search { margin-bottom: 8px; }
    .thoc-products__grid > .row { --bs-gutter-x: 12px; row-gap: 12px; }
    .thoc-products__card :is(.tp-product-content, .tp-product-content-2, .tp-product-content-3, .tp-product-content-4, .tp-product-content-5) { padding: 12px 12px 8px; }
    .thoc-products__card-details { padding: 0 12px 12px; }
    .thoc-products .thoc-products__card-description { font-size: 12px; }
    .thoc-products__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .thoc-products__table, .thoc-products__table tbody { display: block; width: 100%; }
    .thoc-products__table tbody tr { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 6px 12px; border-bottom: 1px solid var(--thoc-border); padding: 18px 0; }
    .thoc-products__table tbody td { width: auto; border: 0; padding: 0; }
    .thoc-products__table .thoc-products__image-cell { grid-column: 1; grid-row: 1 / span 2; width: 48px; padding: 0; }
    .thoc-products__info-cell { grid-column: 2 / -1; }
    .thoc-products__table .thoc-products__price-cell { grid-column: 2; text-align: left; width: auto; }
    .thoc-products__table .thoc-products__warranty-cell { grid-column: 2; width: auto; padding: 0; }
    .thoc-products__table .thoc-products__action-cell { grid-column: 2; width: auto; padding-top: 4px; text-align: left; }
    .thoc-products__warranty-cell::before { content: 'Bảo hành: '; color: #737d88; font-size: 12px; }
    .thoc-products__name { font-size: 14px; }
    .thoc-products .thoc-products__description { -webkit-line-clamp: 2; font-size: 12px; }
    .thoc-products__price { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    /* Only override shortcode transitions; product cards inherit the catalog theme's motion. */
    .thoc-products__chip, .thoc-products__results, .thoc-products .thoc-products__search input { transition: none !important; }
}
.thoc-products [hidden] { display: none !important; }
.thoc-products__notice button { margin-left: 8px; text-decoration: underline; border: 0; background: transparent; color: inherit; }
