/*
Theme Name: Blocksy Child
Description: Child theme of Blocksy
Author: Your Name
Template: blocksy
Version: 1.0.0
Text Domain: blocksy-child
*/

/* 产品图片轮播样式 */
.product-image-carousel-wrapper {
    margin: 30px 0;
    border-radius: 12px;
    overflow: hidden;
}

.product-image-carousel-wrapper.carousel-full-width {
    margin-left: calc(-100vw / 2 + 50%);
    margin-right: calc(-100vw / 2 + 50%);
    max-width: 100vw;
}

.product-image-carousel {
    position: relative;
    width: 100%;
}

.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* 4:3 宽高比 */
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.carousel-slide img,
.carousel-slide video,
.carousel-slide iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.carousel-slide:hover img {
    transform: scale(1.02);
}

/* 进度条指示器 - 放在图片内部中下位置 */
.carousel-progress-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 15;
}

.progress-line {
    width: 40px;
    height: 3px;
    background: rgba(191, 191, 191, 0.4);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.progress-line:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scaleY(1.5);
}

.progress-line.active {
    background: rgba(255, 255, 255, 0.8);
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #fff;
    border-radius: 2px;
    width: 0;
    transition: width 0.1s linear;
}

.progress-line.active .progress-fill {
    animation: progressFill 5s linear infinite;
}

@keyframes progressFill {
    from { width: 0; }
    to { width: 100%; }
}

.carousel-description {
    padding: 30px 20px;
    text-align: center;
}

.carousel-description p {
    margin: 0;
    font-size: 24px;
    line-height: 1.6;
    color: #333;
    width: 80%;
    max-width: 800px;
    margin: 0 auto;
}

.carousel-slide:hover img {
    transform: scale(1.02);
}

/* 单张图片时隐藏导航控件 */
.product-image-carousel[data-slides="1"] .carousel-controls,
.product-image-carousel[data-slides="0"] .carousel-controls {
    display: none !important;
}

.product-image-carousel[data-slides="1"] .carousel-progress-indicators,
.product-image-carousel[data-slides="0"] .carousel-progress-indicators {
    display: none !important;
}
.carousel-controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.product-image-carousel:hover .carousel-controls {
    opacity: 1;
}

/* 导航按钮 */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: #ffffff;
    border: none;
    font-size: 28px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    font-weight: bold;
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

/* 进度条指示器 */
.carousel-progress-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.progress-line {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.progress-line:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scaleY(1.5);
}

.progress-line.active {
    background: rgb(0 0 0 / 24%)
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #fff;
    border-radius: 2px;
    width: 0;
    transition: width 0.1s linear;
}

.progress-line.active .progress-fill {
    animation: progressFill 5s linear infinite;
}

@keyframes progressFill {
    from { width: 0; }
    to { width: 100%; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .product-image-carousel-wrapper {
        margin-left: calc(-100vw / 2 + 50%);
        margin-right: calc(-100vw / 2 + 50%);
        max-width: 100vw;
        border-radius: 0;
    }
    
    .carousel-slides {
        padding-bottom: 75%; /* 移动端也使用4:3比例 */
    }
    
    .carousel-description {
        padding: 20px 15px;
    }
    
    .carousel-description p {
        font-size: 16px;
        width: 85%;
    }
    
    .carousel-prev,
    .carousel-next {
        font-size: 24px;
        width: 42px;
        height: 42px;
    }
    
    .carousel-prev {
        left: 15px;
    }
    
    .carousel-next {
        right: 15px;
    }
    
    .carousel-progress-indicators {
        bottom: 15px;
        gap: 6px;
    }
    
    .progress-line {
        width: 30px;
        height: 3px;
    }
}

@media (max-width: 480px) {
    .product-image-carousel-wrapper {
        margin: 20px 0;
    }
    
    .carousel-slides {
        padding-bottom: 75%; /* 小屏幕使用更方形的比例 */
    }
    
    .carousel-description {
        padding: 15px 10px;
    }
    
    .carousel-description p {
        font-size: 14px;
        width: 90%;
        line-height: 1.5;
    }
    
    .carousel-prev,
    .carousel-next {
        font-size: 20px;
        width: 36px;
        height: 36px;
    }
    
    .carousel-prev {
        left: 10px;
    }
    
    .carousel-next {
        right: 10px;
    }
    
    .progress-line {
        width: 25px;
        height: 3px;
    }
}

/* 高分辨率屏幕优化 */
@media (min-width: 1200px) {
    .carousel-slides {
        padding-bottom: 45%; /* 大屏幕使用更宽的比例 */
    }
    
    .carousel-description p {
        font-size: 20px;
        width: 80%;
    }
    
    .carousel-prev,
    .carousel-next {
        width: 55px;
        height: 55px;
        font-size: 30px;
    }
    
    .progress-line {
        width: 50px;
        height: 3px;
    }
}

/* 后台管理样式 */
.carousel-image-item {
    transition: opacity 0.3s ease;
}

.carousel-image-item:hover {
    opacity: 0.8;
}

.remove-carousel-image:hover {
    background-color: #c82333 !important;
}

/* 加载动画 */
.carousel-slide img {
    transition: transform 0.3s ease;
}

.carousel-slide:hover img {
    transform: scale(1.02);
}

/* 无障碍访问优化 */
.carousel-prev:focus,
.carousel-next:focus,
.progress-line:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* 减少动画效果（用户偏好） */
@media (prefers-reduced-motion: reduce) {
    .carousel-slide {
        transition: opacity 0.3s ease;
        transform: none;
    }
    
    .carousel-slide.active {
        transform: none;
    }
    
    .progress-fill {
        animation: none;
        transition: width 0.3s ease;
    }
    
    .carousel-slide img {
        transition: none;
    }
    
    .carousel-slide:hover img {
        transform: none;
    }
}

/* 预加载优化 */
.carousel-slide img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ================== 第二个模块：产品详情展示样式 ================== */

.product-details-wrapper {
    margin: 50px 0;
}

.product-details-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* 模块标题样式 */
.details-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.details-main-title {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin: 0;
    letter-spacing: -0.5px;
}

/* 项目容器 - 正常与反向布局 */
.details-item-container {
    display: flex;
    align-items: center;
    margin-bottom: 60px;
    gap: 40px;
    min-height: 200px; /* 确保容器有最小高度 */
}

.details-item-container:last-child {
    margin-bottom: 0;
}

/* 反向布局：第2、4、6...项目 */
.details-item-container.reverse {
    flex-direction: row-reverse;
}

/* 文字容器 - 固定35%宽度 */
.details-text-container {
    flex: 0 0 35%;
    padding: 20px;
    min-width: 0; /* 防止文字溢出 */
}

.details-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    line-height: 1.3;
    word-wrap: break-word;
}

