/* 自定义询价按钮样式表 - 各样式使用位置详细说明 */




/* 3. 产品信息展示区域样式
   使用位置：询价表单页面的产品信息展示区
   包含产品图片、名称、描述和属性等信息 */
.product-info-col {
    margin-bottom: 20px;
}


/* 产品图片容器 */
.product-image {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 产品图片本身 */
.product-image img {
    width: 100% !important;
    height: auto !important;
    max-height: auto !important; /* 可根据需要调整 */
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
}
.product-summary {
    margin-bottom: 15px;
}
.product-attributes {
    margin-bottom: 15px;
}
.view-product-btn {
    margin-top: 10px;
}



/* 5. 详情页购物车容器样式
   使用位置：商品详情页的购物车区域
   功能：为详情页询价按钮提供绝对定位参考 */
.single-product .cart {
    position: relative !important;
}

/* 6. 详情页询价按钮专属样式
   使用位置：商品详情页的询价按钮
   功能：实现详情页按钮的居中定位和间距调整 */
.single-inquiry-button {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    
    /* 调整定位偏移（关键修改） */
    top: calc(100% + 230px) !important;  /* 父容器底部 + 230px额外间距 */
}

/* 7. 详情页摘要区域样式
   使用位置：商品详情页的产品摘要区域
   功能：为详情页按钮提供定位参考 */
.single-product .product .summary {
    position: relative !important;
}

/* 8. 增强详情页按钮样式优先级
   使用位置：商品详情页的询价按钮
   功能：确保自定义样式覆盖主题默认样式，继承主题的颜色和字体设置 */
.single-product div.cart a.single-inquiry-button {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    top: calc(100% + 230px) !important;
    color: inherit !important;       /* 继承主题文字颜色 */
    font-size: inherit !important;   /* 继承主题字体大小 */
    background: inherit !important;  /* 继承主题背景色 */
}


/* 询价表单样式 - 与收货地址样式保持一致 */

/* 表单容器 */
.inquiry-form {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 表单头部样式 */
.inquiry-form h3 {
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 600;
    color: var(--wp--preset--color--contrast);
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

/* 表单组样式 - 与收货地址表单保持一致 */
.form-group {
    margin-bottom: var(--wp--preset--spacing--20);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 标签样式 - 与收货地址表单保持一致 */
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--wp--preset--color--contrast);
    font-family: var(--wp--preset--font-family--body), sans-serif;
}

/* 输入框、文本域样式 - 与收货地址表单保持一致 */
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: var(--wp--preset--font-size--medium);
    box-sizing: border-box;
    font-family: var(--wp--preset--font-family--body), sans-serif;
}

/* 输入框聚焦样式 - 与收货地址表单保持一致 */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--wp--preset--color--accent);
    box-shadow: 0 0 0 2px rgba(194, 169, 144, 0.2);
}

/* 优化单选按钮布局 */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 5px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    font-weight: normal;
}

/* 单选按钮自定义样式 */
.radio-group input[type="radio"] {
    width: auto;
    margin: 0;
    transform: translateY(1px);
}

/* 单选按钮项目样式 */
.radio-item {
    display: flex;
    align-items: center;
}

/* 提交按钮样式 - 与收货地址表单保持一致 */
.wp-block-form button[type="submit"] {
    background-color: var(--wp--preset--color--accent);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    display: block;
    font-family: var(--wp--preset--font-family--body), sans-serif;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
}

.wp-block-form button[type="submit"]:hover {
    background-color: var(--wp--preset--color--accent-2);
}

/* 错误和成功消息样式 */
.wp-block-notice__content {
    max-width: 600px;
    margin: 0 auto 20px;
    padding: 10px 15px;
    border-radius: 4px;
}

.wp-block-notice__content.is-success {
    background-color: rgba(133, 178, 121, 0.1);
    color: #2e7d32;
    border: 1px solid rgba(133, 178, 121, 0.3);
}

.wp-block-notice__content.is-error {
    background-color: rgba(244, 67, 54, 0.1);
    color: #c62828;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* 必填字段标记 */
.required {
    color: var(--wp--preset--color--accent);
}



/* 按钮宽度适应文字 */
.custom-inquiry-button .wp-block-button__link {
    display: inline-block !important; /* 确保按钮只占内容宽度 */
    width: auto !important; /* 宽度自动适应文字 */
    white-space: nowrap; /* 防止文字换行 */
}

/* 保持原有间距控制 */
.custom-inquiry-button {
    margin: 1.5rem 0 !important;
}
