/* ============================================================
   产品询盘-3 (product_inquiry_3) 专属样式
   还原自 eco-tableware.com 产品详情页(C:/tmp/eco-ref/product-detail.html 的
   .ueeshop_responsive_products_detail):
     左栏 = Categories 分类树(与产品列表-4 左侧同口径, 无 Hot Products);
     右栏 = 画廊(缩略图竖排在左 + 大图 364x364) + 信息区 + Description 富文本。
   实例级样式(颜色/字号/间距/按钮)由模板内联输出, 这里只放固定版式。
   引入方: templates/sitebuilder/modules/product_inquiry_3.html

   原站口径备注:
     - 大图 364x364: 原站容器 1200px 下 gallery 占 50%(约 438px, responsive.css:106),
       缩略图列 15%(responsive.css:120)、bigimg padding-left 17%(responsive.css:107),
       大图净宽 ≈ 438 x 0.83 ≈ 364;
     - 缩略图选中边框 #de3232: style.css:184 .left_small_img .pic_box.on;
     - 放大镜: 原站用 MagicZoom 整图放大(magiczoom.js), 本模块与产品询盘-2 同款实现 ——
       悬停大图取景框(.pi_zoom_lens) + 图册右侧 2 倍放大面板(.pi_zoom_panel), 仅 PC。
   ============================================================ */

.ly_product_inquiry_3 a { text-decoration: none; color: inherit; }
.ly_product_inquiry_3 img { max-width: 100%; }

