/*
Theme Name: Astra Child - JerseysFlow
Template: astra
Description: Custom child theme for JerseysFlow - Soccer Jersey Store
Version: 1.0
*/

/* ===== 全局样式 ===== */
:root {
    --jf-primary: #e74c3c;
    --jf-dark: #000000;
    --jf-text: #333333;
    --jf-light-bg: #f5f5f5;
    --jf-border: #e0e0e0;
    --jf-green: #27ae60;
    --jf-gold: #f39c12;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--jf-text);
}

/* ===== 顶部公告栏 - 类似 haierjersey.com ===== */
.jf-announcement-bar {
    background: var(--jf-dark);
    color: #fff;
    text-align: center;
    padding: 8px 0;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.jf-announcement-bar a {
    color: var(--jf-gold);
    text-decoration: underline;
}

/* ===== Header 导航 - 匹配 haierjersey.com ===== */
/* Primary header row: Logo (left) + Search (center) + Cart (right) */
.ast-primary-header-bar {
    background: #fff !important;
    border-bottom: none !important;
    box-shadow: none;
    padding: 10px 0 !important;
}

/* Below header row: Menu centered */
.ast-below-header-bar {
    background: #fff !important;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 0 !important;
}

/* Search icon style - make it look like a search bar */
.ast-header-search .ast-search-menu-icon .search-field {
    border: 2px solid #333;
    border-radius: 25px;
    padding: 8px 20px;
    min-width: 300px;
}

.ast-header-search .astra-search-icon {
    background: #333;
    color: #fff;
    padding: 8px 15px;
    border-radius: 0 25px 25px 0;
}

/* Cart icon style */
.ast-header-woo-cart .ast-cart-menu-wrap {
    padding: 5px 0;
}

/* 菜单容器 */
.ast-builder-menu-1 {
    width: auto !important;
}

/* 菜单列表 - 水平排列居中 */
.main-header-menu,
.ast-below-header-bar .main-header-menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
}

/* 菜单项样式 */
.main-header-menu > .menu-item > a {
    color: var(--jf-dark) !important;
    font-weight: 500;
    text-transform: capitalize;
    font-size: 15px;
    letter-spacing: 0.3px;
    padding: 12px 20px !important;
    white-space: nowrap;
    display: block;
    line-height: 1.4;
    transition: color 0.2s ease;
}

/* Menu toggle arrow for sub-menus */
.main-header-menu > .menu-item .ast-menu-toggle {
    display: inline-block !important;
}

.main-header-menu > .menu-item > a:hover,
.main-header-menu > .menu-item.current-menu-item > a {
    color: var(--jf-primary) !important;
}

/* 下拉菜单 */
.main-header-menu .sub-menu {
    background: #fff;
    border: 1px solid var(--jf-border);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 9999;
}

.main-header-menu .sub-menu .menu-item a {
    font-size: 14px;
    padding: 10px 20px;
    color: var(--jf-text) !important;
    font-weight: 400;
}

.main-header-menu .sub-menu .menu-item a:hover {
    background: var(--jf-light-bg);
    color: var(--jf-primary) !important;
}

/* Ensure sub-menu shows on hover */
.main-header-menu .menu-item:hover > .sub-menu,
.main-header-menu .menu-item.focus > .sub-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    left: 0 !important;
    right: auto !important;
}

/* Hide the toggle buttons on desktop - sub-menus show on hover */
.ast-below-header-bar .ast-header-button-wrap,
.ast-below-header-bar .menu-item .ast-header-navigation-arrow {
    display: none !important;
}

/* Sub-menu arrow icon in menu items */
.main-header-menu > .menu-item-has-children > a::after {
    content: '\25BE';
    margin-left: 5px;
    font-size: 10px;
}

/* Remove the Astra toggle button for desktop */
.ast-desktop .ast-below-header-bar .ast-menu-toggle {
    display: none !important;
}

/* Site title/logo 样式 */
.ast-site-identity .site-title a {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--jf-dark) !important;
}

/* ===== 产品卡片 - 复刻 haierjersey.com 风格 ===== */
.woocommerce ul.products li.product {
    border: 1px solid var(--jf-border);
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
    padding: 0;
    margin-bottom: 20px;
}

.woocommerce ul.products li.product:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 13px !important;
    font-weight: 500;
    color: var(--jf-text);
    padding: 10px 12px 5px;
    line-height: 1.4;
    min-height: 50px;
}

.woocommerce ul.products li.product .price {
    padding: 0 12px 10px;
    font-size: 16px;
}

.woocommerce ul.products li.product .price del {
    color: #999;
    font-size: 13px;
    margin-right: 5px;
}

.woocommerce ul.products li.product .price ins {
    color: var(--jf-primary);
    font-weight: 700;
    text-decoration: none;
}

/* 产品图片 */
.woocommerce ul.products li.product img {
    border-bottom: 1px solid var(--jf-border);
}

/* 销售标签 */
.woocommerce span.onsale {
    background: var(--jf-primary);
    border-radius: 3px;
    min-width: auto;
    min-height: auto;
    padding: 4px 10px;
    font-size: 12px;
    line-height: 1.5;
}

/* 加入购物车按钮 */
.woocommerce ul.products li.product .button {
    background: var(--jf-primary) !important;
    color: #fff !important;
    border-radius: 3px;
    font-size: 13px;
    padding: 8px 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 12px 12px;
    width: calc(100% - 24px);
    text-align: center;
}

.woocommerce ul.products li.product .button:hover {
    background: #c0392b !important;
}

/* ===== 单品页面 ===== */
.woocommerce div.product .product_title {
    font-size: 24px;
    font-weight: 600;
    color: var(--jf-dark);
}

