/* ========================================
   通用组件样式
   ======================================== */

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: var(--font-size-sm);
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: var(--color-white);
}

.btn-secondary {
    background: var(--color-secondary);
    color: var(--color-white);
}

.btn-secondary:hover {
    background: var(--color-secondary-dark);
    color: var(--color-white);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* 卡片 */
.card {
    background: var(--color-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* 标题样式 */
.section-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-subtitle {
    font-size: var(--font-size-md);
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: var(--font-size-xs);
    font-weight: 500;
    border-radius: var(--border-radius-sm);
}

.tag-primary {
    background: rgba(0, 102, 204, 0.1);
    color: var(--color-primary);
}

.tag-secondary {
    background: rgba(0, 166, 81, 0.1);
    color: var(--color-secondary);
}

/* 表单元素 */
.input {
    width: 100%;
    padding: 12px 16px;
    font-size: var(--font-size-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: border-color var(--transition-fast);
}

.input:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* 图片容器 */
.img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.img-wrapper:hover img {
    transform: scale(1.05);
}

/* 分隔线 */
.divider {
    height: 1px;
    background: var(--border-color);
    margin: var(--spacing-xl) 0;
}

/* 面包屑 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    padding: var(--spacing-md) 0;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--color-primary);
}

.breadcrumb-separator {
    color: var(--text-muted);
}

.breadcrumb-current {
    color: var(--text-primary);
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3xl);
    text-align: center;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin-bottom: var(--spacing-md);
    color: var(--text-muted);
}

.empty-state-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.empty-state-desc {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* 加载状态 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--border-radius-sm);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 工具类 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 响应式工具类 */
@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .show-mobile {
        display: none !important;
    }
}

/* 产品CTA按钮 */
.product-cta {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 500;
    color: #0066CC;
    background: rgba(0, 102, 204, 0.08);
    border-radius: 4px;
    transition: all 0.3s ease;
    text-align: center;
}

.product-card:hover .product-cta {
    background: #0066CC;
    color: #fff;
}

/* Footer电话链接 */
.footer-phone {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #0066CC;
    text-decoration: none;
    margin: 8px 0;
}

.footer-phone:hover {
    color: #004999;
    text-decoration: underline;
}

.footer-address {
    font-size: 14px;
    color: #999;
    margin: 4px 0 0 0;
}

/* ========================================
   页脚样式 - A.O.史密斯风格
   ======================================== */
.footer {
    background: #1a1a2e;
    color: #fff;
}

.footer-main {
    padding: 48px 0 40px;
}

.footer-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.footer-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #0066CC;
}

.footer-nav-sep {
    color: #666;
}

.footer-contact {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 48px;
    flex-wrap: wrap;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ccc;
    font-size: 14px;
}

.footer-contact-item svg {
    width: 18px;
    height: 18px;
    color: #0066CC;
}

.footer-contact-item a {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
}

.footer-contact-item a:hover {
    color: #0066CC;
}

.footer-bottom {
    background: #151525;
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 13px;
    color: #888;
}

.footer-bottom a {
    color: #888;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: #0066CC;
}

/* 移动端适配 */
@media (max-width: 767px) {
    .footer-nav {
        flex-wrap: wrap;
        gap: 12px;
    }

    .footer-nav a {
        font-size: 14px;
    }

    .footer-contact {
        flex-direction: column;
        gap: 16px;
    }

    .footer-contact-item {
        font-size: 13px;
    }

    .footer-contact-item a {
        font-size: 16px;
    }
}

/* ========================================
   移动端底部固定热线栏
   仅在768px以下显示
   ======================================== */
.mobile-hotline-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed, 300);
    background: #ffffff;
    border-top: 1px solid #e5e5e5;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    padding: 10px 16px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hotline-phone {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #333333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.hotline-phone svg {
    width: 18px;
    height: 18px;
    color: #0066CC;
    flex-shrink: 0;
}

.hotline-phone span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.hotline-consult-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background: #0066CC;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.3s ease;
}

.hotline-consult-btn:hover {
    background: #0052a3;
    color: #ffffff;
}

/* 仅移动端显示 */
@media (max-width: 767px) {
    .mobile-hotline-bar {
        display: flex;
    }

    /* 为页面底部留出热线栏空间，避免footer被遮挡 */
    body {
        padding-bottom: 60px;
    }
}

/* ========================================
   悬浮咨询按钮
   ======================================== */
.floating-consult {
    position: fixed;
    right: 20px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
}

.consult-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #0066CC;
    color: #fff;
    border-radius: 24px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.consult-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.consult-btn:hover {
    transform: translateX(-4px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
    background: #0052a3;
}

.consult-phone:hover {
    background: #004999;
}

.consult-wechat {
    background: #07C160;
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.3);
}

.consult-wechat:hover {
    background: #06a854;
    box-shadow: 0 6px 16px rgba(7, 193, 96, 0.4);
}

.consult-label {
    white-space: nowrap;
}

/* 移动端适配 */
@media (max-width: 767px) {
    .floating-consult {
        right: 12px;
        bottom: 60px;
        gap: 8px;
    }

    .consult-btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    .consult-btn svg {
        width: 18px;
        height: 18px;
    }

    .consult-label {
        display: none;
    }

    .consult-btn::after {
        content: '';
    }
}
