/* 菜单商品分类数量样式 */
.shopire-menu-cat-count{
  font-size: 12px;
  opacity: .7;
  margin-left: 4px;
  white-space: nowrap;
}

/* 下拉菜单兜底：不管是否分列，都要限制高度避免出屏 */
.wf_header .wf_navbar-mainmenu .dropdown-menu,
.wf_header .widget_nav_menu .sub-menu{
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
}

/* 多子分类下拉菜单：超过半屏时自动分列（PC），手机端单列可滚动 */
.wf_header .wf_navbar-mainmenu .dropdown-menu.shopire-dropdown--tall,
.wf_header .widget_nav_menu .sub-menu.shopire-dropdown--tall{
  width: 52rem;         /* 2列默认宽度 */
  max-width: 92vw;
  column-count: 2;
  column-gap: 0;
  padding: .5rem;
}

/* 超大屏可以 3 列 */
@media (min-width: 1400px){
  .wf_header .wf_navbar-mainmenu .dropdown-menu.shopire-dropdown--tall,
  .wf_header .widget_nav_menu .sub-menu.shopire-dropdown--tall{
    width: 78rem;
    column-count: 3;
  }
}

/* 分列时：每个 li 不要被拆开，a 撑满列宽 */
.wf_header .wf_navbar-mainmenu .dropdown-menu.shopire-dropdown--tall > li,
.wf_header .widget_nav_menu .sub-menu.shopire-dropdown--tall > li{
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}
.wf_header .wf_navbar-mainmenu .dropdown-menu.shopire-dropdown--tall > li > a,
.wf_header .widget_nav_menu .sub-menu.shopire-dropdown--tall > li > a{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  white-space: nowrap;
}

