/* PetMarty 宠物用品独立站 - 主样式表 */

/* ===== 基础变量 ===== */
:root {
    --cache-buster: "20250226v2";
    --primary-color: #0047AB;
    --primary-dark: #003380;
    --accent-color: #FF6B35;
    --text-dark: #2C3E50;
    --text-medium: #5D6D7E;
    --text-light: #95A5A6;
    --bg-light: #F5F5F5;
    --bg-white: #FFFFFF;
    --border-color: #E5E7EB;
    --success-color: #27AE60;
    --warning-color: #F39C12;
    --error-color: #E74C3C;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
}

/* ===== 重置样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

input, textarea {
    font-family: inherit;
}

/* ===== 容器 ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 公告栏 ===== */
.announcement-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 14px;
}

.announcement-bar strong {
    background: white;
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    margin: 0 5px;
}

/* ===== 头部 ===== */
.header {
    background: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
}

.logo i {
    font-size: 32px;
}

.search-box {
    flex: 1;
    max-width: 500px;
    display: flex;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-dark);
    position: relative;
}

.action-btn i {
    font-size: 22px;
}

.action-btn:hover {
    color: var(--primary-color);
}

.cart-btn .cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-color);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ===== 主导航 ===== */
.main-nav {
    border-top: 1px solid var(--border-color);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    font-weight: 500;
    color: var(--text-dark);
    border-bottom: 3px solid transparent;
}

.nav-item:hover > a {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.nav-item.sale > a {
    color: var(--accent-color);
    font-weight: 600;
}

.nav-item.sale > a:hover {
    color: var(--accent-color);
}

/* 下拉菜单 */
.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 20px;
    min-width: 500px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.dropdown-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.dropdown-column h4 {
    font-family: var(--font-heading);
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--primary-color);
}

.dropdown-column a {
    display: block;
    padding: 5px 0;
    font-size: 14px;
    color: var(--text-medium);
}

.dropdown-column a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* ===== Banner ===== */
.hero-banner {
    background: linear-gradient(135deg, #FFF5F0 0%, #FFF 100%);
    padding: 60px 0;
    overflow: hidden;
}

.banner-slide {
    display: none;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 60px;
}

.banner-slide.active {
    display: flex;
}

.banner-content {
    flex: 1;
}

.banner-content h1 {
    font-family: var(--font-heading);
    font-size: 52px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.2;
}

.banner-content p {
    font-size: 18px;
    color: var(--text-medium);
    margin-bottom: 30px;
}

.banner-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.banner-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--primary-color);
    width: 30px;
    border-radius: 6px;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-large {
    padding: 16px 40px;
    font-size: 16px;
}

/* ===== 分类区域 ===== */
.category-section {
    padding: 60px 0;
    background: var(--bg-light);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-dark);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.category-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.category-icon i {
    font-size: 40px;
    color: white;
}

.category-card h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.category-card p {
    font-size: 14px;
    color: var(--text-light);
}

