/*
 Theme Name:   Astra Child
 Template:     astra
 Version:      1.0.0
*/

/* 产品下拉菜单 - 强制不透明背景 */
.site-header .menu-item-has-children .sub-menu {
    background-color: rgba(255, 255, 255, 1) !important;
    background: #ffffff !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 8px 0 !important;
    min-width: 220px !important;
}

.site-header .menu-item-has-children .sub-menu li {
    background-color: #ffffff !important;
    margin: 0 !important;
}

.site-header .menu-item-has-children .sub-menu li a {
    color: #1A1A2E !important;
    background-color: transparent !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
}

.site-header .menu-item-has-children .sub-menu li a:hover {
    background-color: #f0f0f0 !important;
    color: #2E5CFF !important;
}

.site-header .menu-item-has-children .sub-menu li:hover {
    background-color: #f5f5f5 !important;
}

/* 按钮样式 */
.wp-block-button__link {
    background-color: #FF6B35 !important;
    color: #ffffff !important;
    padding: 12px 32px !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    display: inline-block !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.wp-block-button__link:hover {
    background-color: #E55A2B !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4) !important;
}

/* Learn More 按钮特殊样式 */
a[href=/products].wp-block-button__link {
    background-color: #2E5CFF !important;
}

a[href=/products].wp-block-button__link:hover {
    background-color: #1E4AEE !important;
    box-shadow: 0 4px 12px rgba(46, 92, 255, 0.4) !important;
}

/* 产品图片网格布局 */
.product-image-grid, .wp-block-gallery {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 20px !important;
    margin: 40px 0 !important;
}

.product-image-grid img, .wp-block-gallery img {
    width: 100% !important;
    height: 250px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    transition: transform 0.3s ease !important;
}

.product-image-grid img:hover, .wp-block-gallery img:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .product-image-grid, .wp-block-gallery {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    .product-image-grid img, .wp-block-gallery img {
        height: 180px !important;
    }
}

@media (max-width: 480px) {
    .product-image-grid, .wp-block-gallery {
        grid-template-columns: 1fr !important;
    }
    
    .product-image-grid img, .wp-block-gallery img {
        height: 220px !important;
    }
}

/* 产品页面图片网格布局 */
.product-description-content img, .product-header-image img, .product-bottom-image img {
    display: block;
    margin: 20px auto;
}

/* 多图片自动网格 */
.product-description-content p img, .wp-block-image img {
    display: inline-block;
    margin: 10px;
}

/* 产品图片画廊布局 */
div[class*='product'] img[src*='.jpg'], div[class*='product'] img[src*='.png'], div[class*='product'] img[src*='.webp'] {
    display: inline-grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    width: calc(33.333% - 20px);
    margin: 10px;
    height: 280px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

/* 底部图片画廊 */
.product-bottom-image {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.product-bottom-image img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

/* 响应式 */
@media (max-width: 992px) {
    div[class*='product'] img[src*='.jpg'], div[class*='product'] img[src*='.png'], div[class*='product'] img[src*='.webp'] {
        width: calc(50% - 15px);
        height: 240px;
    }
}

@media (max-width: 768px) {
    div[class*='product'] img[src*='.jpg'], div[class*='product'] img[src*='.png'], div[class*='product'] img[src*='.webp'] {
        width: 100%;
        height: 260px;
    }
    
    .product-bottom-image {
        grid-template-columns: 1fr;
    }
}

/* 产品页面底部图片画廊 - 强制网格布局 */
.product-bottom-image {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-gap: 20px !important;
    margin: 40px 0 !important;
}

.product-bottom-image img {
    width: 100% !important;
    height: 280px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12) !important;
    transition: transform 0.3s ease !important;
}

.product-bottom-image img:hover {
    transform: scale(1.03) !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2) !important;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .product-bottom-image {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .product-bottom-image img {
        height: 240px !important;
    }
}

@media (max-width: 768px) {
    .product-bottom-image {
        grid-template-columns: 1fr !important;
    }
    
    .product-bottom-image img {
        height: 300px !important;
    }
}

/* 产品详情图片容器 */
.product-description-content {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 20px !important;
}

/* 产品头图 */
.product-header-image img {
    max-height: 500px !important;
    object-fit: contain !important;
}
/* 产品页面图片画廊美化 */
.product-bottom-image {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    grid-gap: 25px !important;
    margin: 50px 0 !important;
    padding: 20px !important;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%) !important;
    border-radius: 15px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1) !important;
}

.product-bottom-image img {
    width: 100% !important;
    height: 400px !important;
    object-fit: cover !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 3px solid rgba(255,255,255,0.8) !important;
}

.product-bottom-image img:hover {
    transform: scale(1.08) translateY(-5px) !important;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25) !important;
    border-color: #2E5CFF !important;
}