/* 手机端：强制单列 + 限高滚动（不分列） */
@media (max-width: 991px){
  .wf_mobilenav-mainmenu .dropdown-menu{
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .wf_header .wf_navbar-mainmenu .dropdown-menu.shopire-dropdown--tall,
  .wf_header .widget_nav_menu .sub-menu.shopire-dropdown--tall{
    width: 92vw;
    column-count: 1;
    padding: .5rem 0;
  }
}

/*
Theme Name: 	   Shopire
Text Domain: 	   shopire
Version:            1.0.54
Tested up to:       6.8
Requires at least:  4.7
Requires PHP:       5.6
Author:             WPFable
Author URI:         https://wpfable.com/
Theme URI:          https://wpfable.com/themes/shopire-free/
Description:        Shopire is a fast, clean, lightweight theme. Shopire is customizable and modern-looking free responsive WooCommerce WordPress theme for e-commerce stores like clothing, fashion, electronics, ebooks, dress store, sports shop, marketplace, multivendor, equipments or online products. Theme is compatible with Elementor, WPML, Polylang, Yoast SEO, WooCommerce, Contact Form 7, Jetpack and other popular plugins. The theme is SEO friendly, WPML and RTL ready. Looking for a WooCommerce theme? Look no further! Shopire Pro demo https://demos.wpfable.com/premium/shopire/
Tags:               one-column, two-columns ,right-sidebar, flexible-header, custom-background, custom-header, custom-menu, editor-style, featured-images, footer-widgets, post-formats, theme-options, threaded-comments, translation-ready, full-width-template, custom-logo, blog, e-commerce, portfolio
License: GPLv3 or later
License URI:  https://www.gnu.org/licenses/gpl-3.0.html

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned
with others.
 */
 
.iconbox:hover a {
    color: #fff;
}

.iconbox a {
    text-decoration: none;
	color: var(--wf-secondary-color);
}

.wp-block-details summary {
    font-weight: 600;
    padding: 10px;
}

.wp-block-latest-comments__comment a {
    text-decoration: none;
}

.wp-block-verse {
    padding: 10px;
}

.wp-block-archives-list a {
    text-decoration: none;
}

.has-background.wp-block-read-more, 
.has-background.post-navigation-link-next,
.has-background.post-navigation-link-previous {
    padding: 0.25em 1.375em;
}

.wp-block-woocommerce-customer-account a .wc-block-customer-account__account-icon {
    height: 2rem !important;
    width: 2rem !important;
}

.wp-block-avatar img {
    border-radius: 50%;
}

.wp-block-avatar:hover img {
    -webkit-transform: scale(1.07);
    transform: scale(1.07);
}

.post-navigation-link-next a,
.post-navigation-link-previous a {
    text-decoration: none;
}

.wp-block-woocommerce-single-product .wp-block-post-title a {
    text-decoration: none;
}

.wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:hover, 
.wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:focus {
    color: #fff;
}

.wp-block-page-list {
    list-style: none;
    padding: 0;
}

.wc-block-grid__products .wc-block-components-product-button__button {
    border-radius: 0;
    text-decoration: none;
}

.wp-block-page-list a {
    color: var(--wf-secondary-color);
    text-decoration: none;
    font-weight: 600;
}

.wc-block-components-product-title a.wc-block-components-product-name:hover, 
.wc-block-components-product-title a.wc-block-components-product-name:focus {
    color: var(--wf-main-color);
}

.wp-block-page-list a:hover,
.wp-block-page-list a:focus {
    color: var(--wf-main-color);
}

.wp-block-list {
    padding: 0;
}

.wc-block-components-product-name {
    color: var(--wf-secondary-color);
    text-decoration: none;
    font-weight: 600;
}

.wp-block-list.has-background {
    padding: 1.25em 2.375em;
}

.wp-block-details.has-background {
    padding: 1.25em 2.375em;
}

.wp-block-verse.has-background {
    padding: 1.25em 2.375em;
}

.wp-block-preformatted.has-background {
    padding: 1em;
}

.wp-block-archives {
    list-style: none;
    padding: 0;
}

.wp-block-archives-list a {
    font-weight: 600;
    color: var(--wf-secondary-color);
}

.wp-block-archives-list a:hover, 
.wp-block-archives-list a:focus {
    color: var(--wf-main-color);
}

.wp-block-page-list.has-background {
    padding: 1rem;
}

a.wp-block-button__link:hover, 
a.wp-block-button__link:focus {
    color: #fff;
    text-decoration: none;
}

.wp-block-button.is-style-outline a.wp-block-button__link {
    color: var(--wf-main-color);
}

.wp-block-latest-comments {
    padding-left: 0;
}

.wp-block-latest-comments li a:not(:hover, :focus) {
    color: var(--wf-secondary-color);
}

.wp-block-latest-comments li a {
    text-decoration:none;
}

.wf_footer ul.product_list_widget li .woocommerce-Price-amount {
    color: var(--wf-main-color);
}

.wf_footer ul.product_list_widget li {
    border-bottom: none;
}

.wf_footer .widget_shopping_cart .button:not(.checkout):not(.add_to_cart_button) {
    background-color: var(--wf-secondary-color);
}

.wf_footer .widget_shopping_cart .button:not(.checkout):not(.add_to_cart_button):hover,
.wf_footer .widget_shopping_cart .button:not(.checkout):not(.add_to_cart_button):focus {
        background-color: var(--wf-secondary-color) !important;
}

.wf_footer .widget_shopping_cart a.checkout:hover, 
.wf_footer .widget_shopping_cart a.checkout:focus {
        background-color: var(--wf-main-color) !important;
}

.wf_footer .widget_shopping_cart span.amount {
    color: var(--wf-main-color);
}

.wf_footer .widget_shopping_cart li img {
   object-fit: contain !important;
   padding-right: 10px;
}

/* ========================================
   商品详情页 - 产品大图固定尺寸 + 小缩略图（强制生效）
   兼容：经典模板(flexslider) + WooCommerce Blocks 画廊
   ======================================== */

/* 经典 WooCommerce 画廊（Flexslider） */
body.single-product.woocommerce div.product div.images .flex-viewport,
body.single-product.woocommerce div.product div.images .woocommerce-product-gallery .flex-viewport {
    height: 1400px !important;
    max-height: 1400px !important;
    min-height: 1400px !important;
    overflow: hidden !important;
    background: #f9f9f9 !important;
    border-radius: 8px !important;
}

/* 强制覆盖 Flexslider JS 动态设置的 inline style（使用属性选择器） */
body.single-product.woocommerce div.product div.images .flex-viewport[style],
body.single-product.woocommerce div.product div.images .woocommerce-product-gallery .flex-viewport[style] {
    height: 1400px !important;
    max-height: 1400px !important;
    min-height: 1400px !important;
}

/* 确保主图图片正确显示 */
body.single-product.woocommerce div.product div.images .flex-viewport .woocommerce-product-gallery__image img,
body.single-product.woocommerce div.product div.images .woocommerce-product-gallery .flex-viewport .woocommerce-product-gallery__image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    transition: none !important; /* 禁用过渡动画，避免闪烁 */
}

/* 禁用 zoom 功能的样式（防止鼠标悬停时图片尺寸变化） */
body.single-product.woocommerce div.product div.images .woocommerce-product-gallery__image .zoomImg,
body.single-product.woocommerce div.product div.images .woocommerce-product-gallery__image img.zoomImg {
    display: none !important;
}

