/*
 * TechnicianMarket Platform — Shop Preview CSS
 *
 * File:
 * /wp-content/plugins/technicianmarket-platform/assets/css/shop.css
 *
 * Purpose:
 * - Enterprise shop/filter visual layer.
 * - Full-bleed inside Twenty Twenty-Five.
 * - Scoped only to #tm-shop.
 * - No framework. No external dependency.
 * - Fast, responsive, mobile drawer-ready.
 */

/* =========================================================
   ROOT / DESIGN SYSTEM
   ========================================================= */

#tm-shop {
--bg: #0a0c10;
    --bg-2: #11141a;
    --bg-3: #161a22;
    --bg-deep: #06080b;

    --line: #1f2530;
    --line-2: #2a3140;
    --line-soft: rgba(255, 255, 255, 0.07);

    --text: #eef3fb;
    --text-2: #b7c1d3;
    --text-3: #8793a6;

    --brand: #ff5722;
    --brand-dark: #e64a19;
    --brand-soft: rgba(255, 87, 34, 0.11);

    --ok: #22c55e;
    --warn: #f59e0b;
    --danger: #ef4444;

    --radius: 14px;
    --radius-lg: 22px;

    --shadow: 0 18px 54px rgba(0, 0, 0, 0.35);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.22);
    --shadow-cta: 0 12px 28px rgba(255, 87, 34, 0.24);

    --wrap: 1440px;
    --pad: clamp(14px, 2vw, 30px);
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

    position: relative;
    left: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    overflow-x: hidden;

    background:
        radial-gradient(900px 420px at 92% 0%, rgba(255, 87, 34, 0.12), transparent 60%),
        linear-gradient(180deg, #0a0c10 0%, #0b0f15 100%);
    color: var(--text);

    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    right: auto !important;
    transform: none !important;
    min-width: 0 !important;
    margin-right: 0 !important;
}

#tm-shop *,
#tm-shop *::before,
#tm-shop *::after {
    box-sizing: border-box;
}

#tm-shop a {
    color: inherit;
    text-decoration: none;
}

#tm-shop img {
    display: block;
    max-width: 100%;
    height: auto;
}

#tm-shop button,
#tm-shop input,
#tm-shop select,
#tm-shop textarea {
    font: inherit;
}

#tm-shop button,
#tm-shop select {
    cursor: pointer;
}

#tm-shop .wrap {
    width: min(100%, var(--wrap));
    margin: 0 auto;
    padding-left: var(--pad);
    padding-right: var(--pad);
}

#tm-shop :focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
    border-radius: 8px;
}

/* =========================================================
   UTILITY STRIP
   ========================================================= */

#tm-shop .util {
    background: var(--bg-deep);
    border-bottom: 1px solid var(--line);
    color: var(--text-2);
    font-size: 12px;
}

#tm-shop .util .wrap {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

#tm-shop .util-left,
#tm-shop .util-right {
    display: flex;
    align-items: center;
    gap: 13px;
    flex-wrap: wrap;
}

#tm-shop .util b {
    color: #fff;
    font-weight: 850;
}

#tm-shop .util-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #485365;
    flex: 0 0 auto;
}

#tm-shop .pulse {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#tm-shop .pulse::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--ok);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    animation: tmPulse 2.4s ease-out infinite;
}

@keyframes tmPulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
    70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

#tm-shop .veh-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 5px 11px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 12px;
    font-weight: 750;
}

#tm-shop .veh-pill .dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--ok);
}

#tm-shop .veh-pill a {
    color: var(--brand);
    font-weight: 850;
}

#tm-shop .veh-pill a:hover {
    color: #fff;
}

/* =========================================================
   ARCHIVE HEADER
   ========================================================= */

#tm-shop .head {
    padding: 38px 0 26px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(780px 340px at 95% 0%, rgba(255, 87, 34, 0.10), transparent 62%),
        radial-gradient(700px 360px at 8% 100%, rgba(255, 255, 255, 0.035), transparent 62%),
        var(--bg);
}

