/* elegate — 商品详情页。商城与插件输出的标记用主题容器（.eg-product）限定。 */

/* 面包屑胶囊已改为全站通用规则（base.css），与生产一致 */

/* 详情页的侧栏只在桌面出现 */
.eg-shop__sidebar--static {
    display: none;
}

/* 插件挂在摘要里的浮动按钮（对比 / 收藏）、新品角标都以商品容器为定位基准 */
.eg-product {
    position: relative;
}

/* ---------- 上半部分：相册 + 摘要 ---------- */
/* 生产：图片区与摘要之间没有间距（.product-images-wrapper 后紧跟 .summary） */
.eg-product__top {
    display: grid;
    gap: 0;
    margin-bottom: 6.429em; /* 生产 .single-product .single-product-wrapper（各宽度 90px） */
}

.eg-product__gallery {
    position: relative;
    min-width: 0;
    overflow: hidden;
}

.eg-product__gallery .eg-onsale {
    position: absolute;
    top: 16px;
    left: 0;
    z-index: 3;
    padding: 2px 10px;
    border-radius: 4px;
    background: #e00;
    color: #fff;
    font-weight: 700;
    line-height: 24px;
}

.eg-product__gallery .woocommerce-product-gallery {
    position: relative;
    opacity: 1 !important; /* 商城脚本初始化前把相册设为透明；没有脚本时也要能看到图 */
}

.eg-product__gallery .woocommerce-product-gallery__wrapper {
    margin: 0;
}

.eg-product__gallery .woocommerce-product-gallery__image img {
    display: block;
    width: 100%;
    height: auto;
}

/* 生产 .single-product .woocommerce-product-gallery：主图下边距 .857em；放大按钮只定位（按钮里是商城脚本放的「🔍」字符，
   生产不加载商城样式表，按钮没有底色和尺寸） */
.single-product .woocommerce-product-gallery .flex-viewport {
    margin-bottom: .857em;
}

.single-product .woocommerce-product-gallery .flex-viewport figure {
    margin-bottom: 0;
}

.single-product .woocommerce-product-gallery .woocommerce-product-gallery__trigger {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
}

/* 相册脚本初始化之前、以及初始化的那一帧，都保持最终的样子，避免加载过程中内容跳动（布局偏移）：
   1. 商城把相册里的所有大图竖着排在一起（透明、但占位置），5 张图就是两千多像素高，脚本跑完才收成一张，
      缩略图和下面的内容随之跳上来——第 2 张起先不显示，等轮播脚本给每张图写上宽度（内联 style）后再显示；
   2. 初始化那一帧，轮播脚本先把轨道拉到 1000% 宽、还没给图片定宽，图片被撑到十倍大——图片最宽不超过相册本身；
   3. 初始化后相册下面有一段下边距，初始化前先留出来。 */
.single-product .woocommerce-product-gallery {
    container-type: inline-size;
}

.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image:nth-child(n+2):not([style*="width"]) {
    display: none;
}

.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image > a > img {
    max-width: 100cqw;
}

.single-product .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper {
    margin-bottom: .857em;
}

/* 主图自己的翻页圆点不显示（同生产 .woocommerce-product-gallery.electro-carousel-loaded .flex-control-nav） */
.single-product .woocommerce-product-gallery.eg-thumbs-loaded .flex-control-nav {
    display: none;
}

/* 缩略图轮播：生产 .electro-wc-product-gallery 规则原样（类名换成主题的） */
.single-product .eg-pthumbs {
    position: relative;
}

/* 缩略图轮播初始化之前：排成一行（脚本就绪前会折成两行）、每格 90 + 间距 6，并留出翻页圆点的高度，与初始化后的高度一致 */
.single-product .eg-pthumbs:not(:has(.flex-viewport)) {
    min-height: 121px;
    overflow: hidden;
}

.single-product .eg-pthumbs:not(:has(.flex-viewport)) .eg-pthumbs__wrapper {
    flex-wrap: nowrap;
    margin: 0;
}

