/* =============================================
   Wolmart Demo-12 — 酒红色高端零售风格
   仅被 default theme 引用（不影响 apple theme 和 admin 后台）
   ============================================= */

/* === 色板变量 === */
:root {
    --wm-wine: #9A2948;
    --wm-wine-dark: #7A1F38;
    --wm-wine-light: #C44D6E;
    --wm-orange: #FF9933;
    --wm-dark: #333333;
    --wm-gray: #666666;
    --wm-muted: #999999;
    --wm-bg: #f5f5f5;
    --wm-border: #eeeeee;
    --wm-radius: 6px;
    --wm-radius-sm: 4px;
    --wm-shadow: 0 2px 8px rgba(0,0,0,0.06);
    --wm-font: 'Poppins', 'Segoe UI', sans-serif;
}

/* === 顶部信息栏（Demo-12：浅色背景 + 深色文字） === */
.wm-topbar {
    background: #f5f5f5;
    color: #666;
    font-size: 0.75rem;
    padding: 7px 0;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 1px solid #eee;
}
.wm-topbar a { color: #666; text-decoration: none; transition: color 0.2s; }
.wm-topbar a:hover { color: var(--wm-wine); }
.wm-topbar .wm-topbar-sep { margin: 0 8px; opacity: 0.3; font-size: 0.7rem; }

/* === 主导航栏 === */
.wm-header {
    background: #fff;
    padding: 18px 0;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: box-shadow 0.3s;
}
.wm-header.scrolled {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 12px 0;
}
.wm-header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}
/* 联系方式和图标推到最右 */
.wm-header-right {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
    flex-shrink: 0;
}
.wm-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}
.wm-logo img { max-height: 44px; }
.wm-logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--wm-wine);
    letter-spacing: -0.03em;
}
/* 搜索框（Demo-12：All Categories 下拉 + 输入框 + 搜索图标） */
.wm-search {
    flex: 1;
    max-width: 600px;
    position: relative;
    display: flex;
    align-items: stretch;
    height: 45px;
    border: 1px solid #ddd;
    border-radius: 0;
    background: #fff;
}
/* All Categories 下拉按钮 */
.wm-search-cat-dropdown {
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-right: 1px solid #ddd;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    user-select: none;
    flex-shrink: 0;
}
.wm-search-cat-label {
    font-size: 0.85rem;
    color: #333;
    font-weight: 500;
}
.wm-search-cat-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: -1px;
    min-width: 180px;
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    z-index: 100;
    padding: 6px 0;
    margin-top: 8px;
}
.wm-search-cat-menu.show { display: block; }
.wm-search-cat-menu a {
    display: block;
    padding: 7px 16px;
    font-size: 0.85rem;
    color: #333;
    text-decoration: none;
}
.wm-search-cat-menu a:hover { background: #f5f5f5; color: var(--wm-wine); }
/* 搜索输入框 */
.wm-search-input {
    flex: 1;
    height: 100%;
    border: none;
    padding: 0 16px;
    font-size: 0.9rem;
    outline: none;
    background: transparent;
    color: #333;
}
.wm-search-input::placeholder { color: #aaa; font-size: 0.88rem; }
/* 搜索按钮 */
.wm-search-btn {
    height: 100%;
    width: 50px;
    background: none;
    color: #333;
    border: none;
    border-left: 1px solid #ddd;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
    flex-shrink: 0;
}
.wm-search-btn:hover { color: var(--wm-wine); }
/* 导航图标组 */
.wm-nav-icons {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-shrink: 0;
}
.wm-nav-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-size: 0.7rem;
    position: relative;
    transition: color 0.2s;
    letter-spacing: 0.02em;
}
.wm-nav-icon:hover { color: var(--wm-wine); }
.wm-nav-icon i { font-size: 1.5rem; line-height: 1; height: 26px; display: flex; align-items: center; justify-content: center; }
.wm-nav-icon img { height: 26px; width: 26px; object-fit: cover; border-radius: 50%; }
.wm-nav-icon .wm-badge {
    position: absolute;
    top: -5px;
    right: -6px;
    background: var(--wm-wine);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
/* 联系方式 */
.wm-contact-info {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
/* 手机端导航 */
.wm-mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--wm-dark);
    cursor: pointer;
    padding: 4px;
}

/* === 商品卡片 === */
.wm-product-card {
    background: #fff;
    border-radius: var(--wm-radius);
    overflow: hidden;
    transition: box-shadow 0.25s, transform 0.25s;
    border: 1px solid var(--wm-border);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.wm-product-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.wm-product-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f8f8f8;
}
.wm-product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.wm-product-card:hover .wm-product-img-wrap img {
    transform: scale(1.06);
}
/* 收藏心形 */
.wm-product-fav {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #ccc;
    transition: all 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    z-index: 2;
}
.wm-product-fav:hover, .wm-product-fav.active { color: var(--wm-wine); }
/* 折扣标签 */
.wm-product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--wm-orange);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    z-index: 2;
}
/* 商品信息 */
.wm-product-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.wm-product-title {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--wm-dark);
    margin: 0 0 6px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.wm-product-title a { color: inherit; text-decoration: none; }
