/* Product Categories - News Feed style grid */
.product-categories-section {
    padding: 48px 0 72px;
}

.product-categories-section.bg-white {
    /* 背景由 .page 统一提供，切换筛选时不重排纹理 */
    background-image: none !important;
    background-attachment: scroll;
    background-position: 0 0;
}

.product-categories-section .container-xl {
    max-width: 1680px;
    padding-left: 20px;
    padding-right: 20px;
}

.product-categories-top-row {
    margin-bottom: 10px;
}

.product-categories-section .product-categories-heading {
    margin: 0;
    color: #29293a;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-align: left;
}

.product-categories-section .product-categories-intro {
    max-width: 720px;
    margin: 0 0 20px;
    color: #7a7a85;
    font-size: 15px;
    line-height: 1.65;
    text-align: left;
}

.product-categories-filters {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin: 0 0 32px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.product-categories-filters::-webkit-scrollbar {
    display: none;
}

.product-category-filter {
    flex: 0 0 auto;
    padding: 6px 12px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #29293a;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.product-category-filter:hover {
    background: rgba(41, 41, 58, 0.06);
}

.product-category-filter.is-active {
    background: #29293a;
    color: #fff;
}

.product-categories-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 22px;
}

.product-categories-grid .product-grid-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(41, 41, 58, 0.07);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.product-categories-grid .product-grid-card:hover {
    box-shadow: 0 8px 26px rgba(41, 41, 58, 0.11);
    transform: translateY(-2px);
    color: inherit;
    text-decoration: none;
}

.product-categories-grid .product-grid-card:nth-child(-n+3) {
    grid-column: span 4;
}

.product-categories-grid .product-grid-card:nth-child(n+4) {
    grid-column: span 3;
}

.product-categories-grid .product-grid-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #f4f5f7;
    overflow: hidden;
}

.product-categories-grid .product-grid-card:nth-child(-n+3) .product-grid-card-media {
    aspect-ratio: 16 / 10.5;
}

.product-categories-grid .product-grid-card-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 14px;
    box-sizing: border-box;
    opacity: 1 !important;
    transition: transform 0.35s ease;
}

.product-categories-grid .product-grid-card:hover .product-grid-card-image {
    transform: scale(1.03);
}

.product-categories-grid .product-grid-card-body {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 118px;
    padding: 16px 18px 18px;
    text-align: left;
}

.product-categories-grid .product-grid-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.product-categories-grid .product-grid-card-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.3;
    text-transform: uppercase;
}

.product-categories-grid .product-grid-card-tag.tag-purple {
    color: #6b4fa3;
    background: rgba(107, 79, 163, 0.14);
}

.product-categories-grid .product-grid-card-tag.tag-orange {
    color: #c96a1b;
    background: rgba(201, 106, 27, 0.14);
}

.product-categories-grid .product-grid-card-tag.tag-blue {
    color: #2f6fb3;
    background: rgba(47, 111, 179, 0.14);
}

.product-categories-grid .product-grid-card-tag.tag-green {
    color: #2f8f5b;
    background: rgba(47, 143, 91, 0.14);
}

.product-categories-grid .product-grid-card-tag.tag-teal {
    color: #1f8a8a;
    background: rgba(31, 138, 138, 0.14);
}

.product-categories-grid .product-grid-card-tag.tag-pink {
    color: #b44d7d;
    background: rgba(180, 77, 125, 0.14);
}

.product-categories-grid .product-grid-card-tag.tag-indigo {
    color: #4856b8;
    background: rgba(72, 86, 184, 0.14);
}

.product-categories-grid .product-grid-card-label {
    color: #9a9aa5;
    font-size: 12px;
    line-height: 1.2;
}

.product-categories-grid .product-grid-card-title {
    color: #29293a;
    font-size: 17px;
    line-height: 1.45;
    font-weight: 700;
    margin: 0;
    padding-right: 26px;
}

.product-categories-grid .product-grid-card:nth-child(-n+3) .product-grid-card-title {
    font-size: 18px;
}

.product-categories-grid .product-grid-card-arrow {
    position: absolute;
    right: 18px;
    bottom: 16px;
    color: #29293a;
    font-size: 16px;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
}

.product-categories-grid .product-grid-card:hover .product-grid-card-arrow {
    color: #ffc90b;
    transform: translateX(3px);
}

@media (max-width: 1199.98px) {
    .product-categories-filters {
        justify-content: flex-start;
    }
}

@media (max-width: 991.98px) {
    .product-categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .product-categories-grid .product-grid-card:nth-child(-n+3),
    .product-categories-grid .product-grid-card:nth-child(n+4) {
        grid-column: span 1;
    }
}

@media (max-width: 575.98px) {
    .product-categories-section .product-categories-heading {
        font-size: 28px;
    }

    .product-categories-grid {
        grid-template-columns: 1fr;
    }

    .product-category-filter {
        font-size: 13px;
        padding: 6px 12px;
    }
}
