.store-search-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 0;
}

.store-search-title {
    font-size: 26px;
    text-align: center;
}

.store-search-top-section {
    gap: 20px;
    padding: 16px 45px 45px 45px;
}

.store-search-category-section {
    width: 100%;
}

.store-search-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 10px;
    justify-content: center;
    margin: 0 auto;
    width:80%;
}

.store-search-category-item {
    padding: 10px 20px;
    border: 1px solid #E0E0E0;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.store-search-category-item:hover {
    border-color: #7800FF;
    color: #7800FF;
}

.store-search-category-item.active {
    background: #7800FF;
    color: #fff;
    border-color: #7800FF;
    /* font-weight: 700; */
}

.store-search-controls {
    display: flex;
    gap: 30px;
    /* justify-content: flex-start; */
    justify-content: center;
    align-items: center;
    margin-top:0; 
    margin-bottom: 80px;
}

.search-label {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    min-width: 60px;
}

.store-search-form-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width:50%;
    margin: 0 auto;
    padding-bottom: 10px;
    border-bottom: 3px solid #000;
    /* flex: 1;
    max-width: 600px; */
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
}

.search-clear-btn {
    position: absolute;
    right: 50px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #7D7D7D;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.search-clear-btn:hover {
    color: #333;
}

.store-search-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    width: 20px;
    height: 20px;
    font-size: 18px;
    color: #666;
}

.store-search-filter-section {
    margin: 50px 0 40px 0;
}

.store-search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid #E0E0E0;
}

.store-search-count {
    font-size: 16px;
    color: #666;
    margin: 0;
    flex-shrink: 0;
}

.result-count {
    font-weight: 700;
    color: #303030;
}

.store-search-sort-list {
    display: flex;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

.store-search-sort-item {
    font-size: 16px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0 15px;
    font-weight: 500;
    position: relative;
}

.store-search-sort-item:not(:last-child)::after {
    content: "|";
    position: absolute;
    right: 0;
    color: #CCC;
    font-weight: 300;
}

.store-search-sort-item:hover {
    color: #303030;
}

.store-search-sort-item.active {
    color: #303030;
    font-weight: 700;
}

/* ===== 상품 리스트 (4x3 그리드) ===== */
.store-search-product-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 34px;
    margin: 40px 0;
    min-height: 600px;
}

/* 상품 카드 스타일 */
.product-card {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    display:block;
}

.product-image {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, #00000000, #00000001, #000000B5);
}

.product-img {
    width: 100%;
    height: 330px;
    object-fit: cover;
    transition: transform 0.4s ease;
    will-change: transform;
    display: block;
}

.product-image:hover .product-img {
    transform: scale(1.05);
}

.product-tag {
    position: absolute;
    top: 15px;
    left: 10px;
}

.product-tag-badge {
    background: #000;
    color: #fff;
    border-radius: 20px;
    padding: 3px 13px;
    font-size: 14px;
    font-weight: 700;
    display: inline-block;
}


.product-wish-btn {
    position: absolute;
    top: 9px;
    right: 10px;
    background: #797979;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: none;
}

.product-wish-btn img {
     position: absolute;top: 17%;right: 3px;width: 19px;opacity: 0.8;
}

.product-content {
    padding: 16px 0;
}