/* 第一张大图跨列显示 */
.product-bottom-image img:first-child {
    grid-column: 1 / -1 !important;
    height: 450px !important;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .product-bottom-image {
        grid-template-columns: 1fr !important;
        grid-gap: 20px !important;
    }
    
    .product-bottom-image img,
    .product-bottom-image img:first-child {
        grid-column: auto !important;
        height: 350px !important;
    }
}

@media (max-width: 768px) {
    .product-bottom-image {
        padding: 15px !important;
        margin: 30px 0 !important;
    }
    
    .product-bottom-image img,
    .product-bottom-image img:first-child {
        height: 300px !important;
    }
}

/* 按钮美化 - 渐变效果 */
.wp-block-button__link, .product-description-content a[href*=contact] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    padding: 16px 40px !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    display: inline-block !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
    transition: all 0.3s ease !important;
    border: none !important;
    text-transform: uppercase !important;
}

.wp-block-button__link:hover, .product-description-content a[href*=contact]:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6) !important;
}

/* 主要按钮 - 蓝色渐变 */
a[href*=contact]:has-text(Request), a[href*=contact]:has-text(Quote) {
    background: linear-gradient(135deg, #2E5CFF 0%, #00C896 100%) !important;
    box-shadow: 0 4px 15px rgba(46, 92, 255, 0.4) !important;
}

a[href*=contact]:has-text(Request):hover, a[href*=contact]:has-text(Quote):hover {
    background: linear-gradient(135deg, #00C896 0%, #2E5CFF 100%) !important;
    box-shadow: 0 8px 25px rgba(46, 92, 255, 0.6) !important;
}

/* About Us 页面图片画廊优化 */
.facility-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    grid-gap: 30px !important;
    margin: 40px 0 !important;
}

.facility-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    padding: 25px !important;
    border-radius: 15px !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08) !important;
    transition: transform 0.3s ease !important;
}

.facility-item:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

.facility-item img {
    width: 100% !important;
    height: 280px !important;
    object-fit: cover !important;
    border-radius: 10px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1) !important;
}

.facility-item h3 {
    color: #2E5CFF !important;
    font-size: 20px !important;
    margin-bottom: 15px !important;
    font-weight: 600 !important;
}

.facility-item p {
    color: #555 !important;
    font-size: 15px !important;
    line-height: 1.8 !important;
}

/* CTA 区域美化 */
.about-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 50px 30px !important;
    border-radius: 20px !important;
    text-align: center !important;
    margin: 60px 0 !important;
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.3) !important;
}

.about-cta h3 {
    color: white !important;
    font-size: 32px !important;
    margin-bottom: 20px !important;
    font-weight: 700 !important;
}

.about-cta p {
    color: rgba(255,255,255,0.95) !important;
    font-size: 18px !important;
    margin-bottom: 35px !important;
}

.about-cta a {
    background: white !important;
    color: #667eea !important;
    padding: 18px 50px !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    display: inline-block !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2) !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

.about-cta a:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .facility-grid {
        grid-template-columns: 1fr !important;
    }
    
    .facility-item img {
        height: 320px !important;
    }
}

@media (max-width: 768px) {
    .facility-item img {
        height: 260px !important;
    }
    
    .about-cta h3 {
        font-size: 26px !important;
    }
    
    .about-cta p {
        font-size: 16px !important;
    }
}

/* About Us 工厂图片画廊 - 2x2 网格布局 */
.factory-gallery {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    grid-gap: 20px !important;
    margin: 30px 0 !important;
}

.factory-gallery img {
    width: 100% !important;
    height: 280px !important;
    object-fit: cover !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    transition: transform 0.3s ease !important;
}

.factory-gallery img:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

/* 响应式 */
@media (max-width: 768px) {
    .factory-gallery {
        grid-template-columns: 1fr !important;
    }
    
    .factory-gallery img {
        height: 300px !important;
    }
}

/* 设施卡片统一样式 */
.facility-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
    padding: 30px !important;
    border-radius: 15px !important;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08) !important;
    margin-bottom: 30px !important;
}

.facility-item h3 {
    color: #2E5CFF !important;
    font-size: 22px !important;
    margin: 20px 0 15px !important;
    font-weight: 600 !important;
}

.facility-item p {
    color: #555 !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
}

/* 博客文章卡片样式 */
.blog-post-card {
    background: white !important;
    border-radius: 15px !important;
    padding: 35px !important;
    margin-bottom: 40px !important;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08) !important;
    border-left: 5px solid #2E5CFF !important;
    transition: all 0.3s ease !important;
}

.blog-post-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 35px rgba(0,0,0,0.12) !important;
}

.blog-post-card h2 {
    color: #1A1A2E !important;
    font-size: 28px !important;
    margin-bottom: 20px !important;
    font-weight: 700 !important;
}

.blog-post-card .post-meta {
    color: #888 !important;
    font-size: 14px !important;
    margin-bottom: 20px !important;
}

.blog-post-card h3 {
    color: #2E5CFF !important;
    font-size: 20px !important;
    margin: 25px 0 15px !important;
    font-weight: 600 !important;
}