#tm-shop .crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--text-3);
    font-size: 12px;
}

#tm-shop .crumbs a {
    color: var(--text-2);
}

#tm-shop .crumbs a:hover {
    color: #fff;
}

#tm-shop .title {
    margin: 0 0 9px;
    max-width: 900px;
    color: #fff;
    font-size: clamp(34px, 4.2vw, 58px);
    font-weight: 900;
    letter-spacing: -0.045em;
    line-height: 0.98;
}

#tm-shop .lede {
    max-width: 780px;
    margin: 0;
    color: var(--text-2);
    font-size: clamp(15px, 1.2vw, 18px);
    line-height: 1.68;
}

#tm-shop .head-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

#tm-shop .head-stats span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-2);
    font-size: 12px;
}

#tm-shop .head-stats b {
    margin-right: 4px;
    color: #fff;
    font-weight: 850;
}

#tm-shop .cat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

#tm-shop .cat-chips a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 13px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 750;
    transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

#tm-shop .cat-chips a:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: #fff;
}

/* =========================================================
   FINDER
   ========================================================= */

#tm-shop .finder {
    margin-top: 24px;
    max-width: 1180px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(22, 28, 38, 0.96), rgba(14, 18, 25, 0.98));
    box-shadow: var(--shadow);
}

#tm-shop .ftabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #0c1016;
    border-bottom: 1px solid var(--line);
}

#tm-shop .ftab {
    min-height: 56px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.01em;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

#tm-shop .ftab:hover {
    color: #fff;
}

#tm-shop .ftab[aria-selected="true"] {
    color: #fff;
    border-bottom-color: var(--brand);
    background: rgba(255, 255, 255, 0.025);
}

#tm-shop .fpanels {
    padding: 20px;
}

#tm-shop .fpanel {
    display: none;
}

#tm-shop .fpanel.is-active {
    display: block;
}

#tm-shop .fpanel form {
    display: grid;
    gap: 14px;
}

#tm-shop .fields {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

#tm-shop .field label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-3);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

#tm-shop .field input,
#tm-shop .field select,
#tm-shop .brand-search,
#tm-shop .price-inputs input,
#tm-shop .tm-sort {
    width: 100%;
    border: 1px solid var(--line-2);
    background: #0a0f15;
    color: #fff;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

#tm-shop .field input,
#tm-shop .field select {
    min-height: 48px;
    padding: 0 13px;
    border-radius: 11px;
    font-size: 14px;
}

#tm-shop .field input::placeholder {
    color: #778397;
}

#tm-shop .field input:focus,
#tm-shop .field select:focus,
#tm-shop .brand-search:focus,
#tm-shop .price-inputs input:focus,
#tm-shop .tm-sort:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.12);
    outline: 0;
}

#tm-shop .field-help {
    margin: 6px 0 0;
    color: var(--text-3);
    font-size: 12px;
    line-height: 1.55;
}

/* =========================================================
   BUTTONS
   ========================================================= */

#tm-shop .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 850;
    text-align: center;
    transition:
        transform 0.16s ease,
        background 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        box-shadow 0.16s ease;
}

#tm-shop .btn:hover {
    transform: translateY(-1px);
}

#tm-shop .btn:active {
    transform: translateY(0);
}

#tm-shop .btn-primary {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
    box-shadow: var(--shadow-cta);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

#tm-shop .btn-primary:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

#tm-shop .btn-ghost {
    background: rgba(255, 255, 255, 0.035);
    color: var(--text);
    border-color: var(--line-2);
}

#tm-shop .btn-ghost:hover {
    border-color: var(--brand);
    color: #fff;
    background: var(--brand-soft);
}

#tm-shop .btn-sm {
    min-height: 40px;
    padding: 0 13px;
    font-size: 13px;
}

#tm-shop .btn-block {
    width: 100%;
}

