/* ============================================
   搜索结果页面样式 - search_goods.css
   版本: 1.0
   更新时间: 2026-07-06
   ============================================ */

/* 搜索页面包装器 */
.search-page-wrapper {
    min-height: 100vh;
}

/* 容器 */
.search-container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    background-color: #ffffff;
}

/* ============================================
   面包屑 + 搜索标题区域
   ============================================ */
.search-header {
    padding: 24px 0 32px;
}

.search-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #a3a3a3;
    margin-bottom: 20px;
}

.search-breadcrumb a {
    color: #737373;
    transition: color 0.15s ease;
}

.search-breadcrumb a:hover {
    color: #d92121;
}

.search-breadcrumb .separator {
    font-size: 11px;
    color: #d4d4d4;
}

.search-breadcrumb .current {
    color: #404040;
    font-weight: 500;
}

.search-title-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.search-title {
    font-size: 26px;
    font-weight: 700;
    color: #171717;
    letter-spacing: -0.5px;
}

.search-keyword {
    color: #d92121;
}

.search-count {
    font-size: 14px;
    color: #a3a3a3;
    font-weight: 400;
}

/* ============================================
   排序栏 - Sort Bar
   ============================================ */
.search-sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.search-sort-options {
    display: flex;
    align-items: center;
    gap: 4px;
}

.search-sort-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #525252;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    position: relative;
}

.search-sort-btn:hover {
    color: #d92121;
    background: #fef2f2;
}

.search-sort-btn.active {
    color: #d92121;
    font-weight: 600;
    background: #fef2f2;
}

.search-sort-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: #d92121;
    border-radius: 1px;
}

.search-sort-icon {
    width: 12px;
    height: 12px;
    margin-left: 3px;
    fill: currentColor;
}

.search-sort-divider {
    width: 1px;
    height: 20px;
    background: #e5e5e5;
    margin: 0 8px;
}

/* 价格区间 */
.search-price-range {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #525252;
}

.search-price-input {
    width: 80px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 13px;
    color: #262626;
    transition: border-color 0.15s ease;
}

.search-price-input:focus {
    outline: none;
    border-color: #d92121;
}

.search-price-sep {
    color: #a3a3a3;
}

.search-price-confirm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 14px;
    background: #d92121;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.search-price-confirm:hover {
    background: #c41e1e;
}

/* 排序栏右侧 */
.search-sort-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-sort-meta {
    font-size: 13px;
    color: #a3a3a3;
}

.search-sort-meta strong {
    color: #d92121;
    font-weight: 600;
}

/* ============================================
   商品网格 - Goods Grid
   ============================================ */
.search-goods-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

/* ============================================
   商品卡片 - Goods Card
   ============================================ */
.search-goods-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5e5e5;
    overflow: hidden;
    text-decoration: none;
    display: block;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-goods-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(217, 33, 33, 0.15);
    border-color: rgba(217, 33, 33, 0.3);
}

/* 图片容器 */
.search-card-img-wrapper {
    width: 100%;
    padding-top: 100%;
    position: relative;
    background-color: #f5f5f5;
    overflow: hidden;
}

.search-card-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-goods-card:hover .search-card-img-wrapper img {
    transform: scale(1.05);
}

/* 图片遮罩层 */
.search-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 40%, rgba(217, 33, 33, 0.7) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-card-overlay span {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transform: translateY(10px);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-goods-card:hover .search-card-overlay {
    opacity: 1;
}

.search-goods-card:hover .search-card-overlay span {
    transform: translateY(0);
}

/* 卡片文字区域 */
.search-card-text {
    padding: 12px 16px 16px;
}

.search-card-name {
    font-size: 14px;
    font-weight: 500;
    color: #262626;
    line-height: 1.5;
    transition: color 0.15s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
    margin-bottom: 8px;
}

.search-goods-card:hover .search-card-name {
    color: #d92121;
}

.search-card-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.search-card-price {
    font-size: 18px;
    font-weight: 700;
    color: #d92121;
    line-height: 1.2;
}

.search-card-price .price-symbol {
    font-size: 12px;
    font-weight: 600;
}

.search-card-price-original {
    font-size: 12px;
    color: #a3a3a3;
    text-decoration: line-through;
}

/* ============================================
   分页器 - Pagination
   ============================================ */
.search-pagination {
    display: flex;
    justify-content: center;
    padding: 24px 0 40px;
}

.search-pagination-inner {
    display: flex;
    align-items: center;
    gap: 4px;
}

.search-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 14px;
    color: #525252;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.search-page-btn:hover {
    color: #d92121;
    border-color: #d92121;
}

.search-page-btn.active {
    color: #ffffff;
    background: #d92121;
    border-color: #d92121;
}

.search-page-btn.disabled {
    color: #a3a3a3;
    background: #f5f5f5;
    border-color: #e5e5e5;
    cursor: not-allowed;
}

/* 分页跳转区域 - "到X页 确定" */
.search-pagination-inner .pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.search-pagination-inner .pagination > li {
    display: flex;
    align-items: center;
}

.search-pagination-inner .pagination > li > a,
.search-pagination-inner .pagination > li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 14px;
    color: #525252;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.15s ease;
    margin: 0;
    line-height: 1;
}

