/* ========================================================================== */
/*  AZEKA Custom CSS                                                          */
/*  来源：WP 额外 CSS 迁移                                                    */
/*  加载顺序：最后（enqueue priority 999）                                   */
/*  ⚠ 请勿再放回 WP Customizer                                                */
/* ========================================================================== */


/* ========================================================================== */
/*  01. 产品主图 / Gallery（桌面端 + 移动端）【独立模块：不与其他合并】        */
/* ========================================================================== */

/* WooCommerce 标签页内容左右边距 */
.woocommerce-tabs .wc-tabs-wrapper .ct-accordion-tab .ct-accordion-heading,
.woocommerce-tabs .wc-tabs-wrapper .ct-accordion-tab .woocommerce-Reviews {
    margin-left: 3%;
    margin-right: 3%;
}

/* 产品摘要区域对齐修正 */
.ct-default-gallery .entry-summary,
.ct-stacked-gallery .entry-summary {
    margin-inline-start: 0%;
}

/* 主图整体微调（抵消边框影响） */
.ct-product-gallery-container {
    margin-left: 2px;
    margin-right: -2px;
}

/* 桌面端：主图瀑布布局 */
.ct-stacked-gallery-container {
    display: flex;
    flex-wrap: wrap;
    margin-left: -1px;
    margin-top: -1px;
}

.ct-stacked-gallery-container .ct-media-container {
    box-sizing: border-box;
    width: 50%;                 /* 两列布局 */
    border: 1px solid #000;
    margin-left: -1px;
    margin-top: -1px;
}

.ct-stacked-gallery-container .ct-media-container img {
    display: block;
    width: 100%;
    height: auto;
}

/* Flexy 组件微调（可选移除：若你当前不再使用 flexy，可注释整个块测试） */
.flexy-item {
    margin: 0 -0.5px;
}

.flexy-items .flexy-item {
    margin-left: -0.5px;
    margin-right: -0.5px;
}

/* 移动端：主图横向滚动（核心体验） */
@media (max-width: 1024px) {

    /* 主图容器：为滚动条预留空间 */
    .ct-product-gallery-container {
        position: relative;
        padding-bottom: 2px;
    }

    /* 横向滚动主图容器 */
    .ct-stacked-gallery-container {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 0 !important;

        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;

        cursor: grab !important;
        scrollbar-width: thin;                  /* Firefox 滚动条样式 */
        scrollbar-color: #ccc transparent;      /* Firefox 滚动条颜色 */
    }

    .ct-stacked-gallery-container:active {
        cursor: grabbing !important;
    }

    /* Webkit 滚动条样式 */
    .ct-stacked-gallery-container::-webkit-scrollbar {
        height: 8px;
        margin-top: 20px !important;
    }

    .ct-stacked-gallery-container::-webkit-scrollbar-track {
        background: transparent;
        margin: 0 20px;
    }

    .ct-stacked-gallery-container::-webkit-scrollbar-thumb {
        background: #000;
        border-radius: 10px;
    }

    .ct-stacked-gallery-container::-webkit-scrollbar-thumb:hover {
        background: #000;
    }

    /* 每一张主图占满视口 */
    .ct-stacked-gallery-container > figure {
        flex: 0 0 100% !important;
        width: 100% !important;
        margin-right: 0 !important;
        position: relative;

        scroll-snap-align: start !important;
    }

    .ct-stacked-gallery-container .ct-media-container,
    .ct-stacked-gallery-container img {
        width: 100% !important;
        height: auto !important;
    }
}

/* 小屏幕：瀑布两列的反向修正 */
@media (max-width: 768px) {

    .ct-stacked-gallery-container .ct-media-container {
        width: 100%;
    }

    .ct-product-gallery-container {
        margin-left: 0;
    }
}


/* ========================================================================== */
/*  02. WooCommerce 通用（全站：产品/列表/购物车/结账/账号）                    */
/* ========================================================================== */

/* 修复：Blocksy 移动端单品页主图下方 3em 间距（来源：blocksy woocommerce.min.css） */
@media (max-width: 999.98px) {
    body.single-product div.woocommerce-product-gallery {
        margin-bottom: 0 !important;
    }
}


/* 产品列表卡片间距压缩 */
.products.columns-5 li.product {
    margin: -1px !important;
}

/* 防止交互层被遮挡（可选移除：若不再出现“按钮/标题被相邻卡片遮挡”，可注释测试） */
.products.columns-5 li.product .ct-woo-card-actions,
.products.columns-5 li.product .woocommerce-loop-product__title,
.products.columns-5 li.product .entry-meta {
    position: relative;
    z-index: 1;
}

