/*
Theme Name: Astra RQ Parts Child
Theme URI: https://rqparts.com
Author: RQ Parts
Template: astra
Version: 1.1.0
Text Domain: astra-rqparts-child
*/

/* --- 面包屑：产品图片上方、内容区顶部；隐藏摘要里重复的那个 --- */
.single-product .woocommerce-breadcrumb {
    margin: 0 0 16px;
    padding: 12px 0;
    font-size: 13px;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    width: 100%;
}
.single-product .woocommerce-breadcrumb a {
    color: #2563eb;
}
.single-product .woocommerce-breadcrumb a:hover {
    color: #1d4ed8;
}
/* 隐藏塞在产品摘要里的重复面包屑 */
.single-product .summary.entry-summary > .woocommerce-breadcrumb,
.single-product .summary.entry-summary .woocommerce-breadcrumb {
    display: none !important;
}

/* --- 产品标签页：仿 fridayparts 水平下划线风格 --- */
.woocommerce div.product .woocommerce-tabs ul.tabs {
    margin: 0 0 0;
    padding: 0;
    border-bottom: 2px solid #e5e7eb;
    background: transparent;
}

.woocommerce div.product .woocommerce-tabs ul.tabs::before {
    display: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
    border: none;
    background: transparent;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    margin: 0 24px 0 0;
    padding: 12px 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    color: #6b7280;
    font-weight: 600;
    font-size: 15px;
    text-transform: none;
    padding: 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
    background: transparent;
    border-bottom-color: #2563eb;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: #2563eb;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li:hover a {
    color: #2563eb;
}

.woocommerce div.product .woocommerce-tabs .panel {
    padding: 24px 0;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.woocommerce div.product .woocommerce-tabs .panel h2:first-child,
.woocommerce div.product .woocommerce-tabs .panel h3:first-child {
    margin-top: 0;
}

/* --- 产品属性表格：fridayparts 风格 --- */
.woocommerce-product-attributes {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.woocommerce-product-attributes th,
.woocommerce-product-attributes td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    vertical-align: top;
    line-height: 1.6;
}

.woocommerce-product-attributes th {
    width: 30%;
    min-width: 180px;
    background: #f9fafb;
    font-weight: 600;
    color: #111827;
}

.woocommerce-product-attributes td {
    color: #374151;
}

.woocommerce-product-attributes tr:nth-child(even) td {
    background: #fafafa;
}

.woocommerce-product-attributes p {
    margin: 0;
}

/* --- 产品主区域布局：左图 + 右摘要，顶部无侧边栏（fridayparts 风格） --- */
.single-product.ast-no-sidebar #primary,
.single-product.ast-main-site-nav-bar-layout-1 #primary {
    width: 100%;
    max-width: 100%;
    padding-right: 0;
}

/* 产品页顶部隐藏右侧边栏 */
.single-product #secondary {
    display: none;
}

.single-product div.product {
    display: flex;
    flex-wrap: wrap;
}

.single-product div.product .woocommerce-product-gallery {
    flex: 0 0 42%;
    max-width: 42%;
    padding-right: 30px;
    box-sizing: border-box;
}

.single-product div.product .summary.entry-summary {
    flex: 0 0 58%;
    max-width: 58%;
    padding-left: 0;
    box-sizing: border-box;
}

.single-product div.product .summary .price {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
    margin: 12px 0;
}

.single-product div.product .summary .single_add_to_cart_button {
    min-height: 44px;
    padding-left: 24px;
    padding-right: 24px;
}

/* --- 产品页专家联系提示 --- */
.rq-product-expert-help {
    margin-top: 16px;
    padding: 12px 16px;
    background: #f9fafb;
    border-left: 3px solid #2563eb;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    color: #4b5563;
}

.rq-product-expert-help a {
    color: #2563eb;
    font-weight: 600;
}

/* --- 标签区域：全宽显示，隐藏右侧 Need Help 卡片 --- */
.single-product .woocommerce-tabs {
    display: block;
    width: 100%;
    padding-right: 0;
}

.single-product .rq-tabs-side-help {
    display: none !important;
}

.single-product .rq-tabs-side-help-inner {
    position: -webkit-sticky;
    position: sticky;
    top: 120px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
}

/* Need Help 头部：头像 + 标题 */
.single-product .rq-tabs-side-help .rq-help-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.single-product .rq-tabs-side-help .rq-help-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.single-product .rq-tabs-side-help .rq-help-title-wrap h4 {
    font-size: 16px;
    margin: 0 0 6px;
    color: #111827;
}

