/**
 * 产品定制器 — 产品详情页样式
 * 按钮布局、产品元信息、折叠栏、FAQ、Bundle 等
 */

/* ===== 产品详情页通用（PC + 移动） ===== */

/* 三按钮统一：ADD TO CART、BUY IT NOW、CUSTOMIZE NOW */
.single-product form.cart {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px !important;
}

.single-product form.cart .quantity {
    flex-shrink: 0 !important;
    width: auto !important;
    flex-basis: auto !important;
}

.single-product form.cart .single_add_to_cart_button,
.single-product form.cart .pc-buy-now-btn {
    flex: 1 !important;
    min-width: 100px !important;
    height: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Bundle button — 与 ADD TO CART 保持一致的样式 */
.single-product .pc-bundle-add-to-cart.single_add_to_cart_button {
    height: 48px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-radius: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* CUSTOMIZE NOW 上间距 */
.single-product .qcd-single-btn-wrap {
    width: 100% !important;
    flex-basis: 100% !important;
    margin: 10px 0 0 0 !important;
}

/* BUY IT NOW 默认色 */
.single-product form.cart .pc-buy-now-btn {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.single-product form.cart .pc-buy-now-btn:hover {
    background: #f5f5f5;
}

.single-product .qcd-single-btn-wrap .qcd-single-btn,
.single-product .qcd-quick-design-btn.qcd-single-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 48px !important;
    padding: 0 !important;
    text-align: center !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-radius: 4px !important;
    border: none !important;
    background: #f5a623;
    color: #fff;
    cursor: pointer !important;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(245, 166, 35, 0.3) !important;
}

.single-product .qcd-single-btn-wrap .qcd-single-btn:hover,
.single-product .qcd-quick-design-btn.qcd-single-btn:hover {
    opacity: 0.9;
    box-shadow: 0 3px 12px rgba(245, 166, 35, 0.4) !important;
}

.single-product .qcd-single-btn-wrap .qcd-single-btn::before,
.single-product .qcd-single-btn-wrap .qcd-single-btn::after,
.single-product .qcd-quick-design-btn.qcd-single-btn::before,
.single-product .qcd-quick-design-btn.qcd-single-btn::after {
    display: none !important;
    content: none !important;
}

/* 旧版 BUY IT NOW 全局样式移除，统归上面 */

/* 隐藏 Stripe 分期付款提示 */
.single-product #payment-method-message {
    display: none !important;
}

/* 精简产品详情页：隐藏 Wishlist */
.single-product .qwfw-add-to-wishlist-wrapper {
    display: none !important;
}

/* ===== 产品元信息：去掉横线和间距 ===== */
.single-product .product_meta {
    border-top: none !important;
    margin-top: 0 !important;
    padding-top: 10px !important;
    padding-bottom: 0 !important;
}
.single-product .product_meta > * {
    margin-bottom: 6px !important;
}

/* Tabs 直排 */
.single-product .woocommerce-tabs {
    margin-top: 20px !important;
}

.single-product .woocommerce-tabs .wc-tabs {
    display: none !important;
}

.single-product .woocommerce-Tabs-panel {
    display: block !important;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 30px;
}

.single-product .woocommerce-Tabs-panel h2:first-child {
    display: block !important;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8e8e8;
}

/* Restore paragraph margins in description tab (theme forcibly sets p { margin: 0 }) */
.single-product .woocommerce-Tabs-panel p {
    margin: 0 0 1em !important;
}

/* 产品折叠栏 */
.pc-product-accordion {
    margin-top: 20px;
    border-top: 1px solid #e8e8e8;
}

.pc-product-accordion-item {
    border-bottom: 1px solid #e8e8e8;
}

.pc-product-accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 0;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: #333;
    cursor: pointer;
    text-align: left;
    gap: 10px;
}

.pc-accordion-icon-left {
    flex-shrink: 0;
    color: #666;
    display: flex;
    align-items: center;
}

.pc-accordion-label { flex: 1; }

.pc-product-accordion-toggle:hover {
    color: #333;
}

.pc-accordion-icon {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-right: 2px solid #999;
    border-bottom: 2px solid #999;
    transform: rotate(45deg);
    transition: transform 0.3s;
}

.pc-product-accordion-item.open .pc-accordion-icon {
    transform: rotate(-135deg);
}

.pc-product-accordion-content {
    display: none;
    padding: 0 0 16px;
}

.pc-product-accordion-item.open .pc-product-accordion-content {
    display: block;
}

/* Related / Up-sells 产品卡片 */
.single-product .related.products,
.single-product .up-sells.products {
    margin-top: 10px !important;
    background: #f8f8f8 !important;
    padding: 30px !important;
    border-radius: 6px !important;
    box-shadow: 0 0 0 100vmax #f8f8f8;
    clip-path: inset(0 -100vmax);
}