.woocommerce div.product p.price {
    font-size: 22px;
}

.woocommerce div.product p.price del {
    color: #999;
    font-size: 16px;
}

.woocommerce div.product p.price ins {
    color: var(--jf-primary);
    font-weight: 700;
    text-decoration: none;
}

/* 促销信息条 */
.jf-promo-banner {
    background: var(--jf-primary);
    color: #fff;
    padding: 8px 15px;
    border-radius: 3px;
    margin: 10px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.jf-promo-banner .get-it-btn {
    background: #fff;
    color: var(--jf-primary);
    padding: 3px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
}

/* 尺码选择器 */
.woocommerce div.product form.cart .variations td.value select {
    border: 2px solid var(--jf-border);
    border-radius: 3px;
    padding: 8px 12px;
}

/* 加入购物车按钮 - 单品页 */
.woocommerce div.product form.cart .button,
.single_add_to_cart_button {
    background: #fff !important;
    color: var(--jf-dark) !important;
    border: 2px solid var(--jf-dark) !important;
    border-radius: 3px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 12px 30px;
    letter-spacing: 1px;
}

/* Buy Now 按钮 */
.jf-buy-now-btn {
    background: var(--jf-gold) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 3px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 12px 30px;
    letter-spacing: 1px;
    cursor: pointer;
    display: inline-block;
    margin-left: 10px;
}

/* ===== 面包屑 ===== */
.woocommerce .woocommerce-breadcrumb {
    font-size: 13px;
    color: #666;
    padding: 10px 0;
}

.woocommerce .woocommerce-breadcrumb a {
    color: var(--jf-primary);
}

/* ===== 页脚 ===== */
.site-footer {
    background: var(--jf-dark);
    color: #ccc;
}

.site-footer a {
    color: #fff;
}

.site-footer a:hover {
    color: var(--jf-primary);
}

/* ===== 搜索栏 ===== */
.ast-search-menu-icon .search-field {
    border: 2px solid var(--jf-border);
    border-radius: 20px;
    padding: 8px 15px;
}

/* ===== WhatsApp 浮动按钮 ===== */
.jf-whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 80px;
    z-index: 9999;
    width: 50px;
    height: 50px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    cursor: pointer;
}

.jf-whatsapp-float svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

/* ===== 回到顶部按钮 ===== */
.jf-back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    width: 40px;
    height: 40px;
    background: var(--jf-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
}

.jf-back-to-top.visible {
    opacity: 1;
}

.jf-back-to-top svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .woocommerce ul.products li.product .woocommerce-loop-product__title {
        font-size: 12px !important;
        min-height: 40px;
    }
    
    .woocommerce ul.products li.product .price {
        font-size: 14px;
    }
}

/* ===== 库存标签 ===== */
.jf-stock-badge {
    color: var(--jf-green);
    font-size: 14px;
    margin: 5px 0;
}

/* ===== 分类页面标题 ===== */
.woocommerce-products-header__title {
    font-size: 28px;
    font-weight: 700;
    color: var(--jf-dark);
    border-bottom: 2px solid var(--jf-primary);
    padding-bottom: 10px;
    margin-bottom: 20px;
}
/* ===== 尺码选择器 ===== */
.jf-size-selector,
.jf-patch-selector,
.jf-customize-selector {
    margin: 15px 0;
}

.jf-size-selector label,
.jf-patch-selector label,
.jf-customize-selector label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.jf-size-options,
.jf-patch-options,
.jf-customize-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.jf-size-btn,
.jf-patch-btn,
.jf-customize-btn {
    border: 2px solid #ddd;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    background: #fff;
    display: inline-block;
}

.jf-size-btn:hover,
.jf-patch-btn:hover,
.jf-customize-btn:hover {
    border-color: #333;
}

.jf-size-btn.selected,
.jf-patch-btn.selected,
.jf-customize-btn.selected {
    border-color: #000;
    background: #000;
    color: #fff;
}

.jf-size-guide {
    display: inline-block;
    margin-left: 15px;
    font-size: 13px;
    color: #666;
    text-decoration: none;
}

.jf-total-extras {
    margin: 15px 0;
    font-size: 14px;
    font-weight: 600;
}

.jf-extras-price {
    color: var(--jf-primary);
}

/* ===== BUY NOW 按钮 ===== */
.jf-buy-now-btn {
    background: #f39c12 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 3px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 12px 30px;
    letter-spacing: 1px;
    cursor: pointer;
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
}

.jf-buy-now-btn:hover {
    background: #e67e22 !important;
}

/* ===== Make Money 区域 ===== */
.jf-make-money {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    margin-top: 20px;
}

.jf-make-money h4 {
    margin: 0 0 5px;
}

/* ===== Email 浮动按钮 ===== */
.jf-email-float {
    position: fixed;
    right: 20px;
    bottom: 140px;
    z-index: 9999;
    width: 50px;
    height: 50px;
    background: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    cursor: pointer;
}

.jf-email-float svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

/* ===== 页脚优化 ===== */
.ast-small-footer {
    background: #1a1a1a !important;
    color: #999;
    padding: 20px 0;
}

.ast-small-footer a {
    color: #ccc;
}

/* Patch 图片按钮样式 */
.jf-patch-btn.jf-patch-img {
    padding: 4px;
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    position: relative;
}
.jf-patch-btn.jf-patch-img:hover {
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.jf-patch-btn.jf-patch-img.selected {
    border-color: #000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.jf-patch-btn.jf-patch-img img {
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
}
/* Tooltip on hover */
.jf-patch-btn.jf-patch-img:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}
