/**
 * 鍒楄〃椤垫牱寮?- Collection CSS
 * 涓€姣斾竴澶嶅埢鍙傝€冪珯 https://1xz1eh-dp.myshopify.com/collections/all
 */

/* ========== 闈㈠寘灞戝�鑸?========== */
.collection-breadcrumb {
    padding: 12px 20px 28px;
    font-size: 13px;
    color: #888888;
}

.collection-breadcrumb a {
    color: #888888;
    text-decoration: none;
}

.collection-breadcrumb a:hover {
    color: #333333;
}

.breadcrumb-sep {
    margin: 0 6px;
    color: #cccccc;
}

/* ========== 甸潰澶撮儴 ========== */
.collection-header {
    text-align: left;
    padding: 10px 20px 15px;
}

.collection-title {
    font-family: var(--font-family-body);
    font-size: 28px;
    font-weight: 700;
    color: #232323;
    margin: 0;
}

/* ========== 工具栏 ========== */
.collection-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 0;
}

.toolbar-left,
.toolbar-center,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #232323;
    letter-spacing: 0.5px;
}

/* Filter按钮（移动端） */
.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #232323;
    cursor: pointer;
    transition: var(--transition);
}

.filter-toggle-btn:hover {
    background: #f5f5f5;
    border-color: #232323;
}

/* 视图切换 */
.view-toggle {
    display: flex;
    gap: 0;
}

.view-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dddddd;
    background: #ffffff;
    color: #888888;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.view-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.view-btn:last-child {
    border-radius: 0 4px 4px 0;
    border-left: none;
}

.view-btn.active {
    color: #232323;
    border-color: #232323;
}

/* 下拉选择框样式 */
.items-per-page-select,
.sort-select {
    padding: 8px 32px 8px 12px;
    border: 1px solid #dddddd;
    border-radius: 4px;
    background: #ffffff;
    font-size: 13px;
    color: #232323;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23232323' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    min-width: 140px;
}

/* ========== 涓讳綋甯冨 ========== */
.collection-layout {
    display: flex;
    gap: 30px;
    padding-bottom: 80px;
    margin-top: -15px;
}

/* ========== 绞涢€変晶杈规爮 ========== */
.filter-sidebar {
    width: 240px;
    flex-shrink: 0;
}

.filter-sidebar-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
}

.filter-sidebar-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #232323;
}

.filter-group {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e8e8e8;
}

.filter-group:last-of-type {
    border-bottom: none;
}

.filter-title {
    font-family: var(--font-family-body);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    color: #232323;
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-list li {
    margin-bottom: 8px;
}

.filter-list li a {
    font-size: 13px;
    color: #555555;
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    text-decoration: none;
    transition: var(--transition);
}

.filter-list li a:hover,
.filter-list li a.active {
    color: #232323;
    font-weight: 600;
}

.filter-list li a .count {
    color: #999999;
    font-size: 12px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555555;
    cursor: pointer;
    margin-bottom: 8px;
}

.filter-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #232323;
}

/* 可折叠筛选组 */
.filter-group-collapsible {
    border-bottom: 1px solid #e8e8e8;
}

.filter-group-collapsible:last-of-type {
    border-bottom: none;
}

.filter-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
    margin: 0;
    user-select: none;
}

.filter-toggle:hover {
    color: #555555;
}

.filter-toggle-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.filter-toggle.collapsed .filter-toggle-icon {
    transform: rotate(-90deg);
}

.filter-content {
    overflow: hidden;
    max-height: 1000px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding-bottom: 10px;
}

.filter-content.collapsed {
    max-height: 0;
    padding-bottom: 0;
}

/* 浠锋牸杈撳 */
.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-input-group {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.price-input-group span {
    font-size: 13px;
    color: #999999;
}

.price-input-group .form-control {
    padding: 6px 8px;
    font-size: 13px;
    width: 100%;
    border: 1px solid #dddddd;
    border-radius: 4px;
}

.price-separator {
    font-size: 13px;
    color: #999999;
}

/* APPLY 按钮 */
.filter-apply-btn {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    background: #232323;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-apply-btn:hover {
    background: #000000;
}

/* ========== 浜у搧缃戞牸 - 2鍒?========== */
/* ========== 产品区域 ========== */
.collection-products {
    flex: 1;
    min-width: 0;
}

.products-title {
    font-family: var(--font-family-body);
    font-size: 24px;
    font-weight: 700;
    color: #232323;
    margin: 0px 0 15px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8e8e8;
}

/* ========== 浜у缃戞牸 - 2鍒?========== */
.product-grid {
    display: grid;
    gap: 12px;
}

.product-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.product-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.product-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ========== 浜у搧鍗＄墖 - 澶嶅埢鍙傝€冪珯 ========== */
.collection-product-card {
    position: relative;
    background: #ffffff;
    overflow: visible;
}

/* 鏍囩�鍖哄煙 - 鍦ㄥ浘鐗囦笂鏂?*/
.collection-product-labels {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 3;
}

.collection-label-new {
    background-color: #f0f0f0;
    color: #333333;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.collection-label-sale {
    background-color: #e74c3c;
    color: #ffffff;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* 鍥剧墖鍖哄煙 */
.collection-product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background-color: #f5f5f5;
}

.collection-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.collection-product-card:hover .collection-product-image img {
    transform: scale(1.03);
}

/* 收藏按钮 - 图片右上角 */
.collection-wishlist-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #232323;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    z-index: 2;
}