/* 标签字号统一 */
.ct-product-additional-info li .ct-label {
    font-size: 12px;
}

/* SKU / 变体选择器 */
.ct-variation-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0;                     /* 桌面端无间距 */
}

.ct-variation-swatches .ct-swatch-container {
    margin: 0 !important;
}

@media (max-width: 768px) {
    .ct-variation-swatches {
        gap: 8px;               /* 移动端增加点击间距 */
    }
}

/* 产品详情页：结构与间距（3% 规范） */
.summary.entry-summary.entry-summary-items {
    padding-top: 9px;
}

.summary.entry-summary .ct-breadcrumbs,
.summary.entry-summary .product_title.entry-title,
.summary.entry-summary .woocommerce-product-details__short-description,
.summary.entry-summary .price,
.woocommerce-product-rating,
.summary.entry-summary .ct-product-add-to-cart {
    margin-left: 3%;
    margin-right: 3%;
}

/* 描述折叠区域 */
.ct-accordion-heading.ct-expandable-trigger {
    padding-left: 3% !important;
    padding-right: 3% !important;
}

#tab-description .entry-content.is-layout-constrained,
#tab-additional_information {
    padding-left: 3% !important;
    padding-right: 3% !important;
}

/* 隐藏侧边评价（最后一个 tab） */
.wc-tabs-wrapper .ct-accordion-tab:last-child {
    display: none;
}

/* 价格后缀（全站显示：可选中/可翻译由 PHP 注入控制） */
.azeka-price-suffix {
    display: inline-block;
    margin-left: 5px;

    font-size: 0.8em;
    color: #4CAF50;
    white-space: nowrap;
}

/* 购物车页面边距 */
.ct-woocommerce-cart-form,
.ct-suggested-products--cart {
    margin: 3%;
}

/* 结账页边距 */
body.page-id-9 .ct-container-full[data-content="normal"][data-vertical-spacing="top:bottom"] {
    padding: 3% !important;
}

/* 账号页（移动端）边距 */
@media (max-width: 1200px) {
    div.woocommerce-MyAccount-content {
        margin-left: 3%;
        margin-right: 3%;
    }
}


/* ========================================================================== */
/*  03. 页面级布局（非 Woo：NEWS / 登录 / 404）                                */
/* ========================================================================== */

/* NEWS 页面 */
body[class*="news"] .ct-container[data-sidebar="left"],
body:has(a[href*="/news/"]) .ct-container[data-sidebar="left"] {
    padding: 3% !important;
    box-sizing: border-box;
}

/* 登录页 */
.page-id-1004 .ct-container-full[data-content="normal"] {
    padding: 3% !important;
}

/* 404 页面 */
.ct-container[data-vertical-spacing="top:bottom"] .ct-no-results {
    padding: 3% !important;
}


/* ========================================================================== */
/*  04. 全站组件（UI/表单/浮层/插件通用）                                      */
/* ========================================================================== */

/* 底部悬浮加购条：增加 1px 顶部分隔线 */
.ct-drawer-inner .ct-floating-bar {
    border-top: 1px solid #000;
}

/* 表单（全站）：textarea 统一（⚠ 仅当你确认全站都需要统一高度时保留） */
textarea {
    --theme-form-field-border-radius: 0;
    height: 100px;
}

/* 翻译插件：隐藏语言检测弹窗 */
#trp_no_text_popup_wrap {
    display: none !important;
}


/* ========================================================================== */
/*  05. 评论区（Customer Reviews 插件：全站 + 移动端弹窗）                     */
/* ========================================================================== */

/* 隐藏无关元素 */
.cr-ajax-search,
.cr-review-form-cancel,
.cr-review-form-nav,
.cr-summaryBox-wrap.cr-summaryBox-add-review,
.cr-search-no-reviews,
.cr-count-row {
    display: none !important;
}

/* 评论表单强制显示 */
.cr-review-form-wrap {
    display: block !important;
}

/* 星级大小 */
.cr-review-form-rating-cont .cr-review-form-rating-inner svg {
    height: 23px !important;
    width: auto;
}

/* 评论 LOGO */
.cr-review-form-item img[src*="cropped-LOGO_icon.png"] {
    height: 40px !important;
    width: auto !important;
}

/* 提交按钮样式（保持原逻辑：仅改背景色为黑色） */
.cr-all-reviews-shortcode .cr-review-form-wrap .cr-review-form-buttons .cr-review-form-submit,
.cr-ajax-reviews-review-form .cr-review-form-wrap .cr-review-form-buttons .cr-review-form-submit,
.cr-reviews-grid .cr-review-form-wrap .cr-review-form-buttons .cr-review-form-submit,
.cr-qna-block .cr-review-form-buttons .cr-review-form-submit {
    display: flex;
    background-color: #000;
}

