/* Hero Section */
.hero {
    height: 40vh;
    min-height: 300px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    overflow: hidden;
    padding-top: 80px;
    box-sizing: border-box;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(196, 22, 28, 0.8) 0%, rgba(249, 168, 37, 0.8) 100%);
    z-index: 1;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.7);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-text-wrapper {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 64px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-subtitle {
    font-size: 24px;
    margin-bottom: 40px;
    color: #fff;
    opacity: 0.95;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Hero */
@media (max-width: 768px) {
    .hero {
        height: 50vh;
        min-height: 280px;
    }
    
    .hero-title {
        font-size: 38px;
        margin-bottom: 16px;
    }
    
    .hero-subtitle {
        font-size: 18px;
        margin-bottom: 32px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
}

/* Shop Links Section */
.shop-links-section {
    background: #fff;
}

.shop-links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.shop-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 20px;
    background: var(--bg-light);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.shop-link-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
    background: #fff;
}

.shop-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    margin-bottom: 16px;
}

.shop-icon.taobao {
    background: linear-gradient(135deg, #FF5000, #FF7A00);
}

.shop-icon.tmall {
    background: linear-gradient(135deg, #FF0036, #FF4D6A);
}

.shop-icon.jd {
    background: linear-gradient(135deg, #E2231A, #FF4B4B);
}

.shop-icon.pdd {
    background: linear-gradient(135deg, #E02E24, #FF6B5A);
}

.shop-icon.douyin {
    background: linear-gradient(135deg, #010101, #333333);
}

.shop-icon.kuaishou {
    background: linear-gradient(135deg, #FF4906, #FF7A45);
}

.shop-icon.wxvideo {
    background: linear-gradient(135deg, #FA9D3B, #FFBB5C);
}

.shop-info {
    flex: 1;
    min-width: 0;
}

.shop-info h4 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.shop-info p {
    font-size: 13px;
    color: var(--text-gray);
}

.shop-link-card:hover .shop-info h4 {
    color: var(--primary-color);
}

/* Shop Modal */
.shop-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.shop-modal.active {
    display: flex;
}

.shop-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.shop-modal-content {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.shop-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-light);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    transition: all 0.3s ease;
}

.shop-modal-close:hover {
    background: var(--primary-color);
    color: #fff;
}

.shop-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.shop-modal-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #fff;
}

.shop-modal-icon.taobao { background: linear-gradient(135deg, #FF5000, #FF7A00); }
.shop-modal-icon.tmall { background: linear-gradient(135deg, #FF0036, #FF4D6A); }
.shop-modal-icon.jd { background: linear-gradient(135deg, #E2231A, #FF4B4B); }
.shop-modal-icon.pdd { background: linear-gradient(135deg, #E02E24, #FF6B5A); }
.shop-modal-icon.douyin { background: linear-gradient(135deg, #010101, #333333); }
.shop-modal-icon.kuaishou { background: linear-gradient(135deg, #FF4906, #FF7A45); }
.shop-modal-icon.wxvideo { background: linear-gradient(135deg, #FA9D3B, #FFBB5C); }

.shop-modal-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-dark);
}

.shop-modal-body {
    text-align: center;
}

.shop-modal-qrcode {
    margin-bottom: 24px;
}

.shop-modal-qrcode img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.shop-modal-qrcode p {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-gray);
}

.shop-modal-link {
    margin-bottom: 20px;
    text-align: left;
}

.shop-modal-link label {
    display: block;
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.link-copy-wrapper {
    display: flex;
    gap: 8px;
}

.link-copy-wrapper input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-dark);
    background: var(--bg-light);
    outline: none;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #a81118;
}

.copy-success {
    display: none;
    font-size: 13px;
    color: #07C160;
    margin-top: 8px;
}

.copy-success.show {
    display: block;
}

.shop-modal-visit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.shop-modal-visit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(196, 22, 28, 0.3);
}

/* Dark Mode - Shop Modal */
[data-theme="dark"] .shop-modal-content {
    background: #1e1e1e;
}

[data-theme="dark"] .shop-modal-close {
    background: #333;
}

[data-theme="dark"] .link-copy-wrapper input {
    background: #333;
    border-color: #444;
}

@media (max-width: 480px) {
    .shop-modal-content {
        padding: 32px 24px;
    }
    
    .shop-modal-qrcode img {
        width: 150px;
        height: 150px;
    }
    
    .link-copy-wrapper {
        flex-direction: column;
    }
    
    .copy-btn {
        justify-content: center;
    }
}

/* Shop Links Responsive */
@media (max-width: 1024px) {
    .shop-links-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .shop-links-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .shop-link-card {
        padding: 24px 16px;
    }
    
    .shop-icon {
        width: 52px;
        height: 52px;
    }
    
    .shop-icon svg {
        width: 26px;
        height: 26px;
    }
    
    .shop-info h4 {
        font-size: 14px;
    }
    
    .shop-info p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .shop-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dark Mode - Shop Links */
[data-theme="dark"] .shop-links-section {
    background: #121212;
}

[data-theme="dark"] .shop-link-card {
    background: #1e1e1e;
}

[data-theme="dark"] .shop-link-card:hover {
    background: #252525;
}

/* Search & Filter */
.search-wrapper {
    max-width: 100%;
    margin: 0 0 40px 0;
    padding: 0;
}

.search-box {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
}

.search-box input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    border-color: var(--primary-color);
}

.search-btn {
    padding: 14px 32px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #a81118;
}

.filter-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 10px 24px;
    border: 2px solid var(--border-color);
    background: #fff;
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-tag.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* Products List Section */
.products-list-section {
    padding: 80px 0 60px;
    background: var(--bg-light);
}

.products-list-section.section {
    padding: 30px 0 60px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 0;
}

.product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.product-card:hover::before {
    left: 100%;
}

.product-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-card:hover .product-info h3 {
    color: var(--primary-color);
}

.product-card:hover .product-specs span {
    background: rgba(196, 22, 28, 0.1);
    color: var(--primary-color);
}

.product-image {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 220px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    z-index: 1;
}

.product-image img.error {
    display: none;
}

.product-image img.loading {
    opacity: 0;
}

.product-image img.loaded {
    opacity: 1;
}

/* 占位符样式 */
.product-image .placeholder-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: rgba(255, 255, 255, 0.8);
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image .placeholder-text::before {
    content: '📦';
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    background: var(--primary-color);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(196, 22, 28, 0.3);
}

.product-info {
    padding: 20px;
    position: relative;
    z-index: 1;
    background: #fff;
}

.product-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.product-info > p {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 12px;
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-specs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.product-specs span {
    padding: 4px 10px;
    background: var(--bg-light);
    color: var(--text-gray);
    font-size: 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-buy {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(196, 22, 28, 0.2);
}

.btn-buy:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(196, 22, 28, 0.3);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 48px;
    padding: 0 20px;
}

.page-btn {
    min-width: 48px;
    height: 48px;
    padding: 0 18px;
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .page-banner {
        height: 240px;
    }

    .banner-content h1 {
        font-size: 32px;
    }

    .banner-content p {
        font-size: 16px;
    }

    .search-box {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
    }

    .filter-tags {
        justify-content: center;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .product-image {
        min-height: 140px;
    }

    .product-info {
        padding: 12px;
    }

    /* 产品卡片手机端优化 */
    .btn-buy {
        padding: 6px 12px;
        font-size: 12px;
    }

    .product-price {
        font-size: 18px;
    }

    .product-info h3 {
        font-size: 14px;
    }

    .product-info > p {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .product-specs {
        margin-bottom: 10px;
    }

    .product-specs span {
        padding: 2px 6px;
        font-size: 10px;
    }

    /* 手机端分页按钮优化 */
    .prev-page,
    .next-page {
        min-width: 44px;
        height: 44px;
        padding: 0;
    }

    .prev-page svg,
    .next-page svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 暗色模式适配 */
[data-theme="dark"] .search-section {
    background: #1a1a1a;
}

[data-theme="dark"] .search-box input {
    background: #1e1e1e;
    border-color: var(--border-color);
    color: var(--text-dark);
}

[data-theme="dark"] .filter-tag {
    background: #1e1e1e;
    border-color: var(--border-color);
}

[data-theme="dark"] .products-list-section {
    background: #121212;
}

[data-theme="dark"] .product-card {
    background: #1e1e1e;
}

[data-theme="dark"] .product-card:hover {
    background: #252525;
}

[data-theme="dark"] .product-specs span {
    background: #252525;
}

[data-theme="dark"] .page-btn {
    background: #1e1e1e;
    border-color: var(--border-color);
}
