@import url('https://unpkg.com/element-ui/lib/theme-chalk/index.css');

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    background-color: #f9fafb;
    color: #1f2937;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    box-sizing: border-box;
}

/* 顶部导航样式 */
.top-nav {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.top-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
}

.logo-circle {
    width: 36px;
    height: 36px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
}

.logo span {
    font-size: 20px;
    font-weight: 600;
}

.icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: color 0.3s;
}

.icon-btn:hover,
.icon-btn:focus {
    color: #FF6B00;
}

.icon {
    width: 24px;
    height: 24px;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #ff4444;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* 分类导航样式 */
.category-nav {
    background-color: #f8f9fa;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
    width: 100%;
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    z-index: 999;
}

.category-nav .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: flex;
    justify-content: center;
}

.category-nav .container::-webkit-scrollbar {
    display: none;
}

.category-nav ul {
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.category-nav li {
    display: inline-block;
    padding: 0 16px;
}

.category-nav a {
    text-decoration: none;
    color: #666;
    font-size: 15px;
    padding: 6px 0;
    position: relative;
    transition: all 0.3s ease;
    display: inline-block;
    font-weight: 500;
}

.category-nav a:hover,
.category-nav a.active,
.category-nav li.active a {
    color: #FF6B00;
}

.category-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #FF6B00;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-nav a:hover::after,
.category-nav a.active::after,
.category-nav li.active a::after {
    transform: scaleX(1);
}

/* 添加滚动渐变效果 */
.category-nav::before,
.category-nav::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    z-index: 1;
    pointer-events: none;
}