.single-product .eg-pthumbs:not(:has(.flex-viewport)) .eg-pthumbs__wrapper .eg-pthumbs__image {
    flex: 0 0 90px;
    margin: 0 6px 0 0;
    padding: 0;
}

.single-product .eg-pthumbs .flex-viewport {
    margin-bottom: .857em;
}

.single-product .eg-pthumbs .flex-viewport figure {
    margin-bottom: 0;
}

.single-product .eg-pthumbs .eg-pthumbs__wrapper::after {
    display: block;
    clear: both;
    content: "";
}

.single-product .eg-pthumbs .eg-pthumbs__wrapper {
    display: flex;
    flex-flow: row wrap;
    margin: 0 -5px;
    padding: 0;
}

.single-product .eg-pthumbs .eg-pthumbs__wrapper .eg-pthumbs__image {
    padding: 5px;
    list-style: none;
    cursor: pointer;
}

.single-product .eg-pthumbs .eg-pthumbs__wrapper .eg-pthumbs__image img {
    margin: auto;
    border: 1px solid #fff;
}

.single-product .eg-pthumbs .eg-pthumbs__wrapper .eg-pthumbs__image.flex-active-slide img {
    border-bottom-width: 2px;
    border-bottom-style: solid;
    border-bottom-color: var(--eg-primary);
}

.single-product .eg-pthumbs .flex-control-nav {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 10px 0 0;
}

.single-product .eg-pthumbs .flex-control-nav li {
    list-style: none;
}

.single-product .eg-pthumbs .flex-control-nav li a {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 20px;
    background: #bcbcbc;
    text-indent: -9999px;
    cursor: pointer;
}

.single-product .eg-pthumbs .flex-control-nav li a.flex-active {
    width: 30px;
    background-color: var(--eg-primary);
}

.single-product .eg-pthumbs .flex-control-nav li + li {
    margin-left: 1em;
}

.eg-pthumbs img[alt~="Awaiting"] {
    width: 80px;
    border: 1px solid #eaeaea;
}

@media (max-width: 575.98px) {
    .eg-pthumbs .eg-pthumbs__image.flex-active-slide a {
        background-color: var(--eg-primary);
    }
}

/* 摘要 */
.eg-product__summary {
    min-width: 0;
}

/* 生产 .single-product .product_title：1.786em / 行高 1.28em / 下 .48em */
.eg-product__summary .product_title {
    margin: 0 0 .48em;
    font-size: 1.786em;
    font-weight: 500;
    line-height: 1.28em;
}

/* 标题下的分隔线用生产 hr 元素规则（reboot：上下 1rem、文字色、透明度 .25、高 1px） */

/* 生产 .single-product .price：2.5em / 行高 1.286em / 下 .571em */
.eg-product__summary .price {
    margin: 0 0 .571em;
    color: #333e48;
    font-size: 2.5em;
    font-weight: 400;
    line-height: 1.286em;
}

.eg-product__summary .price ins {
    color: #dc3545;
    text-decoration: none;
}

/* 生产 .single-product .price del：.6em / 行高 1.5em / 左 .174em */
.eg-product__summary .price del {
    margin-left: .174em;
    color: #848484;
    font-size: .6em;
    line-height: 1.5em;
    text-decoration: none;
}

/* 生产 .single-product .price del .amount：删除线画在价格数字上 */
.eg-product__summary .price del .amount {
    text-decoration: line-through;
}

/* 详情页价格顺序：划线原价在前、现价在后（与卡片相反） */
.eg-product__summary .price .eg-sr + *,
.eg-product__summary p.price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 10px;
}

.eg-product__summary p.price del { order: -1; }

/* 生产 .single-product .woocommerce-product-details__short-description 原样（行高 1.5em、灰字、下边距 2.5em） */
.eg-product__summary .woocommerce-product-details__short-description {
    margin-bottom: 2.5em;
    color: #7d7d7d;
    line-height: 1.5em;
}

