/* css/style.css */

/* 1. 引入Google字体 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* 2. 定义CSS变量和基础样式 */
:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --text-color: #333;
    --light-gray: #f8f9fa;
    --white-color: #ffffff;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background-color: var(--light-gray);
}

/* 3. 导航栏样式 */
.navbar {
    transition: box-shadow 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-brand img {
    height: 35px;
}

/* 4. 英雄区 (Hero Section) */
.hero-section {
    padding: 6rem 0;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
    text-align: center;
}

.hero-section h1 {
    font-weight: 700;
    font-size: 3.5rem;
}

.hero-section .lead {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* 5. 产品卡片样式 */
.product-card {
    border: 1px solid #e9ecef;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--white-color);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .175) !important;
}

.product-card .card-header {
    background-color: transparent;
    border-bottom: 1px solid #e9ecef;
    font-size: 1.25rem;
    font-weight: 600;
}

.product-card .card-title {
    font-weight: 700;
}

.product-card .list-unstyled li {
    padding: 0.5rem 0;
    color: #6c757d;
}

/* 6. "Most Popular" 卡片高亮样式 */
.product-card.popular {
    border: 2px solid var(--secondary-color);
    position: relative;
    overflow: hidden;
}

.popular-badge {
    position: absolute;
    top: 15px;
    right: -35px;
    background: var(--secondary-color);
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 0.8rem;
    font-weight: 600;
}

/* 7. 按钮样式 */
.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 8. 页脚 (Footer) */
.site-footer {
    background-color: #212529;
    color: var(--light-gray);
    padding: 40px 0;
    font-size: 0.9rem;
}

.site-footer h5 {
    color: var(--white-color);
    font-weight: 600;
}

.site-footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: var(--white-color);
}

.site-footer .social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background-color: #343a40;
    color: var(--light-gray);
    text-align: center;
    margin-right: 10px;
}

.site-footer .social-icons a:hover {
    background-color: var(--secondary-color);
}

.footer-copyright {
    border-top: 1px solid #343a40;
    padding-top: 20px;
    margin-top: 20px;
    text-align: center;
    color: #adb5bd;
}

/* 9. 购物车样式更新 */
.cart-item-remove-btn {
    font-size: 1.1rem;
    padding: .25rem .5rem;
    line-height: 1;
    border-radius: 50%;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-controls .btn {
    padding: 0.2rem 0.5rem;
    line-height: 1;
    border-radius: 50%;
}

.quantity-display {
    min-width: 25px;
    text-align: center;
    font-weight: 600;
}

/* 10. 新增：导航栏链接样式 */
.navbar-nav .nav-link {
    font-weight: 600;
    color: #555;
    transition: color 0.2s ease-in-out;
    padding: 0.5rem 1rem;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

/* 当链接对应的页面是当前页时，应用这个样式 */
.navbar-nav .nav-link.active {
    color: var(--secondary-color);
}