/* style.css - DiggerPig.com 主样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #faf8f6;
    color: #2d2d2d;
    line-height: 1.6;
}

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

/* ===== Header & Navigation ===== */
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    flex-wrap: wrap;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2.2rem;
    background: #ffb6c1;
    padding: 6px 12px;
    border-radius: 40px;
    color: #fff;
    font-weight: bold;
    letter-spacing: -1px;
    line-height: 1;
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: #e8436e;
}

.tagline {
    font-size: 0.9rem;
    color: #999;
    margin-left: 8px;
    font-weight: 300;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 28px;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: #e8436e;
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #ffe3e8 0%, #fff0f3 100%);
    padding: 60px 0;
    text-align: center;
    border-radius: 0 0 40px 40px;
}

.hero h1 {
    font-size: 2.8rem;
    color: #2d2d2d;
    margin-bottom: 10px;
}

.hero h1 span {
    color: #e8436e;
}

.hero p {
    font-size: 1.2rem;
    color: #555;
    max-width: 600px;
    margin: 10px auto 25px;
}

.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 14px 22px;
    font-size: 1rem;
    outline: none;
}

.search-box button {
    background: #e8436e;
    color: #fff;
    border: none;
    padding: 14px 30px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-box button:hover {
    background: #c7355a;
}

/* ===== Section Titles ===== */
.section-title {
    font-size: 2rem;
    margin: 40px 0 20px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #e8436e;
    margin-top: 8px;
    border-radius: 4px;
}

/* ===== Product Cards ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 28px;
    margin: 30px 0;
}

.product-card {
    background: #fff;
    border-radius: 16px;
    padding: 18px 16px 20px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    transition: transform 0.15s, box-shadow 0.2s;
    text-align: center;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    border-radius: 8px;
    background: #f7f7f7;
}

.product-card h3 {
    margin: 12px 0 4px;
    font-size: 1.1rem;
}

.product-card .price {
    font-weight: 700;
    color: #2d2d2d;
    font-size: 1.2rem;
}

.product-card .old-price {
    text-decoration: line-through;
    color: #aaa;
    font-size: 0.9rem;
    margin-left: 8px;
}

.product-card .cashback {
    display: inline-block;
    background: #ffd93d;
    color: #2d2d2d;
    padding: 2px 14px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.85rem;
    margin: 8px 0 12px;
}

.btn {
    display: inline-block;
    background: #e8436e;
    color: #fff;
    padding: 10px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #c7355a;
}

.btn-outline {
    background: transparent;
    border: 2px solid #e8436e;
    color: #e8436e;
}

.btn-outline:hover {
    background: #e8436e;
    color: #fff;
}

/* ===== Categories Index ===== */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.cat-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: background 0.2s;
    text-decoration: none;
    color: #2d2d2d;
}

.cat-card:hover {
    background: #ffe3e8;
}

.cat-card .icon {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 8px;
}

/* ===== Product Detail ===== */
.product-detail {
    display: flex;
    gap: 40px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.product-detail .images {
    flex: 1 1 40%;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.product-detail .images img {
    max-width: 100%;
    max-height: 400px;
}

.product-detail .info {
    flex: 1 1 50%;
}

.product-detail .info h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.product-detail .info .rating {
    color: #f5b342;
    margin-bottom: 12px;
}

.product-detail .info .price-box {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d2d2d;
}

.product-detail .info .old-price-box {
    color: #aaa;
    font-size: 1.2rem;
    text-decoration: line-through;
    margin-left: 15px;
    font-weight: 400;
}

.product-detail .info .cashback-badge {
    display: inline-block;
    background: #ffd93d;
    padding: 6px 24px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1.3rem;
    margin: 15px 0 20px;
}

.product-detail .info .desc {
    color: #555;
    margin: 20px 0;
}

/* ===== Footer ===== */
footer {
    background: #2d2d2d;
    color: #ccc;
    padding: 40px 0 20px;
    margin-top: 60px;
}

footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

footer a {
    color: #ffb6c1;
    text-decoration: none;
}

footer .copy {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    margin-top: 20px;
    width: 100%;
    font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
    }
    nav ul {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
        margin-top: 10px;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .product-detail {
        flex-direction: column;
    }
}