/* 确保 zoom 容器不会影响布局 */
body.single-product.woocommerce div.product div.images .woocommerce-product-gallery__image {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 8px !important; /* 切换到任意一张主图都保持圆角 */
}

body.single-product.woocommerce div.product div.images .woocommerce-product-gallery__image a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

body.single-product.woocommerce div.product div.images .woocommerce-product-gallery__image a:hover img {
    transform: none !important; /* 禁用 hover 时的缩放 */
    transition: none !important;
}

/* 解除主题在 woo-styles.css 中对第一张图的 max-height 限制（否则主图无法变高） */
body.single-product.woocommerce div.product div.images .woocommerce-product-gallery__image,
body.single-product .woocommerce div.product div.images .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child,
body.single-product.woocommerce div.product div.images .woocommerce-product-gallery__image:nth-child(1) {
    max-height: none !important;
}

body.single-product.woocommerce div.product div.images .flex-viewport img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
}

/* Owl Carousel 主图也强制圆角（部分站点切换图时走 Owl 容器） */
body.single-product .woocommerce-product-gallery__wrapper.owl-carousel,
body.single-product .woocommerce-product-gallery__wrapper.owl-carousel .woocommerce-product-gallery__image,
body.single-product .woocommerce-product-gallery__wrapper.owl-carousel .woocommerce-product-gallery__image a,
body.single-product .woocommerce-product-gallery__wrapper.owl-carousel .woocommerce-product-gallery__image img {
    border-radius: 8px !important;
    overflow: hidden !important;
}

/* ========================================
   商品详情页 - 缩略图相册：一行固定 4 个 + 左右翻页（桌面/手机一致）
   兼容：Flexslider(.flex-control-thumbs) / 主题缩略图(.product-control-nav) / Blocks
   ======================================== */

body.single-product .rsd-thumb-carousel {
    position: relative !important;
    margin-top: 10px !important;
}

body.single-product .rsd-thumb-carousel__track {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    overflow: hidden !important;
    scroll-behavior: smooth !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

/* 一行固定 4 张：每张固定 200x300（超出则按钮翻页） */
body.single-product .rsd-thumb-carousel__track > li,
body.single-product .rsd-thumb-carousel__track > .wc-block-product-gallery-thumbnails__thumbnail {
    flex: 0 0 160px !important;
    width: 160px !important;
    max-width: 160px !important;
    height: 240px !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    background: #fff !important;
}

body.single-product .rsd-thumb-carousel__track img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    opacity: 1 !important;
    transition: opacity 0.3s ease !important;
}

/* 点击的图片添加蒙版效果（变暗） */
body.single-product .rsd-thumb-carousel__track > li.flex-active img,
body.single-product .rsd-thumb-carousel__track > li.active img {
    opacity: 0.4 !important;
}

body.single-product .rsd-thumb-carousel__btn {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(0,0,0,0.12) !important;
    background: rgba(255,255,255,0.96) !important;
    color: #111 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 5 !important;
    user-select: none !important;
}

body.single-product .rsd-thumb-carousel__btn:hover,
body.single-product .rsd-thumb-carousel__btn:focus {
    border-color: var(--wf-main-color) !important;
}

body.single-product .rsd-thumb-carousel__btn[disabled] {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
}

body.single-product .rsd-thumb-carousel__btn--prev { left: -8px !important; }
body.single-product .rsd-thumb-carousel__btn--next { right: -8px !important; }


body.single-product.woocommerce div.product div.images .flex-control-thumbs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    margin-top: 10px !important;
}

body.single-product.woocommerce div.product div.images .flex-control-thumbs li {
    width: 160px !important;
    height: 240px !important;
    flex: 0 0 200px !important;
    overflow: hidden !important;
    margin: 0 !important;
}

body.single-product.woocommerce div.product div.images .flex-control-thumbs li img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    border: 2px solid #e1e1e1 !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    opacity: 1 !important;
    transition: opacity 0.3s ease, border-color 0.3s ease !important;
}

body.single-product.woocommerce div.product div.images .flex-control-thumbs li img:hover {
    border-color: var(--wf-main-color) !important;
}

/* 点击的图片添加蒙版效果（变暗） */
body.single-product.woocommerce div.product div.images .flex-control-thumbs li img.flex-active {
    border-color: var(--wf-main-color) !important;
    opacity: 0.4 !important;
}

/* WooCommerce Blocks 画廊（Gutenberg/Blocks） */
body.single-product .wc-block-product-gallery-large-image__container {
    height: 1400px !important;
    overflow: hidden !important;
    background: #f9f9f9 !important;
    border-radius: 8px !important;
}

