/*
Theme Name: Winvasen
Theme URI: https://winvasen.com
Author: Winvasen Official
Author URI: https://winvasen.com
Description: Premium Men's Fashion WordPress Theme - Sweatshirts, T-Shirts, Pants
Version: 4.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: winvasen
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #1a1a1a;
    --secondary: #444;
    --accent: #d49d6b;
    --light: #f8f8f8;
    --dark: #0f0f0f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Inter, sans-serif;
    color: var(--primary);
    background: var(--light);
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ==============================================
   核心修复：Header (Logo+菜单+搜索按钮)
   ============================================== */
header {
    position: sticky;
    top: 0;
    z-index: 9999; /* 最高层级，绝对不被覆盖 */
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(5px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
    width: 100%;
    height: 80px;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
    padding: 0 20px;
}

/* Logo 修复：禁止压缩 + 最高层级 */
.logo {
    flex-shrink: 0;
    z-index: 10000;
}

.logo img {
    height: 34px;
    display: block; /* 消除图片底部空隙 */
}

/* 导航菜单修复：防挤压 + 不换行 */
.main-nav {
    display: flex;
    gap: 20px; /* 减小间距避免溢出 */
    flex-wrap: nowrap;
    align-items: center;
}

.main-nav a {
    font-weight: 500;
    white-space: nowrap; /* 禁止文字换行 */
    padding: 8px 0;
    color: var(--primary);
}

.main-nav a:hover {
    color: var(--accent);
}

/* 搜索按钮修复：可点击 + 扩大点击区域 */
.header-icons {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-shrink: 0;
}

.header-icons .search-icon {
    cursor: pointer; /* 手型光标 */
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.header-icons .search-icon:hover {
    background: rgba(0, 0, 0, 0.05);
}

.lang-currency {
    display: flex;
    gap: 12px;
    font-size: 14px;
}

.mobile-menu-btn {
    display: none;
    font-size: 22px;
    background: none;
    border: none;
    cursor: pointer;
}

/* ==============================================
   英雄海报：适配 Header，不覆盖
   ============================================== */
.hero-slider {
    position: relative;
    height: calc(75vh - 80px); /* 减去header高度，避免重叠 */
    overflow: hidden;
    z-index: 1; /* 远低于header */
    margin-top: 0;
}

.slide-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.slide-item.active {
    opacity: 1;
}

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .6), transparent);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    z-index: 2;
}

.btn-dark {
    background: var(--primary);
    color: white;
    padding: 12px 30px;
    display: inline-block;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-dark:hover {
    background: var(--dark);
}

.btn-light {
    border: 1px solid white;
    color: white;
    padding: 12px 30px;
    display: inline-block;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-light:hover {
    background: rgba(255, 255, 255, 0.1);
}

.slide-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* ==============================================
   6个类目布局：桌面3列 + 手机2列
   ============================================== */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    margin-bottom: 10px;
}

/* 分类网格：适配6个类目，桌面3列，手机2列 */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    width: 100%;
}

.cat-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}

.cat-item:hover {
    transform: translateY(-5px);
}

.cat-item img {
    width: 100%;
    height: 450px;
    object-fit: cover;
}

/* 桌面端：悬浮文字遮罩 */
.cat-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    display: grid;
    place-items: center;
    color: white;
}

.cat-overlay h3 {
    font-size: 22px;
    font-weight: 600;
}

/* ==============================================
   WooCommerce 产品样式
   ============================================== */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.woocommerce ul.products li.product {
    text-align: left;
}

.woocommerce ul.products li.product img {
    border-radius: 8px;
    margin-bottom: 15px;
}

.woocommerce ul.products li.product h2 {
    font-size: 18px;
    font-weight: 600;
}

.woocommerce ul.products li.product .price {
    font-weight: 700;
    font-size: 18px;
}

.woocommerce a.add_to_cart_button {
    background: var(--primary) !important;
    color: white !important;
    border-radius: 99px !important;
    padding: 8px 12px !important;
}

/* ==============================================
   品牌故事 + Instagram 板块
   ============================================== */
.brand-story {
    background: var(--primary);
    color: white;
    padding: 80px 0;
}

.brand-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.brand-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.insta-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.insta-grid img {
    height: 200px;
    object-fit: cover;
}