/* =========================================================
   TOOLBAR + ACTIVE FILTERS
   ========================================================= */

#tm-shop .toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 24px 0 15px;
    flex-wrap: wrap;
}

#tm-shop .tm-results-count {
    color: var(--text-2);
    font-size: 14px;
}

#tm-shop .tm-results-count b {
    color: #fff;
    font-weight: 850;
}

#tm-shop .tm-results-count em {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-left: 8px;
    padding: 2px 9px;
    border: 1px solid rgba(34, 197, 94, 0.32);
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.08);
    color: #91f5b3;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

#tm-shop .toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

#tm-shop .tm-sort {
    min-height: 40px;
    min-width: 190px;
    padding: 0 34px 0 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    appearance: none;
    background-color: #0c1016;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--text-3) 50%),
        linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
    background-position:
        calc(100% - 16px) 18px,
        calc(100% - 11px) 18px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

#tm-shop .filter-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line-2);
    border-radius: 10px;
    background: #0c1016;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

#tm-shop .filter-toggle .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
}

#tm-shop .active-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 0 17px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

#tm-shop .active-filters .label {
    margin-right: 3px;
    color: var(--text-3);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

#tm-shop .chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 31px;
    padding: 5px 11px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 12px;
    font-weight: 750;
}

#tm-shop .chip-fit {
    border-color: rgba(34, 197, 94, 0.33);
    background: rgba(34, 197, 94, 0.10);
    color: #a7f3c0;
}

#tm-shop .chip-fit::before {
    content: "✓";
    font-weight: 900;
}

#tm-shop .chip button {
    margin: 0 0 0 2px;
    padding: 0 0 0 4px;
    border: 0;
    background: transparent;
    color: var(--text-3);
    font-size: 15px;
    line-height: 1;
}

#tm-shop .chip button:hover {
    color: #fff;
}

#tm-shop .chip-clear {
    margin-left: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--brand);
    font-size: 12px;
    font-weight: 850;
}

#tm-shop .chip-clear:hover {
    color: #fff;
}

/* =========================================================
   MAIN LAYOUT
   ========================================================= */

#tm-shop .layout {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    padding-bottom: 64px;
}

/* =========================================================
   FILTER RAIL
   ========================================================= */

#tm-shop .rail {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(17, 20, 26, 0.98);
    box-shadow: var(--shadow-soft);
    scrollbar-width: thin;
    scrollbar-color: var(--line-2) transparent;
}

#tm-shop .rail::-webkit-scrollbar {
    width: 7px;
}

#tm-shop .rail::-webkit-scrollbar-thumb {
    background: var(--line-2);
    border-radius: 999px;
}

#tm-shop .rail-head {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    border-bottom: 1px solid var(--line);
}

#tm-shop .rail-head h3 {
    margin: 0;
    color: #fff;
    font-size: 17px;
    font-weight: 900;
}

#tm-shop .rail-close {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line-2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
    color: #fff;
    font-size: 20px;
}

#tm-shop .fblock {
    border-bottom: 1px solid var(--line);
}

#tm-shop .fblock:last-of-type {
    border-bottom: 0;
}

#tm-shop .fblock summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 14px;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

#tm-shop .fblock summary::-webkit-details-marker {
    display: none;
}

#tm-shop .fblock summary::after {
    content: "+";
    color: var(--text-3);
    font-size: 19px;
    font-weight: 600;
}

#tm-shop .fblock[open] summary::after {
    content: "−";
}

#tm-shop .fbody {
    padding: 0 14px 15px;
}

#tm-shop .fitment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 650;
}

/* Animated toggle */
#tm-shop .switch {
    position: relative;
    flex: 0 0 auto;
    width: 42px;
    height: 24px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: #222936;
    transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

#tm-shop .switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    transition: transform 0.22s ease;
}

#tm-shop .switch.is-on {
    background: var(--brand);
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(255, 87, 34, 0.12);
}

