:root {
    --bg-dark: #1a1a1a;
    --bg-darker: #111;
    --bg-card: #222;
    --text-primary: #fff;
    --text-secondary: #999;
    --accent-orange: #ff6b35;
    --accent-yellow: #ffd700;
    --border-color: #333;
    --sidebar-width: 320px;
}

.cs-container{
    padding: 100px 0;
}

.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.filter-overlay.active {
    opacity: 1;
    visibility: visible;
}


.filter-sidebar {
    position: fixed;
    top: 0;
    left: calc(-1 * var(--sidebar-width));
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-darker);
    z-index: 1001;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
}

.filter-sidebar.active {
    left: 0;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.filter-header h3 {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 1px;
}

.close-filter {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.close-filter:hover {
    color: var(--text-primary);
}

.custom-filters {
    padding: 20px;
}

.filter-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.filter-section:last-of-type {
    border-bottom: none;
}

.filter-section h4 {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-slider {
    padding: 10px 0;
}

.price-inputs {
    position: relative;
    height: 30px;
}

.price-inputs input[type="range"] {
    position: absolute;
    width: 100%;
    height: 4px;
    background: transparent;
    -webkit-appearance: none;
    pointer-events: none;
}

.price-inputs input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #e0be70;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    border: 2px solid var(--text-primary);
}

.price-inputs input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
}

.price-inputs input[type="range"]:first-child::-webkit-slider-runnable-track {
    background: linear-gradient(to right, var(--border-color) 0%, #e0be70 50%, var(--border-color) 100%);
}

.price-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    color: var(--text-secondary);
    font-size: 14px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 14px;
    transition: color 0.2s;
}

.filter-checkbox:hover {
    color: #e0be70;
}

.filter-checkbox input[type="checkbox"] {
    display: none;
}

.filter-checkbox .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 3px;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s;
}

.filter-checkbox input[type="checkbox"]:checked + .checkmark {
    background: #e0be70;
    border-color: #e0be70;
}

.filter-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid var(--text-primary);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-checkbox .count {
    color: var(--text-secondary);
    margin-left: auto;
    font-size: 12px;
}

.filter-submit-btn {
    width: 100%;
    padding: 14px;
    background: #e0be70;
    color: #000000;
    border: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}

.filter-submit-btn:hover,
.filter-submit-btn:focus{
    background: #f1d28b !important;
    color: #000 !important;
}

.filter-clear-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-size: 13px;
    text-align: center;
    text-decoration: none;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.filter-clear-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}


.shop-container {
    color: var(--text-primary);
    min-height: 100vh;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 30px 50px;
    width: 100%;
    box-sizing: border-box;
}

.woocommerce-products-header {
    padding: 30px;
    text-align: center;
    max-width: 1500px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* 面包屑 */
.woocommerce-breadcrumb {
    color: #ddd !important;
    font-size: 16px !important;
    margin-bottom: 15px !important;
}

.woocommerce-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.woocommerce-breadcrumb a:hover {
    color: #e0be70;
}

.woocommerce-products-header__title {
    color: var(--text-primary);
    font-size: 28px;
    margin: 0;
}

.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
}

.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: transparent;
    color: #e0be70;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 180px;
    border: 0;
    font-weight: bold;
    f left: fl;
    flex: 1;
}

.filter-toggle-btn:hover {
    border-color: #e0be70;
    color: #e0be70;
}

.filter-toggle-btn svg {
    width: 20px;
    height: 20px;
}