.category-nav::before {
    left: 0;
    background: linear-gradient(to right, #f8f9fa 20%, rgba(248, 249, 250, 0));
}

.category-nav::after {
    right: 0;
    background: linear-gradient(to left, #f8f9fa 20%, rgba(248, 249, 250, 0));
}

/* 主要内容 */
main {
    margin-top: 120px;
    padding: 20px 0;
    min-height: calc(100vh - 120px);
}

.content-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

/* 商品网格布局 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
    margin: 0 auto;
}

/* 搜索结果中的商品网格 */
#products-container .products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* 商品卡片 */
.product-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.product-image {
    position: relative;
    padding-bottom: 100%;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f3f4f6;
    cursor: zoom-in;
}

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

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

.product-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: auto;
    padding: 1rem 0;
    width: 100%;
}

.product-category {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-id {
    color: #f97316;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.add-to-cart {
    background: #f97316;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    max-width: 200px;
}

.add-to-cart:hover {
    background: #ea580c;
    transform: translateY(-1px);
}

.add-to-cart.in-cart {
    background: #059669;
    pointer-events: none;
}

.add-to-cart.in-cart:hover {
    background: #059669;
    transform: none;
}

/* 页脚 */
footer {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-section h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #6b7280;
}

/* 分页容器样式 */
.pagination-container {
    width: 1020px;
    margin-top: 3rem;
    padding: 1.5rem 0;
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.page-btn {
    border: 1px solid #e5e7eb;
    background: white;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    color: #4b5563;
    transition: all 0.2s;
}

.page-btn:not(:disabled):hover {
    border-color: #f97316;
    color: #f97316;
}

.page-btn:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.page-input {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #4b5563;
    font-size: 0.875rem;
}

.page-number {
    width: 3.5rem;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.page-number:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

.page-total {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Element UI 按钮样式覆盖 */
.el-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
    border: 1px solid #dcdfe6;
    background-color: #fff;
    color: #606266;
    cursor: pointer;
    transition: all 0.3s;
}

.el-button:hover:not(.is-disabled) {
    color: #f97316;
    border-color: #f97316;
    background-color: #fff;
}

.el-button.is-disabled {
    background-color: #f5f7fa;
    border-color: #e4e7ed;
    color: #c0c4cc;
    cursor: not-allowed;
}

/* 分页输入框样式 */
.el-pagination__editor {
    width: 3rem;
    margin: 0 0.5rem;
    padding: 0.25rem;
    text-align: center;
    border: 1px solid #dcdfe6;
    border-radius: 0.25rem;
    outline: none;
}

.el-pagination__editor:focus {
    border-color: #f97316;
}

.el-pagination__total {
    color: #606266;
}

.el-pagination__jump {
    color: #606266;
    margin: 0 1rem;
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .products-grid,
    #products-container .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .pagination-container {
        width: 985px;
    }
}

@media (max-width: 900px) {
    .products-grid,
    #products-container .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .category-nav ul {
        gap: 1.5rem;
    }
    .category-nav .container {
        padding: 0 1rem;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 16px;
    }
    .products-grid,
    #products-container .products-grid {
        grid-template-columns: 1fr;
    }
    .category-nav a {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    .category-nav ul {
        gap: 1rem;
    }
    .add-to-cart {
        padding: 10px 20px;
        font-size: 14px;
    }
    .logo-circle {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }
    .logo span {
        font-size: 1rem;
    }
    .pagination-container {
        width: auto;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .search-input {
        width: 120px;
    }
    .search-input:focus {
        width: 140px;
    }
    .icons {
        gap: 8px;
    }
    .category-nav {
        padding: 8px 0;
        top: 60px;
    }
    .category-nav .container {
        justify-content: flex-start;
    }
    .category-nav ul {
        justify-content: flex-start;
        padding: 0 12px;
        width: auto;
    }
    .category-nav li {
        padding: 0 10px;
    }
    .category-nav a {
        font-size: 14px;
        padding: 4px 0;
    }
    .category-nav::before,
    .category-nav::after {
        width: 20px;
    }
    main {
        margin-top: 110px;
    }
}

@media (max-width: 480px) {
    .search-input {
        width: 100px;
    }
    .search-input:focus {
        width: 120px;
    }
    .category-nav ul {
        padding: 0 8px;
    }
    .category-nav li {
        padding: 0 8px;
    }
    .category-nav a {
        font-size: 13px;
        padding: 3px 0;
    }
    main {
        margin-top: 100px;
    }
}

/* 加载中效果 */
.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

/* 错误提示 */
.error-message {
    text-align: center;
    padding: 2rem;
    color: #ef4444;
    background: #fee2e2;
    border-radius: 0.5rem;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
}

.page-btn {
    background: #f97316;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: #ea580c;
}

.page-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.page-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-number {
    width: 3rem;
    padding: 0.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    text-align: center;
}

.page-number::-webkit-inner-spin-button,
.page-number::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.page-number:focus {
    outline: none;
    border-color: #f97316;
}

/* 购物车图标样式 */
.cart-icon {
    position: relative;
}

.icon-btn.cart-icon {
    text-decoration: none;
    color: inherit;
}

.icon-btn.cart-icon:hover,
.icon-btn.cart-icon:focus {
    color: #FF6B00;
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: #f97316;
    color: white;
    font-size: 12px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    transform: translate(25%, -25%);
}

/* 购物车页面样式 */
.cart-page {
    background-color: #f5f7fa;
    min-height: 100vh;
}

.cart-header {
    text-align: center;
    padding: 2.5rem 0 2rem;
    margin-bottom: 2rem;
}

.cart-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.cart-description {
    color: #6b7280;
    font-size: 1.125rem;
}

.cart-content {
    background: white;
    border-radius: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 2rem;
}

.cart-table {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cart-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.cart-table th {
    background: #f8fafc;
    color: #374151;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 1.25rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.cart-table td {
    padding: 1.5rem;
    vertical-align: middle;
    border-bottom: 1px solid #e5e7eb;
}

.cart-table tr:last-child td {
    border-bottom: none;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f3f4f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.cart-item-image:hover img {
    transform: scale(1.05);
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 2rem;
}

.cart-item-category {
    color: #6b7280;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.cart-item-id {
    color: #1f2937;
    font-weight: 600;
    font-size: 1.125rem;
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    width: 140px;
    gap: 4px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}

.quantity-btn:hover {
    border-color: #FF6B00;
    color: #FF6B00;
    background: #fff8f3;
}

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-input {
    width: 60px;
    height: 32px;
    text-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    font-size: 15px;
    color: #1f2937;
    font-weight: 500;
    padding: 0;
    -moz-appearance: textfield;
    -webkit-appearance: none;
    margin: 0;
}

.quantity-input:focus {
    outline: none;
    border-color: #FF6B00;
    box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.1);
}

.quantity-input::-webkit-inner-spin-button,
.quantity-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 移动端样式优化 */
@media (max-width: 768px) {
    .quantity-control {
        width: 120px;
        padding: 3px;
        gap: 3px;
    }

    .quantity-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .quantity-input {
        width: 50px;
        height: 28px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .quantity-control {
        width: 110px;
        padding: 2px;
        gap: 2px;
    }

    .quantity-btn {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }

    .quantity-input {
        width: 46px;
        height: 26px;
        font-size: 13px;
    }
}

/* 表格中的数量列样式 */
.cart-table td:nth-child(3) {
    width: 160px;
    min-width: 160px;
}

@media (max-width: 768px) {
    .cart-table td:nth-child(3) {
        width: 140px;
        min-width: 140px;
    }
}

@media (max-width: 480px) {
    .cart-table td:nth-child(3) {
        width: 120px;
        min-width: 120px;
    }
}

.cart-footer {
    border-top: 1px solid #e5e7eb;
    padding: 2rem;
    background: #f8fafc;
}

.cart-summary {
    margin-bottom: 2rem;
}

.summary-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
    color: #1f2937;
    font-size: 1.125rem;
}

.summary-label {
    color: #4b5563;
}

.summary-value {
    font-weight: 600;
    color: #FF6B00;
    font-size: 1.25rem;
}

.cart-actions {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-top: 16px;
    justify-content: flex-end;
}

.cart-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

/* 清空商品按钮 */
.cart-actions .clear-cart {
    background-color: #FEF2F2;
    border-color: #FECACA;
    color: #EF4444;
}

.cart-actions .clear-cart:hover {
    background-color: #FEE2E2;
    border-color: #EF4444;
    color: #DC2626;
}

.cart-actions .clear-cart svg {
    color: #EF4444;
}

/* 复制链接按钮 */
.cart-actions .copy-link {
    background-color: #EFF6FF;
    border-color: #BFDBFE;
    color: #3B82F6;
}

.cart-actions .copy-link:hover {
    background-color: #DBEAFE;
    border-color: #3B82F6;
    color: #2563EB;
}

.cart-actions .copy-link svg {
    color: #3B82F6;
}

/* 更新收藏夹按钮 */
.cart-actions .update-cart {
    background-color: #FFF7ED;
    border-color: #FFEDD5;
    color: #F97316;
}

.cart-actions .update-cart:hover {
    background-color: #FFEDD5;
    border-color: #F97316;
    color: #EA580C;
}

.cart-actions .update-cart svg {
    color: #F97316;
}

/* 分享链接按钮 */
.cart-actions .checkout-btn {
    background-color: #F0FDF4;
    border-color: #DCFCE7;
    color: #22C55E;
}

.cart-actions .checkout-btn:hover {
    background-color: #DCFCE7;
    border-color: #22C55E;
    color: #16A34A;
}

.cart-actions .checkout-btn svg {
    color: #22C55E;
}

.cart-actions button:active {
    transform: scale(0.98);
}

.cart-actions svg {
    width: 18px;
    height: 18px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .cart-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cart-actions button {
        width: 100%;
        min-width: unset;
        justify-content: center;
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .cart-actions button {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* 更新产品信息间距 */
.product-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.add-to-cart-btn {
    background-color: #f97316;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 8px;
    transition: background-color 0.3s;
}

.add-to-cart-btn:hover {
    background-color: #ea580c;
}

.cart-summary {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    margin: 1rem 0;
    text-align: right;
}

.cart-total-items {
    font-size: 1rem;
    color: #374151;
    font-weight: 500;
}

.cart-total-items span {
    color: #f97316;
    font-weight: 600;
    margin: 0 0.25rem;
}

/* 移除输入框上下小按钮 */
.quantity-input::-webkit-inner-spin-button,
.quantity-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-input {
    -moz-appearance: textfield;
}

/* 商品按钮容器 */
.product-buttons {
    display: flex;
    gap: 0.5rem;
    /* width: 100%; */
    max-width: 200px;
    margin: 0 auto;
}

.continue-add-btn,
.remove-from-cart-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.continue-add-btn {
    background: #f97316;
    color: white;
}

.continue-add-btn:hover {
    background: #ea580c;
    transform: translateY(-1px);
}

.remove-from-cart-btn {
    background: #ef4444;
    color: white;
}

.remove-from-cart-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* 购物车数量控制样式 */
.cart-info {
    text-align: center;
    width: 100%;
    margin-top: 10px;
}

.cart-quantity-text {
    color: #666;
    font-size: 14px;
    margin: 5px 0;
}

.quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f8f8;
    padding: 5px;
    border-radius: 4px;
    width: fit-content;
    margin: 0 auto;
}

.quantity-btn {
    width: 24px;
    height: 24px;
    background-color: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background-color: #f0f0f0;
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 0 5px;
    padding: 2px 5px;
    font-size: 14px;
}

.quantity-input::-webkit-inner-spin-button,
.quantity-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* 搜索结果中的商品卡片样式 */
.search-results .product-card {
    position: relative;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin: 10px;
    width: 200px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.search-results .product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.search-results .product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

.search-results .product-card h3 {
    margin: 10px 0;
    font-size: 16px;
    color: #333;
}

.search-results .product-card .price {
    color: #e44d26;
    font-size: 18px;
    font-weight: bold;
    margin: 5px 0;
}

.search-results .product-card .category {
    color: #666;
    font-size: 14px;
    margin: 5px 0;
}

.search-results .product-card .product-code {
    color: #999;
    font-size: 12px;
    margin: 5px 0;
}

.search-results .product-card button {
    width: 100%;
    padding: 8px;
    margin-top: 10px;
    border: none;
    border-radius: 4px;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-results .product-card button:hover {
    background-color: #45a049;
}

.search-results .product-card button.remove {
    background-color: #f44336;
}

.search-results .product-card button.remove:hover {
    background-color: #da190b;
}

.search-results .product-card button.continue {
    background-color: #2196F3;
}

.search-results .product-card button.continue:hover {
    background-color: #0b7dda;
}

/* 搜索相关样式 */
.search-container {
    display: flex;
    align-items: center;
    position: relative;
}

.search-input {
    width: 160px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    right: 100%;
    margin-right: 8px;
}

.search-input.active {
    opacity: 1;
    visibility: visible;
}

.search-input:focus {
    width: 180px;
    border-color: #FF6B00;
    box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.1);
}

.search-icon {
    cursor: pointer;
    z-index: 2;
}

.no-results {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}

/* 提示弹窗样式 */
.toast-notification {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translate(-50%, 100%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.toast-notification.show {
    transform: translate(-50%, 0);
    opacity: 1;
    visibility: visible;
}

.toast-notification .icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast-notification.success .icon {
    stroke: #10B981;  /* 成功状态的绿色 */
}

.toast-notification.warning .icon {
    stroke: #F59E0B;  /* 警告状态的黄色 */
}

.toast-notification .message {
    color: #1F2937;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

/* 确保提示在移动端也能正确显示 */
@media (max-width: 768px) {
    .toast-notification {
        bottom: 16px;
        padding: 10px 20px;
        max-width: 90%;
        font-size: 13px;
    }
    
    .toast-notification .icon {
        width: 18px;
        height: 18px;
    }
    
    .toast-notification .message {
        font-size: 13px;
    }
}

/* 搜索结果页面样式 */
.search-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 24px;
    text-align: center;
}

.search-header h1 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.search-info {
    display: flex;
    justify-content: center;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.search-query {
    color: #f97316;
    font-weight: 500;
}

.search-count {
    color: #666;
}

.no-results {
    text-align: center;
    padding: 3rem 0;
    color: #666;
    font-size: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

#loading-spinner {
    text-align: center;
    padding: 3rem 0;
    color: #666;
    max-width: 1200px;
    margin: 0 auto;
}

#products-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    padding: 24px 0;
}  */

/* 移动端响应式布局 */
@media (max-width: 768px) {
    .cart-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .cart-table table {
        min-width: 600px;
    }

    .cart-table th:nth-child(1),
    .cart-table td:nth-child(1) {
        width: 80px;
    }

    .cart-table th:nth-child(2),
    .cart-table td:nth-child(2) {
        min-width: 120px;
    }

    .cart-table th:nth-child(3),
    .cart-table td:nth-child(3) {
        width: 100px;
    }

    .cart-table th:nth-child(4),
    .cart-table td:nth-child(4) {
        width: 60px;
    }
}

@media (max-width: 480px) {
    .cart-table table {
        min-width: 480px;
    }

    .cart-table th,
    .cart-table td {
        padding: 0.75rem;
    }

    .cart-table th:nth-child(1),
    .cart-table td:nth-child(1) {
        width: 70px;
    }

    .cart-table th:nth-child(2),
    .cart-table td:nth-child(2) {
        min-width: 100px;
    }

    .cart-table th:nth-child(3),
    .cart-table td:nth-child(3) {
        width: 90px;
    }

    .cart-table th:nth-child(4),
    .cart-table td:nth-child(4) {
        width: 50px;
    }
}

.remove-item {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FEE2E2;
    border: 1px solid #EF4444;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.remove-item:hover {
    background: #FEE2E2;
    border-color: #EF4444;
}

.remove-item:active {
    transform: scale(0.95);
}

.remove-item .icon {
    width: 20px;
    height: 20px;
    color: #EF4444;
    transition: color 0.2s ease;
}

.remove-item:hover .icon {
    color: #DC2626;
}

@media (max-width: 768px) {
    .remove-item {
        width: 32px;
        height: 32px;
    }

    .remove-item .icon {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .remove-item {
        width: 28px;
        height: 28px;
    }

    .remove-item .icon {
        width: 16px;
        height: 16px;
    }
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.logo-link:hover {
    transform: scale(1.02);
}

/* 图片预览样式 */
.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: zoom-out;
}

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

.preview-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.image-preview-overlay.active .preview-image {
    transform: scale(1);
}

.zoomable-image {
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.zoomable-image:hover {
    transform: scale(1.05);
}

/* 确认弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.confirm-modal {
    background: white;
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .confirm-modal {
    transform: scale(1);
}

.confirm-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.confirm-modal-header .icon {
    width: 24px;
    height: 24px;
    color: #EF4444;
}

.confirm-modal-header .title {
    font-size: 18px;
    font-weight: 600;
    color: #1F2937;
}

.confirm-modal-content {
    color: #4B5563;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.confirm-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.confirm-modal-actions button {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-modal-actions .cancel-btn {
    background-color: #F3F4F6;
    border: 1px solid #E5E7EB;
    color: #4B5563;
}

.confirm-modal-actions .cancel-btn:hover {
    background-color: #E5E7EB;
    border-color: #D1D5DB;
}

.confirm-modal-actions .confirm-btn {
    background-color: #EF4444;
    border: 1px solid #EF4444;
    color: white;
}

.confirm-modal-actions .confirm-btn:hover {
    background-color: #DC2626;
    border-color: #DC2626;
}

.confirm-modal-actions button:active {
    transform: scale(0.98);
}

@media (max-width: 480px) {
    .confirm-modal {
        padding: 20px;
    }
    
    .confirm-modal-header .title {
        font-size: 16px;
    }
    
    .confirm-modal-content {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    .confirm-modal-actions button {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* 空购物车样式 */
.empty-cart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-cart-icon {
    width: 64px;
    height: 64px;
    color: #9CA3AF;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

.empty-cart-text {
    color: #6B7280;
    font-size: 16px;
    margin-bottom: 24px;
}

.go-shopping-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #FF6B00;
    color: white;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(255, 107, 0, 0.2);
}

.go-shopping-btn:hover {
    background-color: #FF5500;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(255, 107, 0, 0.25);
}

.go-shopping-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 107, 0, 0.2);
}

.go-shopping-btn .icon {
    width: 20px;
    height: 20px;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .empty-cart-container {
        padding: 36px 20px;
    }

    .empty-cart-icon {
        width: 56px;
        height: 56px;
    }

    .empty-cart-text {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .go-shopping-btn {
        padding: 10px 20px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .empty-cart-container {
        padding: 32px 16px;
    }

    .empty-cart-icon {
        width: 48px;
        height: 48px;
    }

    .empty-cart-text {
        font-size: 14px;
        margin-bottom: 16px;
    }

    .go-shopping-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* 返回顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color, #ff6b00);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--primary-color-dark, #e65c00);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* 移动设备适配 */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 36px;
        height: 36px;
    }
    
    .back-to-top svg {
        width: 18px;
        height: 18px;
    }
}