/*
Theme Name: Astra Child
Theme URI: https://wpastra.com/
Description: Astra Child Theme
Author: Brainstorm Force
Author URI: https://www.brainstormforce.com
Template: astra
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: astra-child
*/

/* 在这里添加您的自定义样式 */

/* 商店页面样式 */
.shop-products-section {
    margin-top: 40px;
}

.shop-products-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
    color: #333;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-title {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
}

.product-price {
    font-size: 1.1em;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 15px;
}

.add-to-cart-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
}

.add-to-cart-btn:hover {
    background: #2980b9;
}

/* 产品变体按钮样式 */
.button-group-attribute {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.attribute-btn {
    padding: 8px 16px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.attribute-btn:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.attribute-btn.selected {
    border-color: #3498db;
    background: #3498db;
    color: white;
}

.attribute-btn.out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* 产品标签样式 */
.shipping-info-content,
.guarantees-content {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 15px;
}

.shipping-info-content ul,
.guarantees-content ul {
    margin: 0;
    padding-left: 20px;
}

.shipping-info-content li,
.guarantees-content li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .shop-products-section h2 {
        font-size: 1.5em;
    }
    
    .button-group-attribute {
        gap: 8px;
    }
    
    .attribute-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* 加载动画 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 成功消息样式 */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 5px;
    margin: 10px 0;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 5px;
    margin: 10px 0;
    border: 1px solid #f5c6cb;
} 


/* ***************************************************** */
/*  页眉完全透明，内容始终在最上层，背景图完全覆盖页眉区域 */
/* ***************************************************** */
/* 让Astra页眉完全透明，内容始终在最上层 */
.site-header,
.ast-main-header-wrap,
.main-header-bar,
.ast-primary-header-bar {
    background: transparent !important;
    box-shadow: none !important;
    position: relative;
    z-index: 20;
}

/* 保证页眉内容（菜单、Logo等）始终在最上层 */
.site-header *,
.ast-main-header-wrap *,
.main-header-bar *,
.ast-primary-header-bar * {
    position: relative;
    z-index: 21;
}