/* 렌탈 상품 카테고리 페이지 스타일 */

.rental-product-category-page {
    background-color: #ffffff;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 카테고리 탭 섹션 */
.category-tabs-section {
    background-color: #ffffff;
    padding: 20px 0;    
}

.category-tabs {
    display: flex;
    justify-content: center;
}

.category-tabs-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0;
    border-bottom: 1px solid #e2e2e2;
}

.category-tab-item {
    position: relative;
}

.category-tab-item a {
    display: block;
    padding: 12px 25px;
    text-decoration: none;
    color: #666;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.category-tab-item:hover a {
    color: #333;
}

.category-tab-item.active a {
    color: #3617ce;
    font-weight: 600;
    border-bottom-color: #3617ce;
}

/* 서브카테고리 탭 스타일 */
.subcategory-tabs {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.subcategory-tabs-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 10px;
    justify-content: center;
}

.subcategory-tab-item {
    position: relative;
}

.subcategory-tab-item a {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    color: #7d8288;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 20px;
    background-color: #f8f9fa;
}

.subcategory-tab-item:hover a {
    color: #333;
    background-color: #e8e8e8;
}

.subcategory-tab-item.active a {
    color: #ffffff;
    font-weight: 600;
    background-color: #3617ce;
}

/* 모바일 반응형 서브카테고리 탭 */
@media (max-width: 768px) {
    .subcategory-tabs-list {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        justify-content: flex-start;
    }
    
    .subcategory-tabs-list::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .subcategory-tab-item a {
        padding: 6px 12px;
        font-size: 13px;
        white-space: nowrap;
    }
}

/* 베스트 상품 섹션 */
.best-products-section {
    padding: 40px 0 40px;
    background-color: #ffffff;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #333;
    text-align: center;
    line-height: 1.4;
}

.section-title br {
    display: block;
    content: "";
    margin-top: 5px;
}

.best-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* 일반 상품 섹션 */
.regular-products-section {
    padding: 40px 0 60px;
    background-color: #ffffff;
}

.section-subtitle {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 40px;
    color: #333;
    text-align: center;
}

.product-count {
    font-size: 16px;
    color: #333;
    text-align: left;    
    margin-left: 10px;
    font-weight: 400;
    margin-bottom: 15px;
}
.product-count .value {
    color: #3617ce;
    font-weight: 600;
}

