/* 
 * 靴下専科 Styles v2.0 
 * Last updated: 2025-07-27 22:36 
 * Cache buster: <?php echo time(); ?>
 */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header 样式 */
.header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: 2px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: #007bff;
}

.cart-count {
    background: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    min-width: 20px;
    text-align: center;
}

.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Category Filter Section */
.category-filter {
    background: white;
    padding: 2rem 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 2rem;
}

.category-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.category-btn {
    padding: 0.8rem 2rem;
    border: 2px solid #e9ecef;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    justify-content: center;
}

.category-btn:hover {
    border-color: #007bff;
    color: #007bff;
    background: #f8f9ff;
}

.category-btn.active {
    border-color: #007bff;
    background: #007bff;
    color: white;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 0;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    letter-spacing: 3px;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Products Grid */
.products-section {
    margin-bottom: 3rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 电脑端固定4列 */
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

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

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

.sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #dc3545;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 2;
}

.official-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff6b35;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
}

.limited-badge {
    position: absolute;
    top: 45px;
    left: 10px;
    background: #28a745;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 500;
    z-index: 2;
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.quick-view-btn {
    background: white;
    color: #333;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.quick-view-btn:hover {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
}

.stars {
    display: flex;
    gap: 0.1rem;
}

.star {
    color: #ddd;
    font-size: 0.9rem;
}

.star.filled {
    color: #ffa500;
}

.star.half {
    background: linear-gradient(90deg, #ffa500 50%, #ddd 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rating-text {
    color: #666;
    font-weight: 500;
}

.reviews-count {
    color: #888;
    font-size: 0.75rem;
}

.product-price {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.current-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
}

.original-price {
    font-size: 0.9rem;
    color: #6c757d;
    text-decoration: line-through;
}

.price-range {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

.currency {
    font-size: 0.8rem;
    color: #6c757d;
}

.amazon-btn {
    width: 100%;
    background: #ff9900;
    color: white;
    border: none;
    padding: 0.7rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.amazon-btn:hover {
    background: #e6880a;
}

.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
}

.favorite-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.favorite-btn:hover {
    background: white;
    color: #dc3545;
    transform: scale(1.1);
}

/* Load More Section */
.load-more-section {
    text-align: center;
    margin: 3rem 0;
}

.load-more-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.load-more-btn:hover {
    background: #0056b3;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
    color: #bdc3c7;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr); /* 中等屏幕3列 */
    }
}

@media (max-width: 768px) {
    .nav-list {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr); /* 小屏幕2列 */
        gap: 1rem;
    }
    
    .product-card {
        border-radius: 8px;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 0.8rem;
    }
    
    .current-price {
        font-size: 1rem;
    }
    
    .amazon-btn {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .category-buttons {
        gap: 0.5rem;
    }
    
    .category-btn {
        padding: 0.6rem 1rem;
        min-width: 80px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
    
    .products-grid {
        grid-template-columns: 1fr; /* 最小屏幕1列 */
        gap: 1rem;
    }
    
    .product-card {
        max-width: 100%;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 无障碍优化 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 产品详情页样式 */
.product-detail {
    background: white;
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.product-images {
    position: relative;
}

.product-main-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* 详情图片样式 */
.product-detail-images {
    margin-top: 2rem;
}

.detail-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.detail-image-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detail-image-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.detail-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

/* 图片放大模态框 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    padding: 20px;
    box-sizing: border-box;
}

.image-modal-content {
    position: relative;
    margin: auto;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.image-modal img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.image-modal-close:hover {
    color: #ccc;
}

.product-detail-info h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.product-description {
    margin: 1.5rem 0;
    line-height: 1.8;
    color: #555;
}

.product-specs {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.product-specs h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.spec-item:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .product-detail-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
} 