/* 当前筛选条件标签 */
.active-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-weight: 500;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-card, #222);
    color: var(--text-primary, #fff);
    border: 1px solid var(--border-color, #333);
    border-radius: 3px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.filter-tag:hover {
    border-color: #e0be70;
    color: #e0be70;
}

.filter-tag .remove {
    font-size: 16px;
    line-height: 1;
    opacity: 0.7;
}

.filter-tag:hover .remove {
    opacity: 1;
}

.clear-all-filters {
    color: var(--text-secondary, #999);
    font-size: 13px;
    text-decoration: underline;
    transition: color 0.2s;
}

.clear-all-filters:hover {
    color: #e0be70;
}

.column-switcher {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;
    justify-content: center;
}

.col-btn {
    width: auto;
    height: auto;
    background: transparent;
    border: 1px solid #847045;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 3px;
}

.col-btn:hover,
.col-btn.active {
    border-color: #e0be70;
    background: #e0be70;
}

.col-btn.active .col-icon span {
    background: var(--text-primary);
}

.col-icon {
    display: flex;
    gap: 2px;
    height: 25px;
}

.col-icon span {
    display: block;
    width: 15px;
    height: 100%;
    background: #e0be70;
    transition: background 0.2s;
}

.col-btn:hover .col-icon span {
    background: var(--text-primary);
}

.sort-dropdown {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: end;
}

.sort-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: #e0be70;
    border: 1px solid #e0be70;
    font-size: 17px;
    cursor: pointer;
    min-width: 180px;
    justify-content: space-between;
    transition: all 0.2s;
    border-radius: 50px;
}

[type=button]:focus, [type=button]:hover, [type=submit]:focus, [type=submit]:hover, button:focus, button:hover{
    background: unset;
    color: #ddd;
}

.sort-dropdown-btn:hover {
    border-color: #e0be70;
    color: #e0be70;
}

.sort-dropdown-btn svg {
    transition: transform 0.2s;
}

.sort-dropdown.open .sort-dropdown-btn svg {
    transform: rotate(180deg);
}

.sort-options {
    position: absolute;
    top: 58px;
    right: 0;
    width: 220px;
    background: #000;
    border: 1px solid var(--border-color);
    z-index: 100;
    display: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.sort-dropdown.open .sort-options {
    display: block;
}

.sort-options-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    font-size: 12px;
    color: #ddd;
    letter-spacing: 1px;
}

.sort-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.sort-close:hover {
    color: var(--text-primary);
}

.sort-option {
    display: block;
    padding: 12px 15px;
    color: #ddd;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.sort-option:hover {
    background: var(--bg-darker);
    color: #e0be70 !important;
}

.sort-option.active {
    color: #e0be70;
}


.shop-products-area {
    width: 100%;
}

ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    list-style: none;
    padding: 0;
    margin: 0 !important;
}

ul.products.cols-1 {
    grid-template-columns: 1fr;
}

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

ul.products.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

ul.products.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

ul.products.cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

ul.products.cols-6 {
    grid-template-columns: repeat(6, 1fr);
}

li.product {
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

li.product:hover {
}

li.product .woocommerce-loop-product__link {
    display: block;
    text-decoration: none;
}


.product-images-wrapper {
    position: relative;
}

.product-main-image {
    position: relative;
    overflow: hidden;
    background: #1a1a1a;
}
.product-main-image img{
    aspect-ratio: 4 / 3;
}

.product-main-image img {
    transition: opacity 0.2s ease-out;
}

.product-main-image img.fade {
    opacity: 0.5;
}

/* 预加载图片（隐藏） */
.preload-images {
    display: none !important;
}

.product-gallery-thumbs {
    display: flex;
    gap: 1px;
    padding: 0;
    background: #fff;
}

.product-gallery-thumbs > .gallery-thumb:first-child{
    display: none;
}

.gallery-thumb {
    flex: 1;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.2s;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    opacity: 1;
    border-color: #e0be70;
}

.gallery-thumb img {
    width: 100%;
    height: 45px;
    object-fit: cover;
    display: block;
}


li.product img {
    margin: 0 !important;
    height: 100% !important;
    object-fit: cover;
}

li.product .onsale {
    position: absolute;
    top: 5px !important;
    right: 5px !important;
    background: #e0be70;
    color: var(--text-primary);
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 3px;
    z-index: 10;
    text-transform: uppercase;
    margin: 0 !important;
}

li.product .woocommerce-loop-product__title {
    color: var(--text-primary);
    font-size: 16px !important;
    font-weight: bold;
    padding: 15px 0 0 0 !important;
    margin: 0 !important;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

li.product:hover .woocommerce-loop-product__title {
}

.product-rating{
    display: none;
}

span.woocommerce-Price-amount.amount{
    color: #fdb002;
    font-size: 20px;
}

del span.woocommerce-Price-amount.amount bdi{
    opacity: .7;
}

li.product .price {
    padding: 5px 15px 15px;
    font-size: 16px;
}

li.product .price del {
    color: var(--text-secondary);
    font-size: 14px;
    margin-right: 8px;
}

li.product .price ins {
    color: #e0be70;
    text-decoration: none;
    font-weight: 600;
}

li.product .price .woocommerce-Price-amount {
    color: var(--text-primary);
}

li.product .price del .woocommerce-Price-amount {
    color: var(--text-secondary);
}

li.product .price ins .woocommerce-Price-amount {
    color: #e0be70;
}

li.product .star-rating {
    display: flex;
    align-items: center;
    padding: 0 15px 10px;
    font-size: 12px;
    color: #edb572;
}

li.product .star-rating::before {
    content: 'ÃƒÂ¢Ã‹Å“Ã¢â‚¬Â¦ÃƒÂ¢Ã‹Å“Ã¢â‚¬Â¦ÃƒÂ¢Ã‹Å“Ã¢â‚¬Â¦ÃƒÂ¢Ã‹Å“Ã¢â‚¬Â¦ÃƒÂ¢Ã‹Å“Ã¢â‚¬Â¦';
    letter-spacing: 2px;
}

li.product .star-rating span {
    overflow: hidden;
    position: absolute;
    left: 0;
    top: 0;
}

li.product .button,
li.product .add_to_cart_button {
    display: none !important;
}

.custom-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding: 20px 0;
}

.custom-pagination a,
.custom-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0;
    background: #e0be70;
    color: #000;
    border: 1px solid #e0be70;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.custom-pagination a:hover {
    border-color: #ffffff;
    color: #000;
}

.custom-pagination .current {
    background: #ffffff;
    border-color: #ffffff;
    color: #000000;
}

.woocommerce-loop-product__link ins {
    text-decoration-line: none;
}
.woocommerce-loop-product__link del {color: #b98001;text-decoration: none;position: relative;}
.woocommerce-loop-product__link del:before{
    content: '';
    width: 100%;
    display: block;
    height: 2px;
    border-radius: 5px;
    position: absolute;
    left: 0;
    top: 6px;
    background: #b98001;
}

.blade-options-wrapper {
    margin: 0;
    padding: 0;
    border-radius: 5px;
}
.blade-edge-option, .engraving-option {
    margin-bottom: 20px;
}
.blade-edge-option:last-child, .engraving-option:last-child {
    margin-bottom: 0;
}
.option-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #ddd;
    margin-bottom: 0;
}
.option-label .selected-grade {
    color: #edb572;
    font-weight: 500;
}
.option-label-warp {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 6px;
}
.option-hint {
    color: #ddd;
    margin: 0;
}
.grade-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.grade-btn {
    padding: 8px 15px;
    border: 1px solid #6e5a43;
    border-radius: 0;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    background: #000;
}
.grade-btn:hover {
    border-color: #edb572;
    background: unset;
}

.grade-btn:hover .grade-name{
    color: #edb572;
}
.grade-btn.selected {
    border-color: #edb572;
    background: #111111;
}

.grade-btn.selected .grade-name{
    color: #edb572;
}
.grade-btn .grade-name {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: #6e5a43;
    margin-bottom: 0;
}
.grade-btn .grade-desc {
    display: block;
    font-size: 12px;
    color: #999;
}
.custom_engraving-warp {
    position: relative;
}
.engraving-option input[type='text'] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #333;
    border-radius: 0;
    color: #fff;
    background: #000;
    font-size: 14px;
    box-sizing: border-box;
}
.engraving-option input[type='text']:focus {
    outline: none;
    border-color: #edb572;
}
.char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-top: 0;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.woocommerce-error, .woocommerce-info, .woocommerce-message {
    background: #1a1a1a;
    color: #ddd;
    margin-bottom: 1px;
}