.single-product .rq-tabs-side-help .rq-help-title-wrap p {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
}

/* 右侧 Need Help 表单样式 */
.single-product .rq-tabs-side-help .rq-help-form {
    margin-top: 8px;
}

.single-product .rq-tabs-side-help .rq-help-form label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 3px;
}

.single-product .rq-tabs-side-help .rq-help-form input,
.single-product .rq-tabs-side-help .rq-help-form textarea {
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.single-product .rq-tabs-side-help .rq-help-form textarea {
    min-height: 60px;
    resize: vertical;
}

.single-product .rq-tabs-side-help .rq-help-form button[type="submit"] {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.2s;
}

.single-product .rq-tabs-side-help .rq-help-form button[type="submit"]:hover {
    opacity: 0.9;
}

/* 右侧按钮备用样式 */
.single-product .rq-tabs-side-help a.rq-btn-whatsapp,
.single-product .rq-tabs-side-help a.rq-btn-email {
    display: block;
    text-align: center;
    padding: 9px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    transition: opacity 0.2s;
}

.single-product .rq-tabs-side-help a.rq-btn-whatsapp {
    background: #25D366;
    color: #fff;
}

.single-product .rq-tabs-side-help a.rq-btn-email {
    background: #1e73be;
    color: #fff;
}

.single-product .rq-tabs-side-help a.rq-btn-whatsapp:hover,
.single-product .rq-tabs-side-help a.rq-btn-email:hover {
    opacity: 0.9;
}

/* --- Q&A / Shipping / Highlights 内容区通用 --- */
.rq-product-highlights-content ul,
.rq-shipping-content ul {
    padding-left: 20px;
    margin-bottom: 16px;
}

.rq-product-highlights-content li,
.rq-shipping-content li {
    margin-bottom: 6px;
    line-height: 1.6;
}

.rq-shipping-content strong {
    color: #111827;
    display: block;
    margin-bottom: 8px;
}

/* --- 产品页底部推荐区块 --- */
.rq-product-bottom-recommendations {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e5e7eb;
}

.rq-product-bottom-recommendations h2 {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 20px;
}

.rq-product-bottom-recommendations h2 + h2 {
    margin-top: 40px;
}

.rq-product-bottom-recommendations .products {
    margin-bottom: 0;
}

.rq-product-bottom-recommendations .product {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.rq-product-bottom-recommendations .product:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.rq-product-bottom-recommendations .product .woocommerce-loop-product__title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-top: 10px;
}

.rq-product-bottom-recommendations .product .price {
    font-size: 14px;
    font-weight: 700;
    color: #2563eb;
}

/* --- 移动端适配 --- */
@media (max-width: 921px) {
    .single-product div.product .woocommerce-product-gallery,
    .single-product div.product .summary.entry-summary {
        flex: 0 0 50%;
        max-width: 50%;
        padding-right: 15px;
    }
    .single-product .woocommerce-tabs,
    .single-product .rq-tabs-side-help {
        display: block;
        width: 100%;
        padding-right: 0;
    }
    .single-product .rq-tabs-side-help {
        margin-top: 24px;
    }
    .woocommerce div.product .woocommerce-tabs ul.tabs li {
        margin-right: 16px;
        padding: 10px 0;
    }
    .woocommerce div.product .woocommerce-tabs ul.tabs li a {
        font-size: 14px;
    }
    .woocommerce-product-attributes th {
        width: 40%;
        min-width: 120px;
    }
}

@media (max-width: 544px) {
    .single-product div.product .woocommerce-product-gallery,
    .single-product div.product .summary.entry-summary {
        flex: 0 0 100%;
        max-width: 100%;
        padding-right: 0;
    }
    .single-product div.product {
        display: block;
    }
    .woocommerce div.product .woocommerce-tabs ul.tabs li {
        display: block;
        margin: 0;
        padding: 8px 0;
        border-bottom: 1px solid #e5e7eb;
    }
    .woocommerce div.product .woocommerce-tabs ul.tabs li.active {
        border-bottom-color: #2563eb;
    }
    .woocommerce-product-attributes th,
    .woocommerce-product-attributes td {
        display: block;
        width: 100%;
        border-bottom: none;
    }
    .woocommerce-product-attributes tr {
        border-bottom: 1px solid #e5e7eb;
    }