/* 分享链接之后的操作按钮行：生产这一行是空的弹性容器（对比 / 收藏按钮绝对定位到别处），只留下 20px 下边距 */
.eg-product__summary .eg-product__actions {
    display: flex;
    margin-bottom: 20px;
    font-size: .929em;
    line-height: 1.385em;
}

.eg-product__summary .stock {
    margin: 0 0 12px;
    font-weight: 700;
}

.eg-product__summary .stock.out-of-stock { color: #dc3545; }

/* 库存状态胶囊：与库存插件「型号 / GS1 / 各仓库存」的值同一套外形（圆角 999px、浅底深字、13px / 600）。
   只加外观，不动标记：标题下「Availability:」行的 p.stock（登录买家可见；可变商品切规格时 single.js 把新的
   p.stock 写进 .eg-stock-availability，同一选择器继续生效），以及商城自己在购买区输出的缺货 / 可缺货下单提示。
   有货 = 绿（与插件一致）；缺货 = 红（沿用本站原有的缺货红 #dc3545 的深一档，保证深字浅底对比度）；
   可缺货下单 = 琥珀（提醒但可下单）。商城自己的「有货」提示仍按上面的规则隐藏。 */
.eg-product__summary .availability > .eg-stock-availability > p.stock, /* 比下面 .single-product .availability p.stock 的 display:inline 高一档 */
.eg-product__summary .stock.out-of-stock,
.eg-product__summary .stock.available-on-backorder {
    --eg-stock-fg: #166534;
    --eg-stock-bg: #e7f6ed;
    display: inline-block;
    max-width: 100%;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--eg-stock-bg);
    color: var(--eg-stock-fg);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

/* 「Availability:」行：胶囊要与前面的标签文字垂直居中。上面 .eg-product__summary .stock 给了 margin-bottom: 12px
   （为购买区的缺货提示留的间距），inline-block 的外边距会算进行盒，胶囊被整体顶高约 4px、与标签文字错位；
   这一行里不需要它，清零后 vertical-align: middle 才对得上。左侧留 4px 与标签拉开。 */
.eg-product__summary .availability > .eg-stock-availability > p.stock {
    margin: 0 0 0 4px;
}

/* 原来靠胶囊的 12px 下边距把下一行（已售数量）隔开；外边距清零后改由这一行（table-cell，外边距无效，用内边距）补回，
   只作用于标题下这一行（直接子元素），不影响库存插件嵌在简短描述里的各仓库存行。
   只在行里有胶囊时才补：切到没有库存文案的规格时 single.js 会把 .eg-stock-availability 清空（p.stock 随之移除），
   胶囊没了间距也该没了，否则下面一行白多 12px。 */
.eg-product__summary > .availability:has(> .eg-stock-availability > p.stock) {
    padding-bottom: 12px;
}

.eg-product__summary .availability > .eg-stock-availability > p.stock.out-of-stock,
.eg-product__summary .stock.out-of-stock {
    --eg-stock-fg: #b02a37;
    --eg-stock-bg: #fdecee;
}

.eg-product__summary .availability > .eg-stock-availability > p.stock.available-on-backorder,
.eg-product__summary .stock.available-on-backorder {
    --eg-stock-fg: #8a5300;
    --eg-stock-bg: #fff3dc;
}

/* 变体选择：生产规则原样（.single-product table.variations …）；th / td 的 display: block 来自款式插件
   （.woo-variation-swatches.wvs-show-label .variations td, th），标签外观来自 reboot label 与插件 */
.single-product table.variations {
    margin-bottom: 1.786em;
}

.single-product table.variations td,
.single-product table.variations th {
    vertical-align: middle;
    border-top: 1px solid rgb(231.2, 231.2, 231.2);
}

.single-product table.variations tr:last-child td,
.single-product table.variations tr:last-child th {
    border-bottom: 1px solid rgb(231.2, 231.2, 231.2);
}

.single-product table.variations td.value select {
    display: inline-block;
    width: auto;
    max-width: 100%;
}

.single-product table.variations td.value .reset_variations {
    margin-left: .75em;
    font-size: 90%;
}

.single-product .woocommerce-variation {
    margin-bottom: 1.786em;
}

/* 数量 + 加购：同生产，表单是普通块布局（子元素外边距可折叠），
   数量框 .single-product .cart .quantity { display: inline-block; width: 10em }，按钮行内块，两者之间是模板里的空白字符 */
.eg-product__summary .cart .quantity {
    display: inline-block;
    width: 10em;
}

.eg-product__summary .single_add_to_cart_button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    /* 生产 .single_add_to_cart_button.button：1em / 700 / 内边距 1.036em 3.434em / 圆角 1.8em（行高取 .button 的 1.714） */
    padding: 1.036em 3.434em;
    border: 0;
    border-radius: 1.8em;
    background: var(--eg-primary);
    color: var(--eg-on-primary);
    font: inherit;
    font-size: 1em;
    font-weight: 700;
    line-height: 1.714;
    cursor: pointer;
    transition: color 0.15s, background-color 0.15s, border-color 0.15s, box-shadow 0.15s, transform var(--eg-ease), opacity var(--eg-ease);
}