.woocommerce-result-count,
.woocommerce-ordering {
    display: none !important;
}

.woocommerce ul.products.columns-3 li.product, .woocommerce-page ul.products.columns-3 li.product{
    width: auto;
    margin: 0;
    float: unset;
    border-radius: 0;
}

.woocommerce .products ul::after, .woocommerce .products ul::before, .woocommerce ul.products::after, .woocommerce ul.products::before {
    display: none;
}
.elementor-nav-menu--main .elementor-nav-menu ul {
    width: 100% !important;
}

.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) #respond input#submit.loading::after,.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) a.button.loading::after,.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) button.button.loading::after,.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) input.button.loading::after,:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce #respond input#submit.loading::after,:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce a.button.loading::after,:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce button.button.loading::after,:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce input.button.loading::after {
    position: unset !important;
}

.button.product_type_simple.add_to_cart_button.ajax_add_to_cart {
    display: flex;
    gap: 5px;
    align-items: center;
}

#customer_login h2 {
    margin-bottom: 0;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
}

#customer_login .woocommerce-form {
    margin-top:15px ;
}
.woocommerce form .show-password-input::before, .woocommerce-page form .show-password-input::before{
    filter: invert(1);
}


.woocommerce-form__input-checkbox {
    display: none;
}

