.page-category-local-design {
    overflow-x: clip;
}

.category-list-u-hidden {
    display: none !important;
}

.category-list-main {
    min-height: 40vh;
}

/* 상품 0개 — top_html만 표시 (Tailwind max-w-7xl/px-4 보다 우선) */
.category-list-main.category-list-top-only {
    max-width: none !important;
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    min-height: 0;
}

.category-list-main.category-list-top-only .category-top-html-section {
    margin-bottom: 0;
    width: 100% !important;
    max-width: none !important;
    position: static !important;
    left: auto !important;
    right: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: visible;
}

/* 카테고리 top_html — max-w-7xl 밖으로 풀블리드 */
.category-top-html-section {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow-x: hidden;
    isolation: isolate;
}

.category-top-html-section img,
.category-top-html-section video {
    max-width: 100%;
}

.category-top-html-section img:not([class*="object-cover"]),
.category-top-html-section video:not([class*="h-full"]) {
    height: auto;
}

.category-top-html-section img[class*="object-cover"] {
    height: 100%;
    object-fit: cover;
}

/* 로컬 카테고리 디자인(예: bellissima-wrap) — 부모 사이트 타이포와 충돌 완화 */
.category-top-html-section #bellissima-wrap {
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.category-top-html-section #bellissima-wrap h1,
.category-top-html-section #bellissima-wrap h2,
.category-top-html-section #bellissima-wrap h3,
.category-top-html-section #bellissima-wrap h4,
.category-top-html-section #bellissima-wrap h5,
.category-top-html-section #bellissima-wrap h6 {
    line-height: 1.25;
}

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

@media (min-width: 640px) {
    .category-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .category-product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (min-width: 1280px) {
    .category-product-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.category-top-swiper {
    overflow: hidden;
    padding-bottom: 4px;
}

.category-top-swiper .swiper-slide {
    width: 160px;
}

@media (min-width: 640px) {
    .category-top-swiper .swiper-slide {
        width: 200px;
    }
}

.category-top-swiper .md-product-card .thumb {
    aspect-ratio: 1;
}

#categoryPagination .pagination-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#categoryPagination button,
#categoryPagination a {
    min-width: 2.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    border: 1px solid rgb(226 232 240);
    background: white;
    color: rgb(51 65 85);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.dark #categoryPagination button,
.dark #categoryPagination a {
    border-color: rgb(51 65 85);
    background: rgb(30 41 59);
    color: rgb(226 232 240);
}

#categoryPagination button:hover:not(:disabled),
#categoryPagination a:hover {
    background: rgb(241 245 249);
    border-color: rgb(148 163 184);
}

.dark #categoryPagination button:hover:not(:disabled),
.dark #categoryPagination a:hover {
    background: rgb(51 65 85);
}

#categoryPagination button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

#categoryPagination .pagination-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: rgb(0 122 204);
    border: 1px solid rgb(0 122 204);
    color: white;
    font-weight: 600;
}

.dark #categoryPagination .pagination-current {
    background: rgb(0 122 204);
    border-color: rgb(0 122 204);
    color: white;
}
