/*
Theme Name: Anlye Official Store
Theme URI: https://yourdomain.com
Author: AI Assistant & You
Description: Custom WooCommerce theme based on Anlye design.
Version: 1.0.0
Text Domain: anlye-theme
*/

:root {
    --theme-primary-green: #007c64; 
    --theme-text-dark: #333333;
    --theme-text-light: #666666;
    --theme-bg-gray: #f7f7f7;
    --theme-border: #e1e1e1;
}

body { margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: var(--theme-text-dark); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

/* ==========================================================
   === 通用页面与 WooCommerce 布局分离样式 ===
   ========================================================== */
.anlye-page-container { padding: 40px 15px; min-height: 60vh; margin-top: 20px; margin-bottom: 40px; }
.single-product-container { margin-top: 40px; margin-bottom: 20px !important; }
.shop-page-header-container { text-align: center; padding: 50px 0; background: #fafafa; margin-bottom: 40px; }
.shop-main-layout { display: flex; gap: 40px; margin-bottom: 60px; }
.shop-sidebar-container { width: 250px; flex-shrink: 0; }
.shop-sidebar-fallback { padding: 20px; background: #f9f9f9; border: 1px dashed #ccc; font-size: 13px; color: #666; }
.shop-content-container { flex: 1; }

/* ==========================================================
   === 头部导航栏 (Header & Navigation) ===
   ========================================================== */
.top-bar { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid #eee; font-size: 12px; color: #666; }
.main-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.logo img { max-height: 50px; width: auto; }
.search-bar { flex: 1; margin: 0 40px; }
.search-bar form { display: flex; width: 100%; align-items: stretch; border: 2px solid var(--theme-primary-green); border-radius: 4px; overflow: hidden; height: 48px; box-sizing: border-box; }
.search-bar input.search-field { flex: 1; padding: 0 20px; border: none; outline: none; font-size: 16px; height: 100%; box-sizing: border-box; }
.search-cat-dropdown { border: none; border-left: 1px solid #ddd; background: #fcfcfc; padding: 0 15px; outline: none; cursor: pointer; font-size: 16px; color: #555; height: 100%; box-sizing: border-box; -webkit-appearance: none; -moz-appearance: none; appearance: none; background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M7 10l5 5 5-5z"/></svg>'); background-repeat: no-repeat; background-position: right 10px center; background-size: 12px; padding-right: 35px; }
.search-bar button { background: var(--theme-primary-green); color: white; border: none; padding: 0 45px; cursor: pointer; font-size: 20px; height: 100%; box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
.header-icons { display: flex; gap: 20px; align-items: center; }
.nav-bar { background-color: var(--theme-primary-green); color: white; }
.nav-container { display: flex; align-items: center; }
.shop-by-categories { position: relative; background: rgba(0,0,0,0.1); padding: 15px 20px; font-weight: bold; cursor: pointer; display: flex; align-items: center; width: 260px; box-sizing: border-box;}
.category-dropdown { display: none; position: absolute; top: 100%; left: 0; background: white; width: 260px; z-index: 999; box-shadow: 0 4px 10px rgba(0,0,0,0.05); border: 1px solid #eee; border-top: none;}
.shop-by-categories:hover .category-dropdown, .shop-by-categories.home-active .category-dropdown { display: block; } 
.category-dropdown ul li a { display: block; padding: 15px 20px; color: #333; text-decoration: none; border-bottom: 1px solid #f5f5f5; font-size: 14px; font-weight: normal;}
.category-dropdown ul li a:hover { color: var(--theme-primary-green); background-color: #f9f9f9; }
.main-menu ul { display: flex; gap: 20px; padding-left: 20px; list-style: none; margin: 0; }
.main-menu ul li a { color: white; font-weight: bold; text-decoration: none; }

/* 菜单粗体与首页透明化 */
.category-dropdown ul li a, .shop-sidebar ul li a, .widget_product_categories ul li a { font-weight: 600 !important; }
.shop-by-categories.home-active .category-dropdown { background: transparent !important; box-shadow: none !important; border: none !important; }
.shop-by-categories.home-active .category-dropdown ul li a { border-bottom: 1px solid rgba(0,0,0,0.05) !important; }

/* ==========================================================
   === 首页独有结构 (Home Elements) ===
   ========================================================== */
.desktop-only-content .features-bar { display: flex; justify-content: space-between; padding: 30px 0; border-bottom: 1px solid #eee; margin-bottom: 40px; margin-top: 40px;}
.feature-item { display: flex; align-items: center; gap: 15px; }
.feature-item h4 { margin: 0; font-size: 16px; color: #333; }
.feature-item p { margin: 5px 0 0 0; font-size: 13px; color: #888; }
.home-grid-layout { display: grid; grid-template-columns: 1fr 3fr; gap: 30px; margin-bottom: 40px; }
.section-title { font-size: 20px; border-bottom: 2px solid var(--theme-primary-green); padding-bottom: 10px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center;}
.section-title a { font-size: 14px; color: var(--theme-primary-green); text-decoration: none; font-weight: normal; }
.section-title.home-tabs { justify-content: flex-start; gap: 30px; color: #999; font-weight: normal; }
.section-title.home-tabs span.active { color: var(--theme-primary-green); font-weight: bold; }
.section-title.home-tabs a { font-size: 20px; color: inherit; text-decoration: none; font-weight: inherit; transition: color 0.3s;}
.section-title.home-tabs a:hover { color: #333; }

/* ==========================================================
   === 首页轮播图 (核心修复：弹性的贴边填充) ===
   ========================================================== */
/* 使用 flex 弹性布局把轮播图平稳地推向右边边缘，绝不干扰 Swiper 引擎 */
.hero-container-wrapper { 
    position: relative; 
    margin-top: 20px; 
    display: flex; 
    justify-content: flex-end; 
}
.anlye-hero-slider { 
    width: calc(100% - 280px) !important; /* 给左侧菜单留出280px的空间，剩余100%全占满！ */
    margin: 0 !important; /* 彻底废弃之前导致死机的 margin，交给外框对齐 */
    height: 420px; 
    background-color: #fafafa; 
    overflow: hidden !important; 
}

.swiper-slide { display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: space-between !important; padding: 40px 50px !important; box-sizing: border-box !important; }
.swiper-slide:nth-child(even) { flex-direction: row-reverse !important; } 

/* 保持文字占 60%，图片占 40%，让横向内容极致饱满 */
.hero-text-content { width: 60%; padding: 0 40px 0 0 !important; text-align: left; }
.swiper-slide:nth-child(even) .hero-text-content { padding: 0 0 0 40px !important; }
.hero-text-content .hero-title { font-size: 56px; font-weight: bold; margin: 0 0 5px 0; color: #111; line-height: 1.1; }
.hero-text-content .hero-subtitle { font-size: 42px; font-weight: bold; margin: 0 0 15px 0; color: #111; }
.hero-text-content p { font-size: 28px; color: #333; margin-bottom: 30px; }
.hero-btns { display: flex; gap: 15px; }
.hero-btns a { display: inline-block; padding: 12px 30px; text-decoration: none; font-weight: bold; font-size: 16px; transition: all 0.3s;}
.btn-shop { background-color: var(--theme-primary-green); color: white; }
.btn-read { border: 2px solid var(--theme-primary-green); color: var(--theme-primary-green); background: transparent; }
.hero-image-content { width: 40%; text-align: center; height: 100%; display: flex; align-items: center; justify-content: center;}
.hero-image-content img { max-width: 100%; max-height: 340px; object-fit: contain; }
.swiper-pagination-bullet-active { background: var(--theme-primary-green) !important; }

/* ==========================================================
   === 分类页与通用商品卡片样式 ===
   ========================================================== */
.shop-page-header h1 { font-size: 48px; color: #333; margin-bottom: 15px; font-weight: bold;}
.shop-page-header .woocommerce-breadcrumb { font-size: 14px; color: #666; justify-content: center; display: flex; gap: 8px;}
.shop-page-header .woocommerce-breadcrumb a { color: #666; text-decoration: none;}
.shop-page-header .woocommerce-breadcrumb a:hover { color: var(--theme-primary-green); }
.shop-sidebar ul { list-style: none; padding: 0; margin: 0; }
.shop-sidebar ul li { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #f5f5f5;}
.shop-sidebar ul li a { color: #333; text-decoration: none; font-size: 15px; font-weight: bold;}
.shop-sidebar ul li a:hover { color: var(--theme-primary-green); }
.woocommerce-before-shop-loop { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; font-size: 14px; color: #666;}
.woocommerce-ordering select { padding: 10px 15px; border: 1px solid #ddd; outline: none; border-radius: 4px; background: #fff;}
.woocommerce ul.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin: 0; padding: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product { width: 100% !important; margin: 0 !important; text-align: center; background: #fff; padding-bottom: 20px;}
.woocommerce ul.products li.product a img { margin-bottom: 15px; width: 100%; height: auto;}
.woocommerce ul.products li.product .woocommerce-loop-category__title { font-size: 12px; color: #999; margin: 0; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 16px; color: #333; margin: 8px 0; padding: 0 10px; font-weight: normal;}
.woocommerce ul.products li.product .star-rating { margin: 10px auto; font-size: 12px; color: #ccc;}
.woocommerce ul.products li.product .price { color: #333; font-weight: bold; font-size: 18px; margin-bottom: 15px; }
.woocommerce ul.products li.product .button { background-color: #f5f5f5; color: #333; width: 60%; margin: 0 auto; display: block; padding: 12px; border-radius: 4px; font-size: 14px; font-weight: bold; transition: all 0.3s;}
.woocommerce ul.products li.product .button:hover { background-color: var(--theme-primary-green); color: white; }
.woocommerce span.onsale { background-color: var(--theme-primary-green); color: white; padding: 2px 12px; font-size: 12px; font-weight: bold; position: absolute; top: 15px; left: 15px; line-height: 1.5; z-index: 9; border-radius: 50px; display: inline-flex; align-items: center; justify-content: center;}
.woocommerce nav.woocommerce-pagination { margin-top: 50px; text-align: center;}
.woocommerce nav.woocommerce-pagination ul { border: none; padding: 0; display: inline-flex; gap: 10px;}
.woocommerce nav.woocommerce-pagination ul li { border: none; overflow: visible;}
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--theme-primary-green); color: white; padding: 10px 18px; font-weight: bold;}
.woocommerce nav.woocommerce-pagination ul li a { padding: 10px 18px; color: #333; font-weight: bold; }
.woocommerce nav.woocommerce-pagination ul li a:hover { color: var(--theme-primary-green); }

/* ==========================================================
   === 产品详情页 (Single Product) 样式 ===
   ========================================================== */
.woocommerce div.product { display: flex; flex-wrap: wrap; justify-content: space-between; }
.woocommerce div.product div.images { width: 48%; min-width: 0;}
.woocommerce div.product div.summary { width: 48%; }
.woocommerce ul.products li.product a img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; margin-bottom: 15px; display: block; border-radius: 4px; }
.woocommerce div.product div.images .woocommerce-product-gallery__wrapper { position: relative; margin-bottom: 15px; border-radius: 4px; overflow: hidden; border: 1px solid #eee; }
.woocommerce div.product div.images .woocommerce-product-gallery__image a { display: block; cursor: zoom-in; }
.woocommerce div.product div.images .woocommerce-product-gallery__image img { width: 100%; height: auto; display: block; }
.woocommerce div.product div.images .woocommerce-product-gallery__trigger { display: none !important; }
.product-nav-wrap { font-size: 14px; color: #666; margin-bottom: 15px; }
.product-nav-wrap a { color: #666; transition: color 0.3s;}
.product-nav-wrap a:hover { color: var(--theme-primary-green); }
.woocommerce div.product .product_title { font-size: 34px; font-weight: 900; margin: 0 0 10px 0; color: #222; line-height: 1.2;}
.woocommerce div.product p.price { font-size: 30px; color: #222; font-weight: 900; margin-bottom: 10px; border-bottom: 1px solid #eee; padding-bottom: 15px;}
.woocommerce div.product .stock { color: #2ecc71; font-weight: bold; font-size: 15px; margin-bottom: 15px; }

/* Option 变体精修 */
.woocommerce div.product form.cart { margin-bottom: 30px; }
.woocommerce div.product form.cart table.variations { width: 100%; margin-bottom: 15px; border: none; padding: 0; }
.woocommerce div.product form.cart table.variations tr { display: flex !important; align-items: center !important; margin-bottom: 15px; width: 100%; }
.woocommerce div.product form.cart table.variations th,
.woocommerce div.product form.cart table.variations th.label { width: 120px !important; text-align: left !important; padding: 0 10px 0 0 !important; display: flex; align-items: center; }
.woocommerce div.product form.cart table.variations th label { text-transform: capitalize !important; margin: 0 !important; line-height: 1.2; font-size: 15px; color: #333; }
.woocommerce div.product form.cart table.variations td,
.woocommerce div.product form.cart table.variations td.value { flex: 1 !important; padding: 0 !important; display: flex; align-items: center; }
.woocommerce div.product form.cart table.variations td select { width: 100% !important; max-width: 220px !important; margin: 0 !important; padding: 0 15px; border: 1px solid #e1e1e1; outline: none; border-radius: 2px; background: #fff; font-size: 15px; color: #555; height: 44px; }

/* 购买按钮 */
.woocommerce div.product form.cart .woocommerce-variation-add-to-cart { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.woocommerce div.product form.cart .perfect-qty-wrapper { display: flex; align-items: center; border: 1px solid #e1e1e1; border-radius: 2px; height: 44px; width: 120px; background: #fff; overflow: hidden; margin-right: 15px;}
.woocommerce div.product form.cart .perfect-qty-wrapper .qty-btn { width: 35px; flex: 0 0 35px; height: 100%; background: transparent; border: none; font-size: 18px; font-weight: bold; cursor: pointer; color: #333; display: flex; align-items: center; justify-content: center;}
.woocommerce div.product form.cart .perfect-qty-wrapper .qty-btn:hover { background: #f9f9f9; }
.woocommerce div.product form.cart .perfect-qty-wrapper .quantity { flex: 1; height: 100%; border: none !important; margin: 0 !important; padding: 0 !important; width: auto;}
.woocommerce div.product form.cart .perfect-qty-wrapper input.qty { width: 100%; height: 100%; border: none; border-left: 1px solid #e1e1e1; border-right: 1px solid #e1e1e1; text-align: center; font-size: 16px; font-weight: bold; background: transparent; padding: 0; margin: 0; color: #333;}
.woocommerce div.product form.cart .single_add_to_cart_button { background-color: var(--theme-primary-green); color: white; height: 44px; padding: 0 30px; border-radius: 2px; font-weight: bold; font-size: 16px; border: none; cursor: pointer; line-height: 44px; white-space: nowrap; transition: opacity 0.3s;}
.woocommerce div.product form.cart .fake-buy-now { background-color: var(--theme-secondary-color) !important; color: white !important; height: 44px; padding: 0 30px; border-radius: 2px; font-weight: bold; font-size: 16px; border: none; cursor: pointer; line-height: 44px; white-space: nowrap; margin-left: 10px; transition: opacity 0.3s;}

.woocommerce div.product .woocommerce-tabs { width: 100%; margin-top: 25px; margin-bottom: 10px !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs { border-bottom: 2px solid #eee; padding: 0; margin: 0 0 15px 0; display: flex; gap: 40px; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { border: none; background: transparent; margin: 0; padding: 0 0 10px 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { color: #666; font-size: 18px; font-weight: bold; padding: 0;}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { border-bottom: 3px solid #333; }

/* 消除 Description 内部重复标题 */
.woocommerce-Tabs-panel--description > h2:first-of-type,
.woocommerce-Tabs-panel--additional_information > h2:first-of-type { display: none !important; }

/* ==========================================================
   === 开启单行左右滑动：Related Products & Recently Viewed ===
   ========================================================== */
.woocommerce .related.products { margin-top: 10px !important; margin-bottom: 10px !important; width: 100%; }
.recently-viewed-products { margin-top: 10px !important; margin-bottom: 10px !important; width: 100%; }
.woocommerce .related.products h2, .recently-viewed-products h2 { margin-bottom: 15px !important; font-size: 22px !important; color: #333; font-weight: bold; border-bottom: 2px solid #eee; padding-bottom: 5px !important; }

/* 左右滑动主容器 */
.woocommerce .related.products ul.products, 
.recently-viewed-products ul.products { 
    display: flex !important; 
    flex-wrap: nowrap !important; 
    overflow-x: auto !important; 
    overflow-y: hidden !important;
    gap: 20px !important; 
    margin-bottom: 0 !important; 
    padding-bottom: 15px !important;
    -webkit-overflow-scrolling: touch; 
    scroll-snap-type: x mandatory;
}
.woocommerce .related.products ul.products::-webkit-scrollbar, 
.recently-viewed-products ul.products::-webkit-scrollbar { height: 4px; }
.woocommerce .related.products ul.products::-webkit-scrollbar-thumb, 
.recently-viewed-products ul.products::-webkit-scrollbar-thumb { background-color: #e1e1e1; border-radius: 4px; }

/* 电脑端：一行可见 5 个 */
.woocommerce .related.products ul.products li.product, 
.recently-viewed-products ul.products li.product { 
    flex: 0 0 calc(20% - 16px) !important; 
    max-width: calc(20% - 16px) !important; 
    width: 100% !important;
    margin: 0 !important; 
    scroll-snap-align: start;
}

/* 核心重构：高度压缩！卡片内部视觉降噪与标题提权 */
.woocommerce .related.products ul.products li.product .woocommerce-loop-product__title, 
.recently-viewed-products ul.products li.product .woocommerce-loop-product__title { 
    font-size: 13px !important; 
    font-weight: bold !important; 
    color: #222 !important;
    line-height: 1.4 !important;
    margin: 10px 0 2px 0 !important;
    height: 36px !important;
    overflow: hidden !important; 
    text-overflow: ellipsis !important; 
    display: -webkit-box !important; 
    -webkit-line-clamp: 2 !important; 
    -webkit-box-orient: vertical !important;
}

.woocommerce .related.products ul.products li.product .price, 
.recently-viewed-products ul.products li.product .price { 
    font-size: 14px !important; 
    font-weight: normal !important; 
    color: #666 !important;
    margin: 0 0 3px 0 !important;
}

.woocommerce .related.products ul.products li.product .star-rating, 
.recently-viewed-products ul.products li.product .star-rating { 
    font-size: 10px !important; 
    margin: 0 auto 5px auto !important;
}

.woocommerce .star-rating { color: #e1e1e1 !important; } 
.woocommerce .star-rating span { color: #ffb800 !important; } 
.woocommerce div.product div.images .flex-control-thumbs { display: flex; flex-wrap: nowrap; gap: 10px; padding: 0; margin: 0; list-style: none; overflow-x: hidden; scroll-behavior: smooth; }
.woocommerce div.product div.images .flex-control-thumbs li { width: calc(25% - 7.5px); flex: 0 0 calc(25% - 7.5px); cursor: pointer; }
.woocommerce div.product div.images .flex-control-thumbs li img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 4px; opacity: 0.6; }
.woocommerce div.product div.images .flex-control-thumbs li img.flex-active { opacity: 1; border: 2px solid var(--theme-primary-green); }
.anlye-thumbs-wrapper { position: relative; margin-top: 15px; }
.anlye-thumb-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; background: rgba(0,0,0,0.5); color: white; text-align: center; line-height: 26px; border-radius: 50%; cursor: pointer; z-index: 10; font-size: 14px; display: none; }
.anlye-thumb-arrow.prev { left: -10px; } .anlye-thumb-arrow.next { right: -10px; }
.anlye-share-icon { display: flex; transition: all 0.3s ease; text-decoration: none !important; }
.anlye-share-icon:hover { transform: translateY(-3px); filter: brightness(0.8); }
.anlye-share-icon[title="Copy Link"]:hover { color: var(--theme-primary-green, #288f6c) !important; filter: none; }

/* Hot Deals 侧边栏 */
.sidebar-hot-deals ul.products { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 15px !important; }
.sidebar-hot-deals ul.products li.product { width: 100% !important; margin: 0 !important; padding-bottom: 10px !important; border-bottom: none !important; position: relative !important; }
.sidebar-hot-deals ul.products li.product .woocommerce-loop-product__title, .sidebar-hot-deals ul.products li.product .woocommerce-loop-category__title, .sidebar-hot-deals ul.products li.product .button { display: none !important; }
.sidebar-hot-deals ul.products li.product .onsale { left: auto !important; right: 5px !important; top: 5px !important; padding: 1px 6px !important; font-size: 9px !important; font-weight: bold !important; line-height: 1.5 !important; text-align: center !important; border-radius: 50px !important; display: flex !important; align-items: center !important; justify-content: center !important; min-width: unset !important; width: auto !important;}
.sidebar-hot-deals ul.products li.product .star-rating { margin: 0 auto 5px auto !important;}
.sidebar-hot-deals ul.products li.product .price { font-size: 16px !important; margin-bottom: 0 !important;}

/* Checkout 结账页 */
form.woocommerce-checkout { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 40px; align-items: flex-start; }
form.woocommerce-checkout > h3#order_review_heading { display: none; }
form.woocommerce-checkout #customer_details { width: 55%; display: block; }
form.woocommerce-checkout #customer_details .col-1, form.woocommerce-checkout #customer_details .col-2 { width: 100%; float: none; margin-bottom: 30px; padding: 0; }
form.woocommerce-checkout #order_review { width: calc(45% - 40px); background: #fcfcfc; padding: 30px; border-radius: 4px; border: 1px solid #eee; }
.woocommerce-checkout-review-order-table { width: 100%; margin-bottom: 30px; }
#payment ul.payment_methods { border-bottom: 1px solid #eee; padding: 0 0 20px 0 !important; margin: 0 0 20px 0 !important; }
#payment .place-order .button { width: 100%; background-color: var(--theme-primary-green); color: white; padding: 18px; font-size: 18px; font-weight: bold; border-radius: 4px; }

/* ==========================================================
   === 全局：订阅按钮与页脚 (Footer & Newsletter) ===
   ========================================================== */
.newsletter-section, .footer-newsletter, .email-form { 
    background-color: var(--theme-primary-green) !important; 
    padding: 35px 0 !important; 
    color: white !important; 
}
.newsletter-container { display: flex !important; justify-content: space-between !important; align-items: center !important; gap: 40px; }
.newsletter-text { text-align: left !important; flex: 1; }
.newsletter-section h2 { font-size: 28px !important; margin: 0 0 8px 0 !important; font-weight: bold; color: white !important; }
.newsletter-section p { font-size: 16px !important; margin: 0 !important; color: white !important; }
.newsletter-form-wrapper { flex: 1; display: flex; justify-content: flex-end; }
.newsletter-section form, .footer-newsletter form, .email-form form { display: flex !important; flex-direction: row !important; align-items: center !important; background: #fff !important; border-radius: 50px !important; padding: 4px 4px 4px 20px !important; width: 100% !important; max-width: 480px !important; margin: 0 !important; box-sizing: border-box !important; border: 2px solid #fff !important; }
.newsletter-section input[type="email"], .footer-newsletter input[type="email"], .email-form input[type="email"] { flex: 1 !important; border: none !important; background: transparent !important; padding: 10px 0 !important; font-size: 16px !important; color: #333 !important; outline: none !important; box-shadow: none !important; width: auto !important; margin: 0 !important; }
.newsletter-section button, .newsletter-section input[type="submit"], .footer-newsletter button, .email-form button { background-color: var(--theme-secondary-color) !important; color: #fff !important; border: none !important; padding: 12px 35px !important; font-size: 16px !important; font-weight: bold !important; border-radius: 50px !important; cursor: pointer !important; flex-shrink: 0 !important; margin: 0 !important; white-space: nowrap !important; }

.main-footer { padding: 60px 0; background: #fff; border-top: 1px solid #eee; }
.footer-columns { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; font-size: 14px; line-height: 2; color: #666;}
.footer-columns h4, .footer-columns h2 { color: #333; margin-bottom: 20px; font-weight: bold; font-size: 16px; margin-top: 0;}
.footer-columns ul li a { text-decoration: none; color: #666; transition: color 0.3s; }
.footer-columns ul li a:hover { color: var(--theme-primary-green); }


/* ==========================================================
   === 极致手机端适配 (Mobile Responsive) ===
   ========================================================== */
.mobile-only-header, .mobile-only-content, .mobile-global-footer, .m-sticky-footer, #back-to-top { display: none !important; }

@media (max-width: 768px) {
    /* 强行隐藏电脑端结构 */
    .top-bar, .main-header, .nav-bar, .desktop-only-content, footer.main-footer, .newsletter-section { display: none !important; height: 0 !important; overflow: hidden !important; }
    
    /* 开启手机端核心容器 */
    .mobile-only-header { display: block !important; background: #fff; width: 100%; border-bottom: 1px solid #eee; position: relative; z-index: 999; }
    .mobile-only-content { display: block !important; background: #fff; padding-bottom: 80px; }
    .mobile-global-footer { display: block !important; padding-bottom: 70px; }

    /* --- 手机端头部 --- */
    .m-welcome-bar { background: #f8f8f8; text-align: center; font-size: 11px; padding: 8px 0; color: #666; width: 100%; }
    .m-main-nav { display: flex !important; align-items: center; justify-content: space-between; padding: 0 15px; height: 60px; }
    .m-menu-toggle { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: #333; }
    .m-logo { position: absolute; left: 50%; transform: translateX(-50%); }
    .m-logo img { max-height: 35px; width: auto; display: block; }
    .m-actions { display: flex; align-items: center; gap: 15px; }
    .m-search-btn { background: none; border: none; font-size: 22px; cursor: pointer; color: #333; text-decoration: none; }
    .m-cart-btn { text-decoration: none; font-size: 22px; position: relative; color: #333; }
    .m-cart-count { position: absolute; top: -5px; right: -8px; background: var(--theme-secondary-color); color: #fff; font-size: 10px; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

    /* --- 手机端首页内容区 --- */
    .hero-container-wrapper { display: block !important; margin-top: 10px !important; }
    .anlye-hero-slider { width: 100% !important; margin: 0 !important; height: auto !important; min-height: 200px !important; display: block !important; }
    .swiper-slide { height: auto !important; padding: 20px 15px !important; }
    .hero-text-content { width: 55%; padding: 0 10px 0 0 !important; }
    .swiper-slide:nth-child(even) .hero-text-content { padding: 0 0 0 10px !important; }
    .hero-text-content .hero-title { font-size: 22px !important; margin-bottom: 5px !important; line-height: 1.2 !important; }
    .hero-text-content .hero-subtitle { font-size: 18px !important; margin-bottom: 5px !important; }
    .hero-text-content p { font-size: 14px !important; margin-bottom: 10px !important; }
    .hero-btns { display: flex !important; flex-direction: row !important; gap: 5px !important; justify-content: flex-start !important; }
    .hero-btns a { padding: 6px 12px !important; font-size: 11px !important; width: auto !important; }
    .hero-image-content { width: 45%; margin: 0 !important; }
    .hero-image-content img { width: 100%; height: auto; max-height: 140px; object-fit: contain; }

    .m-features { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 15px; padding: 25px 15px; background: #fff; border-bottom: 8px solid #f9f9f9; }
    .m-feature-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
    .m-f-icon { font-size: 36px; color: var(--theme-primary-green); }
    .m-f-text h4 { font-size: 14px; margin: 0; color: #333; font-weight: bold;}
    .m-f-text p { font-size: 12px; margin: 5px 0 0; color: #666; }

    .m-section { padding: 20px 15px; border-bottom: 8px solid #f5f5f5; }
    .m-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
    .m-section-header h2 { font-size: 18px; margin: 0; color: #333; }
    .view-all { color: var(--theme-secondary-color); font-size: 13px; text-decoration: underline; }

    .mobile-only-content ul.products { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 10px !important; padding: 0 !important; margin: 0 !important; list-style: none; }
    .mobile-only-content ul.products li.product { width: 100% !important; margin: 0 !important; text-align: center; }
    .mobile-only-content ul.products li.product img { border-radius: 8px; margin-bottom: 8px; }

    /* --- 恢复手机端产品详情页上半部分布局 --- */
    .woocommerce div.product div.images, 
    .woocommerce div.product div.summary { width: 100% !important; padding: 0 15px !important; box-sizing: border-box !important; }
    .woocommerce div.product .product_title { font-size: 24px !important; line-height: 1.3 !important; margin-top: 15px !important; }
    .woocommerce div.product p.price { font-size: 22px !important; margin-bottom: 15px !important; }
    .woocommerce div.product form.cart .perfect-qty-wrapper { width: 100% !important; margin: 0 0 15px 0 !important; justify-content: center; }

   /* 手机端：一行可见 2 个，超出的横向滑动 */
    .woocommerce .related.products ul.products, 
    .woocommerce .recently-viewed-products ul.products,
    .recently-viewed-products ul.products { 
        display: flex !important; 
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 15px !important; 
    }
    
    .woocommerce .related.products ul.products li.product, 
    .woocommerce .recently-viewed-products ul.products li.product,
    .recently-viewed-products ul.products li.product { 
        flex: 0 0 calc(50% - 7.5px) !important; 
        max-width: calc(50% - 7.5px) !important; 
        display: block !important;
    }

    /* 恢复手机端产品详情页横向滚动 Tabs */
    .woocommerce div.product .woocommerce-tabs ul.tabs { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto !important; justify-content: space-between !important; padding: 0 !important; margin: 0 0 15px 0 !important; border-bottom: 1px solid #eee !important; }
    .woocommerce div.product .woocommerce-tabs ul.tabs li { margin: 0 !important; padding: 0 !important; flex: 1 !important; text-align: center !important; border: none !important; background: transparent !important; }
    .woocommerce div.product .woocommerce-tabs ul.tabs li a { font-size: 12px !important; padding: 10px 2px !important; display: block !important; white-space: nowrap !important; letter-spacing: -0.3px !important; color: #666 !important; }
    .woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--theme-primary-green) !important; font-weight: bold !important; border-bottom: 2px solid var(--theme-primary-green) !important; }
    
    /* 切忌写 display: block，把显示/隐藏权完全还给 WooCommerce 官方 JS！ */
    .woocommerce div.product .woocommerce-tabs .panel { padding: 0 15px !important; border: none !important; margin: 0 -15px !important; }

    /* 核心：隐藏原生按钮必须用这种方式，绝对不要用 display:none 导致参数丢失！ */
    .woocommerce div.product form.cart .single_add_to_cart_button, 
    .woocommerce div.product form.cart .fake-buy-now { 
        position: absolute !important; 
        left: -9999px !important; 
        visibility: hidden !important; 
        opacity: 0 !important; 
        height: 0 !important;
        width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 手机端分类页与搜索页 */
    .tax-product_cat .shop-sidebar, .tax-product_cat #secondary, .search-results .shop-sidebar, .search-results #secondary, .post-type-archive-product .shop-sidebar, .post-type-archive-product #secondary, .woocommerce-sidebar { display: none !important; }
    .tax-product_cat .site-main, .search-results .site-main, .post-type-archive-product .site-main, .tax-product_cat .shop-main-content, .search-results .shop-main-content { width: 100% !important; float: none !important; padding: 0 15px !important; box-sizing: border-box !important; }
    .woocommerce-products-header__title.page-title { font-size: 24px !important; text-align: center; margin: 20px 0 15px 0 !important; }
    .woocommerce-result-count { display: block; text-align: center; float: none !important; margin: 0 0 10px 0 !important; font-size: 13px; color: #666; }
    .woocommerce-ordering { float: none !important; margin: 0 0 20px 0 !important; display: flex; justify-content: center; }
    .woocommerce-ordering select { width: 100%; max-width: 300px; padding: 10px; font-size: 14px; border-radius: 5px; border: 1px solid #ddd; }
    .woocommerce ul.products { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 15px !important; margin: 0 !important; padding: 0 !important; }
    .woocommerce ul.products li.product { width: 100% !important; margin: 0 !important; clear: none !important; background: #fff; padding-bottom: 15px; }
    .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 13px !important; line-height: 1.4 !important; margin: 8px 0 !important; height: 36px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .woocommerce ul.products li.product .price { font-size: 15px !important; margin-bottom: 10px !important; }
    .woocommerce ul.products li.product .button { width: 85% !important; padding: 8px 0 !important; font-size: 12px !important; margin: 0 auto !important; display: block !important; }

    /* 手机端底部结构 */
    .m-newsletter { background: var(--theme-primary-green); padding: 30px 15px; text-align: left; color: #fff; }
    .m-newsletter h2 { font-size: 20px; margin-bottom: 8px; font-weight: bold; color: #fff; line-height: 1.2;}
    .m-newsletter p { font-size: 14px; margin-bottom: 20px; line-height: 1.4; color: #fff; }
    .m-sub-form { background: #fff; border-radius: 50px; display: flex; align-items: center; padding: 4px; box-sizing: border-box; width: 100%; margin: 0; }
    .m-sub-form input { flex: 1 1 auto; min-width: 0; border: none; padding-left: 15px; outline: none; font-size: 15px; background: transparent; color: #333; }
    .m-sub-form button { background: var(--theme-secondary-color); color: #fff; border: none; border-radius: 50px; padding: 12px 20px; font-size: 14px; font-weight: bold; flex: 0 0 auto; }
    
    .m-contact-info { padding: 30px 15px; background: #fafafa; border-bottom: 1px solid #eee; }
    .m-contact-info ul { list-style: none; padding: 0; margin: 0; }
    .m-contact-info li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #333; margin-bottom: 15px; }
    .m-contact-info li:last-child { margin-bottom: 0; }
    .m-contact-info .icon { font-size: 16px; color: #666; width: 20px; text-align: center; }

    .m-footer-folders { padding-bottom: 20px; background: #fafafa; }
    .m-folder-item { border-bottom: 1px solid #eee; margin: 0 15px; }
    .m-folder-item:last-child { border-bottom: none; }
    .m-folder-header { padding: 18px 0; font-size: 16px; font-weight: bold; color: #333; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
    .m-folder-header::before, .m-folder-header::after { display: none !important; content: none !important; }
    .m-folder-header .folder-arrow { font-size: 14px; font-weight: normal; color: #333; transition: transform 0.3s ease; }
    .m-folder-header.is-open .folder-arrow { transform: rotate(180deg); }
    .m-folder-body { display: none; padding-bottom: 15px; font-size: 14px; color: #666; line-height: 1.6; }
    .m-folder-body ul { list-style: none; padding: 0; margin: 0; }
    .m-folder-body ul li { margin-bottom: 12px; }
    .m-folder-body ul li a { color: #666; text-decoration: none; }
    
    .m-copyright { text-align: center; font-size: 13px; color: #333; padding: 25px 0 35px; border-top: 1px solid #eee; background: #fafafa;}

    /* 侧滑与弹窗 */
    .m-side-menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 100000; display: none; }
    .m-side-menu { position: fixed; top: 0; left: -80%; width: 75%; height: 100%; background: #fff; z-index: 100001; transition: left 0.3s ease; box-shadow: 2px 0 10px rgba(0,0,0,0.1); flex-direction: column; display: none; }
    .m-side-menu.open { left: 0; }
    .m-side-menu-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #eee; }
    .m-side-menu-header h3 { margin: 0; font-size: 18px; color: #333; font-weight: bold; }
    .m-side-menu-close { font-size: 30px; color: #333; cursor: pointer; line-height: 1; }
    .m-side-menu-content { padding: 20px; overflow-y: auto; flex: 1; }
    .m-side-menu-content ul { list-style: none; padding: 0; margin: 0; }
    .m-side-menu-content ul li { border-bottom: 1px solid #f5f5f5; }
    .m-side-menu-content ul li a { display: block; padding: 15px 0; font-size: 16px; color: #333; text-decoration: none; }
    .m-search-overlay-new { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.98); z-index: 100000; align-items: center; justify-content: center; display: none; }
    .m-search-close-new { position: absolute; top: 20px; right: 30px; font-size: 40px; color: #333; cursor: pointer; }
    .m-search-overlay-new .m-search-input { width: 100%; border: none; border-bottom: 2px solid #333; font-size: 24px; padding: 15px 10px; outline: none; background: transparent; color: #333; }

    /* 悬浮导航与置顶 */
    .m-sticky-footer { display: flex !important; position: fixed; bottom: 0; left: 0; width: 100%; height: 60px; background: #fff; border-top: 1px solid #eee; z-index: 9990; justify-content: space-around; align-items: center; }
    .m-sticky-footer a { display: flex; flex-direction: column; align-items: center; font-size: 11px; color: #333; text-decoration: none; }
    .m-sticky-footer a span { font-size: 20px; margin-bottom: 2px;}
    #back-to-top { display: block !important; position: fixed; right: 15px; bottom: 80px; width: 40px; height: 40px; background: rgba(0,0,0,0.5); color: #fff; border-radius: 50%; text-align: center; line-height: 40px; z-index: 999; cursor:pointer;}

    /* 折扣标签压扁 */
    .woocommerce span.onsale, .mobile-only-content span.onsale { font-size: 10px !important; padding: 1px 8px !important; line-height: 1.4 !important; border-radius: 50px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; }
    .sidebar-hot-deals ul.products li.product .onsale { font-size: 9px !important; padding: 1px 5px !important; border-radius: 50px !important; line-height: 1.4 !important; }

    /* 手机端专属：详情页底部双排悬浮购买栏 */
    .single-product .m-sticky-footer { display: none !important; } 
    .m-sticky-atc-bar { display: flex; position: fixed; bottom: 0; left: 0; width: 100%; height: 60px; z-index: 9999; background: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); }
    .m-sticky-atc-bar button { flex: 1; border: none; font-size: 15px; font-weight: bold; color: #fff; cursor: pointer; text-transform: uppercase; margin: 0; padding: 0; }
    .m-atc-btn { background: var(--theme-primary-green); }
    .m-buy-btn { background: var(--theme-secondary-color); }
    .single-product .mobile-global-footer { padding-bottom: 80px !important; } 
}