.regular-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* 상품 카드 공통 스타일 */
.product-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.product-link {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: 100%;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.product-image {
    height: 220px;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
    position: relative; /* 뱃지 positioning을 위해 추가 */
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.no-image {
    color: #999;
    font-size: 14px;
}

.product-info {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
}

.product-brand {
    font-size: 12px;
    color: #7d8288;
    font-weight: 500;
    
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    height: auto;
    max-height: 44px;
    line-height: 1.4;
    flex-grow: 1;
}

.rd-product-price {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.monthly-price {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    
}

.discount-info {
    font-size: 16px;    
    color: #ff6b6b;
    font-weight: 500;
}

@media (max-width: 768px) {
    .monthly-price {
        font-size: 12px;
    }
    .discount-info {
        font-size: 14px;
    }
}

.price-inquiry {
    font-size: 15px;
    color: #666;
    font-weight: 600;
}

/* 베스트 상품 카드 특별 스타일 */
.best-product-card {    
    position: relative;
    display: flex;
    flex-direction: column;
}

.best-product-card .product-link {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.best-product-card .product-info {
    width: auto;
    min-width: 0;
    flex: 1;
}

.best-product-card::before {
    content: 'BEST';
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #3617ce;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    z-index: 1;
}

/* Function 뱃지 스타일 */
.product-functions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;    
    padding-top: 10px;
    padding-left: 16px;
}

.function-ice-badge,
.function-hot-badge,
.function-cool-badge,
.function-water-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 6px;
    border-radius: 4px;
}

.function-ice-badge {
    background-color: #edd5fb6e;
    color: #8a71ff;   
}

.function-hot-badge {
    background-color: #fff0f0;
    color: #ff6b6b;    
}

.function-cool-badge {
    background-color: #99d2fb24;
    color: #2c93ef;    
}

.function-water-badge {
    background-color: #ecfaf8;
    color: #40d1be;    
}

/* 모바일에서는 이미지 내부 뱃지 숨김 */
.product-image .image-functions {
    display: none;
}

/* 데스크탑에서만 모든 기능 뱃지들을 이미지 오른쪽 하단에 세로로 배치 */
@media (min-width: 769px) {
    /* 이미지 내부 뱃지 컨테이너 */
    .product-image .image-functions {
        position: absolute;
        bottom: 8px;
        right: 8px;
        display: flex;
        flex-direction: column;
        gap: 4px;
        z-index: 2;
    }
    
    /* 이미지 내부 뱃지들 스타일 */
    .product-image .image-functions .function-ice-badge,
    .product-image .image-functions .function-hot-badge,
    .product-image .image-functions .function-cool-badge,
    .product-image .image-functions .function-water-badge {
        margin: 0;
        pointer-events: none;
        font-weight: 600;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 11px;
        backdrop-filter: blur(2px);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .product-image .image-functions .function-ice-badge {
        background-color: #edd5fb6e;
        color: #8a71ff;   
    }
    
    .product-image .image-functions .function-hot-badge {
        background-color: #fff0f0;
        color: #ff6b6b;    
    }
    
    .product-image .image-functions .function-cool-badge {
        background-color: #99d2fb24;
        color: #2c93ef;    
    }
    
    .product-image .image-functions .function-water-badge {
        background-color: #ecfaf8;
        color: #40d1be;  
    }
    
    /* 데스크탑에서 기존 product-functions 영역 숨김 */
    .best-product-card .product-functions {
        display: none;
    }
    
    .regular-product-card .product-left .product-functions {
        display: none;
    }
}

/* 모바일용 짧은 텍스트 기본 숨김 */
.badge-short {
    display: none;
}

.badge-full {
    display: inline;
}

/* 상품 없음 메시지 */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

/* 페이지네이션 */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 데스크탑용 페이지네이션 */
.pagination-desktop {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 모바일용 페이지네이션 */
.pagination-mobile {
    display: none;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 50%;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background-color: #f0f4ff;
    border-color: #3617ce;
    color: #3617ce;
}

.pagination-btn.current {
    background-color: #3617ce;
    border-color: #3617ce;
    color: white;
    font-weight: 600;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-ellipsis {
    padding: 0 8px;
    color: #999;
}

/* 모바일 반응형 */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
}

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

    /* 카테고리 탭 모바일 */
    .category-tabs-list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0;
    }

    .category-tab-item a {
        padding: 10px 15px;
        font-size: 14px;
    }

    /* 베스트 상품 모바일 - 세로형 유지, 2개씩 */
    .best-products-section {
        padding: 40px 0 30px;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .best-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        margin-bottom: 30px;
    }

    /* 일반 상품 모바일 - 가로형, 1개씩 */
    .regular-products-section {
        padding: 30px 0 40px;
    }

    .section-subtitle {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .product-count {
        font-size: 14px;        
    }

    .regular-products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 30px;
    }

    /* 일반 상품 카드만 가로형 레이아웃 */
    .regular-product-card .product-link {
        flex-direction: row;
        height: auto;
        align-items: center;
        width: 100%;
    }

    /* 이미지와 뱃지를 포함하는 왼쪽 영역 */
    .regular-product-card .product-left {
        display: flex;
        flex-direction: column;
        width: 120px;
        flex-shrink: 0;
        border-right: 1px solid #f0f0f0;
        justify-content: center;
        align-items: center;
    }
    
    .regular-product-card .product-left .product-image {
        width: 100%;
        height: 100px;
        border-right: none;
        border-bottom: none;
        padding: 8px;
        margin-bottom: 4px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .regular-product-card .product-left .product-image img {
        max-height: 84px;
        max-width: 100%;
    }

    /* 모바일에서 뱃지를 이미지 아래로 이동 */
    .regular-product-card .product-left .product-functions {
        padding: 10px 8px 8px 8px;
        margin-bottom: 0;
        justify-content: center;
        width: 100%;
    }
    
    .regular-product-card .product-info {
        flex: 1;
        padding: 16px;
        justify-content: space-between;
        min-width: 0;
        width: auto;
        box-sizing: border-box;
    }

    /* 상품 정보에서 뱃지 제거 (이미지 아래로 이동했으므로) */
    .regular-product-card .product-info .product-functions {
        display: none;
    }

    .regular-product-card .product-name {
        margin-bottom: 8px;
        max-height: 44px;
    }

    .regular-product-card .rd-product-price {
        margin-top: auto;
        padding-top: 0;
        border-top: none;
    }

    .regular-product-card .monthly-price {
        font-size: 12px;
    }

    .regular-product-card .discount-info {
        font-size: 14px;
    }

    /* Function 뱃지 모바일 스타일 */
    .product-functions {
        gap: 3px;
        margin-bottom: 8px;
    }
    
    /* 모바일에서 짧은 텍스트 표시 */
    .badge-short {
        display: inline;
    }
    
    .badge-full {
        display: none;
    }
    
    .function-water-badge,
    .function-ice-badge,
    .function-hot-badge,
    .function-cool-badge {        
        padding: 2px 5px;
        border-radius: 3px;
        min-width: 18px;
        text-align: center;
    }

    /* 베스트 상품 라벨 모바일 */
    .best-product-card::before {
        top: 12px;
        right: 12px;
        padding: 4px 8px;
        font-size: 10px;
        border-radius: 6px;
        font-weight: 700;
    }

    /* 페이지네이션 모바일 */
    .pagination-container {
        margin-top: 30px;
    }

    .pagination {
        gap: 6px;
    }

    /* 데스크탑 페이지네이션 숨기기 */
    .pagination-desktop {
        display: none;
    }

    /* 모바일 페이지네이션 표시 */
    .pagination-mobile {
        display: flex;
    }

    .pagination-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    /* 카테고리 탭 작은 모바일 */
    .category-tab-item a {
        padding: 8px 12px;
        font-size: 13px;
    }

    /* 베스트 상품 작은 모바일 */
    .section-title {
        font-size: 20px;
        margin-bottom: 25px;
    }

    .best-products-grid {
        gap: 12px;
    }

    /* 일반 상품 작은 모바일 */
    .section-subtitle {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .product-count {
        font-size: 13px;        
    }

    .regular-products-grid {
        gap: 12px;
    }

    /* Function 뱃지 작은 모바일 스타일 */
    .product-functions {
        gap: 2px;
        margin-bottom: 6px;
    }
    
    .function-water-badge,
    .function-ice-badge,
    .function-hot-badge,
    .function-cool-badge {
        font-size: 9px;
        padding: 2px 4px;
        border-radius: 2px;
    }

    /* 일반 상품 카드 작은 모바일 */
    .regular-product-card .product-left {
        width: 100px;
        justify-content: center;
        align-items: center;
    }

    .regular-product-card .product-left .product-image {
        height: 80px;
        padding: 6px;
        margin-bottom: 3px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .regular-product-card .product-left .product-image img {
        max-height: 90px;
        max-width: 110px;
    }

    .regular-product-card .product-left .product-functions {
        padding: 10px 6px 6px 6px;
        width: 100%;
        justify-content: center;
    }

    .regular-product-card .product-info {
        padding: 14px;
    }

    .regular-product-card .product-brand {
        font-size: 11px;
        margin-bottom: 3px;
    }

    .regular-product-card .product-name {
        font-size: 14px;
        margin-bottom: 6px;
        max-height: 40px;
    }

    .regular-product-card .monthly-price {
        font-size: 12px;
    }

    .regular-product-card .discount-info {
        font-size: 14px;
    }

    .regular-product-card .price-inquiry {
        font-size: 14px;
    }
}

/* 전체 상품 보러가기 버튼 스타일 */
.view-all-products-container {
    text-align: center;
    margin-top: 30px;
}

.view-all-products-btn {
    display: inline-block;
    background-color: #f0f4ff;
    border-color: #3617ce;
    color: #3617ce;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.view-all-products-btn:hover {    
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);    
    text-decoration: none;
}

.view-all-products-btn i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.view-all-products-btn:hover i {
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .view-all-products-btn {
        width: 100%;
        text-align: center;
    }
}

/* 필터 섹션 */
.filter-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    position: relative;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.search-button {
    background-color: #3617ce;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
    min-width: 80px;
}

.search-button:hover {
    background-color: #3617ce;
}

.filter-buttons {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
    width: 100%;
    grid-column: 1 / -1;
}

.reset-button {
    background-color: #ffffff;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    font-weight: 600;
    min-width: 80px;
}

.reset-button:hover {
    background-color: #f5f5f5;
}

/* 활성 필터 표시 */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    margin-left: 10px;
    align-items: center;
}

.applied-filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #7d8288;
    margin-right: 5px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    background-color: #f0f4ff;
    border-radius: 20px;
    font-size: 14px;
    color: #3617ce;
    border: 1px solid #3617ce;
}

.filter-tag .remove-filter {
    margin-left: 8px;
    cursor: pointer;
    font-weight: bold;
    color: #3617ce;
    font-size: 16px;
}