/* 租户还没有已上架产品时的占位 */
.ly_product_inquiry_3 .detail_empty { padding: 60px 0; color: #999; text-align: center; }

/* ---------- 左右两栏 ---------- */
.ly_product_inquiry_3 .pi3_wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.ly_product_inquiry_3 .pi3_side { width: 22%; margin-right: 3%; }
.ly_product_inquiry_3 .pi3_main { flex: 1; width: 75%; }
/* 没有产品分类时右栏占满整行 */
.ly_product_inquiry_3 .pi3_wrapper.full .pi3_main { width: 100%; }

/* ---------- 左栏: 分类树(复刻 productList_4 左栏口径) ---------- */
/* 标题条: 原站 .wrap-menu .cate-top 高 47px 绿底 #94c33b 白字 18px Verdana(style.css:136) */
.ly_product_inquiry_3 .pi3_box_title {
    height: 47px;
    line-height: 47px;
    padding: 0 15px;
    box-sizing: border-box;
    background-color: #94c33b;
    font-size: 18px;
    font-family: Verdana, Arial;
    text-overflow: ellipsis;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    word-break: break-word;
}
/* 分类树: 与产品列表-4 完全同口径 —— 子级默认收起(JS 加 .closed), 点击有子级的父项
   展开/收起, 无子级的项点击跳分类页; 缩进取原站 .wrap-menu 绝对值: 一级 15px
   (与标题条 padding 15px 对齐) / 二级 42px / 三级 52px */
.ly_product_inquiry_3 .pi3_cate_box .category_box { padding: 8px 0; }
.ly_product_inquiry_3 .pi3_cate_box .category_box .item_title { margin: 5px 0; }
.ly_product_inquiry_3 .pi3_cate_box .cate_item {
    display: inline-block;
    line-height: 32px;
    font-size: 14px;
    box-sizing: border-box;
}
.ly_product_inquiry_3 .pi3_cate_box .cate_item:hover { text-decoration: none; }
.ly_product_inquiry_3 .pi3_cate_box .cate_item h2,
.ly_product_inquiry_3 .pi3_cate_box .cate_item h3,
.ly_product_inquiry_3 .pi3_cate_box .cate_item h4 {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}
/* 子级容器不带缩进, 缩进落在各级链接自身的 padding-left 上(取原站绝对值,
   保证一级与标题条 15px 对齐、二级 42px / 三级 52px 递进不受容器嵌套影响);
   .closed 由 JS 加: 子级默认收起, 点父项展开/收起 */
.ly_product_inquiry_3 .pi3_cate_box .category_box .next_box.closed { display: none; }
/* 本模块树结构与产品列表-4 一致但标题容器没有 one_title/sec_title 辅助类, 用直接子选择器区分层级 */
.ly_product_inquiry_3 .pi3_cate_box .category_box .one_item > .item_title .cate_item { padding-left: 15px; }
.ly_product_inquiry_3 .pi3_cate_box .category_box .sec_item > .item_title .cate_item { padding-left: 42px; }
.ly_product_inquiry_3 .pi3_cate_box .category_box .third_box .cate_item { padding-left: 52px; }

/* ---------- 右栏上区: 画廊 + 信息区 ---------- */
.ly_product_inquiry_3 .goods_wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
/* position:relative 是给悬停放大区(.pi_zoom_panel)当定位父级 —— 它要贴在画廊右边缘外侧 */
.ly_product_inquiry_3 .pi3_gallery {
    display: flex;
    align-items: flex-start;
    flex: none;
    position: relative;
}
/* 信息区占画廊之外的剩余宽度(画廊 = 缩略图 80 + 间距 14 + 大图 364 = 458;
   单图无缩略图列时画廊只剩 364, flex:1 自动补位) */
.ly_product_inquiry_3 .pi3_info { flex: 1; min-width: 0; margin-left: 24px; }

/* ---------- 画廊 ---------- */
/* 缩略图列: 大图左侧竖排, 结构与规则照原站 .left_small_img/.pic_box
   (responsive.css:120-124 + style.css:184 + global.css:176-177):
   原站 .left_small_img 是 absolute width:15%(画廊占容器 50%), 本模块画廊列宽随配置变,
   改用 flex 同位 —— 列宽 80px(原站缩略图净高 80.5px 的格子), 间距/边框/选中态/em 规则取原站值 */
.ly_product_inquiry_3 .left_small_img {
    flex: none;
    width: 80px;
    margin-right: 14px;
}
.ly_product_inquiry_3 .left_small_img .pic_box {
    display: block;
    width: 80px;
    height: 80px;
    box-sizing: border-box;
    border: 1px solid #ddd;
    text-align: center;
    overflow: hidden;
    background-color: #fff;
    cursor: pointer;
}
.ly_product_inquiry_3 .left_small_img .pic_box a { display: block; height: 100%; }
.ly_product_inquiry_3 .left_small_img .pic_box img {
    max-width: 100%;
    max-height: 100%;
    vertical-align: middle;
}
/* em 竖排居中补位(原站 global.css:176): 高度 100% 的 inline-block 把图挤到行中央 */
.ly_product_inquiry_3 .left_small_img .pic_box em {
    vertical-align: middle;
    height: 100%;
    display: inline-block;
}
/* 相邻缩略图间距: 原站 .pic_box + .pic_box{margin-top:13%}(相对列宽 ≈8.5px), 80px 列取同比例 10px */
.ly_product_inquiry_3 .left_small_img .pic_box + .pic_box { margin-top: 10px; }
/* 选中态: 红色描边 #de3232(原站 style.css:184, 覆盖 responsive.css:124 的 #3c3c3c) */
.ly_product_inquiry_3 .left_small_img .pic_box.on { border: 1px solid #de3232; }

/* 大图: 固定 364x364(原站尺寸, 见文件头备注), 图片 cover 铺满 */
.ly_product_inquiry_3 .thumb_big {
    position: relative;
    width: 364px;
    max-width: 100%;
    height: 364px;
    overflow: hidden;
    background-color: #fff;
}
.ly_product_inquiry_3 .thumb_big ul {
    margin: 0;
    padding: 0;
    list-style: none;
    height: 100%;
}
.ly_product_inquiry_3 .thumb_big ul li { display: none; }
.ly_product_inquiry_3 .thumb_big ul li.current { display: block; height: 100%; }
.ly_product_inquiry_3 .thumb_big ul li.current img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ly_product_inquiry_3 .thumb_big ul li.no_media img { object-fit: contain; background: #f7f7f7; }
.ly_product_inquiry_3 .thumb_big ul li video,
.ly_product_inquiry_3 .thumb_big ul li iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}
/* ---------- 悬停放大(仅 PC, 与产品询盘-2 同款) ----------
   .pi_zoom_lens 是取景框, .pi_zoom_panel 用 background-image + background-position
   显示取景框那一块放大 2 倍的图; 尺寸/背景/显隐全部由 product_inquiry_3.js 现算。
   移动端没有 hover 且画廊右侧没有空位, CSS 直接隐藏 */
.ly_product_inquiry_3 .thumb_big .pi_zoom_lens {
    position: absolute;
    display: none;
    box-sizing: border-box;
    background-color: #fff;
    border: 1px solid #000;
    opacity: .3;
    /* 跟随框自己不能吃鼠标事件, 否则 mousemove 的 target 一直是它, 坐标就跳了 */
    pointer-events: none;
    z-index: 22;
}
/* 放大面板贴在画廊右边缘外侧、盖在信息区上方(原站 MagicZoom 也是这个位置)。
   left:100% 相对 .pi3_gallery —— 面板左边=大图右边; 宽高与背景由 js 设 */
.ly_product_inquiry_3 .pi3_gallery .pi_zoom_panel {
    position: absolute;
    display: none;
    left: 100%;
    top: 0;
    margin-left: 10px;
    box-sizing: border-box;
    border: 1px solid #000;
    background-color: #fff;
    background-repeat: no-repeat;
    z-index: 23;
}

/* ---------- 信息区 ---------- */
.ly_product_inquiry_3 .pi3_info .g_name {
    margin: 0;
    line-height: 32px;
    word-break: break-word;
    font-weight: 400;
}
.ly_product_inquiry_3 .pi3_info .g_number { margin-top: 14px; font-size: 16px; }
.ly_product_inquiry_3 .pi3_info .g_desc {
    margin-top: 14px;
    line-height: 1.9;
    word-break: break-word;
}
.ly_product_inquiry_3 .pi3_info .g_button { margin-top: 24px; }

/* ---------- 信息区: 参数(与产品询盘-2 的 Param 子项同款) ----------
   两列清单: 名称列加粗带冒号(最多占一半宽), 值列占满剩余宽可换行 */
.ly_product_inquiry_3 .pi3_info .g_params { margin-top: 14px; margin-bottom: 24px; font-size: 14px; color: #222222; }
.ly_product_inquiry_3 .pi3_info .g_params .param_title { font-size: 18px; font-weight: 600; }
.ly_product_inquiry_3 .pi3_info .g_params .param_item { display: flex; margin-top: 10px; line-height: 1.5; }
.ly_product_inquiry_3 .pi3_info .g_params .param_item .cell:nth-child(1) {
    max-width: 50%;
    margin-right: 5px;
    font-weight: 600;
}
.ly_product_inquiry_3 .pi3_info .g_params .param_item .cell:nth-child(2) {
    flex: 1;
    word-wrap: break-word;
    opacity: .8;
}

/* ---------- 信息区: 规格属性(与产品询盘-2 主区的 Attr 子项同款, 无规格抽屉) ----------
   层级照询盘-2: .attr_info 是整区头部, .item_info 挂在每个 .attr_item 下;
   选项组内单选(active 由模板初始给第一个选项、JS 点击切换), 图片型选项照 optionImage 判定 */
.ly_product_inquiry_3 .pi3_info .widgets_attr_box {
    width: 100%;
    padding-bottom: 4px;
}
.ly_product_inquiry_3 .pi3_info .widgets_attr_box .attr_info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.ly_product_inquiry_3 .pi3_info .widgets_attr_box .attr_info .attr_title {
    font-size: 18px;
    font-weight: bold;
    color: #333333;
}
.ly_product_inquiry_3 .pi3_info .widgets_attr_box .attr_list .attr_item { margin-top: 25px; }
.ly_product_inquiry_3 .pi3_info .widgets_attr_box .attr_list .attr_item:first-child { margin-top: 10px; }
/* "属性名: 选中值" —— 选中值在 em 里, js 只改这一处(与询盘-2 selectAttrOption 同口径) */
.ly_product_inquiry_3 .pi3_info .widgets_attr_box .attr_list .attr_item .item_info {
    font-size: 16px;
    font-weight: bold;
    color: #888888;
}
.ly_product_inquiry_3 .pi3_info .widgets_attr_box .attr_list .attr_item .item_info span em {
    font-weight: normal;
    font-style: normal;
}
.ly_product_inquiry_3 .pi3_info .widgets_attr_box .attr_list .attr_item .item_box {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    margin-top: 15px;
}
.ly_product_inquiry_3 .pi3_info .widgets_attr_box .attr_list .attr_item .item_box .item {
    position: relative;
    box-sizing: border-box;
    border: 1px solid #F4F4F5;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.ly_product_inquiry_3 .pi3_info .widgets_attr_box .attr_list .attr_item .item_box .item .text {
    padding: 5px 10px;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: 6px;
    background-color: #F4F4F5;
    font-size: 12px;
    color: #333333;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.ly_product_inquiry_3 .pi3_info .widgets_attr_box .attr_list .attr_item .item_box .item:hover,
.ly_product_inquiry_3 .pi3_info .widgets_attr_box .attr_list .attr_item .item_box .item.active {
    border-color: #1F2328;
    box-shadow: 0 0 0 1px #1F2328;
}
/* 图片型选项(库里 option_image 非空): 一行 6 个方格, 正方形靠 aspect-ratio 撑, 与询盘-2 同款 */
.ly_product_inquiry_3 .pi3_info .widgets_attr_box .attr_list .attr_item .item_box .item.picture {
    width: calc((100% - 5 * 10px) / 6);
    aspect-ratio: 1 / 1;
    height: auto;
    border-color: #E1E1E1;
    background-color: #ffffff;
}
.ly_product_inquiry_3 .pi3_info .widgets_attr_box .attr_list .attr_item .item_box .item .image {
    width: calc(100% - 2px);
    height: calc(100% - 2px);
    margin: 1px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    overflow: hidden;
}
.ly_product_inquiry_3 .pi3_info .widgets_attr_box .attr_list .attr_item .item_box .item .image img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

/* ---------- 描述区 ---------- */
.ly_product_inquiry_3 .pi3_description { margin-top: 70px; }
.ly_product_inquiry_3 .pi3_description .desc_title {
    padding: 0 0 12px 0;
    border-bottom: 1px solid #e8e8e8;
    font-family: Verdana, Arial;
    text-transform: uppercase;
}
/* 富文本内容: 首尾子元素的默认 margin 撑出多余空白 */
.ly_product_inquiry_3 .pi3_description .desc_contents {
    margin-top: 24px;
    line-height: 1.8;
    color: #555;
    word-break: break-word;
}
.ly_product_inquiry_3 .pi3_description .desc_contents > :first-child { margin-top: 0; }
.ly_product_inquiry_3 .pi3_description .desc_contents > :last-child { margin-bottom: 0; }
/* 描述富文本(产品管理-产品详情描述)里的图片强制撑满描述列宽; !important 压过编辑器
   (TinyMCE 保留内联 style)缩放图片时写下的 style="width:..", height 锁 auto 防变形。
   只作用于描述富文本容器, 左画廊大图/缩略图的专属尺寸规则在下方不受影响 */
.ly_product_inquiry_3 .pi3_description .desc_contents img { width: 100% !important; height: auto !important; }
/* 富文本嵌的视频等 iframe: 默认固定宽(如 300px)不跟容器, 统一撑满描述列宽 */
.ly_product_inquiry_3 .pi3_description .desc_contents iframe { width: 100%; }
.ly_product_inquiry_3 .pi3_description .desc_contents:empty { display: none; }

/* 编辑态描边(hover/选中)与 cursor 统一在 editor.css 的 .deco-module::before 覆盖层里,
   本文件不再重复一套 outline。 */

/* 编辑态左上角有模块名 label、右上角有操作条(editor.css, 都是绝对定位浮层),
   本模块左栏 CATEGORIES 标题条紧贴模块顶边会被 label 压住。
   编辑态两栏一起下移一个 label 高度(只加在 .deco-edit-mode 下, 发布态与预览尺寸不受影响)。 */
.deco-edit-mode .ly_product_inquiry_3 .pi3_wrapper { padding-top: 24px; }

/* ============================================================
   移动端
   ============================================================ */
@media screen and (max-width: 1000px) {
    /* 原站移动端隐藏左侧分类菜单(style.css @media 内 .wrapper-left{display:none}), 同口径 */
    .ly_product_inquiry_3 .pi3_side { display: none; }
    .ly_product_inquiry_3 .pi3_main { width: 100%; flex: auto; }
    /* 移动端不放大(没有 hover, 画廊右侧也没有空位), 与产品询盘-2 同分端口径 */
    .ly_product_inquiry_3 .thumb_big .pi_zoom_lens,
    .ly_product_inquiry_3 .pi3_gallery .pi_zoom_panel { display: none !important; }

    .ly_product_inquiry_3 .goods_wrapper { flex-wrap: wrap; }
    .ly_product_inquiry_3 .pi3_info { width: 100%; margin-top: 20px; }
    /* 画廊改上下排: 缩略图横排挪到大图下方, 大图撑满列宽保持 1:1 */
    .ly_product_inquiry_3 .pi3_gallery { flex-direction: column-reverse; width: 100%; }
    .ly_product_inquiry_3 .pi3_info { margin-left: 0; }
    .ly_product_inquiry_3 .thumb_big { width: 100%; max-width: 364px; height: auto; margin: 0 auto; }
    .ly_product_inquiry_3 .thumb_big ul { height: auto; }
    .ly_product_inquiry_3 .thumb_big ul li.current {
        height: 0;
        padding-top: 100%;
        position: relative;
    }
    .ly_product_inquiry_3 .thumb_big ul li.current img,
    .ly_product_inquiry_3 .thumb_big ul li.current video,
    .ly_product_inquiry_3 .thumb_big ul li.current iframe {
        position: absolute;
        top: 0;
        left: 0;
    }
    .ly_product_inquiry_3 .left_small_img {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
        margin: 12px 0 0;
    }
    .ly_product_inquiry_3 .left_small_img .pic_box { width: 56px; height: 56px; }
    .ly_product_inquiry_3 .left_small_img .pic_box + .pic_box { margin-top: 0; }

    .ly_product_inquiry_3 .pi3_description { margin-top: 30px; }
    /* 参数字号移动端取询盘-2 同口径 12px; 属性选项 flex-wrap 自适应, 不用单独调 */
    .ly_product_inquiry_3 .pi3_info .g_params { font-size: 12px; }
}