/* ==============================================
   页脚样式
   ============================================== */
footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-about p {
    color: rgba(255, 255, 255, .7);
    margin-top: 15px;
}

.footer-menu h4 {
    margin-bottom: 15px;
}

.footer-menu ul {
    list-style: none;
    line-height: 2.2;
    color: rgba(255, 255, 255, .7);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding-top: 20px;
    text-align: center;
    color: rgba(255, 255, 255, .5);
}

/* ==============================================
   移动端适配（768px以下）
   ============================================== */
@media (max-width: 768px) {
    /* Header 适配 */
    header {
        height: 70px;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .header-inner {
        padding: 0 15px;
    }
    
    .header-icons {
        gap: 12px;
    }
    
    /* 英雄海报适配 */
    .hero-slider {
        height: calc(60vh - 70px);
    }
    
    /* 分类网格：手机端2列 */
    .cat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .cat-item img {
        height: 250px; /* 手机端图片高度适配 */
    }
    
    /* 其他板块适配 */
    .single-product-wrap, .brand-grid {
        grid-template-columns: 1fr;
    }
    
    .woocommerce ul.products {
        grid-template-columns: 1fr 1fr;
    }
    
    .insta-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}
/* My account page style - PC + Mobile */
body div[style*="padding"] {
    max-width: 500px !important;
    width: calc(100% - 40px) !important;
    margin: 40px auto !important;
    padding: 35px !important;
    background: #ffffff !important;
    border: 1px solid #f0f0f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important;
    box-sizing: border-box !important;
}

/* Title style */
body div[style*="padding"] h1 {
    font-size: 28px !important;
    color: #111 !important;
    margin: 0 0 30px 0 !important;
    font-weight: 600 !important;
    text-align: left !important;
}

/* Label style - single line */
body div[style*="padding"] label {
    display: block !important;
    font-size: 16px !important;
    color: #333 !important;
    margin: 20px 0 8px 0 !important;
}

/* Input style - bigger */
body div[style*="padding"] input[type="text"],
body div[style*="padding"] input[type="password"] {
    width: 100% !important;
    padding: 16px 20px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
    background: #fff !important;
    transition: border-color 0.3s ease !important;
}
body div[style*="padding"] input[type="text"]:focus,
body div[style*="padding"] input[type="password"]:focus {
    border-color: #222 !important;
    outline: none !important;
}

/* Button style - bigger + brand color */
body div[style*="padding"] input[type="submit"] {
    width: 100% !important;
    padding: 18px !important;
    background: #222222 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 17px !important;
    margin-top: 25px !important;
    cursor: pointer !important;
    transition: background 0.3s ease !important;
}
body div[style*="padding"] input[type="submit"]:hover {
    background: #000000 !important;
}

/* Remember & forget password */
body div[style*="padding"] input[type="checkbox"] {
    margin: 22px 8px 22px 0 !important;
}
body div[style*="padding"] a {
    color: #222222 !important;
    text-decoration: underline !important;
    font-size: 14px !important;
    display: block !important;
    margin-top: 12px !important;
}

/* PC style (screen > 768px) */
@media (min-width: 769px) {
    body div[style*="padding"] {
        margin: 60px auto !important;
        padding: 40px !important;
    }
    body div[style*="padding"] h1 {
        font-size: 32px !important;
    }
    body div[style*="padding"] input[type="text"],
    body div[style*="padding"] input[type="password"] {
        padding: 18px 22px !important;
        font-size: 17px !important;
    }
    body div[style*="padding"] input[type="submit"] {
        padding: 20px !important;
        font-size: 18px !important;
    }
}

/* Mobile style (screen < 768px) */
@media (max-width: 768px) {
    body div[style*="padding"] {
        margin: 20px auto !important;
        padding: 25px !important;
    }
    body div[style*="padding"] h1 {
        font-size: 24px !important;
    }
    body div[style*="padding"] input[type="text"],
    body div[style*="padding"] input[type="password"] {
        padding: 14px 16px !important;
        font-size: 15px !important;
    }
    body div[style*="padding"] input[type="submit"] {
        padding: 16px !important;
        font-size: 16px !important;
    }
}