/* 晒图横向列表的滚动条下移 15px */
.cr-ajax-reviews-cus-images-div2 {
    padding-bottom: 15px;
}

/* 限制描述部分高度 */
.cr-comment-text .description {
    max-height: 149px;
    overflow-y: auto;
}

/* 描述区域滚动条（Webkit） */
.cr-comment-text .description::-webkit-scrollbar {
    width: 6px;
}

.cr-comment-text .description::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.cr-comment-text .description::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.cr-comment-text .description::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 移动端：评论图片弹窗 */
@media (max-width: 768px) {

    .cr-ajax-reviews-cus-images-modal-cont.cr-mask-active {
        padding: 6% !important;
        box-sizing: border-box !important;
        overflow: visible !important; /* 滚动交给内部模态框 */
    }

    .cr-ajax-reviews-cus-images-modal {
        width: 100% !important;
        height: 75vh !important;

        overflow-y: auto !important;
        overflow-x: hidden !important;

        margin: 0 !important;
        border-radius: 8px !important;

        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important; /* Firefox 隐藏滚动条 */
    }

    .cr-ajax-reviews-cus-images-modal::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }

    /* 内部滑块容器适配 */
    .cr-ajax-reviews-cus-images-slider-main {
        height: auto !important;
        min-height: 100% !important;
    }

    /* 头部：固定 + 去除横线/阴影 */
    .cr-ajax-reviews-cus-images-hdr {
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;

        background: transparent !important;
        border-bottom: none !important;
        box-shadow: none !important;
    }

    .cr-ajax-reviews-cus-images-close {
        background: rgba(0, 0, 0, 0.2) !important;
        border-radius: 50% !important;

        width: 40px !important;
        height: 40px !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        margin-left: auto !important;
    }

    /* 图片适应容器 */
    .cr-ajax-reviews-slide-main img {
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
    }

    /* 移除之前可能设置的评论区域单独滚动 */
    .cr-ajax-reviews-slide-main-comment,
    .cr-ajax-reviews-slide-main-comment-body {
        overflow: visible !important;
        max-height: none !important;
    }

    /* 隐藏底部缩略图导航区域 */
    .cr-ajax-reviews-cus-images-slider-nav {
        display: none !important;
    }

    /* 评价内容高度 */
    .cr-ajax-reviews-slide-main-comment-body {
        margin-top: 20px !important;

        height: auto !important;
        max-height: 300px !important;
        min-height: 60px !important;

        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;

        display: flex;
        flex-direction: column;
    }

    /* 确保点赞按钮始终在底部 */
    .cr-ajax-reviews-slide-main-comment {
        display: flex;
        flex-direction: column;
        min-height: 0;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* 点赞按钮样式优化 */
    .cr-vote {
        margin-top: auto !important;
        padding-top: 15px !important;
        border-top: 1px solid #f0f0f0 !important;
    }
}


/* ========================================================================== */
/* ======================  调整价格区域中特定元素的样式  ==================== */
/* ========================================================================== */

.single-product .summary .price del,
.single-product .summary .price .azeka-price-suffix {
    font-weight: normal !important; /* 确保这些元素不加粗 */
}

/* 单独设置划线价为深灰色 */
.single-product .summary .price del .woocommerce-Price-amount {
    color: #666 !important; /* 这里使用深灰色，您可以根据需要调整色值，例如 #777 或 #888 */
}


/* 1. 自定义加载动画 */
.ct-load-more-helper .ct-ajax-loader {
  position: relative;
  width: 60px; /* 设置加载动画的大小 */
  height: 60px; /* 设置加载动画的大小 */
	 margin-top: 20px; /* 上边距 */
  margin-bottom: 20px; /* 下边距 */
}

/* 所有图片：利用 width/height 属性维持比例 */
img {
    display: block;
    aspect-ratio: attr(width) / attr(height);
    min-height: 1px;
}
/* 精确针对浮动栏内的容器设置边距 */
.ct-drawer-inner .ct-floating-bar .ct-container {
    margin-left: 20px;
    margin-right: 20px;
    box-sizing: border-box; /* 确保内边距和边框计算在总宽度内 */
}




/* ========================================================================== */
/*   调整下拉菜单四周边距  以及结账页条款上下间距 */
/* ========================================================================== */

ul.sub-menu,
#menu-item-7803.menu-item,#gspb_row-id-gsbp-a465f14  {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.woocommerce-terms-and-conditions {
    margin-top: 20px !important;
    margin-bottom: 20px !important;
}