/* ==========================================================================
   BuyerBuy Footer Styles v1.0.0 (Updated 2026-08-30)
   4等分网格布局 + 顶部精准对齐 + 潮牌极简质感
   ========================================================================== */

/* 1. 页脚整体容器与背景 */
body .site-footer {
    background-color: #fafbfc;
    border-top: 1px solid #f0f2f5;
}

body .site-primary-footer-wrap {
    padding-top: 48px;
    padding-bottom: 36px;
    background-color: transparent;
}

body .site-primary-footer-wrap .ast-builder-grid-row-container-inner {
    max-width: var(--ast-normal-container-width, 1200px);
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

/* 2. 4等分网格布局 + 顶部对齐 */
body .site-primary-footer-wrap .ast-builder-grid-row,
body .site-primary-footer-wrap .site-primary-footer-inner-wrap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    align-items: flex-start;
    width: 100%;
    max-width: var(--ast-normal-container-width, 1200px);
    margin: 0 auto;
}

body .site-primary-footer-wrap .site-footer-section {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    align-self: flex-start;
    width: 100%;
    margin: 0;
    padding: 0;
}

body .site-primary-footer-wrap .footer-widget-area {
    width: 100%;
    margin: 0;
    padding: 0;
}

body .site-primary-footer-wrap .footer-widget-area > section.widget {
    margin: 0;
    padding: 0;
    width: 100%;
}

/* 3. 栏目标题 (Product, Quick Link, Policy) - 顶部零外边距实现对齐 */
body .site-primary-footer-wrap .widget-title,
body .site-primary-footer-wrap h2.widget-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #111827;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 16px;
    padding: 0;
    line-height: 1.3;
}

/* 4. 导航菜单链接样式 */
body .site-primary-footer-wrap nav.menu-product-container,
body .site-primary-footer-wrap nav.menu-quick-link-container,
body .site-primary-footer-wrap nav.menu-policy-container,
body .site-primary-footer-wrap .widget_nav_menu nav {
    width: 100%;
}

body .site-primary-footer-wrap ul.menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

body .site-primary-footer-wrap ul.menu > li {
    margin: 0 0 10px 0;
    padding: 0;
    line-height: 1.4;
}

body .site-primary-footer-wrap ul.menu > li > a {
    color: #4b5563;
    font-size: 13.5px;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.15s ease;
    display: inline-block;
}

body .site-primary-footer-wrap ul.menu > li > a:hover {
    color: #111827;
    text-decoration: none;
}

/* 5. 第4栏 Logo 与品牌描述 */
body .site-primary-footer-wrap .site-footer-primary-section-4 .widget_media_image {
    margin: 0 0 12px 0;
    padding: 0;
    line-height: 1;
}

body .site-primary-footer-wrap .site-footer-primary-section-4 figure.wp-block-image {
    margin: 0;
    padding: 0;
    line-height: 1;
}

body .site-primary-footer-wrap .site-footer-primary-section-4 figure.wp-block-image img {
    max-width: 170px;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
    object-fit: contain;
}

body .site-primary-footer-wrap .site-footer-primary-section-4 .widget_text {
    margin: 0;
    padding: 0;
}

body .site-primary-footer-wrap .site-footer-primary-section-4 p.wp-block-paragraph,
body .site-primary-footer-wrap .site-footer-primary-section-4 p {
    font-size: 13px;
    line-height: 1.65;
    color: #6b7280;
    margin: 0;
    padding: 0;
}

/* 6. 底部版权栏 (Below Footer) */
body .site-below-footer-wrap {
    background-color: transparent;
    border-top: 1px solid #f0f2f5;
    padding: 16px 0;
}

