/* Store Styles */
.store-main {
    background: #f8f9fa;
}

/* Page Header - Standard Style */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 3rem 0;
    background: linear-gradient(135deg, #E8F5E8 0%, #C8E6C9 100%);
    border-radius: 12px;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #2E7D32;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.1rem;
    color: #555;
}

.search-bar-wrapper {
    margin-bottom: 2rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    text-align: center;
}

.hero-text h1 {
    font-size: 1.8rem;
    margin-bottom: 0.1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.hero-search {
    width: 100%;
    max-width: 350px;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    /* 스토어 메인 영역 - 고정 헤더 공간 확보 */
    .store-main {
        padding-top: 50px;
        padding-bottom: 60px;
    }

    .page-header {
        padding: 1rem 1rem !important;
        margin-bottom: 1rem !important;
        margin-top: 0 !important;
    }

    .page-header h1 {
        font-size: 1.3rem !important;
        margin-bottom: 0.3rem !important;
    }

    .page-header p {
        font-size: 0.85rem !important;
        margin: 0 !important;
    }

    .search-bar-wrapper {
        margin-bottom: 1rem;
    }

    main {
        padding-top: 0;
    }

    .container {
        margin-top: 0;
        padding: 0 10px;
    }

    .search-box {
        display: flex !important;
        align-items: center !important;
        width: 90%;
        max-width: 350px;
        margin: 0 auto;
        padding: 0.5rem;
        gap: 0.3rem;
    }

    .search-box input {
        font-size: 0.9rem !important;
        padding: 0.5rem !important;
    }

    .search-btn-icon {
        font-size: 1.3rem !important;
        padding: 0.3rem 0.5rem !important;
    }

    .btn-clear-search {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.9rem !important;
        margin-right: 0.3rem !important;
    }

    /* 모바일 상품 그리드 - 리스트 형태 (깔끔하게 정리) */
    .products-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1px !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .product-card {
        background: white !important;
        border: none !important;
        border-bottom: 1px solid #f0f0f0 !important;
        display: flex !important;
        flex-direction: row !important;
        padding: 16px !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        transform: none !important;
    }

    .product-image {
        width: 120px !important;
        height: 120px !important;
        margin-right: 16px !important;
        flex-shrink: 0 !important;
        border: 1px solid #f0f0f0 !important;
        border-radius: 4px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: white !important;
    }

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

    .product-info {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        gap: 6px !important;
    }

    .product-title {
        display: block !important;
        font-size: 16px !important;
        font-weight: 400 !important;
        color: #333 !important;
        line-height: 1.3 !important;
        margin: 0 0 8px 0 !important;
        padding: 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        background: none !important;
        border: none !important;
        text-align: left !important;
    }

    .product-price {
        display: flex !important;
        align-items: baseline !important;
        gap: 6px !important;
        margin: 0 !important;
        flex-wrap: wrap !important;
    }

    .product-price .discount-rate {
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #FA622F !important;
    }

    .product-price .price {
        font-size: 16px !important;
        font-weight: 600 !important;
        color: #333 !important;
    }

    .product-price .original-price {
        font-size: 13px !important;
        color: #999 !important;
        text-decoration: line-through !important;
    }

    .shipping-info {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        width: 100% !important;
        margin-top: 4px !important;
    }

    .shipping-cost {
        font-size: 12px !important;
        color: #666 !important;
        font-weight: 400 !important;
    }

    .total-price {
        font-size: 14px !important;
        color: #2E7D32 !important;
        font-weight: 600 !important;
    }

    .product-rating {
        display: flex !important;
        flex-direction: column !important;
        gap: 3px !important;
        margin: 0 !important;
    }

    .rating-stars {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
    }

    .rating-stars .stars {
        color: #FF8A00 !important;
        font-size: 13px !important;
    }

    .rating-stars .rating-score {
        color: #333 !important;
        font-size: 13px !important;
        font-weight: 500 !important;
    }

    .rating-reviews .rating-count {
        color: #999 !important;
        font-size: 12px !important;
    }

    .product-features {
        display: flex !important;
        gap: 8px !important;
        margin: 0 !important;
        flex-wrap: wrap !important;
    }

    .product-features .delivery-info {
        font-size: 13px !important;
        color: #008C00 !important;
        font-weight: 500 !important;
    }

    .product-features .discount-label {
        font-size: 12px !important;
        color: #FA622F !important;
        background: rgba(250, 98, 47, 0.1) !important;
        padding: 2px 6px !important;
        border-radius: 3px !important;
        font-weight: 500 !important;
        border: 1px solid rgba(250, 98, 47, 0.2) !important;
    }

    /* 불필요한 요소들 숨기기 */
    .product-header,
    .product-description,
    .product-benefits,
    .product-actions,
    .product-overlay {
        display: none !important;
    }

    /* 상품명 강제 표시 */
    .product-card .product-title {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .discount-badge {
        position: absolute !important;
        top: 4px !important;
        left: 4px !important;
        background: #FA622F !important;
        color: white !important;
        padding: 2px 4px !important;
        border-radius: 2px !important;
        font-size: 10px !important;
        z-index: 2 !important;
    }

    /* Filter Section Mobile */
    .filter-header h2 {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }

    .filter-controls select {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
    }

    /* 모바일에서 view-toggle 숨기기 (이미 리스트 형태) */
    .view-toggle {
        display: none !important;
    }

    .view-btn {
        display: none;
    }

    /* Category Links Mobile - 간소화된 텍스트 링크 유지 */
    .categories-list {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.3rem 1rem !important;
        justify-content: center !important;
        padding: 1rem 0.5rem !important;
        background: white !important;
    }

    .category-link, .category-btn {
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.25rem !important;
        padding: 0.4rem 0.7rem !important;
        background: none !important;
        border: none !important;
        border-radius: 15px !important;
    }

    .category-btn.active {
        background: #E8F5E8 !important;
    }

    .category-text {
        display: flex !important;
        flex-direction: row !important;
        align-items: baseline !important;
        gap: 0.25rem !important;
    }

    .category-text h3 {
        font-size: 0.9rem !important;
        font-weight: 500 !important;
        color: #333 !important;
        margin: 0 !important;
    }

    .category-btn.active .category-text h3 {
        color: #2E7D32 !important;
        font-weight: 600 !important;
    }

    .category-count {
        font-size: 0.8rem !important;
        color: #999 !important;
        font-weight: 400 !important;
    }

    .category-btn.active .category-count {
        color: #2E7D32 !important;
        font-weight: 500 !important;
    }

    /* Section Headers Mobile */
    .section-header h2 {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }

    .section-nav .nav-btn {
        background: none;
        border: none;
        padding: 0;
        font-size: 0.75rem;
        color: #4CAF50;
        text-decoration: underline;
        cursor: pointer;
        margin-right: 1rem;
    }

    /* Benefits Section Mobile */
    .benefits-section {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }

    .benefits-section h2 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem !important;
        text-align: center;
    }

    .benefits-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    .benefit-card {
        padding: 0.5rem !important;
        text-align: center !important;
        border: 1px solid #eee !important;
        border-radius: 6px !important;
    }

    .benefit-icon {
        font-size: 1.2rem !important;
        margin-bottom: 0.2rem !important;
    }

    .benefit-card h3 {
        font-size: 0.7rem !important;
        margin-bottom: 0.1rem !important;
    }

    .benefit-card p {
        font-size: 0.65rem !important;
        line-height: 1.2 !important;
        margin: 0 !important;
    }


    /* Pagination Mobile */
    .pagination-container .btn {
        background: none;
        border: none;
        padding: 0;
        font-size: 0.8rem;
        color: #4CAF50;
        text-decoration: underline;
        cursor: pointer;
    }

    /* Additional Layout Styles */
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .filter-header,
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .filter-controls,
    .section-nav {
        flex-wrap: wrap;
    }

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


    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .category-info {
        text-align: center;
    }

    .products-grid.list-view .product-card {
        flex-direction: column;
        text-align: center;
    }

    .products-grid.list-view .product-image {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .products-grid.list-view .product-actions {
        margin-left: 0;
        flex-direction: column;
    }
}


.search-box {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: visible;
    transition: border-color 0.3s ease;
    gap: 0.5rem;
}

.search-box:focus-within {
    border-color: #4CAF50;
}

.search-box input {
    flex: 1;
    padding: 1rem;
    border: none;
    font-size: 1rem;
    outline: none;
}

.search-btn-icon {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: transform 0.2s ease;
}

.search-btn-icon:hover {
    transform: scale(1.1);
}

.btn-clear-search {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    margin-right: 0.5rem;
    transition: all 0.2s ease;
}

.btn-clear-search:hover {
    background: #cc0000;
    transform: scale(1.1);
}

.popular-searches {
    color: #666;
    font-size: 0.9rem;
}

.popular-searches span {
    margin-right: 0.5rem;
}

.popular-searches a {
    color: #4CAF50;
    text-decoration: none;
    margin-right: 1rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.popular-searches a:hover {
    background: #E8F5E8;
}

/* Filter Section */
.filter-section {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 3rem;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.filter-header h2 {
    color: #2E7D32;
    margin: 0;
}

.filter-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-controls select {
    padding: 0.5rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

.view-toggle {
    display: flex;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.view-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 1rem;
    color: #4CAF50;
    text-decoration: underline;
    margin-right: 1rem;
}

.view-btn.active {
    color: #2E7D32;
    font-weight: bold;
}

/* Categories - 간소화된 텍스트 링크 스타일 */
.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0;
}

.category-link, .category-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: none;
    padding: 0.5rem 0.8rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: inherit;
    border-radius: 20px;
}

.category-link:hover, .category-btn:hover {
    background: #f0f7ff;
}

.category-btn.active {
    background: #E8F5E8;
}

.category-btn.active .category-text h3 {
    color: #2E7D32;
    font-weight: 700;
}

.category-btn.active .category-count {
    color: #2E7D32;
    font-weight: 600;
}

.category-text {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.3rem;
}

.category-text h3 {
    color: #333;
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

.category-count {
    color: #999;
    font-size: 0.85rem;
    font-weight: 400;
}

/* Products Section */
.products-section {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
    color: #2E7D32;
    margin: 0;
    font-size: 2rem;
}

.section-nav {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 1rem;
    color: #4CAF50;
    text-decoration: underline;
    margin-right: 1rem;
}

.nav-btn:hover,
.nav-btn.active {
    color: #2E7D32;
    font-weight: bold;
}

/* Product Grid - 4x8 Layout */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    justify-items: center;
    margin-bottom: 3rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    width: 100%;
    max-width: 280px;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    border-color: #4CAF50;
}

.product-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.discount-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #ff4444;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.product-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.wish-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 0.8rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.wish-btn:hover {
    background: white;
    transform: scale(1.1);
}

.wish-btn:hover {
    color: #ff4444;
}

/* Product Info */
.product-info {
    padding: 1.5rem;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.product-category {
    background: #E8F5E8;
    color: #2E7D32;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.stars {
    font-size: 0.9rem;
}

.rating-count {
    font-size: 0.8rem;
    color: #666;
}

.product-title {
    color: #2E7D32;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    margin-bottom: 1rem;
}

.original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.sale-price {
    color: #ff4444;
    font-weight: 700;
    font-size: 1.3rem;
}

.price {
    color: #2E7D32;
    font-weight: 700;
    font-size: 1.3rem;
}

.product-features {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.feature {
    background: #f8f9fa;
    color: #666;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.btn-block {
    background: none;
    border: none;
    padding: 0;
    color: #4CAF50;
    text-decoration: underline;
    cursor: pointer;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* No Products */
.no-products {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.no-products-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-products h3 {
    color: #2E7D32;
    margin-bottom: 1rem;
}

/* Benefits Section */
.benefits-section {
    background: white;
    padding: 3rem 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 3rem;
}

.benefits-section h2 {
    text-align: center;
    color: #2E7D32;
    margin-bottom: 3rem;
    font-size: 2rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.benefit-card {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-4px);
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.benefit-card h3 {
    color: #2E7D32;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.benefit-card p {
    color: #666;
    line-height: 1.5;
}

/* Pagination */
.pagination-container {
    text-align: center;
    margin-top: 3rem;
}

/* List View - 데스크톱 전용 */
.products-grid.list-view {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.products-grid.list-view .product-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 1.5rem;
    max-width: 100%;
}

.products-grid.list-view .product-image {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
    margin-right: 1.5rem;
    border-radius: 8px;
}

.products-grid.list-view .product-info {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.products-grid.list-view .product-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.products-grid.list-view .product-price {
    margin-bottom: 1rem;
}

.products-grid.list-view .product-rating {
    margin-bottom: 1rem;
}

.products-grid.list-view .product-features {
    margin-top: auto;
}

.products-grid.list-view .product-overlay {
    display: none;
}

/* Responsive */

@media (max-width: 480px) {
    /* 초소형 화면 - 필수 조정만 */
    .hero-text h1 {
        font-size: 1.2rem;
    }

    .product-image {
        width: 100px !important;
        height: 100px !important;
    }

    .product-title {
        font-size: 14px !important;
    }

    .search-box {
        max-width: 250px;
    }
}

/* Pagination Styles */
.pagination-container {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin: 3rem 0;
    text-align: center;
}

.pagination-info {
    color: #666;
    font-size: 14px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

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

.pagination-btn,
.pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 8px 12px;
    text-decoration: none;
    color: #666;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 2px solid transparent;
}

.pagination-btn {
    background: white;
    color: #007bff;
    font-weight: 600;
    min-width: 70px;
}

.pagination-btn:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.pagination-page {
    background: white;
}

.pagination-page:hover {
    background: #f8f9fa;
    color: #495057;
    border-color: #007bff;
}

.pagination-page.active {
    background: #007bff;
    color: white;
    font-weight: 600;
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.pagination-page.active:hover {
    background: #0056b3;
    color: white;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 12px;
}

.results-info {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin: 2rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Responsive Pagination */
@media (max-width: 768px) {
    .pagination-container {
        padding: 1.5rem 1rem;
        margin: 2rem 0;
    }

    .pagination-nav {
        gap: 4px;
    }

    .pagination-btn,
    .pagination-page {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .pagination-btn {
        min-width: 60px;
    }

    .pagination-pages {
        margin: 0 8px;
        gap: 2px;
    }
}

@media (max-width: 480px) {
    .pagination-container {
        padding: 1rem;
    }

    .pagination-btn {
        min-width: 50px;
        font-size: 12px;
    }

    .pagination-page {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }
}