.details-description {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin: 0;
    word-wrap: break-word;
}

/* 媒体容器 - 固定65%宽度，支持图片/视频/YouTube */
.details-media-container {
    flex: 0 0 65%;
    position: relative;
    overflow: hidden;
    min-height: 200px; /* 确保有最小高度 */
}

.details-media-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
    min-height: 200px; /* 确保图片有最小高度 */
}

.details-media-container:hover img {
    transform: scale(1.02);
}

/* 视频样式 */
.details-media-container video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    min-height: 200px;
    border-radius: 12px;
    pointer-events: none; /* 禁止用户交互 */
}

/* 隐藏所有视频控件 */
.details-media-container video::-webkit-media-controls {
    display: none !important;
}

.details-media-container video::-webkit-media-controls-panel {
    display: none !important;
}

.details-media-container video::-webkit-media-controls-play-button {
    display: none !important;
}

.details-media-container video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

.details-media-container video::-webkit-media-controls-volume-slider {
    display: none !important;
}

.details-media-container video::-webkit-media-controls-timeline {
    display: none !important;
}

.details-media-container video::-webkit-media-controls-current-time-display {
    display: none !important;
}

/* Firefox 控件隐藏 */
.details-media-container video::-moz-media-controls {
    display: none !important;
}

/* 确保视频无控件属性 */
.details-media-container video {
    -webkit-media-controls: none;
    -moz-media-controls: none;
}


.details-youtube-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; 
    overflow: hidden;
}

.details-youtube-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none; /* 禁止用户交互 */
}

/* 进一步隐藏YouTube控件和信息 */
.details-youtube-wrapper {
    overflow: hidden;
    position: relative;
}

.details-youtube-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background: transparent;
}

/* 隐藏可能出现的YouTube控件 */
.details-youtube-wrapper {
    overflow: hidden;
}

.details-youtube-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* 兼容旧的图片容器类名 */
.details-image-container {
    flex: 0 0 65%;
    position: relative;
    overflow: hidden;
    min-height: 200px; 
}

.details-image-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
    min-height: 200px; 
}

.details-image-container:hover img {
    transform: scale(1.02);
}