.eg-product__summary .single_add_to_cart_button::before {
    content: "";
    width: 18px;
    height: 18px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.4'/%3E%3Ccircle cx='17' cy='20' r='1.4'/%3E%3Cpath d='M2.5 4h2.6l2.4 12h10.2l1.8-8H8'/%3E%3Cpath d='M13 8.5v4M11 10.5h4'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.4'/%3E%3Ccircle cx='17' cy='20' r='1.4'/%3E%3Cpath d='M2.5 4h2.6l2.4 12h10.2l1.8-8H8'/%3E%3Cpath d='M13 8.5v4M11 10.5h4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.eg-product__summary .single_add_to_cart_button:hover,
.eg-product__summary .single_add_to_cart_button:focus-visible {
    background: #000;
    color: #fff;
}

.eg-product__summary .single_add_to_cart_button:active { transform: scale(0.98); }

.eg-product__summary .single_add_to_cart_button.disabled,
.eg-product__summary .single_add_to_cart_button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 提交中：图标换成转圈，按钮禁用（生产没有，用户 11-17 确认作为改进保留，U9） */
.eg-product__summary .single_add_to_cart_button.is-busy {
    pointer-events: none;
    opacity: 0.8;
}

.eg-product__summary .single_add_to_cart_button.is-busy::before {
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    background: none;
    -webkit-mask: none;
    mask: none;
    animation: eg-spin 0.7s linear infinite;
}

/* 阶梯价插件输出的表格：用插件自带样式与生产 reboot 表格规则（原先主题自写的表格边框 / 内边距 / 外边距已删除）。
   标题字号 / 行高用生产 h3 元素规则（reboot）。 */
.eg-product__summary .tiered-pricing-wrapper h3 {
    margin: 20px 0;
}

/* ---------- 下半部分：相关商品、页签 ---------- */
.eg-product__below .related,
.eg-product__below .upsells {
    margin-bottom: 40px;
}

.eg-product__below .related > h2,
.eg-product__below .upsells > h2 {
    position: relative;
    /* 生产 .single-product .related > h2：1.786em / 行高 1.6em / 下内边距 .4em / 下 1.36em */
    margin: 0 0 1.36em;
    padding-bottom: .4em;
    border-bottom: 1px solid #ddd;
    font-size: 1.786em;
    font-weight: 500;
    line-height: 1.6em;
}

.eg-product__below .related > h2::after,
.eg-product__below .upsells > h2::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 120px;
    height: 2px;
    background: var(--eg-primary);
}

/* ---------- 详情下方：规格 / 描述 / 评价依次排开（不用页签，站长 11-17 定，仿 Mercado Libre） ----------
   每段上方一条分隔线、一个标题；较长的规格和描述先限高收起，由 single.js 判断是否需要「展开」按钮。 */