.single-product .related.products .product,
.single-product .up-sells.products .product {
    background: #fff !important;
    padding: 15px !important;
    border-radius: 6px !important;
    text-align: center !important;
}

/* 产品内容区 */
.single-product .related.products .product-inner,
.single-product .up-sells.products .product-inner,
.single-product .related.products .product-wrapper,
.single-product .up-sells.products .product-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 22px 15px 25px !important;
}

/* 标题区 */
.single-product .related.products .woocommerce-loop-product__title,
.single-product .up-sells.products .woocommerce-loop-product__title {
    text-align: center !important;
}

/* 产品标题 */
.single-product .related.products .woocommerce-loop-product__title,
.single-product .up-sells.products .woocommerce-loop-product__title {
    font-size: 13px !important;
    font-weight: 600 !important;
}

.single-product .related.products > h2,
.single-product .up-sells.products > h2 {
    font-size: 18px !important;
}

.single-product .related.products > h2::before,
.single-product .up-sells.products > h2::before {
    content: 'DISCOVER MORE';
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: #8a6f52;
    margin-bottom: 4px;
}

/* Add to Cart 按钮 */
.single-product .related.products .qcd-product-actions,
.single-product .up-sells.products .qcd-product-actions {
    flex-direction: column !important;
    gap: 8px !important;
    align-items: center !important;
}

.single-product .related.products .add_to_cart_button,
.single-product .up-sells.products .add_to_cart_button {
    background: #1f323a !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 8px 14px !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
    line-height: 1.4 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    width: auto !important;
    max-width: calc(100% - 10px) !important;
    box-sizing: border-box !important;
}

.single-product .related.products .add_to_cart_button::before,
.single-product .up-sells.products .add_to_cart_button::before {
    content: '';
    display: inline-block;
    width: 22px;
    height: 22px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.single-product .related.products .add_to_cart_button:hover,
.single-product .up-sells.products .add_to_cart_button:hover {
    opacity: 0.85 !important;
    color: #fff !important;
}

.single-product .related.products .qcd-quick-design-btn,
.single-product .up-sells.products .qcd-quick-design-btn {
    max-width: calc(100% - 10px) !important;
    box-sizing: border-box !important;
}

.single-product .related.products .qcd-action-add-to-cart,
.single-product .up-sells.products .qcd-action-add-to-cart {
    width: 100% !important;
    flex-shrink: 1 !important;
    display: flex !important;
    justify-content: center !important;
}

/* ===== 产品详情页移动端 ===== */
@media only screen and (max-width: 1200px) {
    .single-product .entry-summary {
        min-width: 0;
        min-height: 0;
        margin-top: 15px;
    }

    .single-product .woocommerce-product-gallery {
        width: 100% !important;
    }

    .single-product .product_title {
        font-size: 24px !important;
    }

    /* 数量 + 两个按钮 Grid */
    .single-product form.cart {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        margin-top: 15px !important;
    }

    .single-product form.cart .quantity {
        grid-column: 1 / -1 !important;
        justify-self: start !important;
        width: auto !important;
        margin: 0 !important;
    }

    .single-product form.cart .single_add_to_cart_button {
        margin: 0 !important;
        float: none !important;
        height: 46px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        letter-spacing: 0 !important;
        text-transform: uppercase !important;
        border-radius: 4px !important;
        width: auto !important;
        background: #1f323a;
        color: #fff;
        border: none;
    }

    /* Stripe 快速支付按钮占 ADD TO CART 右侧 */
    .single-product #wc-stripe-payment-request-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        clear: none !important;
        display: flex !important;
        align-items: center !important;
    }

    /* 自定义快速结算按钮 — 白底黑字，低调 */
    .single-product form.cart .pc-buy-now-btn {
        width: 100% !important;
        height: 46px !important;
        line-height: 46px !important;
        margin: 0 !important;
        padding: 0 8px !important;
        background: #fff;
        color: #333;
        border: 1px solid #ddd;
        border-radius: 4px !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        letter-spacing: 0.05em !important;
        text-transform: uppercase !important;
        cursor: pointer !important;
        white-space: nowrap !important;
    }

    .single-product form.cart .qcd-single-btn-wrap {
        grid-column: 1 / -1 !important;
        margin: 0 !important;
        float: none !important;
        clear: none !important;
        display: block !important;
    }

    /* CUSTOMIZE NOW 按钮 — 独立整行，品牌主色 */
    .single-product form.cart .qcd-single-btn-wrap .qcd-single-btn,
    .single-product form.cart .qcd-quick-design-btn.qcd-single-btn {
        width: 100% !important;
        height: 46px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        letter-spacing: 0 !important;
        text-transform: uppercase !important;
        border-radius: 4px !important;
        margin: 0 !important;
        float: none !important;
        box-sizing: border-box !important;
        background: #f5a623;
        color: #fff;
        border: none;
        white-space: nowrap !important;
        text-decoration: none !important;
        outline: none !important;
        box-shadow: 0 2px 8px rgba(245, 166, 35, 0.3) !important;
        background-image: none !important;
        cursor: pointer !important;
    }

    .single-product form.cart .qcd-single-btn-wrap .qcd-single-btn:hover,
    .single-product form.cart .qcd-single-btn-wrap .qcd-single-btn:focus,
    .single-product form.cart .qcd-quick-design-btn.qcd-single-btn:hover,
    .single-product form.cart .qcd-quick-design-btn.qcd-single-btn:focus {
        background: #f7b933 !important;
        color: #fff !important;
        text-decoration: none !important;
        outline: none !important;
        box-shadow: 0 3px 12px rgba(245, 166, 35, 0.4) !important;
    }

    .single-product form.cart .qcd-single-btn-wrap .qcd-single-btn::before,
    .single-product form.cart .qcd-single-btn-wrap .qcd-single-btn::after {
        display: none !important;
        content: none !important;
    }
}