#tm-shop .switch.is-on::after {
    transform: translateX(18px);
}

#tm-shop .quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

#tm-shop .qc {
    min-height: 31px;
    padding: 5px 10px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 750;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

#tm-shop .qc:hover,
#tm-shop .qc.is-on {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: #fff;
}

#tm-shop .brand-search {
    min-height: 39px;
    padding: 0 11px;
    margin-bottom: 10px;
    border-radius: 10px;
    font-size: 13px;
}

#tm-shop .frow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 34px;
    color: var(--text);
    font-size: 13px;
}

#tm-shop .frow:hover {
    color: #fff;
}

#tm-shop .frow-label {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

#tm-shop .frow-label span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#tm-shop .frow .count {
    color: var(--text-3);
    font-family: var(--mono);
    font-size: 11px;
}

#tm-shop .frow input[type="checkbox"] {
    appearance: none;
    position: relative;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    border: 1.5px solid var(--line-2);
    border-radius: 4px;
    background: #0a0f15;
}

#tm-shop .frow input[type="checkbox"]:checked {
    border-color: var(--brand);
    background: var(--brand);
}

#tm-shop .frow input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

#tm-shop .price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

#tm-shop .price-inputs input {
    min-height: 39px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 13px;
}

#tm-shop .drawer-foot {
    display: none;
    position: sticky;
    bottom: 0;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--line);
    background: var(--bg-2);
}

/* =========================================================
   PRODUCT GRID
   ========================================================= */

#tm-shop .tm-products-container {
    min-width: 0;
}

#tm-shop .tm-products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

#tm-shop.compact .tm-products,
#tm-shop[data-density="compact"] .tm-products {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

#tm-shop .card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-2);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

#tm-shop .card:hover {
    transform: translateY(-3px);
    border-color: var(--line-2);
    box-shadow: var(--shadow-soft);
}

#tm-shop .card-img {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08), transparent 28%),
        linear-gradient(135deg, #10151d 0%, #171d28 100%);
}

#tm-shop .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

#tm-shop .card:hover .card-img img {
    transform: scale(1.045);
}

#tm-shop .card-img.is-empty {
    background:
        repeating-linear-gradient(
            45deg,
            transparent 0,
            transparent 14px,
            rgba(255, 255, 255, 0.025) 14px,
            rgba(255, 255, 255, 0.025) 15px
        ),
        linear-gradient(135deg, #10151d 0%, #171d28 100%);
}

#tm-shop .card-img.is-empty::after {
    content: "Image coming soon";
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 4px 8px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.62);
    color: var(--text-3);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#tm-shop .placeholder-mark {
    width: 58px;
    height: 58px;
    border: 2px solid var(--line-2);
    border-radius: 14px;
    opacity: 0.78;
    position: relative;
}

#tm-shop .placeholder-mark::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 9px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--line-2);
}

#tm-shop .placeholder-mark::after {
    content: "";
    position: absolute;
    left: 14px;
    bottom: 10px;
    width: 28px;
    height: 18px;
    background: var(--line-2);
    clip-path: polygon(0 100%, 38% 35%, 58% 58%, 78% 18%, 100% 100%);
}

#tm-shop .badge-fit,
#tm-shop .ship-chip {
    position: absolute;
    z-index: 2;
}

#tm-shop .badge-fit {
    top: 9px;
    left: 9px;
    max-width: calc(100% - 18px);
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#tm-shop .badge-fit.confirmed {
    background: rgba(34, 197, 94, 0.94);
    color: #062812;
}

#tm-shop .badge-fit.verify {
    background: rgba(135, 147, 166, 0.92);
    color: #0a0c10;
}

#tm-shop .ship-chip {
    right: 9px;
    bottom: 9px;
    padding: 4px 8px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: rgba(10, 12, 16, 0.86);
    color: #fff;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

#tm-shop .card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 7px;
    padding: 13px 14px 15px;
}