/* ===== 产品区域 ===== */
.products-section {
    padding: 60px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.section-header .section-title {
    margin-bottom: 0;
    text-align: left;
}

.view-all {
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.view-all:hover {
    gap: 10px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.product-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.product-image {
    position: relative;
    padding: 20px;
    background: var(--bg-light);
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-height: 180px;
    object-fit: contain;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent-color);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
}

.product-badge.new {
    background: var(--secondary-color);
}

.product-actions {
    position: absolute;
    right: 10px;
    top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.action-icon {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    color: var(--text-dark);
    font-size: 14px;
}

.action-icon:hover {
    background: var(--primary-color);
    color: white;
}

.product-info {
    padding: 15px;
}

.product-category {
    font-size: 12px;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 600;
}

.product-name {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    margin: 5px 0;
    color: var(--text-dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.product-rating i {
    color: #FFC107;
    font-size: 12px;
}

.product-rating span {
    font-size: 12px;
    color: var(--text-light);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.current-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.original-price {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: line-through;
}

.discount {
    font-size: 11px;
    background: var(--accent-color);
    color: white;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.add-to-cart {
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
}

.add-to-cart:hover {
    background: var(--primary-dark);
}

/* ===== 限时特惠 ===== */
.flash-sale {
    padding: 60px 0;
    background: linear-gradient(135deg, #FFF5F0, #FFF);
}

.flash-sale-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.flash-sale-info {
    flex: 1;
}

.sale-badge {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 5px 15px;
    border-radius: var(--radius-xl);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.flash-sale-info h2 {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
}

.flash-sale-info > p {
    font-size: 16px;
    color: var(--text-medium);
    margin-bottom: 25px;
}

.countdown {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.countdown-item {
    text-align: center;
}

.countdown-item .number {
    display: block;
    width: 60px;
    height: 60px;
    background: var(--text-dark);
    color: white;
    border-radius: var(--radius-md);
    font-size: 24px;
    font-weight: 700;
    line-height: 60px;
}

.countdown-item .label {
    font-size: 12px;
    color: var(--text-medium);
    margin-top: 5px;
}

.price-box {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.price-box .original-price {
    font-size: 20px;
}

.price-box .sale-price {
    font-size: 36px;
    font-weight: 800;
    color: var(--accent-color);
}

.flash-sale-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* ===== 品牌特色 ===== */
.features-section {
    padding: 60px 0;
    background: var(--bg-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 30px;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-icon i {
    font-size: 32px;
    color: var(--primary-color);
}

.feature-item h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-item p {
    font-size: 14px;
    color: var(--text-medium);
}

/* ===== 博客区域 ===== */
.blog-section {
    padding: 60px 0;
    background: var(--bg-light);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.blog-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.blog-card:hover {
    box-shadow: var(--shadow-lg);
}

.blog-image {
    overflow: hidden;
}

.blog-image img {
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 20px;
}

.blog-category {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
}

.blog-content h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    margin: 10px 0;
    line-height: 1.4;
}

.blog-content p {
    font-size: 14px;
    color: var(--text-medium);
    margin-bottom: 15px;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
}

.read-more:hover {
    text-decoration: underline;
}

/* ===== 邮件订阅 ===== */
.newsletter-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--secondary-color), #3DBDB4);
}

.newsletter-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.newsletter-text {
    color: white;
}

.newsletter-text h2 {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.newsletter-text p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.newsletter-bonus {
    background: white;
    color: var(--secondary-color);
    padding: 5px 15px;
    border-radius: var(--radius-xl);
    font-size: 14px;
    font-weight: 600;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 450px;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: var(--radius-xl);
    font-size: 14px;
}

.newsletter-form button {
    padding: 15px 30px;
    background: var(--text-dark);
    color: white;
    border-radius: var(--radius-xl);
    font-weight: 600;
    white-space: nowrap;
}

.newsletter-form button:hover {
    background: var(--primary-color);
}

/* ===== 页脚 ===== */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .footer-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

.footer-brand p {
    font-size: 14px;
    color: #95A5A6;
    margin: 0;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.footer-section p {
    font-size: 14px;
    color: #95A5A6;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-section h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    font-size: 14px;
    color: #95A5A6;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #95A5A6;
}

.contact-info li i {
    color: var(--primary-color);
    width: 16px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-bottom p {
    font-size: 14px;
    color: #95A5A6;
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-bottom i {
    color: var(--success-color);
}

.payment-icons {
    display: flex;
    gap: 10px;
}

.payment-icons i {
    font-size: 32px;
    color: #95A5A6;
}

/* ===== 占位图样式 ===== */
.placeholder-img {
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-brand {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .search-box {
        order: 3;
        max-width: 100%;
        flex-basis: 100%;
        margin-top: 10px;
    }
    
    .nav-list {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-item > a {
        padding: 12px 15px;
        white-space: nowrap;
    }
    
    .dropdown-menu {
        display: none;
    }
    
    .banner-slide.active {
        flex-direction: column;
        text-align: center;
    }
    
    .banner-content h1 {
        font-size: 36px;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .flash-sale-content {
        flex-direction: column;
        text-align: center;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-content {
        flex-direction: column;
        text-align: center;
    }
    
    .newsletter-form {
        max-width: 100%;
        width: 100%;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .category-card {
        padding: 20px 10px;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
    }
    
    .category-icon i {
        font-size: 24px;
    }
    
    .category-card h3 {
        font-size: 14px;
    }
    
    .category-card p {
        font-size: 12px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .footer-brand {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* ===== 动画效果 ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* SEO Content - global reuse */
.seo-content {
    padding: 50px 0;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
}
.seo-content-inner {
    max-width: 900px;
    margin: 0 auto;
}
.seo-content-inner h2 {
    font-size: 22px;
    color: var(--text-dark);
    margin-bottom: 18px;
    text-align: center;
    font-weight: 700;
}
.seo-content-inner p {
    font-size: 15px;
    color: var(--text-medium);
    line-height: 1.8;
    margin-bottom: 14px;
}
.seo-content-inner strong {
    color: var(--primary-color);
    font-weight: 600;
}
@media (max-width: 768px) {
    .seo-content {
        padding: 35px 0;
    }
    .seo-content-inner h2 {
        font-size: 18px;
        margin-bottom: 14px;
    }
    .seo-content-inner p {
        font-size: 14px;
        line-height: 1.7;
    }
}