.search-pagination-inner .pagination > li > a:hover {
    color: #d92121;
    border-color: #d92121;
}

.search-pagination-inner .pagination > li.active > a,
.search-pagination-inner .pagination > li.active > span {
    color: #ffffff;
    background: #d92121;
    border-color: #d92121;
}

.search-pagination-inner .pagination > li.disabled > a,
.search-pagination-inner .pagination > li.disabled > span {
    color: #a3a3a3;
    background: #f5f5f5;
    border-color: #e5e5e5;
    cursor: not-allowed;
}

/* 跳转到哪页 - "到 ___ 页 确定" */
.search-pagination-inner .pagination > li:last-child > div {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
}

.search-pagination-inner .pagination > li:last-child span {
    color: #737373;
    font-size: 14px;
}

.search-pagination-inner .pagination > li:last-child input {
    width: 48px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 13px;
    color: #262626;
    text-align: center;
    transition: border-color 0.15s ease;
}

.search-pagination-inner .pagination > li:last-child input:focus {
    outline: none;
    border-color: #d92121;
}

.search-pagination-inner .pagination > li:last-child a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 14px;
    background: #d92121;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.15s ease;
    white-space: nowrap;
    text-decoration: none;
}

.search-pagination-inner .pagination > li:last-child a.btn:hover {
    background: #c41e1e;
}

/* ============================================
   猜你喜欢 - Guess You Like
   ============================================ */
.search-guess-section {
    padding: 32px 0;
    border-top: 1px solid #e5e5e5;
}

.search-guess-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: #171717;
    margin-bottom: 20px;
}

.search-guess-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: #d92121;
    border-radius: 2px;
}

/* ============================================
   底部服务保障
   ============================================ */
.search-footer-info {
    background: #ffffff;
    border-top: 1px solid #e5e5e5;
    padding: 32px 0;
    margin-top: 40px;
}

.search-footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    max-width: 800px;
    margin: 0 auto;
}

.search-footer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.search-footer-icon {
    width: 36px;
    height: 36px;
    background: #fef2f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-footer-icon svg {
    width: 18px;
    height: 18px;
    fill: #d92121;
}

.search-footer-text {
    font-size: 13px;
    color: #737373;
    font-weight: 500;
}

/* ============================================
   空搜索结果 - Empty State
   ============================================ */
.search-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 56px 24px 64px;
    text-align: center;
}

.search-empty-illustration {
    width: 180px;
    height: 180px;
    margin-bottom: 24px;
}

.search-empty-illustration svg {
    width: 100%;
    height: 100%;
}

.search-empty-title {
    font-size: 22px;
    font-weight: 700;
    color: #171717;
    margin: 0 0 8px;
    letter-spacing: -0.3px;
}

.search-empty-desc {
    font-size: 14px;
    color: #737373;
    margin: 0 0 28px;
    line-height: 1.6;
}

.search-empty-keyword {
    color: #d92121;
    font-style: normal;
    font-weight: 600;
}

.search-empty-tips {
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 16px 28px;
    margin-bottom: 32px;
    text-align: left;
    max-width: 420px;
    width: 100%;
}

.search-empty-tips-title {
    font-size: 13px;
    font-weight: 600;
    color: #525252;
    display: block;
    margin-bottom: 8px;
}

.search-empty-tips-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.search-empty-tips-list li {
    font-size: 13px;
    color: #737373;
    line-height: 1.8;
    position: relative;
    padding-left: 14px;
}

.search-empty-tips-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 5px;
    height: 5px;
    background: #d92121;
    border-radius: 50%;
    opacity: 0.45;
}

.search-empty-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-empty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1;
    border: none;
    white-space: nowrap;
}

.search-empty-btn:focus-visible {
    outline: 2px solid #d92121;
    outline-offset: 2px;
}

.search-empty-btn-primary {
    background: #d92121;
    color: #ffffff;
}

.search-empty-btn-primary:hover {
    background: #c41e1e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 33, 33, 0.25);
}

.search-empty-btn-outline {
    background: #ffffff;
    color: #525252;
    border: 1px solid #e5e5e5;
}

.search-empty-btn-outline:hover {
    color: #d92121;
    border-color: #d92121;
    background: #fef2f2;
}

/* ============================================
   响应式适配
   ============================================ */
@media (max-width: 1200px) {
    .search-container {
        width: 100%;
        max-width: 1200px;
    }
    
    .search-goods-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .search-goods-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .search-sort-bar {
        flex-wrap: wrap;
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .search-goods-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .search-title {
        font-size: 22px;
    }
    
    .search-sort-options {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .search-container {
        padding: 0 12px;
    }
    
    .search-goods-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .search-card-text {
        padding: 10px 12px;
    }
    
    .search-card-name {
        font-size: 13px;
    }

    .search-empty-state {
        padding: 40px 16px 48px;
    }

    .search-empty-illustration {
        width: 140px;
        height: 140px;
    }

    .search-empty-title {
        font-size: 18px;
    }

    .search-empty-tips {
        padding: 14px 20px;
    }

    .search-empty-actions {
        flex-direction: column;
        width: 100%;
        max-width: 240px;
    }

    .search-empty-btn {
        width: 100%;
    }
}