.woocommerce-form__input-checkbox + span::before {
    content: '';
    display: inline-block;
    width: 18px; 
    height: 18px;
    border: 2px solid #333;
    background-color: #111;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 3px;
    transition: all 0.2s;
}

.woocommerce-form__input-checkbox:checked + span::before {
    background-color: #d3ab5a;
    border-color: #d3ab5a;
    content: '\2713';
    color: #fff;
    text-align: center;
    font-size: 14px;
    line-height: 18px;
}

.woocommerce-form-login__rememberme:hover .woocommerce-form__input-checkbox + span::before {
    border-color: #d3ab5a;
}

::-webkit-scrollbar { width:8px; }
::-webkit-scrollbar-track { background:#333; border-radius:0; }
::-webkit-scrollbar-thumb { background:#e0be70; border-radius:0; }
::-webkit-scrollbar-thumb:hover { background: #f0d699; }

@media (max-width: 1024px) {
    ul.products {
        grid-template-columns: repeat(3, 1fr);
    }
    
    ul.products.cols-5,
    ul.products.cols-6 {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .column-switcher .col-btn[data-cols="5"],
    .column-switcher .col-btn[data-cols="6"] {
        display: none;
    }
}

@media (max-width: 768px) {
    .cs-container{
        padding: 50px 0;
    }
    .shop-toolbar {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .filter-toggle-btn {
        order: 1;
    }
    
    .column-switcher {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .sort-dropdown {
        order: 2;
        margin-left: auto;
    }
    
    ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    ul.products.cols-4,
    ul.products.cols-5,
    ul.products.cols-6 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .column-switcher .col-btn[data-cols="4"],
    .column-switcher .col-btn[data-cols="5"],
    .column-switcher .col-btn[data-cols="6"] {
        display: none;
    }
    
    .filter-sidebar {
        width: 100%;
        left: -100%;
    }
}

@media (max-width: 480px) {
    .shop-container {
        padding: 0 15px 30px;
    }
    
    .woocommerce-products-header {
        padding: 20px 15px;
    }
    
    .woocommerce-products-header__title {
        font-size: 22px;
    }
    
    ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    ul.products.cols-1 {
        grid-template-columns: 1fr;
    }
    
    ul.products.cols-3,
    ul.products.cols-4,
    ul.products.cols-5,
    ul.products.cols-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .column-switcher .col-btn[data-cols="3"],
    .column-switcher .col-btn[data-cols="4"],
    .column-switcher .col-btn[data-cols="5"],
    .column-switcher .col-btn[data-cols="6"] {
        display: none;
    }
    
    li.product .woocommerce-loop-product__title {
        font-size: 13px;
        padding: 10px 10px 5px;
    }
    
    li.product .price {
        padding: 5px 10px 10px;
        font-size: 14px;
    }
    
    
    .sort-dropdown-btn {
        min-width: 140px;
        font-size: 13px;
        padding: 8px 12px;
    }
}