.wm-product-title a:hover { color: var(--wm-wine); }
/* 星级评分 */
.wm-product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
    font-size: 0.75rem;
}
.wm-product-rating .wm-stars { color: #ffc107; font-size: 0.7rem; }
.wm-product-rating .wm-review-count { color: var(--wm-muted); }
/* 价格 */
.wm-product-price {
    margin-top: auto;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.wm-price-current {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--wm-wine);
}
.wm-price-original {
    font-size: 0.82rem;
    color: #bbb;
    text-decoration: line-through;
}
/* 加入购物车按钮（hover 浮现） */
.wm-product-actions {
    padding: 0 14px 14px;
}
.wm-btn-cart {
    width: 100%;
    height: 38px;
    background: var(--wm-wine);
    color: #fff;
    border: none;
    border-radius: var(--wm-radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.wm-btn-cart:hover { background: var(--wm-wine-dark); }

/* === 分类水平滚动 === */
.wm-category-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 0 16px;
    scrollbar-width: none;
}
.wm-category-scroll::-webkit-scrollbar { display: none; }
.wm-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 80px;
    text-decoration: none;
    color: var(--wm-dark);
    transition: color 0.2s;
}
.wm-category-item:hover { color: var(--wm-wine); }
.wm-category-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--wm-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    border: 2px solid var(--wm-border);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.wm-category-item:hover .wm-category-icon {
    border-color: var(--wm-wine);
    box-shadow: 0 2px 8px rgba(154,41,72,0.15);
}
.wm-category-icon img { width: 100%; height: 100%; object-fit: cover; }
.wm-category-name { font-size: 0.75rem; font-weight: 500; text-align: center; }

/* === 区块标题 === */
.wm-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--wm-dark);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}
.wm-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--wm-wine);
    border-radius: 2px;
}

/* === 通用按钮 === */
.wm-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    padding: 0 28px;
    background: var(--wm-wine);
    color: #fff;
    border: none;
    border-radius: var(--wm-radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}