#tm-shop .card-brand {
    color: var(--text-3);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

#tm-shop .card-title {
    min-height: 39px;
    margin: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.34;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#tm-shop .card-title a:hover {
    color: var(--brand);
}

#tm-shop .card-sku {
    overflow: hidden;
    color: var(--text-3);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#tm-shop .card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 9px;
}

#tm-shop .card-price {
    color: #fff;
    font-size: 18px;
    font-weight: 900;
}

#tm-shop .card-price del {
    margin-right: 4px;
    color: var(--text-3);
    font-size: 12px;
    font-weight: 650;
}

#tm-shop .card-price ins {
    text-decoration: none;
}

#tm-shop .stock-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-2);
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}

#tm-shop .stock-dot::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--ok);
}

#tm-shop .stock-dot.out::before {
    background: var(--text-3);
}

#tm-shop .card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

#tm-shop .card-cta {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line-2);
    border-radius: 10px;
    background: #0c1016;
    color: #fff;
    font-size: 13px;
    font-weight: 850;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

#tm-shop .card-cta:hover {
    border-color: var(--brand);
    background: var(--brand);
    transform: translateY(-1px);
}

#tm-shop .card-ghost {
    min-height: 36px;
    border: 1px solid var(--line-2);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 800;
}

#tm-shop .card-ghost:hover {
    border-color: var(--brand);
    color: #fff;
    background: var(--brand-soft);
}

/* =========================================================
   EMPTY STATE + PAGINATION
   ========================================================= */

#tm-shop .empty {
    padding: 64px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg-2);
    text-align: center;
}

#tm-shop .empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    border: 2px dashed var(--line-2);
    border-radius: 18px;
    color: var(--text-3);
    font-size: 26px;
}

#tm-shop .empty h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 23px;
    font-weight: 900;
}

#tm-shop .empty p {
    max-width: 520px;
    margin: 0 auto 24px;
    color: var(--text-2);
    line-height: 1.65;
}

#tm-shop .empty-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

#tm-shop .tm-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    padding: 32px 0 0;
}

#tm-shop .tm-pagination a,
#tm-shop .tm-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 39px;
    height: 39px;
    padding: 0 11px;
    border: 1px solid var(--line-2);
    border-radius: 10px;
    background: var(--bg-2);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 850;
}

#tm-shop .tm-pagination a:hover {
    border-color: var(--brand);
    color: #fff;
}

#tm-shop .tm-pagination .current {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

#tm-shop .tm-pagination .ellipsis {
    border-color: transparent;
    background: transparent;
}

/* =========================================================
   DRAWER / MODAL / COMPARE
   ========================================================= */

#tm-shop .drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 998;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(4px);
}

#tm-shop.drawer-open .drawer-backdrop {
    display: block;
}

#tm-shop .tm-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1005;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(5px);
}

#tm-shop .tm-modal.is-open {
    display: flex;
}

#tm-shop .tm-modal-content {
    width: min(720px, 100%);
    max-height: min(760px, calc(100vh - 40px));
    overflow: auto;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-lg);
    background: var(--bg-2);
    box-shadow: var(--shadow);
}

#tm-shop .tm-modal-close {
    position: sticky;
    top: 12px;
    float: right;
    z-index: 3;
    width: 40px;
    height: 40px;
    margin: 12px 12px 0 0;
    border: 1px solid var(--line-2);
    border-radius: 11px;
    background: rgba(0, 0, 0, 0.46);
    color: #fff;
    font-size: 22px;
}

#tm-shop .tm-qv-body {
    padding: 24px;
    color: var(--text);
}

#tm-shop .tm-compare-bar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    border-top: 1px solid var(--line-2);
    background: rgba(10, 12, 16, 0.96);
    backdrop-filter: blur(8px);
    box-shadow: 0 -12px 34px rgba(0, 0, 0, 0.32);
}

#tm-shop .tm-compare-bar.is-open {
    display: block;
}

