/* 商品一覧ページのスタイル */

/* パンくずリスト */
.breadcrumb {
    background-color: #f8f8f8;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.breadcrumb ul {
    display: flex;
    flex-wrap: wrap;
}

.breadcrumb ul li {
    font-size: 14px;
    color: #777;
}

.breadcrumb ul li:not(:last-child):after {
    content: '/';
    margin: 0 10px;
    color: #ddd;
}

.breadcrumb ul li a:hover {
    color: #333;
}

/* 商品一覧セクション */
.products-section {
    padding: 40px 0 80px;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.products-header h1 {
    font-size: 28px;
    font-weight: 700;
}

.products-filter-sort {
    display: flex;
    align-items: center;
}

.filter-toggle {
    margin-right: 15px;
    display: none;
}

.filter-toggle button {
    display: flex;
    align-items: center;
    background: none;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.filter-toggle button i {
    margin-right: 5px;
}

.sort-options {
    display: flex;
    align-items: center;
}

.sort-options label {
    margin-right: 10px;
    font-size: 14px;
}

.sort-options select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
}

/* 商品一覧コンテナ */
.products-container {
    display: flex;
    gap: 30px;
}

/* サイドバー */
.products-sidebar {
    width: 250px;
    flex-shrink: 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 20px;
    position: sticky;
    top: 80px;
    height: fit-content;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.close-sidebar {
    display: none;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
}

.filter-section {
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.filter-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.filter-section h4 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
}

.filter-list li {
    margin-bottom: 10px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}

.filter-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.filter-checkbox:hover input ~ .checkmark {
    background-color: #f8f8f8;
}

.filter-checkbox input:checked ~ .checkmark {
    background-color: #333;
    border-color: #333;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.filter-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.filter-checkbox .checkmark:after {
    left: 6px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-checkbox .count {
    margin-left: 5px;
    color: #999;
}

.price-range {
    margin-top: 15px;
}

.price-inputs {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.price-inputs input {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.price-inputs span {
    margin: 0 10px;
    color: #777;
}

.apply-price-btn {
    width: 100%;
    padding: 8px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.apply-price-btn:hover {
    background-color: #e0e0e0;
}

.color-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-filter {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 5px;
    width: calc(50% - 5px);
}

.color-filter input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.color-circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.color-filter:hover .color-circle {
    transform: scale(1.1);
}

.color-filter input:checked ~ .color-circle {
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #333;
}

.color-name {
    font-size: 14px;
}

.tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-filter {
    cursor: pointer;
}

.tag-filter input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.tag {
    display: inline-block;
    padding: 6px 12px;
    background-color: #f0f0f0;
    border-radius: 3px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.tag-filter:hover .tag {
    background-color: #e0e0e0;
}

.tag-filter input:checked ~ .tag {
    background-color: #333;
    color: #fff;
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.clear-filters-btn, .apply-filters-btn {
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.clear-filters-btn {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
}

.clear-filters-btn:hover {
    background-color: #e0e0e0;
}

.apply-filters-btn {
    background-color: #333;
    color: #fff;
    border: none;
}

.apply-filters-btn:hover {
    background-color: #555;
}

/* 商品グリッド */
.products-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* ページネーション */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
}

.page-link, .page-dots, .page-next {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.page-link {
    background-color: #f0f0f0;
    color: #333;
}

.page-link:hover, .page-next:hover {
    background-color: #e0e0e0;
}

.page-link.active {
    background-color: #333;
    color: #fff;
}

.page-dots {
    cursor: default;
}

.page-next {
    background-color: #f0f0f0;
}

/* レスポンシブデザイン */
@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .products-container {
        flex-direction: column;
    }
    
    .products-sidebar {
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 1100;
        border-radius: 0;
        padding-top: 60px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .products-sidebar.active {
        transform: translateX(0);
    }
    
    .filter-toggle {
        display: block;
    }
    
    .close-sidebar {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
    }
    
    .sidebar-header h3 {
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .products-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .products-filter-sort {
        margin-top: 15px;
        width: 100%;
        justify-content: space-between;
    }
    
    .color-filter {
        width: 100%;
    }
}

.product-tag.limited {
    background-color: #ff8c00;
    color: white;
}

.product-tag.soldout {
    background-color: #6c757d;
    color: white;
}