/* 响应式设计 - 手机端 */
@media (max-width: 768px) {
    .product-details-wrapper {
        margin: 30px 0;
    }
    
    .details-section-header {
        margin-bottom: 20px;
    }
    
    .details-main-title {
        font-size: 28px;
    }
    
    .details-item-container {
        flex-direction: column !important;
        gap: 0;
        margin-bottom: 40px;
    }
    
    /* 手机端媒体容器 - 全宽无间隙，始终在第一位 */
    .details-media-container,
    .details-image-container {
        flex: none;
        width: 100vw;
        margin-left: calc(-100vw / 2 + 50%);
        margin-right: calc(-100vw / 2 + 50%);
        border-radius: 0;
        order: 1; /* 媒体始终在第一位 */
    }
    
    /* 手机端文字容器 - 添加左右间距，始终在第二位 */
    .details-text-container {
        flex: none;
        width: 100%;
        padding: 20px 0 0 0;
        order: 2; /* 文字始终在第二位 */
    }
    
    .details-title {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .details-description {
        font-size: 15px;
    }
}

/* 在这里添加您的其他自定义 CSS */

/* 隐藏WooCommerce变体价格显示（第二个价格） */
.woocommerce-variation-price,
.single_variation_wrap .woocommerce-variation-price,
.variations_form .woocommerce-variation-price,
.product-summary .woocommerce-variation-price,
.single-product-summary .woocommerce-variation-price,
.variation-price,
.woocommerce-variation-price-wrapper,
div.woocommerce-variation-price,
p.woocommerce-variation-price,
.woocommerce div.product .woocommerce-variation-price,
.single-product .woocommerce-variation-price,
.single_variation_wrap .price,
.variations .woocommerce-variation-price {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}

/* 隐藏重置变体按钮 */
.reset_variations,
.reset-variations,
.woocommerce-reset-variations,
button.reset_variations,
.woocommerce button.reset_variations,
.single-product .reset_variations,
button[name="reset_variations"],
.woocommerce input[type="button"][name="reset_variations"],
.variations .reset_variations,
.variations_form .reset_variations {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}

/* 确保主价格容器可见且正常显示 */
.woocommerce div.product .price,
.woocommerce div.product p.price,
.product .price,
.summary .price {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    height: auto !important;
    overflow: visible !important;
}

/* ================== 第三个模块：Shop the Eos Collection 样式 ================== */

/* Eos Collection 触发按钮 */
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.eos-modal.active {
    opacity: 1;
}

.eos-modal-content {
    position: fixed;
    right: 0;
    top: 0;
    width: 50%;
    height: 100%;
    background: white;
    padding: 40px;
    overflow-y: auto;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.eos-modal.active .eos-modal-content {
    transform: translateX(0);
}

.eos-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10001;
}

.eos-modal-close:hover {
    color: #000;
    background-color: #f0f0f0;
}

.eos-modal h2 {
    margin: 0 0 30px 0;
    font-size: 32px;
    font-weight: 700;
    color: #333;
    border-bottom: 3px solid #667eea;
    padding-bottom: 15px;
    padding-right: 50px;
}

/* 弹窗内产品样式 - 使用WooCommerce标准结构 */
.eos-modal .eos-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 20px;
}

/* 继承WooCommerce产品循环样式 */
.eos-modal .eos-products-grid .product {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.eos-modal .eos-products-grid .product:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.eos-modal .eos-products-grid .product a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.eos-modal .eos-products-grid .product .woocommerce-loop-product__link {
    display: block;
    height: 100%;
}

.eos-modal .eos-products-grid .product img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.eos-modal .eos-products-grid .product:hover img {
    transform: scale(1.05);
}

.eos-modal .eos-products-grid .product h2,
.eos-modal .eos-products-grid .product .woocommerce-loop-product__title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.eos-modal .eos-products-grid .product .price {
    margin: 0 15px 15px 15px;
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

.eos-modal .eos-products-grid .product .price .amount,
.eos-modal .eos-products-grid .product .price .woocommerce-Price-amount {
    color: #667eea;
}

.eos-modal .eos-products-grid .product .price del {
    opacity: 0.7;
    margin-right: 8px;
}

.eos-modal .eos-products-grid .product .price ins {
    text-decoration: none;
    color: #e74c3c;
}

/* 响应式设计 - 平板 */
@media (max-width: 1024px) {
    .eos-modal-content {
        width: 60%;
        padding: 30px;
    }
    
    .eos-modal h2 {
        font-size: 28px;
    }
    
    .eos-modal .eos-products-grid {
        gap: 20px;
    }
    
    .eos-modal .eos-products-grid .product img {
        height: 180px;
    }
}

/* 响应式设计 - 手机 */
@media (max-width: 768px) {
    .eos-modal-content {
        width: 100%;
        padding: 20px;
    }
    
    .eos-modal .eos-products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .eos-modal h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .eos-modal .eos-products-grid .product img {
        height: 250px;
    }
}

/* 小屏手机优化 */
@media (max-width: 480px) {
    .eos-modal-content {
        padding: 15px;
    }
    
    .eos-modal h2 {
        font-size: 22px;
        padding-right: 40px;
    }
    
    .eos-modal .eos-products-grid .product h2,
    .eos-modal .eos-products-grid .product .woocommerce-loop-product__title {
        font-size: 14px;
    }
    
    .eos-modal .eos-products-grid .product .price {
        font-size: 16px;
    }
}

/* 防止弹窗时页面滚动 */
body.modal-open {
    overflow: hidden !important;
}