#tm-shop .tm-compare-bar .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 78px;
    padding-top: 12px;
    padding-bottom: 12px;
}

#tm-shop .tm-compare-slots {
    display: flex;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
}

#tm-shop .tm-compare-slot {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
    padding: 8px;
    border: 1px solid var(--line-2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 12px;
    font-weight: 750;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1280px) {
    #tm-shop .tm-products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #tm-shop.compact .tm-products,
    #tm-shop[data-density="compact"] .tm-products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    #tm-shop .fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    #tm-shop .layout {
        grid-template-columns: 1fr;
    }

    #tm-shop .filter-toggle {
        display: inline-flex;
    }

    #tm-shop .rail {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 999;
        width: min(390px, 90vw);
        max-height: 100vh;
        border: 0;
        border-right: 1px solid var(--line);
        border-radius: 0;
        transform: translateX(-100%);
        transition: transform 0.24s ease;
    }

    #tm-shop.drawer-open .rail {
        transform: translateX(0);
    }

    #tm-shop .rail-head,
    #tm-shop .drawer-foot {
        display: flex;
    }

    #tm-shop .tm-products,
    #tm-shop.compact .tm-products,
    #tm-shop[data-density="compact"] .tm-products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #tm-shop .head {
        padding-top: 28px;
    }
}

@media (max-width: 680px) {
    #tm-shop .util .wrap {
        align-items: flex-start;
        justify-content: flex-start;
        gap: 10px;
        padding-top: 9px;
        padding-bottom: 9px;
    }

    #tm-shop .util-left,
    #tm-shop .util-right {
        width: 100%;
        justify-content: flex-start;
    }

    #tm-shop .title {
        font-size: clamp(31px, 11vw, 46px);
    }

    #tm-shop .fields {
        grid-template-columns: 1fr;
    }

    #tm-shop .fpanels {
        padding: 16px;
    }

    #tm-shop .toolbar {
        align-items: stretch;
    }

    #tm-shop .toolbar-right,
    #tm-shop .tm-sort,
    #tm-shop .filter-toggle,
    #tm-shop .toolbar-right .btn {
        width: 100%;
    }

    #tm-shop .active-filters .label {
        width: 100%;
    }

    #tm-shop .chip-clear {
        margin-left: 0;
    }

    #tm-shop .card-body {
        padding: 12px;
    }

    #tm-shop .card-title {
        font-size: 13px;
    }

    #tm-shop .card-price {
        font-size: 16px;
    }

    #tm-shop .card-actions {
        grid-template-columns: 1fr;
    }

    #tm-shop .card-cta {
        grid-column: auto;
    }
}

@media (max-width: 440px) {
    #tm-shop .tm-products,
    #tm-shop.compact .tm-products,
    #tm-shop[data-density="compact"] .tm-products {
        grid-template-columns: 1fr;
    }

    #tm-shop .head-stats span,
    #tm-shop .cat-chips a {
        width: 100%;
        justify-content: center;
    }

    #tm-shop .tm-compare-bar .wrap {
        align-items: stretch;
        flex-direction: column;
    }

    #tm-shop .tm-compare-bar .btn {
        width: 100%;
    }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    #tm-shop *,
    #tm-shop *::before,
    #tm-shop *::after {
        animation: none;
        transition: none;
        scroll-behavior: auto;
    }
}

/* === TM SHOP TEMPLATE LOCK START ===
   Enterprise rule:
   /shop-preview/ is now rendered by plugin template.
   Never use old shortcode full-bleed offsets here.
   No left:50%.
   No margin-left:-50vw.
   No calc(50% - 50vw).
   === */

body.tm-platform-template--shop-preview,
body.tm-platform-shop-preview-active {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    background: #0a0c10 !important;
}

body.tm-platform-template--shop-preview #tm-platform-app,
body.tm-platform-shop-preview-active #tm-platform-app {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    background: #0a0c10 !important;
}

