@import url('./css2.css');

:root {
    --primary-color: #ff6b6b;
    --secondary-color: #ffa500;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --card-bg: #fff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}



.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* 搜索栏样式 */
.search-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 2rem 0;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
}

.search-input {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.search-button {
    padding: 0.8rem 1.5rem;
    background-color: var(--text-color);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background-color: #222;
}

/* 产品分类样式 */
.product-category {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.category-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.category-item {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.category-item:hover {
    transform: translateY(-5px);
}

.category-icon {
    width: 220px;
    height: 170px;
    margin-bottom: 1rem;
    object-fit: contain;
}

.category-name {
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-color);
}

/* 热门产品样式 */
.hot-products {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-name {
    font-size: 1.2rem;
    padding: 0.5rem 1rem 0;
}

.product-description {
    padding: 0 1rem;
    color: #666;
    font-size: 0.9rem;
}

.product-price {
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.add-to-cart {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.add-to-cart:hover {
    background-color: #ff5252;
}

/* onlineshop 页面特定样式 */
body {
    padding-top: 70px;
}