.product-title {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.product-title h3 {
    font-size: 22px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
    color: #000;
}

.product-title a {
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.product-price {
    font-size: 22px;
    font-weight: 700;
    margin-top: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.price-discount {
    color: #7800FF;
    font-size: 22px;
}

.price-current {
    color: #000;
    font-weight: 700;
}

.price-original {
    color: #999;
    text-decoration: line-through;
    font-size: 18px;
    font-weight: 600;
}

/* ===== 페이징 ===== */
.store-search-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 80px 0 150px;
    padding: 40px 0;
    border-top: 1px solid #E0E0E0;
    position: relative;
}

.page-info {
    font-size: 16px;
    color: #666;
    font-weight: 500;
    position: absolute;
    right: 0;
}

.page-number-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}
.page-number-wrapper i{
    font-size:24px;
    color: #AFAFAF;
}
.page-current {
    /* font-weight: 700; */
    color: #000;
    padding: 6px 33px;
    font-size: 18px;
    border: 1px solid #AFAFAF;
    border-radius: 5px;
    width: 78px;
    text-align: center;
    background: #fff;
}

.page-current:focus {
    outline: none;
    border-color: #7800FF;
}

.page-separator {
    /* font-weight: 700; */
    color: #000;
}

.page-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-total{
    color: #000;
}

.page-btn {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    background: #fff;
    color: #303030;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn.page-next {
    font-size: 20px;
    color: #fff;
    background: #303030;
    border-radius: 30px;
    padding: 20px 108px;
    border: none;
}

.page-btn:hover:not(.disabled) {
    background: #7800FF;
    color: #fff;
    border-color: #7800FF;
}

.page-btn.disabled {
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.page-input {
    width: 50px;
    padding: 8px 10px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.page-input:focus {
    outline: none;
    border-color: #7800FF;
}
/* PC에서는 커스텀 셀렉트 숨김 */
.store-custom-select-wrapper { display: none; }
.store-search-btn {
    position: absolute;
    right: 3%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    border: none;
    display: flex;
    background: none;
}

.store-search-btn i {
    font-size: 22px;
    color: #7800FF;

}

.store-search-results {
    width: 100%;
}

.store-search-reset-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.reset-box {
    display: flex;
    align-items: center;
    gap: 5px;
}

.reset-box i {
    font-size: 16px;
    /* color: #7800FF; */
}

.reset-box span {
    font-size: 16px;
    font-weight: 500;
}

.store-search-browse-btn {
    background: #7800FF;
    font-size: 20px;
    color: #fff;
    padding: 12px 90px;
    border-radius: 30px;
    cursor: pointer;
    border: none;
}
.store-search-input-section{
    width:100%;
}
.store-search-input {
    height: 100%;
    width: 100%;
    padding: 14px 20px 14px 12px;
    font-size: 18px;
    font-weight: 550;
    letter-spacing: -1px;
    padding-right: 50px;
    border: none;
}

.store-search-input ::placeholder {
    color: #d6d6d6;
    font-weight: 500;
}

.search-icon-btn {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #7D7D7D;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon-btn:hover {
    color: #333;
}
/* =========================================
   [반응형] 교구상점 전체보기 (store.search.css)
========================================= */

@media (max-width: 1300px) {
    body.sub-body {
        margin-top: 0 !important;
    }
}
@media (max-width: 768px) {
    body.sub-body {
        padding-top: 90px;
    }
}
/* 1200px 이하 */
@media (max-width: 1200px) {
    .store-search-product-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

/* 1024px 이하 (태블릿) */
@media (max-width: 1024px) {
    .store-search-container { padding: 40px 20px; }
    .store-search-top-section { padding: 16px 20px 30px; }
    
    /* 검색창과 카테고리 영역 넓이 확장 */
    .store-search-form-wrapper { width: 70%; }
    .store-search-category-tabs { width: 100%; }

    .store-search-filter-section {
        margin: 35px 0 25px 0;
    }
}

/* 768px 이하 (모바일 기본) */
@media (max-width: 768px) {
    .store-search-container { padding: 30px 16px; }
    .store-search-title { font-size: 22px; }

    /* 1. 상단 검색 영역 100% 꽉 차게 최적화 (테두리 깨짐 완벽 해결) */
    .store-search-top-section { padding: 16px 0 24px; gap: 15px; }
    .store-search-controls { margin-bottom: 24px; width: 100%; }
    
    .store-search-form-wrapper { 
        width: calc(100% - 10px) !important; /* 좌우 여백 살짝 확보 */
        margin: 0 auto;
        border-bottom: 2px solid #111 !important; /* 하단 굵은 선 깔끔하게 유지 */
        padding-bottom: 8px !important;
        gap: 0 !important;
    }
    
    .search-input-wrapper {
        border: none !important; 
        background: transparent !important;
    }
    
    .store-search-input { 
        font-size: 16px !important; 
        padding: 10px 75px 10px 5px !important; /* X버튼과 돋보기 영역(75px) 넉넉히 확보 */
        border: none !important; /* 모바일 강제 테두리 완벽 제거 */
        background: transparent !important;
        box-shadow: none !important;
        -webkit-appearance: none !important; /* iOS 기본 둥근 스타일 제거 */
        border-radius: 0 !important;
        outline: none !important;
        margin: 0 !important;
    }
    
    /* X(지우기) 버튼 설정 */
    .search-clear-btn {
        right: 45px !important; /* 돋보기보다 살짝 안쪽으로 */
        border: none !important; /* 버튼 테두리 제거 */
        background: transparent !important;
        box-shadow: none !important;
    }
    
    /* 돋보기 아이콘 설정 */
    .search-icon-btn {
        right: 10px !important; /* 우측 끝 정렬 */
        border: none !important; /* 버튼 테두리 제거 */
        background: transparent !important;
        box-shadow: none !important;
        font-size: 20px !important;
    }

    /* 2. 카테고리 탭 모바일 최적화 (스와이프 해제 -> 한눈에 다 보이도록 줄바꿈) */
    .store-search-category-tabs {
        width: 100%;
        flex-wrap: wrap !important; /* 숨기지 않고 여러 줄로 자연스럽게 떨어지도록 허용 */
        overflow-x: visible !important; /* 가로 스크롤 해제 */
        justify-content: center !important; /* 모바일에서는 가운데로 모아주는 게 깔끔함 */
        gap: 8px !important; /* 버튼 사이 간격을 좁혀서 공간 확보 */
        padding-bottom: 10px;
    }
    
    .store-search-category-item {
        padding: 7px 14px !important; /* 모바일에 맞춰 버튼 상하좌우 크기 축소 */
        font-size: 13px !important; /* 글자 크기 축소 */
        flex-shrink: 0; 
    }

    /* 3. 정렬 및 총 건수 영역 세로 배치 */
    .store-search-header { flex-direction: column; align-items: flex-start; gap: 15px; padding-bottom: 15px; }
    .store-search-sort-list { width: 100%; justify-content: flex-start; gap: 0; }
    .store-search-sort-item { font-size: 14px; padding: 0 12px; }
    .store-search-sort-item:first-child { padding-left: 0; }

    /* 4. 상품 리스트 2열 유지 및 높이/폰트 축소 */
    .store-search-product-list { grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 30px 0; min-height: auto; }
    .product-img { height: 220px; }
    .product-title h3 { font-size: 16px; }
    .product-price { font-size: 16px; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
    .price-discount { font-size: 16px; }
    .price-original { font-size: 14px; }
    
    /* 상품 뱃지 및 찜 버튼 모바일 최적화 */
    .product-tag-badge { font-size: 12px; padding: 3px 10px; }
    .product-wish-btn { width: 26px; height: 26px; top: 12px; right: 10px; }
    .product-wish-btn img { width: 14px; top: 6px; right: 6px; }

    /* 5. 페이징 영역 모바일 최적화 (다음페이지 버튼 100% 꽉 차게) */
    .store-search-pagination {
        flex-direction: column;
        gap: 20px;
        margin: 40px 0 80px;
        padding: 30px 0;
    }
    .page-info { position: static; text-align: center; font-size: 14px; order: -1; }
    .pagination-input { width: 100%; justify-content: center; }
    .page-controls { width: 100%; }
    .page-btn.page-next {
        width: 100%;
        padding: 15px;
        font-size: 16px;
        box-sizing: border-box;
        text-align: center;
    }
    
    .store-search-filter-section {
        margin: 25px 0 15px 0;
    }
}

/* 480px 이하 (작은 모바일) */
@media (max-width: 480px) {
    .store-search-product-list { gap: 12px; }
    .product-img { height: 180px; }
    .product-title h3 { font-size: 15px; }

    /* 가격 정보가 길어서 겹치는 것 방지 (할인가/원가를 세로로 분리) */
    .product-price { flex-direction: column; align-items: flex-start; gap: 4px; }
    .price-discount { font-size: 15px; }
    .price-current { font-size: 16px; }
    .price-original { font-size: 13px; }

    .store-search-sort-item { font-size: 13px; padding: 0 10px; }

    .store-search-filter-section {
        margin: 20px 0 10px 0;
    }
}

/* 345px 이하 (초소형 모바일) */
@media (max-width: 345px) {
    .product-img { height: 150px; }
    .product-title h3 { font-size: 13px; }
    .price-current { font-size: 14px; }
    .store-search-category-item { font-size: 13px; padding: 6px 12px; }
}