.eg-psections {
    margin-bottom: 3em;
}

.eg-psection {
    padding: 2.286em 0 2.571em;
    border-top: 1px solid #e6e6e6;
    scroll-margin-top: 96px; /* 跳到这一段时让开固定在顶部的页头 */
}

.eg-psection > .eg-psection__title,
#tab-description > .eg-psection__title {
    margin: 0 0 1em;
    font-size: 1.714em;
    font-weight: 400;
    line-height: 1.25;
    color: #333e48;
}

.eg-psection__count {
    font-size: 0.75em;
    color: #7d7d7d;
}

.eg-psection__body {
    position: relative;
}

/* 先按限高输出，页面加载时不会因为收起而跳动；内容不够高时什么都看不出来 */
.eg-psection__body[data-eg-collapse]:not(.is-open) {
    max-height: 520px;
    overflow: hidden;
}

.eg-psection__body.is-collapsed::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 96px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--eg-bg, #fff));
    pointer-events: none;
}

.eg-psection__body.is-animating {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.eg-psection__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin-top: 0.571em;
    padding: 0;
    border: 0;
    background: none;
    font-size: 1.071em;
    color: #0062bd;
    cursor: pointer;
}

.eg-psection__toggle:hover {
    color: var(--eg-link-hover, #29323a);
}

.eg-psection__toggle::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-top: -3px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.eg-psection__toggle[aria-expanded="true"]::after {
    margin-top: 4px;
    transform: rotate(-135deg);
}

#reviews {
    scroll-margin-top: 96px;
}

@media (max-width: 767.98px) {
    .eg-psection {
        padding: 1.714em 0 2em;
    }

    .eg-psection > .eg-psection__title,
    #tab-description > .eg-psection__title {
        font-size: 1.429em;
    }

    .eg-psection__body[data-eg-collapse]:not(.is-open) {
        max-height: 360px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .eg-psection__body.is-animating,
    .eg-psection__toggle::after {
        transition: none;
    }
}

/* 生产 #tab-description p { margin-bottom: 2.857em; color: 灰 } 与 #tab-description :last-child { margin-bottom: 0 }；
   描述内容外层 .electro-description（本主题 .eg-description）下边距 8.571em、最后一个子元素无下边距 */
#tab-description p {
    margin-bottom: 2.857em;
    color: rgb(144.5, 144.5, 144.5);
}

#tab-description :last-child {
    margin-bottom: 0;
}

/* 原来在页签面板里靠这个大下边距撑开；分段后由每段自己的内边距负责 */
.eg-description {
    margin-bottom: 0;
}

.eg-description > :last-child {
    margin-bottom: 0;
}

/* 旧子主题 style.css：商品页不显示 SKU 与分类信息 */
.single-product .product_meta {
    display: none;
}

/* 生产 #tab-description 里的各级标题统一：1.643em / 行高 1.043em / 下 1em */
#tab-description :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6) {
    font-size: 1.643em;
    line-height: 1.043em;
    margin-bottom: 1em;
}

.eg-product__below .woocommerce-Tabs-panel img {
    max-width: 100%;
    height: auto;
}

/* 规格页签的属性表：生产规则原样（#tab-specification table / table.shop_attributes），其余用 reboot 表格规则 */
.single-product table.shop_attributes td p {
    margin-bottom: 0;
}

.single-product table.shop_attributes tbody tr:nth-of-type(odd) {
    background-color: #fff;
}

#tab-specification table.shop_attributes tbody tr:nth-of-type(2n+1) {
    background-color: transparent;
}

#tab-specification table,
#tab-specification table.shop_attributes {
    margin-bottom: 5em;
}

#tab-specification table:last-child,
#tab-specification table.shop_attributes:last-child {
    margin-bottom: 0;
}

#tab-specification table tr td,
#tab-specification table tr th {
    padding: 7px 30px;
    font-size: 14px;
}