.blog-post-card p {
    color: #555 !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
    margin-bottom: 15px !important;
}

.blog-post-card ul {
    margin: 15px 0 !important;
    padding-left: 25px !important;
}

.blog-post-card li {
    color: #555 !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
    margin-bottom: 10px !important;
}

.blog-post-card .highlight-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
    padding: 25px !important;
    border-radius: 10px !important;
    margin: 25px 0 !important;
    border-left: 4px solid #00C896 !important;
}

/* Fix Astra submenu visibility */
.ast-transparent-header .main-header-menu .sub-menu {
    background-color: #ffffff !important;
}
.ast-transparent-header .main-header-menu .sub-menu .menu-item a {
    color: #000000 !important;
}
.ast-transparent-header .main-header-menu .sub-menu .menu-item:hover > a {
    color: #000000 !important;
    background-color: #f9f9f9 !important;
}


/* Force submenu visibility across all headers */
.main-header-menu .sub-menu,
.ast-header-break-point .main-header-menu .sub-menu {
    background-color: #ffffff !important;
    background: #ffffff !important;
}
.main-header-menu .sub-menu .menu-item a,
.ast-header-break-point .main-header-menu .sub-menu .menu-item a {
    color: #000000 !important;
}
.main-header-menu .sub-menu .menu-item:hover > a,
.ast-header-break-point .main-header-menu .sub-menu .menu-item:hover > a {
    background-color: #f5f5f5 !important;
    color: #000000 !important;
}


/* Professional Inquiry Form Styles */
.inquiry-form .wpcf7-form label {
    display: block;
    margin-bottom: 16px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}
.inquiry-form .wpcf7-form input[type="text"],
.inquiry-form .wpcf7-form input[type="email"],
.inquiry-form .wpcf7-form input[type="tel"],
.inquiry-form .wpcf7-form select,
.inquiry-form .wpcf7-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    margin-top: 6px;
    transition: border-color 0.3s ease;
    background: #fafafa;
}
.inquiry-form .wpcf7-form input:focus,
.inquiry-form .wpcf7-form select:focus,
.inquiry-form .wpcf7-form textarea:focus {
    border-color: #FF6B35;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255,107,53,0.1);
}
.inquiry-form .wpcf7-form textarea {
    min-height: 120px;
    resize: vertical;
}
.inquiry-form .wpcf7-form input[type="submit"] {
    background: linear-gradient(135deg, #FF6B35, #e55a2b);
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}
.inquiry-form .wpcf7-form input[type="submit"]:hover {
    background: linear-gradient(135deg, #e55a2b, #d04a1b);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,107,53,0.4);
}
.inquiry-form .wpcf7-form select {
    appearance: auto;
}

/* === MAGNETEVA Custom Fixes === */
/* Hide page title on homepage to fix double H1 */
.home .entry-title,
.page-id-2 .entry-title {
    display: none !important;
}

/* Fix image sizing consistency */
.wp-block-image img,
.wp-block-image.size-large img,
.wp-block-image.size-medium img {
    width: 400px !important;
    height: 400px !important;
    object-fit: cover !important;
}

/* Hide duplicate page titles - MAGNETEVA SEO Fix */
.page-title,
.ast-page-title,
.entry-header .entry-title,
.ast-single-post .entry-title,
.ast-archive-title,
.ast-archive-description .ast-archive-title,
.ast-blog-featured-section .entry-title,
article .entry-title,
.ast-single-post .ast-page-title,
.ast-page-builder-template .hentry .entry-title,
.ast-article-post .entry-title,
.ast-archive-entry-title {
    display: none !important;
}

/* Also hide the title in the hero/banner area */
.entry-header,
.ast-entry-header,
.ast-archive-header,
.single .entry-header {
    display: none !important;
}


/* Codex fix: clickable floating WhatsApp and mobile button layout */
.magneteva-whatsapp-fixed { display: none !important; }
.wa-float {
    position: fixed !important;
    right: 22px !important;
    bottom: 96px !important;
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    background: #25D366 !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    box-shadow: 0 10px 24px rgba(0,0,0,.22) !important;
    text-decoration: none !important;
}
.wa-float:hover { transform: translateY(-2px); color: #fff !important; }
.wa-float .wa-tooltip {
    position: absolute !important;
    right: 66px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    white-space: nowrap !important;
    background: #111827 !important;
    color: #fff !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
}
@media (max-width: 768px) {
    .wa-float { right: 16px !important; bottom: 84px !important; width: 52px !important; height: 52px !important; }
    .wa-float .wa-tooltip { display: none !important; }
    .wp-block-buttons, .wp-block-button { max-width: 100% !important; }
    .wp-block-button__link { white-space: normal !important; text-align: center !important; }
    .wp-block-columns, .wp-block-column { overflow: visible !important; }
    .home .wp-block-button__link { min-width: 0 !important; }
}