body .site-below-footer-wrap .ast-builder-grid-row-container-inner {
    max-width: var(--ast-normal-container-width, 1200px);
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

body .site-below-footer-wrap .ast-footer-copyright p,
body .site-below-footer-wrap .ast-footer-copyright {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
}

/* 7. 响应式适配 */
@media (max-width: 921px) {
    body .site-primary-footer-wrap .ast-builder-grid-row,
    body .site-primary-footer-wrap .site-primary-footer-inner-wrap {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px 24px;
    }
}

@media (max-width: 544px) {
    body .site-primary-footer-wrap .ast-builder-grid-row,
    body .site-primary-footer-wrap .site-primary-footer-inner-wrap {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}
/* ==========================================================================
   Hello Elementor Footer 4-Column Flexbox Grid
   ========================================================================== */
.bb-footer-wrap {
    background-color: #fafbfc;
    border-top: 1px solid #f0f1f3;
    width: 100%;
}
.bb-footer-container {
    max-width: var(--bb-container-width, 1200px);
    margin: 0 auto;
    padding: 60px 20px 30px;
    box-sizing: border-box;
}
.bb-footer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
}
.bb-footer-col {
    flex: 1 1 200px;
    min-width: 0;
}
.bb-footer-brand .bb-footer-logo-img {
    max-width: 180px;
    height: auto;
    display: block;
    margin-bottom: 16px;
}
.bb-footer-slogan {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    line-height: 1.6;
    letter-spacing: 0.5px;
    margin: 0;
}
.bb-footer-heading {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #111827;
    margin-top: 0;
    margin-bottom: 16px;
}
.bb-footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.bb-footer-menu li {
    margin-bottom: 10px;
}
.bb-footer-menu li a {
    color: #6b7280;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}
.bb-footer-menu li a:hover {
    color: #111827;
}
.bb-footer-bottom {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}
.bb-footer-copyright {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}
@media (max-width: 767px) {
    .bb-footer-grid {
        flex-direction: column;
        gap: 24px;
    }
}

/* ==========================================================================
   Elementor Theme Builder 4-Column Footer Grid (BuyerBuy Standard)
   ========================================================================== */
.elementor-location-footer {
    background-color: #fafbfc !important;
    border-top: 1px solid #f0f1f3 !important;
    width: 100% !important;
    padding: 60px 0 30px 0 !important;
    box-sizing: border-box !important;
}
.elementor-location-footer .bb-footer-container > .e-con-inner {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}
/* 4 Columns Grid */
.elementor-location-footer .bb-footer-grid > .e-con-inner {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 40px !important;
    align-items: flex-start !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.elementor-location-footer .bb-footer-col {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    box-sizing: border-box !important;
}
.elementor-location-footer .bb-footer-col > .e-con-inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    width: 100% !important;
    padding: 0 !important;
    gap: 0 !important;
}
/* Column 1: Brand */
.elementor-location-footer .bb-footer-brand img {
    max-width: 170px !important;
    height: auto !important;
    display: block !important;
    margin: 0 0 16px 0 !important;
    align-self: flex-start !important;
}
.elementor-location-footer .bb-footer-slogan {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
    line-height: 1.6 !important;
    letter-spacing: 0.5px !important;
    margin: 0 !important;
    text-align: left !important;
    text-transform: uppercase !important;
}
/* Columns 2, 3, 4: Headings */
.elementor-location-footer .bb-footer-heading,
.elementor-location-footer .bb-footer-menu-col h4,
.elementor-location-footer .bb-footer-menu-col .elementor-heading-title {
    font-size: 14.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    color: #111827 !important;
    margin-top: 0 !important;
    margin-bottom: 16px !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    text-align: left !important;
}
/* Columns 2, 3, 4: Navigation Menus */
.elementor-location-footer .elementor-nav-menu--layout-vertical,
.elementor-location-footer ul.elementor-nav-menu,
.elementor-location-footer ul.bb-footer-menu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
}
.elementor-location-footer ul.elementor-nav-menu li,
.elementor-location-footer ul.bb-footer-menu li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}
.elementor-location-footer ul.elementor-nav-menu li a,
.elementor-location-footer ul.elementor-nav-menu a.elementor-item,
.elementor-location-footer ul.bb-footer-menu li a {
    color: #4b5563 !important;
    font-size: 13.5px !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    padding: 0 !important;
    line-height: 1.4 !important;
    display: inline-block !important;
    transition: color 0.15s ease !important;
}
.elementor-location-footer ul.elementor-nav-menu li a:hover,
.elementor-location-footer ul.elementor-nav-menu a.elementor-item:hover,
.elementor-location-footer ul.bb-footer-menu li a:hover {
    color: #111827 !important;
}
/* Bottom Row */
.elementor-location-footer .bb-footer-bottom {
    width: 100% !important;
    margin-top: 48px !important;
    padding-top: 24px !important;
    border-top: 1px solid #e5e7eb !important;
    text-align: center !important;
    box-sizing: border-box !important;
}
.elementor-location-footer .bb-footer-bottom p,
.elementor-location-footer .bb-footer-copyright {
    font-size: 13px !important;
    color: #9ca3af !important;
    margin: 0 !important;
    text-align: center !important;
}
/* Responsive */
@media (max-width: 921px) {
    .elementor-location-footer .bb-footer-grid > .e-con-inner {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 32px !important;
    }
}
@media (max-width: 544px) {
    .elementor-location-footer .bb-footer-grid > .e-con-inner {
        grid-template-columns: 1fr !important;
        gap: 28px !important;
    }
}

/* ==========================================================================
   Direct 4-Column Grid Override for .bb-footer-grid
   ========================================================================== */
.elementor-location-footer .bb-footer-grid,
.elementor-location-footer div.bb-footer-grid,
.elementor-location-footer div[data-id="bb_ftr_grid"] {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 40px !important;
    align-items: flex-start !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.elementor-location-footer .bb-footer-col,
.elementor-location-footer div.bb-footer-col,
.elementor-location-footer .bb-footer-grid > .bb-footer-col,
.elementor-location-footer div[data-id="bb_ftr_col1"],
.elementor-location-footer div[data-id="bb_ftr_col2"],
.elementor-location-footer div[data-id="bb_ftr_col3"],
.elementor-location-footer div[data-id="bb_ftr_col4"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
}
.elementor-location-footer .bb-footer-col > .e-con-inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    width: 100% !important;
    padding: 0 !important;
    gap: 0 !important;
}
.elementor-location-footer .bb-footer-brand img,
.elementor-location-footer div[data-id="bb_ftr_col1_img"] img {
    max-width: 170px !important;
    height: auto !important;
    display: block !important;
    margin: 0 0 16px 0 !important;
    align-self: flex-start !important;
}
@media (max-width: 921px) {
    .elementor-location-footer .bb-footer-grid,
    .elementor-location-footer div.bb-footer-grid,
    .elementor-location-footer div[data-id="bb_ftr_grid"] {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 32px !important;
    }
}
@media (max-width: 544px) {
    .elementor-location-footer .bb-footer-grid,
    .elementor-location-footer div.bb-footer-grid,
    .elementor-location-footer div[data-id="bb_ftr_grid"] {
        grid-template-columns: 1fr !important;
        gap: 28px !important;
    }
}

/* Rock-solid Elementor Element ID Selectors */
.elementor-location-footer .elementor-element-bb_ftr_grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 40px !important;
    align-items: flex-start !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.elementor-location-footer .elementor-element-bb_ftr_col1,
.elementor-location-footer .elementor-element-bb_ftr_col2,
.elementor-location-footer .elementor-element-bb_ftr_col3,
.elementor-location-footer .elementor-element-bb_ftr_col4 {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
}
