/* DP Product Cat Listing — Figma node 84:6621. 750px logical canvas. */
body { background: var(--ds-bg); }

#wrapper.product-categories-page {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--ds-bg);
    color: var(--ds-text);
    font-family: var(--ds-font);
    box-sizing: border-box;
}

.product-categories-header {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--ds-surface);
    box-shadow: var(--ds-shadow-100);
}
.product-categories-nav {
    height: 82px;
    display: flex;
    align-items: center;
    padding: 0 11px;
    background: var(--ds-primary-bright);
    color: #fff;
}
.product-categories-nav a,
.product-categories-nav > span {
    width: 82px;
    height: 82px;
    flex: 0 0 82px;
}
.product-categories-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 54px;
    line-height: 1;
    text-decoration: none;
}
.product-categories-nav h1 {
    flex: 1;
    margin: 0;
    font-size: 32px;
    line-height: 41px;
    font-weight: 500;
    text-align: left;
}

.product-categories-tabs {
    height: 67px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--ds-surface);
}
.product-categories-tabs button {
    position: relative;
    border: 0;
    background: transparent;
    color: var(--ds-text-muted);
    font: 500 26px/37px var(--ds-font);
}
.product-categories-tabs button::after {
    position: absolute;
    right: 50%;
    bottom: 0;
    width: 0;
    height: 6px;
    border-radius: 6px 6px 0 0;
    background: var(--ds-primary);
    content: "";
    transform: translateX(50%);
}
.product-categories-tabs button.is-active { color: var(--ds-primary-bright); }
.product-categories-tabs button.is-active::after { width: 50px; }
.product-categories-search {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 30px 22px;
    padding: 0 22px;
    border: 2px solid var(--ds-border);
    border-radius: 999px;
    background: var(--ds-surface);
    box-sizing: border-box;
}
.product-categories-search svg {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    color: var(--ds-text-tertiary);
}
.product-categories-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ds-text);
    font: 400 23px/32px var(--ds-font);
}
.product-categories-search input::placeholder { color: var(--ds-placeholder); }

.product-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 0;
    row-gap: 19px;
    padding: 45px 22px;
}
.product-category-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--ds-text);
    text-decoration: none;
}
.product-category-icon {
    position: relative;
    width: 134px;
    height: 134px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--ds-surface);
    border-radius: 45px;
    /* 同 Products 列表一致：類別相灰色底（client feedback 2026-08 p.3）*/
    background: var(--ds-media-bg);
    box-sizing: border-box;
}
/* 品牌 tile 用 logo 托底色（pp.5-6）*/
.product-category-icon:has(.product-brand-initial) { background: var(--ds-logo-tint); }
/* 有真圖時藏 fallback glyph／字母；img onerror 自刪後 :has 失效，fallback 自動現返 */
.product-category-icon:has(img) svg,
.product-category-icon:has(img) .product-brand-initial { display: none; }
.product-category-icon img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    box-sizing: border-box;
    /* 白底圖溶入托底色 */
    mix-blend-mode: multiply;
}
.product-category-icon svg {
    width: 64px;
    height: 64px;
    color: var(--ds-text-tertiary);
}
.product-brand-initial {
    color: var(--ds-primary);
    font-size: 42px;
    line-height: 1;
    font-weight: 700;
}
.product-category-name {
    width: 186px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--ds-text);
    font-size: 22px;
    line-height: 30px;
    text-align: center;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.product-categories-status {
    grid-column: 1 / -1;
    padding: 90px 20px;
    color: var(--ds-text-tertiary);
    font-size: 26px;
    line-height: 37px;
    text-align: center;
}