#tab-specification table tr th {
    font-weight: 700;
}

#tab-specification table tr td:first-child,
#tab-specification table tr th {
    width: 30%;
}

#tab-specification table tr:first-child td,
#tab-specification table tr:first-child th {
    padding-top: 0;
    border-top: none;
}

/* 紧挨着的几张表（属性表 + 规格正文里商家自填的表）接成一张：去掉中间的空、后一张首行照常留上边距；
   标签列宽本来就是 30%，值列里的长串断开免得把哪张表撑宽，各张表的分隔线和右列起点就对齐。中间隔着文字的表不动。
   整组放进 @supports：不认 :has() 的浏览器一条都不生效，保持原来的间距和首行边距。 */
@supports selector(:has(+ *)) {
    #tab-specification table:has(+ table),
    #tab-specification table.shop_attributes:has(+ table) {
        margin-bottom: 0;
    }

    /* 只给后一张表的第一行（不含 thead 下面 tbody 的首行） */
    #tab-specification table + table > :first-child > tr:first-child td,
    #tab-specification table + table > :first-child > tr:first-child th {
        padding-top: 7px;
    }

    /* 对齐只针对两列表（没有一行超过两格）；三列表、带 rowspan 的多列表保持原布局 */
    #tab-specification table:has(+ table):not(:has(tr > :nth-child(3))) td:not(:first-child),
    #tab-specification table + table:not(:has(tr > :nth-child(3))) td:not(:first-child) {
        overflow-wrap: anywhere;
    }

    /* 手机上 30% 只剩约 50px 字宽，放不下「Dimensiones」，浏览器会按各表最长的词各自撑宽、两表列宽对不上；
       统一放宽到 45%（原来自动撑开约 41%）。词比这还长时那张表照旧自己撑开，不在词中间断。 */
    @media (max-width: 767.98px) {
        #tab-specification table:has(+ table):not(:has(tr > :nth-child(3))) tr > :first-child:nth-last-child(2),
        #tab-specification table + table:not(:has(tr > :nth-child(3))) tr > :first-child:nth-last-child(2) {
            width: 45%;
        }
    }
}

@media (min-width: 768px) {
    .eg-product__top {
        grid-template-columns: 441px minmax(0, 1fr);
        column-gap: 30px;
    }

}

@media (min-width: 1200px) {
    .eg-shop__sidebar--static { display: block; }
}

/* 有货时不显示商城默认的「En existencia」（同生产）；缺货提示照常显示。
   库存插件的型号 / 各仓库存值也用同样的类名（包在 .erp-info-value 里），不能一起隐藏。 */
.eg-product__summary .stock.in-stock:not(.erp-info-value > .stock):not(.availability .stock) {
    display: none;
}

/* 生产 .single-product .related / .upsells ul.products > li.product .product-inner：各宽度内边距 1.071em */
.eg-product__below .related .eg-card__inner,
.eg-product__below .upsells .eg-card__inner {
    padding: 1.071em;
}

/* 生产 .single-product .related / .upsells ul.products > li.product：≥768 每行 4 个（width: 25%） */
@media (min-width: 768px) {
    .eg-product__below .related .eg-grid__list,
    .eg-product__below .upsells .eg-grid__list {
        --eg-cols-now: 4;
    }
}

/* ---------- 评价（生产 Electro 高级评价 .electro-advanced-reviews，本主题 .eg-areviews）：生产规则原样 ---------- */
@font-face {
    font-family: star;
    src: url("../fonts/wc/star.woff") format("woff");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: WooCommerce;
    src: url("../fonts/wc/WooCommerce.woff2") format("woff2"), url("../fonts/wc/WooCommerce.woff") format("woff");
    font-weight: 400;
    font-style: normal;
}

.star-rating {
    position: relative;
    overflow: hidden;
    width: 5.5em;
    height: 1em;
    font-family: star;
    font-size: 1em;
    line-height: 1;
}

