.product-page {
    min-height: 100vh;
    background: #070604;
}

.color-main,
.color-sheet,
.color-sidebar {
    font-family: SimSun, "宋体", "Songti SC", serif;
    font-weight: 700;
}

.color-main {
    width: min(1420px, calc(100% - 48px));
    margin: 0 auto;
    padding: 126px 0 72px;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 32px;
}

.color-sidebar {
    position: sticky;
    top: 104px;
    align-self: start;
    padding: 28px 26px;
    border: 1px solid var(--line);
    background: rgba(10, 9, 7, 0.92);
}

.color-sidebar p {
    margin: 0 0 12px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.color-sidebar h1 {
    margin: 0 0 22px;
    color: var(--gold-soft);
    font-family: SimSun, "宋体", "Songti SC", serif;
    font-size: 38px;
    line-height: 1.2;
    font-weight: 700;
}

.color-sidebar h1::after {
    content: "";
    display: block;
    width: 36px;
    height: 1px;
    margin-top: 18px;
    background: var(--gold);
}

.series-list {
    display: grid;
    gap: 8px;
}

.series-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    padding: 0 12px;
    color: var(--muted);
    border: 1px solid transparent;
    font-size: 15px;
}

.series-list a::after {
    content: attr(data-count);
    color: var(--dim);
    font-size: 12px;
}

.series-list a.is-active,
.series-list a:hover {
    color: var(--gold-soft);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.035);
}

.color-sheet {
    min-height: 820px;
    padding: clamp(34px, 5vw, 64px);
    background: #f8f6ef;
    color: #111;
}

.sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 34px;
}

.sheet-brand {
    display: grid;
    gap: 6px;
    align-content: start;
}