.wm-btn-primary:hover { background: var(--wm-wine-dark); color: #fff; }
.wm-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    padding: 0 28px;
    background: transparent;
    color: var(--wm-dark);
    border: 2px solid var(--wm-dark);
    border-radius: var(--wm-radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.wm-btn-outline:hover { background: var(--wm-dark); color: #fff; }

/* === 面包屑 === */
.wm-breadcrumb {
    background: var(--wm-bg);
    padding: 12px 0;
    font-size: 0.82rem;
    color: var(--wm-muted);
    margin-bottom: 20px;
}
.wm-breadcrumb a { color: var(--wm-gray); text-decoration: none; }
.wm-breadcrumb a:hover { color: var(--wm-wine); }

/* === 倒计时器 === */
.wm-countdown {
    display: inline-flex;
    gap: 6px;
}
.wm-countdown-item {
    background: var(--wm-dark);
    color: #fff;
    min-width: 44px;
    height: 44px;
    border-radius: var(--wm-radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
}
.wm-countdown-label {
    font-size: 0.55rem;
    font-weight: 400;
    opacity: 0.7;
    text-transform: uppercase;
    margin-top: 2px;
}

/* === Footer（渐变酒红色） === */
.wm-footer {
    background: linear-gradient(135deg, #9A2948 0%, #7A1F38 60%, #5a1528 100%);
    color: rgba(255,255,255,0.7);
    padding-top: 0;
}
/* Newsletter 横条 */
.wm-footer-newsletter {
    background: var(--wm-wine);
    padding: 24px 0;
}
.wm-footer-newsletter h5 { color: #fff; font-weight: 700; margin: 0 0 2px; font-size: 1rem; letter-spacing: 0.05em; }
.wm-footer-newsletter p { color: rgba(255,255,255,0.7); font-size: 0.82rem; margin: 0; }
.wm-newsletter-form {
    display: flex;
    max-width: 440px;
    flex: 1;
}
.wm-newsletter-input {
    flex: 1;
    height: 46px;
    border: none;
    border-radius: 0;
    padding: 0 18px;
    font-size: 0.88rem;
    outline: none;
    background: #fff;
    color: #333;
}
.wm-newsletter-input::placeholder { color: #aaa; }
.wm-newsletter-btn {
    height: 46px;
    padding: 0 28px;
    background: var(--wm-dark);
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.wm-newsletter-btn:hover { background: #000; }
/* 主体 */
.wm-footer-main { padding: 40px 0 30px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.wm-footer-title {
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.wm-footer-links { list-style: none; padding: 0; margin: 0; }
.wm-footer-links li { margin-bottom: 10px; }
.wm-footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}
.wm-footer-links a:hover { color: #fff; }
/* 品牌栏 */
.wm-footer-contact-label { font-size: 0.82rem; color: rgba(255,255,255,0.5); margin: 0 0 4px; }
.wm-footer-phone { font-size: 1.3rem; font-weight: 800; color: #fff; margin: 0 0 12px; letter-spacing: 0.02em; }
.wm-footer-desc { font-size: 0.82rem; color: rgba(255,255,255,0.5); line-height: 1.6; margin: 0 0 14px; }
.wm-footer-social { display: flex; gap: 8px; }
.wm-footer-social a {
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; color: #fff; text-decoration: none;
    transition: opacity 0.2s;
}
.wm-footer-social a:hover { opacity: 0.8; }
.wm-footer-social a:nth-child(1) { background: #3b5998; }
.wm-footer-social a:nth-child(2) { background: #000; }
.wm-footer-social a:nth-child(3) { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.wm-footer-social a:nth-child(4) { background: #ff0000; }
.wm-footer-social a:nth-child(5) { background: #000; }
/* 版权底栏 */
.wm-footer-bottom {
    padding: 18px 0;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}

/* === 购物流程步骤条 === */
.wm-steps {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 28px;
}
.wm-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--wm-muted);
}
.wm-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--wm-border);
    color: var(--wm-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}
.wm-step.active .wm-step-dot {
    background: var(--wm-wine);
    color: #fff;
}
.wm-step.active { color: var(--wm-wine); font-weight: 600; }
.wm-step-line {
    width: 40px;
    height: 2px;
    background: var(--wm-border);
    margin: 0 8px;
}
.wm-step.active ~ .wm-step .wm-step-line { background: var(--wm-border); }

/* === 左侧抽屉菜单 === */
.wm-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s;
}
.wm-drawer-overlay.open {
    display: block;
    opacity: 1;
}
.wm-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: #fff;
    z-index: 1051;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
}
.wm-drawer.open {
    transform: translateX(0);
}
.wm-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 18px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}
.wm-drawer-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}
.wm-drawer-close:hover { color: #333; }
.wm-drawer-nav {
    padding: 8px 0;
}
.wm-drawer-section {
    padding: 14px 18px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.wm-drawer-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}
.wm-drawer-nav a:hover {
    background: #faf5f6;
    color: var(--wm-wine, #9A2948);
    border-left-color: var(--wm-wine, #9A2948);
}
.wm-drawer-nav a i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: #999;
}
.wm-drawer-nav a:hover i { color: var(--wm-wine, #9A2948); }

/* === 响应式 === */
@media (max-width: 991.98px) {
    .wm-search { max-width: none; }
    .wm-topbar { display: none; }
}
@media (max-width: 767.98px) {
    .wm-mobile-toggle { display: block; }
    .wm-header-inner { flex-wrap: wrap; gap: 10px; }
    .wm-search { order: 3; width: 100%; max-width: none; height: 40px; }
    .wm-search-cat-dropdown { display: none; }
    .wm-nav-icons { gap: 14px; }
    .wm-nav-icon span { display: none; }
    .wm-nav-icon i { font-size: 1.2rem; }
    .wm-header-right { gap: 14px; }
    .wm-product-body { padding: 10px; }
    .wm-product-title { font-size: 0.8rem; }
    .wm-price-current { font-size: 0.95rem; }
    .wm-product-actions { padding: 0 10px 10px; }
    .wm-section-title { font-size: 1.1rem; }
    .wm-footer-newsletter .container { flex-direction: column; gap: 12px; }
    .wm-newsletter-form { max-width: 100%; }
}
