/* tech-merch shortcodes: [tech_brands] + [tech_categories]
   Brand palette: orange #EC6E4D, teal #4DAAA7, gold #F4B94E */

/* ---------- shared section title ---------- */
.tm-brands-title,
.tm-categories-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
    padding: 0 4px;
    border-bottom: 2px solid #EC6E4D;
    padding-bottom: 6px;
    display: inline-block;
}

.tm-brands,
.tm-categories {
    margin: 32px 0;
}

/* ---------- [tech_brands] pills ---------- */
.tm-brands-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tm-brand-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 18px;
    background: #f4f4f4;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
    transition: background 0.15s, color 0.15s;
}

.tm-brand-pill:hover,
.tm-brand-pill:focus {
    background: #4DAAA7;
    color: #fff;
}

.tm-brand-count {
    margin-left: 6px;
    font-size: 11px;
    opacity: 0.7;
}

/* ---------- [tech_brands] grid ---------- */
.tm-brands-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.tm-brand-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    text-decoration: none;
    color: #222;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.tm-brand-tile:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #4DAAA7;
}

.tm-brand-logo {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.tm-brand-logo img {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
}

.tm-brand-logo-empty {
    background: #f4f4f4;
    color: #888;
    font-size: 20px;
    font-weight: 600;
    border-radius: 4px;
}

.tm-brand-name {
    font-size: 13px;
    text-align: center;
    line-height: 1.3;
}

/* ---------- [tech_categories] pills ---------- */
.tm-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tm-cat-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 18px;
    background: #f4f4f4;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
    transition: background 0.15s, color 0.15s;
}

.tm-cat-pill:hover,
.tm-cat-pill:focus {
    background: #4DAAA7;
    color: #fff;
}

.tm-cat-pill .tm-cat-count {
    margin-left: 6px;
    font-size: 11px;
    opacity: 0.7;
}

/* ---------- [tech_categories] tiles (responsive) + grid (fixed 5-up) ---------- */
.tm-cat-grid {
    display: grid;
    gap: 12px;
}

/* tiles style: responsive auto-fill */
.tm-categories-tiles .tm-cat-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

/* grid style: pin to 5-up on desktop */
.tm-categories-grid .tm-cat-grid {
    grid-template-columns: repeat(5, 1fr);
}

.tm-cat-tile {
    display: block;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    color: #222;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.tm-cat-tile:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #4DAAA7;
}

.tm-cat-img {
    background: #fafafa;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tm-cat-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tm-cat-img-empty span {
    font-size: 42px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.tm-cat-name {
    font-size: 14px;
    font-weight: 600;
    padding: 8px 10px 2px;
    line-height: 1.3;
}

.tm-cat-tile .tm-cat-count {
    font-size: 11px;
    color: #888;
    padding: 0 10px 10px;
}

/* mobile breakpoints */
@media (max-width: 768px) {
    .tm-categories-tiles .tm-cat-grid,
    .tm-categories-grid .tm-cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tm-brands-tiles {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .tm-categories-grid .tm-cat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
