/* 
 * 功能模块样式
 * 合并了以下文件:
 * - newsletter-thanks.css
 * - price-format.css
 * - brand-alignment.css
 * - title-styles.css
 */

/* ========== 订阅感谢页面样式 ========== */
.newsletter-thanks-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.newsletter-thanks-popup.show {
    opacity: 1;
    visibility: visible;
}

.newsletter-thanks-content {
    display: flex;
    max-width: 900px; /* 1.5倍的宽度 */
    width: 90%;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative; /* 添加相对定位以便于放置关闭按钮 */
}

.newsletter-thanks-image {
    width: 50%;
    overflow: hidden;
    height: 225px; /* 高度减半 */
}

.newsletter-thanks-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.newsletter-thanks-message {
    width: 50%;
    padding: 25px; /* 减少内边距以适应更小的高度 */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 标题和文本样式 */
.newsletter-thanks-title {
    font-size: var(--font-size-medium);
    font-weight: var(--font-medium);
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
}

.newsletter-thanks-text {
    font-size: var(--font-size-small);
    font-weight: var(--font-light);
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.newsletter-thanks-close {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px; /* 固定字号 */
    color: #333; /* 更深的颜色，更易看见 */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000; /* 确保在最上层 */
    transition: all 0.3s ease;
    opacity: 0.9;
    line-height: 1;
    padding: 0;
}

.newsletter-thanks-close:hover {
    transform: scale(1.1);
    opacity: 1;
}

/* 添加渐消效果 */
.newsletter-thanks-popup.closing {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ========== 价格显示格式样式 ========== */
/* 产品价格容器 */
.product-card-new .product-price-container {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    margin: 0 0 5px 0;
    text-align: right;
    flex-wrap: nowrap; /* 确保价格不换行 */
}

/* 现价/特价样式 - 放在前面 */
.product-card-new .product-sale-price {
    font-size: var(--font-size-small);
    color: #e74c3c; /* 红色特价 */
    font-weight: var(--font-medium);
    margin: 0;
    order: 1; /* 确保现价在前 */
}

/* 原价样式 - 放在后面并添加删除线 */
.product-card-new .product-regular-price {
    font-size: var(--font-size-small);
    color: #999;
    font-weight: var(--font-light);
    text-decoration: line-through;
    margin: 0;
    order: 2; /* 确保原价在后 */
}

/* 当只有一个价格时的样式 */
.product-card-new .product-price-container .product-regular-price:only-child {
    color: #666;
    text-decoration: none;
    font-weight: var(--font-light);
    order: 1;
}

/* 移除价格中的小数部分和货币符号与数字之间的空格 */
.woocommerce-Price-amount.amount bdi {
    white-space: nowrap;
}

.woocommerce-Price-amount.amount .woocommerce-Price-currencySymbol {
    margin-right: 0; /* 移除货币符号和数字之间的空格 */
}

/* ========== 品牌名称和描述左对齐样式 ========== */
.brand-name,
.brand-description,
.also-in-store {
    text-align: left;
    margin-left: 30px; /* 与section-title保持一致的左边距 */
}

/* 确保品牌名称和描述上下间距均等 */
.brand-name {
    margin-top: 30px;
    margin-bottom: 15px;
}

.brand-description {
    margin-top: 15px;
    margin-bottom: 30px;
}

/* "Also in store"按钮样式 */
.also-in-store {
    display: inline-block;
    margin-top: 15px;
    margin-bottom: 15px;
    padding: 5px 15px;
    background-color: #fff;
    color: #333;
    border: 1px solid #ddd;
    text-decoration: none;
    font-size: var(--font-size-small);
}

.also-in-store:hover {
    border-color: #999;
}

/* ========== 产品列表标题样式 ========== */
/* .section-title 样式已移除，现在统一使用 .leahz-product-list__title */

/* ========== 响应式样式 ========== */
@media (max-width: 768px) {
    /* 订阅感谢页面响应式 */
    .newsletter-thanks-content {
        flex-direction: column;
        max-width: 600px; /* 1.5倍的宽度 */
    }

    .newsletter-thanks-image,
    .newsletter-thanks-message {
        width: 100%;
    }

    .newsletter-thanks-image {
        height: 150px; /* 高度减半 */
    }

    .newsletter-thanks-message {
        padding: 20px; /* 减少内边距 */
    }
    
    /* 价格显示格式响应式 */
    .product-card-new .product-price-container {
        justify-content: flex-start;
        margin-bottom: 5px;
    }
    
    /* 品牌名称和描述响应式 */
    .brand-name,
    .brand-description,
    .also-in-store {
        margin-left: 20px; /* 移动设备上减少左边距 */
    }
    
    /* .section-title 响应式样式已移除 */
}

@media (max-width: 480px) {
    /* 品牌名称和描述响应式 */
    .brand-name,
    .brand-description,
    .also-in-store {
        margin-left: 15px; /* 小屏幕设备上进一步减少左边距 */
    }
    
    /* .section-title 小屏幕响应式样式已移除 */
}
