/* 全局样式 */
:root {
    --primary-color: #d4a574;
    --secondary-color: #8b5a3c;
    --accent-color: #f4e5d3;
    --text-dark: #2c2c2c;
    --text-light: #666666;
    --border-color: #e5e5e5;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text-dark);
}

/* 公告栏 */
.announcement-bar {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 14px;
}

/* 导航栏样式 */
.navbar {
    box-shadow: var(--shadow);
    padding: 0.5rem 0;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin-left: 10px;
    color: var(--secondary-color);
}

.navbar-item:hover {
    background-color: var(--accent-color);
    color: var(--secondary-color);
}

/* Hero Section */
.hero-image {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), 
                url('product_images/image_50.jpg') center/cover;
    position: relative;
    min-height: 500px;
}

.hero-title {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-weight: 600;
    letter-spacing: 2px;
}

.hero-subtitle {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    margin-top: 1rem;
}

/* 信任徽章 */
.trust-badges {
    background-color: #fafafa;
    padding: 2rem 0;
}

.trust-item {
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

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

.trust-item .icon {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* 产品卡片 */
.product-card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.product-image {
    position: relative;
    overflow: hidden;
    padding-top: 100%; /* 1:1 宽高比 */
}

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

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

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ff4444;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}

.product-price {
    color: #ff4444;
    font-size: 1.5rem;
    font-weight: bold;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 1rem;
    margin-left: 8px;
}

.quick-add-btn {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-card:hover .quick-add-btn {
    bottom: 0;
}

/* 分类卡片 */
.category-card {
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

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

/* 购物车侧边栏 */
.cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background-color: white;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.is-active {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background-color: var(--accent-color);
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

/* 支付图标 */
.payment-icons i {
    margin-right: 10px;
    color: var(--text-light);
}

.social-icons a {
    margin-right: 15px;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .trust-item {
        padding: 1rem;
    }
}

/* 按钮样式 */
.button.is-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.button.is-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* 加载动画 */
.is-loading-custom {
    color: transparent !important;
    pointer-events: none;
    position: relative;
}

.is-loading-custom::after {
    content: "";
    position: absolute;
    top: calc(50% - 0.5em);
    left: calc(50% - 0.5em);
    width: 1em;
    height: 1em;
    border: 2px solid var(--border-color);
    border-right-color: transparent;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spinAround 500ms infinite linear;
}

@keyframes spinAround {
    from { transform: rotate(0deg); }
    to { transform: rotate(359deg); }
}

/* 产品详情弹窗 */
.modal-card-body {
    max-height: 70vh;
    overflow-y: auto;
}

.product-detail-image {
    border-radius: 8px;
    margin-bottom: 1rem;
}

.product-features {
    background-color: var(--accent-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.product-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.product-features li:last-child {
    border-bottom: none;
}

/* 浮动购物车按钮（移动端） */
.floating-cart {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 999;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .floating-cart {
        display: flex;
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}