.brand-rule {
    width: 72px;
    height: 8px;
    background:
        linear-gradient(#111, #111) 0 0 / 72px 2px no-repeat,
        linear-gradient(#111, #111) 10px 3px / 54px 2px no-repeat,
        linear-gradient(#111, #111) 20px 6px / 36px 2px no-repeat;
}

.sheet-brand strong {
    font-size: 18px;
    line-height: 1;
    font-weight: 800;
}

.sheet-brand small {
    color: #666;
    font-size: 11px;
    font-weight: 700;
}

.sheet-tag {
    padding-bottom: 4px;
    border-bottom: 2px solid #111;
    color: #111;
    font-size: 12px;
    font-weight: 800;
}

.sheet-summary {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 34px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    padding-bottom: 18px;
}

.sheet-summary h2 {
    margin: 0;
    font-family: SimSun, "宋体", "Songti SC", serif;
    font-size: clamp(32px, 4vw, 58px);
    line-height: 1;
    font-weight: 700;
}

.sheet-summary p {
    margin: 0;
    color: #555;
    font-size: 14px;
    text-align: right;
}

.color-filter-panel {
    width: min(620px, 52%);
    display: grid;
    gap: 14px;
    justify-items: end;
}

.mobile-filter-button,
.color-filter-close,
.color-filter-drawer > strong {
    display: none;
}

.color-filter-drawer {
    width: 100%;
}

.color-filter-row {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.color-filter-row label {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.color-filter-row span {
    color: #8a6b43;
    font-size: 12px;
    font-weight: 800;
}

.color-filter-row select {
    width: 100%;
    min-height: 38px;
    border: 1px solid rgba(17, 17, 17, 0.14);
    border-radius: 0;
    background:
        linear-gradient(45deg, transparent 50%, #8a6b43 50%) calc(100% - 17px) 16px / 6px 6px no-repeat,
        linear-gradient(135deg, #8a6b43 50%, transparent 50%) calc(100% - 11px) 16px / 6px 6px no-repeat,
        rgba(255, 255, 255, 0.64);
    color: #222;
    padding: 0 30px 0 10px;
    outline: 0;
    appearance: none;
}

.color-filter-row select:focus {
    border-color: #c7a77d;
    box-shadow: 0 0 0 3px rgba(199, 167, 125, 0.16);
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px clamp(26px, 4vw, 52px);
}

.color-item {
    min-width: 0;
}

.color-swatch {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #eee9de;
    border: 2px solid transparent;
    border-radius: 6px;
    transition: border-color 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease;
}

.color-swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.36s ease, filter 0.24s ease;
}

.color-item:hover .color-swatch {
    border-color: #c7a77d;
    box-shadow: 0 18px 36px rgba(122, 88, 48, 0.22);
    transform: translateY(-4px);
}

.color-item:hover .color-swatch img {
    transform: scale(1.08);
    filter: saturate(1.04) contrast(1.03);
}

.handle-free-badge {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 18px;
    z-index: 2;
    color: #fffaf0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.62);
    pointer-events: none;
}

.color-item h3 {
    margin: 14px 0 8px;
    color: #9f251d;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: 0;
}

.color-item p {
    margin: 0;
    color: #4f4a43;
    font-size: 14px;
    line-height: 1.55;
}

.color-specs {
    display: grid;
    gap: 6px;
}

.color-spec-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
}

.color-spec-chip {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(17, 17, 17, 0.16);
    background: rgba(255, 255, 255, 0.58);
    color: #4f4a43;
    padding: 0 8px;
    font-size: 14px;
    line-height: 1.3;
}

.color-spec-chip strong {
    color: #8a6b43;
    font-weight: 800;
}

.color-spec-group-edge .color-spec-chip {
    max-width: 100%;
}

.empty-state {
    margin: 42px 0 0;
    color: #666;
    font-size: 15px;
}

@media (max-width: 1020px) and (pointer: coarse) {
    .color-main {
        width: min(100% - 32px, 1420px);
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .color-sidebar {
        position: static;
        padding: 18px 16px;
    }

    .series-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 760px) and (pointer: coarse) {
    .product-page {
        background: #f4f7ef;
    }

    .color-main {
        width: 100%;
        max-width: none;
        padding: 54px 0 42px;
        gap: 0;
        margin: 0;
    }

    .color-sheet {
        width: 100%;
        max-width: none;
        min-height: auto;
        padding: 14px 12px 32px;
        background: #f7faef;
    }

    .color-sidebar {
        z-index: 5;
        padding: 0;
        border: 0;
        background: #f7faef;
    }

    .color-sidebar p,
    .color-sidebar h1 {
        display: none;
    }

    .series-list {
        display: flex;
        gap: 0;
        width: 100vw;
        max-width: 100vw;
        padding: 11px 0;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        touch-action: pan-x;
        cursor: grab;
        user-select: none;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-bottom: 1px solid rgba(17, 17, 17, 0.08);
        background: #f7faef;
    }

    .series-list.is-dragging {
        cursor: grabbing;
        scroll-behavior: auto;
    }

    .series-list::-webkit-scrollbar {
        display: none;
    }

    .series-list a {
        flex: 0 0 auto;
        min-height: 32px;
        padding: 0 14px;
        border: 0;
        color: #203129;
        font-size: 13px;
        font-weight: 800;
        white-space: nowrap;
    }

    .series-list a + a {
        border-left: 1px solid rgba(32, 49, 41, 0.12);
    }

    .series-list a::after {
        display: none;
    }

    .series-list a.is-active,
    .series-list a:hover {
        color: #8a6b43;
        border-color: transparent;
        background: transparent;
    }

    .sheet-head {
        display: none;
    }

    .sheet-summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 16px;
        padding: 12px 0 14px;
    }

    .sheet-summary h2 {
        min-width: 0;
        font-size: 24px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .sheet-summary p {
        font-size: 12px;
        text-align: left;
    }

    .color-filter-panel {
        flex: 0 0 auto;
        width: auto;
        justify-items: end;
        gap: 0;
    }

    .mobile-filter-button {
        min-height: 30px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 14px;
        border: 1px solid rgba(138, 107, 67, 0.38);
        border-radius: 999px;
        background: rgba(199, 167, 125, 0.14);
        color: #654c2c;
        font-size: 12px;
        font-weight: 800;
    }

    .product-page.is-color-filter-open {
        overflow: hidden;
    }

    .product-page.is-color-filter-open::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 98;
        background: rgba(0, 0, 0, 0.42);
    }

    .color-filter-drawer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 99;
        display: grid;
        gap: 16px;
        padding: 18px 18px 22px;
        border-radius: 18px 18px 0 0;
        background: #f8f6ef;
        box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.22);
        transform: translateY(105%);
        transition: transform 0.24s ease;
    }

    .product-page.is-color-filter-open .color-filter-drawer {
        transform: translateY(0);
    }

    .color-filter-drawer > strong {
        display: block;
        color: #111;
        font-size: 18px;
    }

    .color-filter-close {
        position: absolute;
        top: 14px;
        right: 14px;
        min-height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 0;
        background: transparent;
        color: #8a6b43;
        font-size: 14px;
        font-weight: 800;
    }

    .color-filter-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .color-filter-row select {
        min-height: 34px;
        font-size: 12px;
    }

    .color-filter-row span {
        font-size: 11px;
    }

    .color-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 10px;
    }

    .color-swatch {
        border-radius: 4px;
        border-width: 1px;
    }

    .handle-free-badge {
        left: 8px;
        right: 8px;
        bottom: 10px;
        font-size: 13px;
    }

    .color-item h3 {
        margin-top: 8px;
        font-size: 13px;
    }

    .color-specs {
        gap: 5px;
    }

    .color-spec-group {
        gap: 5px;
    }

    .color-spec-chip {
        min-height: 26px;
        gap: 4px;
        padding: 0 6px;
        font-size: 11px;
        line-height: 1.25;
    }
}

@media (max-width: 460px) and (pointer: coarse) {
    .color-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .series-list a {
        padding: 0 16px;
    }
}

@media (hover: hover) and (pointer: fine) {
    .color-sheet {
        padding: 64px;
    }

    .sheet-summary h2 {
        font-size: 58px;
    }

    .color-grid {
        gap: 32px 52px;
    }
}

/* Typeface hierarchy: display titles use Songti; lists, filters and product info use Heiti. */
.color-sidebar p,
.color-sidebar h1,
.sheet-kicker,
.sheet-summary h2 {
    font-family: SimSun, "宋体", "Songti SC", serif;
}

.series-list,
.series-list *,
.color-filter-panel,
.color-filter-panel *,
.color-filter-drawer,
.color-filter-drawer *,
.mobile-filter-button,
.color-item,
.color-item *,
.color-specs,
.color-specs * {
    font-family: SimHei, "Microsoft YaHei", "Heiti SC", sans-serif;
}