.collection-wishlist-btn:hover {
    background: #f0f0f0;
}

.collection-wishlist-btn.wishlist-active {
    color: #e74c3c;
}


/* 产品信息 */
.collection-product-info {
    padding: 4px 4px 2px;
    text-align: center;
}

.collection-product-title {
    font-family: var(--font-family-body);
    font-size: 13px;
    font-weight: 400;
    color: #232323;
    margin-bottom: 2px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.collection-product-title a {
    color: #232323;
    text-decoration: none;
}

.collection-product-title a:hover {
    color: #666666;
}

.collection-product-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    flex-wrap: wrap;
}

.collection-price-current {
    font-weight: 700;
    color: #232323;
}

.collection-price-compare {
    text-decoration: line-through;
    color: #999999;
    font-size: 13px;
}

.collection-price-sale {
    color: #e74c3c;
}

.collection-price-from {
    font-size: 12px;
    color: #999999;
    font-weight: 400;
}

/* ========== 鍒嗛〉锛歋HOW MORE ========== */
.collection-pagination {
    text-align: center;
    padding: 30px 0 20px;
}

.pagination-info {
    font-size: 13px;
    color: #888888;
    margin-bottom: 12px;
}

.pagination-progress {
    width: 200px;
    height: 3px;
    background: #e8e8e8;
    margin: 0 auto 20px;
    border-radius: 2px;
    overflow: hidden;
}

.pagination-progress-bar {
    height: 100%;
    background: #232323;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.show-more-btn {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 14px 24px;
    background: #ffffff;
    border: 1px solid #232323;
    color: #232323;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: var(--transition);
}

.show-more-btn:hover {
    background: #232323;
    color: #ffffff;
}

/* ========== 绌虹姸鎬?========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 48px;
    color: #cccccc;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    color: #232323;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: #888888;
    margin-bottom: 20px;
}

/* ========== 鍝嶅寮?========== */
@media (min-width: 993px) {
    /* PC端：筛选面板始终显示 */
    .filter-sidebar {
        width: 240px;
        flex-shrink: 0;
        position: static;
        background: transparent;
        box-shadow: none;
    }

    .filter-sidebar-header {
        display: none;
    }

    .collection-layout {
        gap: 30px;
    }

    /* PC端隐藏移动端Filter按钮 */
    .filter-toggle-btn {
        display: none;
    }
}

@media (max-width: 992px) {
    /* 遮罩层 */
    .filter-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .filter-overlay.active {
        display: block;
        opacity: 1;
    }

    /* 移动端：筛选面板隐藏为侧边栏 */
    .filter-sidebar {
        position: fixed;
        top: 0;
        left: -300px;
        width: 280px;
        height: 100%;
        background: #ffffff;
        z-index: 2000;
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .filter-sidebar.open {
        left: 0;
    }

    .filter-sidebar-header {
        display: flex;
    }

    .collection-layout {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .collection-toolbar {
        gap: 8px;
        padding: 10px 0;
    }

    /* 移动端隐藏PC端元素 */
    .desktop-only {
        display: none !important;
    }

    .toolbar-label {
        font-size: 11px;
    }

    .sort-select,
    .items-per-page-select {
        min-width: 100px;
        padding: 6px 28px 6px 8px;
        font-size: 12px;
    }

    .view-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    /* 移动端产品网格 - 2列，间距适中 */
    .product-grid-4,
    .product-grid-3,
    .product-grid-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* 移动端产品标题和价格 */
    .collection-product-title {
        font-size: 13px;
    }

    .collection-product-price {
        font-size: 14px;
    }

    .products-title {
        font-size: 20px;
        margin: 8px 0 12px 0;
    }

    .collection-breadcrumb {
        padding: 8px 0;
        font-size: 12px;
    }
}