.star-rating::before {
    content: "sssss";
    position: absolute;
    top: 0;
    left: 0;
    float: left;
    color: rgb(0 0 0 / .2);
}

.star-rating span {
    position: absolute;
    top: 0;
    left: 0;
    float: left;
    overflow: hidden;
    padding-top: 1.5em;
}

.star-rating span::before {
    content: "SSSSS";
    position: absolute;
    top: 0;
    left: 0;
    color: #fed700;
}

.single-product .woocommerce-product-rating .star-rating {
    display: inline-block;
}

p.stars {
    display: inline-block;
    margin: 0;
}

p.stars a {
    position: relative;
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-right: 1px;
    color: var(--eg-primary);
    text-decoration: none;
    text-indent: -99999px;
}

p.stars a::before {
    content: "\e021";
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 1em;
    height: 1em;
    font-family: WooCommerce;
    line-height: 1;
    text-indent: 0;
}

p.stars a:hover ~ a::before { content: "\e021"; }
p.stars:hover a::before { content: "\e020"; }
p.stars.selected a.active::before { content: "\e020"; }
p.stars.selected a.active ~ a::before { content: "\e021"; }
p.stars.selected a:not(.active)::before { content: "\e020"; }

/* 生产 Bootstrap .col-md-6（评价区左右两列） */
@media (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 auto;
        width: 50%;
    }
}

#reviews .commentlist {
    padding-left: 0;
    list-style: none;
}

#reviews .commentlist > li {
    clear: both;
    margin-bottom: 1.5em;
    padding-bottom: 1.5em;
    border-bottom: 1px solid #ddd;
    list-style: none;
}

#reviews .commentlist > li time {
    color: #aeaeae;
    font-size: .929em;
}

#reviews .commentlist > li .avatar { display: none; }
#reviews .commentlist > li p.meta { margin-bottom: 0; }

#reviews .commentlist > li ul.children {
    padding-top: 2.618em;
    border-top: 1px solid #ddd;
}

#reviews .commentlist > li .star-rating { margin-bottom: 1em; }
#reviews .commentlist > li .star-rating + .meta { display: none; }

#reviews .commentlist > li .description {
    margin-bottom: 1.5em;
    line-height: 1.571em;
}

#reviews .commentlist > li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.eg-areviews #reply-title,
.eg-areviews .h2,
.eg-areviews h2 {
    padding-bottom: 0;
    border: none;
    font-size: 1.286em;
    font-weight: 400;
    line-height: 1.222em;
}

.eg-areviews #reply-title::after,
.eg-areviews .h2::after,
.eg-areviews h2::after {
    content: none;
}

.eg-areviews .comment-form > p {
    width: 100%;
    margin-bottom: 1.4em;
}

.eg-areviews .comment-form > p label {
    flex-shrink: 0;
    width: 30%;
}

.eg-areviews .comment-form > p textarea {
    height: 7.857em;
}

.eg-areviews .comment-form .form-submit input[type="submit"] {
    padding: 1em 2.222em;
    border-width: 0;
    font-size: .929em;
    font-weight: 700;
    line-height: 1.385em;
}

.advanced-review { margin-bottom: 3.429em; }
.advanced-review .based-title { margin-bottom: 2.571em; }
.advanced-review .avg-rating { margin-bottom: 1.429em; }

.advanced-review .avg-rating .avg-rating-number {
    display: block;
    font-size: 2.143em;
    font-weight: 700;
    line-height: .6em;
}

.advanced-review .rating-histogram .rating-bar {
    display: flex;
    align-items: center;
    margin-bottom: 1.429em;
}

.advanced-review .rating-histogram .rating-bar::after {
    content: "";
    display: block;
    clear: both;
}

.advanced-review .rating-histogram .star-rating { flex-shrink: 0; }

.advanced-review .rating-histogram .rating-percentage-bar {
    flex-grow: 1;
    max-width: 14.286em;
    height: .714em;
    margin: 0 15px;
    border-radius: .286em;
    background-color: #f3f3f3;
}

