/* 상품리스트 페이지 CSS */

/* 상품리스트 섹션 */
.product-list-section {
    padding: 60px 0;
    background: #fff;
}

.product-list-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 카테고리 탭 */
.category-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: flex-start;
}

.category-tab {
    padding: 12px 28px;
    border-radius: 25px;
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #666;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 80px;
    text-align: center;
}

.category-tab:hover {
    background: #f5f5f5;
    border-color: #c0a062;
    color: #c0a062;
}

.category-tab.active {
    background: #c0a062;
    border-color: #c0a062;
    color: #fff;
    font-weight: 600;
}

/* 필터링 섹션 */
.filter-section {
    margin-bottom: 40px;
    padding: 24px 0;
    border-bottom: 1px solid #f0f0f0;
}

/* 서브카테고리 버튼 컨테이너 */
.subcategory-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 10px;
}

/* 서브카테고리 버튼 스타일 */
.subcategory-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #666;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
    margin-right: 20px;
}

.subcategory-btn:hover {
    color: #c0a062;
    transform: none;
}

.subcategory-btn.active {
    color: #c0a062;
    font-weight: 600;
}

.subcategory-btn.active:hover {
    color: #b8956a;
}

.subcategory-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #c0a062;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.subcategory-btn:hover::after,
.subcategory-btn.active::after {
    width: 100%;
}

.filter-checkboxes {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* 커스텀 체크박스 */
.filter-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    user-select: none;
    position: relative;
}

.filter-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.checkmark {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 3px;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.filter-checkbox input[type="checkbox"]:checked + .checkmark {
    background: #53371F;
    border-color: #53371F;
}

.filter-checkbox input[type="checkbox"]:checked + .checkmark:after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-checkbox:hover .checkmark {
    border-color: #53371F;
}

/* 검색 버튼 */
.search-text-btn {
    padding: 12px 30px;
    background: #53371F;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.search-text-btn:hover {
    background: #53371F;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 105, 20, 0.3);
}

/* 리스트 제목 */
.list-title {
    margin-bottom: 30px;
    padding-bottom: 15px;
}

.list-title h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* 상품 그리드 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

/* 상품 카드 */
.product-card {
    background: #fff;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* 상품 이미지 */
.product-image {
    width: 100%;
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.soldout-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 18px;
    z-index: 1;
}

/* 상품 정보 */
.product-info {
    padding: 20px 0;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    padding-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-bottom: 1px solid #E0E0E0;
}

.product-desc {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    height: 40px;
}

.product-price {
    margin-bottom: 15px;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    margin-right: 8px;
}

.sale-price {
    color: #c0a062;
    font-size: 20px;
    font-weight: bold;
}

/* 무게 옵션 */
.product-weights {
    display: flex;
    gap: 8px;
    justify-content: start;
    flex-wrap: wrap;
}

.weight-option {
    width: 30%;
    padding: 8px 16px;
    background: #F7F7F7;
    border:0;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 45px;
    text-align: center;
    font-family: 'Noto Sans KR', 'Malgun Gothic', dotum, sans-serif;
}



/* 반응형 디자인 */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .product-list-container {
        padding: 0 15px;
    }

    .category-tabs {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 30px;
    }

    .category-tab {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 70px;
    }

    .filter-section {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }

    .filter-checkboxes {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }

    .filter-checkbox {
        font-size: 14px;
    }

    .search-text-btn {
        align-self: center;
        min-width: 120px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    

    .product-info {
        padding: 15px;
    }

    .product-name {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .weight-option {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 40px;
        font-family: 'Noto Sans KR', 'Malgun Gothic', dotum, sans-serif;
    }
}

@media (max-width: 480px) {
    .product-list-section {
        padding: 40px 0;
    }
    .product-list-container {
        padding: 0;
    }
    .category-tabs {
        justify-content: center;
    }

    .category-tab {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 60px;
    }

    .filter-checkboxes {
        gap: 12px;
    }

    .filter-checkbox {
        font-size: 13px;
    }

    .checkmark {
        width: 18px;
        height: 18px;
        margin-right: 6px;
    }

    .filter-checkbox input[type="checkbox"]:checked + .checkmark:after {
        left: 5px;
        top: 1px;
        width: 4px;
        height: 8px;
    }

    .search-text-btn {
        padding: 10px 25px;
        font-size: 14px;
    }

    .list-title h2 {
        font-size: 20px;
    }

    .product-grid {
        gap: 15px;
    }
    .product-info {
        padding: 12px;
    }

    .product-name {
        font-size: 15px;
        margin-bottom: 10px;
    }
    .product-weights {
        gap: 2px;
    }
    .weight-option {
        padding: 5px 10px;
        font-size: 12px;
        min-width: 35px;
    }
}

/* 로딩 애니메이션 */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

.product-card.loading {
    animation: shimmer 1.2s ease-in-out infinite;
    background: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
    background-size: 800px 104px;
}

/* 상품 없음 상태 */
.no-products,
.no-products-filtered {
    text-align: center;
    padding: 40px;
    margin: 20px 0;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-size: 16px;
}
.no-products{
    grid-column: 1/-1;
}
.no-products p,
.no-products-filtered p {
    margin: 0;
}

/* 페이지네이션 - spbros 스타일 적용 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 50px;
    padding: 30px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    background: white;
    border: 1px solid #e0e0e0;
    color: #666;
}

.page-link:hover {
    background: #522F14;
    color: white;
    border-color: #522F14;
    transform: translateY(-1px);
}

.page-link.active {
    width: 40px;
    height: 40px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #522F14;
    color: white;
    border-color: #522F14;
    font-weight: 600;
}

/* 네비게이션 아이콘 버튼 스타일 */
.page-link.pg_start,
.page-link.pg_prev,
.page-link.pg_next,
.page-link.pg_end {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-link.pg_start svg,
.page-link.pg_prev svg,
.page-link.pg_next svg,
.page-link.pg_end svg {
    width: 16px;
    height: 16px;
}

/* 페이지네이션 반응형 스타일 */
@media (max-width: 768px) {
    .pagination {
        padding: 20px;
        gap: 3px;
    }

    .page-link {
        min-width: 32px;
        width: 32px;
        height: 32px;
        padding: 0 8px;
    }

    .page-link.active {
        width: 32px;
        height: 32px;
    }

    .page-link.pg_start,
    .page-link.pg_prev,
    .page-link.pg_next,
    .page-link.pg_end {
        width: 32px;
        height: 32px;
    }

    .page-link.pg_start svg,
    .page-link.pg_prev svg,
    .page-link.pg_next svg,
    .page-link.pg_end svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 300px) {
    .page-link {
        min-width: 28px;
        width: 28px;
        height: 28px;
    }

    .page-link.active {
        width: 28px;
        height: 28px;
    }

    .page-link.pg_start,
    .page-link.pg_prev,
    .page-link.pg_next,
    .page-link.pg_end {
        width: 28px;
        height: 28px;
    }

    .page-link.pg_start svg,
    .page-link.pg_prev svg,
    .page-link.pg_next svg,
    .page-link.pg_end svg {
        width: 12px;
        height: 12px;
    }
}