/* ==========================================================
   TAPPITRACK — TELEMATICS HARDWARE
   Markup: products/index.html, products/<category>.html
   (generated by scripts/site/products.py)
   Script: assets/js/pages/products.js (table filter)
   Brand-free and photo-free: device types and capabilities only.
   Builds on components/page.css. Class prefix: prd-
   ========================================================== */

/* ---------- Profile block ---------- */

.prd-profile {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: center;
    gap: clamp(28px, 6vw, 80px);
}

.prd-profile h2 {
    margin: 0 0 16px;
    font-size: clamp(28px, 3.2vw, 40px);
    font-weight: 800;
}

.prd-profile p {
    margin: 0 0 16px;
    color: var(--tt-muted);
    font-size: 17px;
    line-height: 1.75;
}

.prd-profile-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.prd-profile-list li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--tt-light);
    border-radius: var(--tt-radius);
}

.prd-profile-list svg {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    color: var(--tt-blue);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
}

.prd-profile-list span {
    color: var(--tt-muted);
    font-size: 14px;
}

.prd-profile-list strong {
    display: block;
    color: var(--tt-dark);
    font-family: var(--tt-font-heading);
    font-size: 17px;
}

/* ---------- Category cards ---------- */

.prd-cats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.prd-cat {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    padding: 24px;
    color: inherit;
    background: var(--tt-white);
    border: 1px solid var(--tt-border);
    border-radius: var(--tt-radius);
    text-decoration: none;
    transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.prd-cat:hover {
    border-color: var(--tt-blue);
    box-shadow: var(--tt-shadow-sm);
    transform: translateY(-2px);
}

.prd-cat .pg-icon {
    margin-bottom: 8px;
}

.prd-cat strong {
    color: var(--tt-dark);
    font-family: var(--tt-font-heading);
    font-size: 19px;
}

.prd-cat > span:not(.pg-icon) {
    color: var(--tt-muted);
    font-size: 14px;
}

.prd-cat em,
.prd-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
    color: var(--tt-blue);
    font-size: 15px;
    font-style: normal;
    font-weight: 700;
    text-decoration: none;
}

.prd-cat em svg,
.prd-link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform 200ms ease;
}

.prd-cat:hover em svg,
.prd-link:hover svg {
    transform: translateX(3px);
}

/* ---------- Capability chips ---------- */

.prd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.prd-chips li {
    padding: 4px 10px;
    color: var(--tt-blue);
    background: var(--tt-blue-soft);
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

/* ---------- Device type cards (category pages) ---------- */

.prd-types {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.prd-type {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 26px;
    background: var(--tt-white);
    border: 1px solid var(--tt-border);
    border-radius: var(--tt-radius);
    transition: border-color 200ms ease, box-shadow 200ms ease;
}

.prd-type:hover {
    border-color: var(--tt-blue);
    box-shadow: var(--tt-shadow-sm);
}

.prd-type .pg-icon {
    margin-bottom: 6px;
}

.prd-type h3 {
    margin: 0;
    font-size: 19px;
}

.prd-type p {
    margin: 0 0 6px;
    color: var(--tt-muted);
    line-height: 1.6;
}

.prd-type .prd-link {
    padding-top: 12px;
}

/* ---------- Filterable table (overview) ---------- */

.prd-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.prd-filter::-webkit-scrollbar {
    display: none;
}

.prd-filter button {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 16px;
    color: var(--tt-text);
    background: var(--tt-white);
    border: 1px solid var(--tt-border);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.prd-filter button:hover {
    color: var(--tt-blue);
    border-color: var(--tt-blue);
}

.prd-filter button[aria-pressed="true"] {
    color: var(--tt-white);
    background: var(--tt-blue);
    border-color: var(--tt-blue);
}

.prd-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--tt-border);
    border-radius: var(--tt-radius);
}

.prd-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: 15px;
}

.prd-table th,
.prd-table td {
    padding: 16px 20px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--tt-border);
}

.prd-table thead th {
    color: var(--tt-muted);
    background: var(--tt-light);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.prd-table tbody th {
    color: var(--tt-dark);
    font-weight: 700;
}

.prd-table td {
    color: var(--tt-muted);
}

.prd-table tbody tr:last-child > * {
    border-bottom: 0;
}

.prd-table tbody tr[hidden] {
    display: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
    .prd-cats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .prd-profile {
        grid-template-columns: minmax(0, 1fr);
    }

    .prd-types {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .prd-cats,
    .prd-types {
        grid-template-columns: minmax(0, 1fr);
    }

    .prd-type {
        padding: 22px;
    }
}

/* Hero product images are screenshots/mock-ups: show the whole image
   on the white card rather than cropping it. */
.pg-hero-media img {
    object-fit: contain;
}