@media (min-width: 768px) {
    .advanced-review .rating-histogram .rating-percentage-bar { margin: 0 15px 0 30px; }
}

@media (min-width: 992px) {
    .advanced-review .rating-histogram .rating-percentage-bar { margin: 0 15px 0 40px; }
}

.advanced-review .rating-histogram .rating-percentage {
    display: block;
    height: 100%;
    border-radius: .286em;
    background-color: #d8d8d8;
}

.advanced-review .rating-histogram .rating-count { line-height: 1em; }
.advanced-review .rating-histogram .rating-count.zero { color: #b6b6b6; }

#reviews.eg-areviews .comment_container { padding-bottom: 14px; }

#reviews.eg-areviews .commentlist > li ul.children {
    float: none;
    width: 100%;
    list-style: none;
}

#reviews.eg-areviews .commentlist > li ul.children .meta ~ .meta { display: none; }
#reviews.eg-areviews .commentlist > li ul.children .comment_container { padding-bottom: 0; }
#reviews.eg-areviews .commentlist > li ul.children .description { margin-bottom: 0; }

#reviews.eg-areviews .comment-form > p label {
    display: block;
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    #reviews.eg-areviews .comment-form > p { display: flex; }
}

#reviews.eg-areviews .comment-form > p.comment-form-cookies-consent {
    display: flex;
    align-items: center;
}

#reviews.eg-areviews .comment-form > p.comment-form-cookies-consent label {
    width: 100%;
    margin-bottom: 0;
    margin-left: 10px;
}

/* 评价表单按访客后置加载（inc/shop/reviews.php、single.js）：等待中 / 失败可重试时盖住默认提示，表单到了淡入 */
.eg-review-slot.is-loading > :not(.eg-review-slot__status),
.eg-review-slot.is-failed > :not(.eg-review-slot__status) {
    display: none;
}

.eg-review-slot__status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    min-height: 44px;
    color: #595959;
}

.eg-review-slot__spinner {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-top-color: var(--eg-primary);
    border-radius: 50%;
    animation: eg-review-spin 0.8s linear infinite;
}

.eg-review-slot__retry {
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: #0062bd;
    font-weight: 700;
    cursor: pointer;
}

.eg-review-slot__retry:hover {
    color: var(--eg-link-hover, #29323a);
}

.eg-review-slot.is-loading .eg-review-slot__retry,
.eg-review-slot.is-failed .eg-review-slot__spinner {
    display: none;
}

.eg-review-slot.is-loaded {
    animation: eg-review-in 0.2s ease-out;
}

@keyframes eg-review-spin {
    to { transform: rotate(360deg); }
}

@keyframes eg-review-in {
    from { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .eg-review-slot__spinner,
    .eg-review-slot.is-loaded {
        animation: none;
    }
}

/* 标题下的库存行与型号 / GS1 行（生产 .single-product .availability 三条规则原样） */
.single-product .availability {
    display: table-cell;
    vertical-align: middle;
    color: rgb(118.0243902439, 138.9512195122, 157.9756097561);
}

.single-product .availability span {
    font-weight: 700;
}

.single-product .availability p.stock {
    display: inline;
}

/* 标题下的评分行（生产 .single-product .woocommerce-product-rating 四条规则原样） */
.single-product .woocommerce-product-rating {
    margin-bottom: 1em;
}

.single-product .woocommerce-product-rating .star-rating {
    display: inline-block;
}

.single-product .woocommerce-product-rating .woocommerce-review-link {
    font-size: .929em;
    line-height: 1.308em;
}

.single-product .woocommerce-product-rating .woocommerce-review-link:not(:hover):not(:focus) {
    color: rgb(118.0243902439, 138.9512195122, 157.9756097561);
}

/* 手机上数量框与加购按钮上下排列时的间距（生产 @media (max-width: 575.98px)） */
@media (max-width: 575.98px) {
    .single-product .cart .quantity {
        margin-bottom: 20px;
    }
}