body.tm-platform-template--shop-preview #tm-shop,
body.tm-platform-shop-preview-active #tm-shop {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden !important;
}

body.tm-platform-template--shop-preview #tm-shop .wrap,
body.tm-platform-shop-preview-active #tm-shop .wrap {
    width: min(1440px, calc(100% - 48px)) !important;
    max-width: 1440px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

@media (max-width: 900px) {
    body.tm-platform-template--shop-preview #tm-shop .wrap,
    body.tm-platform-shop-preview-active #tm-shop .wrap {
        width: min(100%, calc(100% - 28px)) !important;
    }
}

@media (max-width: 520px) {
    body.tm-platform-template--shop-preview #tm-shop .wrap,
    body.tm-platform-shop-preview-active #tm-shop .wrap {
        width: min(100%, calc(100% - 22px)) !important;
    }
}

/* === TM SHOP TEMPLATE LOCK END === */

/* === TM SHOP TEMPLATE LOCK START ===
   Enterprise rule:
   /shop-preview/ is now rendered by plugin template.
   Never use old shortcode full-bleed offsets here.
   No left:50%.
   No margin-left:-50vw.
   No calc(50% - 50vw).
   === */

body.tm-platform-template--shop-preview,
body.tm-platform-shop-preview-active {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    background: #0a0c10 !important;
}

body.tm-platform-template--shop-preview #tm-platform-app,
body.tm-platform-shop-preview-active #tm-platform-app {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    background: #0a0c10 !important;
}

body.tm-platform-template--shop-preview #tm-shop,
body.tm-platform-shop-preview-active #tm-shop {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden !important;
}

body.tm-platform-template--shop-preview #tm-shop .wrap,
body.tm-platform-shop-preview-active #tm-shop .wrap {
    width: min(1440px, calc(100% - 48px)) !important;
    max-width: 1440px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

@media (max-width: 900px) {
    body.tm-platform-template--shop-preview #tm-shop .wrap,
    body.tm-platform-shop-preview-active #tm-shop .wrap {
        width: min(100%, calc(100% - 28px)) !important;
    }
}

@media (max-width: 520px) {
    body.tm-platform-template--shop-preview #tm-shop .wrap,
    body.tm-platform-shop-preview-active #tm-shop .wrap {
        width: min(100%, calc(100% - 22px)) !important;
    }
}

/* === TM SHOP TEMPLATE LOCK END === */

/* ==================================================
   TM SHOP A11Y PATCH 1.0.3
   Scope: #tm-shop only
   Purpose: accessibility, contrast, focus, reduced motion
   ================================================== */

#tm-shop {
    --tm-a11y-text-strong: #ffffff;
    --tm-a11y-text-body: #dbe7f7;
    --tm-a11y-text-muted: #c4d1e5;
    --tm-a11y-border-strong: rgba(255,255,255,.22);
    --tm-a11y-focus: #ffffff;
}

#tm-shop p,
#tm-shop li,
#tm-shop small,
#tm-shop .tm-copy,
#tm-shop .tm-note,
#tm-shop .tm-muted,
#tm-shop .tm-card-meta,
#tm-shop .tm-product-meta,
#tm-shop .tm-product-sku,
#tm-shop .tm-product-stock,
#tm-shop .tm-filter-count,
#tm-shop .tm-results-count,
#tm-shop .tm-toolbar,
#tm-shop .tm-breadcrumbs,
#tm-shop .tm-field-help,
#tm-shop .tm-finder-note {
    color: var(--tm-a11y-text-body) !important;
}

#tm-shop .tm-kicker,
#tm-shop .tm-label,
#tm-shop label,
#tm-shop legend,
#tm-shop .tm-filter-title,
#tm-shop .tm-section-title,
#tm-shop .tm-card-title,
#tm-shop .tm-product-title,
#tm-shop .tm-price,
#tm-shop strong {
    color: var(--tm-a11y-text-strong) !important;
}