/* ===== 移动端 880px 以下（产品卡片） ===== */
@media only screen and (max-width: 880px) {
    /* Related Products — 双列紧凑 */
    .single-product .related.products,
    .single-product .up-sells.products {
        padding: 10px !important;
    }

    .single-product .related.products .product,
    .single-product .up-sells.products .product {
        padding: 6px !important;
    }

    .single-product .related.products .product-inner,
    .single-product .up-sells.products .product-inner,
    .single-product .related.products .product-wrapper,
    .single-product .up-sells.products .product-wrapper {
        padding: 12px 8px 15px !important;
    }
}

/* ===== FAQ 区域 — Premium Shopify 风格 ===== */
.qcd-faq-section {
    max-width: 780px;
    margin: 50px auto 0;
    padding: 0 20px;
}

.qcd-faq-header {
    text-align: center;
    margin-bottom: 40px;
}

.qcd-faq-heading {
    font-size: 28px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: -0.01em;
}

.qcd-faq-divider {
    width: 48px;
    height: 3px;
    background: #1f323a;
    margin: 16px auto 0;
    border-radius: 2px;
}

.qcd-faq-list {
    border-top: 1px solid #e5e5e5;
}

.qcd-faq-item {
    border-bottom: 1px solid #e5e5e5;
}

.qcd-faq-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 22px 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    gap: 20px;
    transition: padding-left 0.2s ease;
}

.qcd-faq-toggle:hover {
    padding-left: 6px;
}

.qcd-faq-question {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.4;
    transition: color 0.2s;
}

.qcd-faq-item.open .qcd-faq-question,
.qcd-faq-toggle:hover .qcd-faq-question {
    color: #1f323a;
}

.qcd-faq-icon-wrap {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.qcd-faq-item.open .qcd-faq-icon-wrap,
.qcd-faq-toggle:hover .qcd-faq-icon-wrap {
    color: #1f323a;
}

.qcd-faq-icon {
    transition: transform 0.35s ease;
}

.qcd-faq-item.open .qcd-faq-icon {
    transform: rotate(180deg);
}

.qcd-faq-icon .qcd-faq-icon-v {
    transition: opacity 0.25s ease, transform 0.35s ease;
}

.qcd-faq-item.open .qcd-faq-icon .qcd-faq-icon-v {
    opacity: 0;
    transform: rotate(90deg);
}

.qcd-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.qcd-faq-item.open .qcd-faq-answer {
    max-height: 600px;
}

.qcd-faq-answer-inner {
    padding: 0 0 28px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

.qcd-faq-answer-inner p {
    margin: 0 0 12px;
}

.qcd-faq-answer-inner p:last-child {
    margin-bottom: 0;
}

@media (max-width: 680px) {
    .qcd-faq-section {
        margin-top: 40px;
    }

    .qcd-faq-heading {
        font-size: 22px;
    }

    .qcd-faq-question {
        font-size: 15px;
    }

    .qcd-faq-toggle {
        padding: 18px 0;
    }

    .qcd-faq-answer-inner {
        font-size: 13px;
    }
}

/* ===== Review Form Toggle ===== */
.single-product #tab-reviews #review_form_wrapper {
    display: none;
}
.single-product #tab-reviews.pc-review-expanded #review_form_wrapper {
    display: block;
}
.single-product #tab-reviews .pc-review-toggle-wrap {
    text-align: center;
    margin: 20px 0;
}
.single-product #tab-reviews .pc-review-toggle-btn {
    display: inline-block;
    padding: 12px 32px;
    height: 48px;
    border: 1px solid #000;
    background: transparent;
    color: #000;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.single-product #tab-reviews .pc-review-toggle-btn:hover {
    opacity: 0.8;
}
.single-product #tab-reviews.pc-review-expanded .pc-review-toggle-wrap {
    display: none;
}