body.single-product .wc-block-product-gallery-large-image__wrapper {
    height: 1400px !important;
}

body.single-product img.wc-block-woocommerce-product-gallery-large-image__image {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
}

body.single-product .wc-block-product-gallery-thumbnails__scrollable {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
}

body.single-product .wc-block-product-gallery-thumbnails__thumbnail {
    width: 160px !important;
    height: 240px !important;
    flex: 0 0 150px !important;
    overflow: hidden !important;
    border-radius: 8px !important;
}

body.single-product img.wc-block-product-gallery-thumbnails__thumbnail__image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    border: 2px solid #e1e1e1 !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    opacity: 1 !important;
    transition: opacity 0.3s ease, border-color 0.3s ease !important;
}

body.single-product img.wc-block-product-gallery-thumbnails__thumbnail__image:hover {
    border-color: var(--wf-main-color) !important;
}

/* 点击的图片添加蒙版效果（变暗） */
body.single-product img.wc-block-product-gallery-thumbnails__thumbnail__image--is-active {
    border-color: var(--wf-main-color) !important;
    opacity: 0.4 !important;
}

/* 主题自定义缩略图导航（.product-control-nav） */
body.single-product .woocommerce div.product div.images .product-control-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    margin-top: 10px !important;
    padding: 0 !important;
    list-style: none !important;
}

body.single-product .woocommerce div.product div.images .product-control-nav li {
    width: 160px !important;
    height: 240px !important;
    flex: 0 0 200px !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    border: 2px solid #e1e1e1 !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    transition: border-color 0.3s ease !important;
}

body.single-product .woocommerce div.product div.images .product-control-nav li:hover {
    border-color: var(--wf-main-color) !important;
}

/* 点击的图片边框高亮 */
body.single-product .woocommerce div.product div.images .product-control-nav li.active {
    border-color: var(--wf-main-color) !important;
}

body.single-product .woocommerce div.product div.images .product-control-nav li img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    opacity: 1 !important;
    transition: opacity 0.3s ease !important;
}

/* 点击的图片添加蒙版效果（变暗） */
body.single-product .woocommerce div.product div.images .product-control-nav li.active img {
    opacity: 0.4 !important;
}

/* 主图容器（如果没有 Flexslider） */
body.single-product .woocommerce div.product div.images .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child {
    width: 100% !important;
    height: 1400px !important;
    overflow: hidden !important;
    background: #f9f9f9 !important;
    border-radius: 8px !important;
    margin-bottom: 10px !important;
}

body.single-product .woocommerce div.product div.images .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
}

/* 响应式 */
@media (max-width: 991px) {
    body.single-product.woocommerce div.product div.images .flex-viewport,
    body.single-product.woocommerce div.product div.images .flex-viewport[style*="height"],
    body.single-product .woocommerce div.product div.images .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child {
        height: 660px !important;
        max-height: 660px !important;
        min-height: 660px !important;
    }
}

@media (max-width: 576px) {
    body.single-product.woocommerce div.product div.images .flex-viewport,
    body.single-product.woocommerce div.product div.images .flex-viewport[style*="height"],
    body.single-product .woocommerce div.product div.images .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child {
        height: 420px !important;
        max-height: 420px !important;
        min-height: 420px !important;
    }
    
    /* 手机端：不显示缩略图相册，主图区域左右滑动切换即可 */
    body.single-product .rsd-thumb-carousel,
    body.single-product.woocommerce div.product div.images .flex-control-thumbs,
    body.single-product .woocommerce div.product div.images .product-control-nav,
    body.single-product .wc-block-product-gallery-thumbnails__scrollable {
        display: none !important;
    }
}

/* ========================================
   产品列表/分类页：手机端不显示左侧筛选栏（按你的需求直接隐藏）
   ======================================== */
@media (max-width: 991px) {
    body.post-type-archive-product #wf-sidebar,
    body.tax-product_cat #wf-sidebar,
    body.tax-product_tag #wf-sidebar,
    body.tax-product_brand #wf-sidebar {
        display: none !important;
    }
}

@media (max-width: 991px) {
    body.single-product.woocommerce div.product div.images .flex-viewport { height: 660px !important; }
    body.single-product .wc-block-product-gallery-large-image__container { height: 660px !important; }
    body.single-product .wc-block-product-gallery-large-image__wrapper { height: 660px !important; }
}

@media (max-width: 576px) {
    body.single-product.woocommerce div.product div.images .flex-viewport { height: 420px !important; }
    body.single-product .wc-block-product-gallery-large-image__container { height: 420px !important; }
    body.single-product .wc-block-product-gallery-large-image__wrapper { height: 420px !important; }
}