#tm-shop a,
#tm-shop button,
#tm-shop input,
#tm-shop select,
#tm-shop textarea,
#tm-shop [tabindex] {
    outline-offset: 4px;
}

#tm-shop a:focus-visible,
#tm-shop button:focus-visible,
#tm-shop input:focus-visible,
#tm-shop select:focus-visible,
#tm-shop textarea:focus-visible,
#tm-shop [tabindex]:focus-visible {
    outline: 3px solid var(--tm-a11y-focus) !important;
    box-shadow: 0 0 0 6px rgba(255,87,34,.35) !important;
}

#tm-shop button,
#tm-shop .tm-btn,
#tm-shop .tm-chip,
#tm-shop .tm-pill,
#tm-shop .tm-tab,
#tm-shop .tm-card,
#tm-shop .tm-product-card,
#tm-shop .tm-filter-panel,
#tm-shop .tm-quickview,
#tm-shop .tm-compare-bar {
    border-color: var(--tm-a11y-border-strong) !important;
}

#tm-shop [role="switch"],
#tm-shop .tm-switch,
#tm-shop .tm-toggle,
#tm-shop input[type="checkbox"] {
    cursor: pointer;
}

#tm-shop .tm-visually-hidden,
#tm-shop .tm-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

#tm-shop .tm-a11y-live-region {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
}

#tm-shop.tm-a11y-patched .tm-product-card h3,
#tm-shop.tm-a11y-patched .tm-card h3 {
    margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
    #tm-shop,
    #tm-shop *,
    #tm-shop *::before,
    #tm-shop *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .001ms !important;
    }
}

/* ==================================================
   TM_PLATFORM_A11Y_CONTRAST_1_0_4
   Final Lighthouse accessibility polish.
   Improves low-contrast helper text, metadata, SKU text,
   chips, small labels, breadcrumbs, and focus visibility.
   ================================================== */

#tm-shop {
    --tm-readable: #f5f8ff;
    --tm-readable-soft: #d7e2f3;
    --tm-readable-muted: #c5d3e8;
    --tm-focus: #ff6a33;
}

#tm-shop,
#tm-shop p,
#tm-shop li,
#tm-shop label,
#tm-shop small,
#tm-shop .meta,
#tm-shop .muted,
#tm-shop .hint,
#tm-shop .sku,
#tm-shop .crumbs,
#tm-shop .breadcrumb,
#tm-shop .card-meta,
#tm-shop .product-meta,
#tm-shop .tm-muted,
#tm-shop .tm-small,
#tm-shop .tm-help,
#tm-shop .tm-note,
#tm-shop .tm-kicker,
#tm-shop .tm-subtitle,
#tm-shop .tm-eyebrow,
#tm-shop .filter-count,
#tm-shop .result-count,
#tm-shop .chip span,
#tm-shop .pill span {
    color: var(--tm-readable-muted) !important;
}

#tm-shop h1,
#tm-shop h2,
#tm-shop h3,
#tm-shop strong,
#tm-shop .card-title,
#tm-shop .tm-card-title,
#tm-shop .product-title,
#tm-shop .price,
#tm-shop .amount {
    color: var(--tm-readable) !important;
}

#tm-shop a {
    color: var(--tm-readable) !important;
}

#tm-shop a:hover,
#tm-shop button:hover {
    color: #ffffff !important;
}

#tm-shop a:focus-visible,
#tm-shop button:focus-visible,
#tm-shop input:focus-visible,
#tm-shop select:focus-visible,
#tm-shop [tabindex]:focus-visible {
    outline: 3px solid var(--tm-focus) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 6px rgba(255, 106, 51, .20) !important;
}

#tm-shop [aria-hidden="true"][tabindex="-1"] {
    outline: none !important;
}

#tm-shop .card-img[aria-hidden="true"],
#tm-shop .tm-card-img[aria-hidden="true"] {
    pointer-events: none;
}

