/*
Theme Name: Qween Cosmetics
Template: storefront
Version: 1.0.0
Description: Custom child theme for Qween Cosmetics
*/

/* ===== RESET & BASE ===== */
* { box-sizing: border-box; }

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: #fff;
    color: #1a1a2e;
    margin: 0;
}

/* ===== HEADER ===== */
.site-header {
    background: #fff !important;
    border-bottom: 1px solid #f0e6f0;
    padding: 0 !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.storefront-handheld-footer-bar { display: none !important; }

/* Header inner layout */
.col-full {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

.site-branding {
    padding: 10px 0 !important;
}

.site-logo img,
.custom-logo {
    max-height: 70px !important;
    width: auto !important;
}

/* ===== NAVIGATION ===== */
.main-navigation {
    background: transparent !important;
    border: none !important;
}

.main-navigation ul li a {
    color: #1a1a2e !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    padding: 8px 18px !important;
    border-radius: 20px;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a {
    background: #fce4ec !important;
    color: #c2185b !important;
}

/* ===== HERO SECTION ===== */
.qween-hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #fff5f7 0%, #fce4ec 40%, #fff 100%);
    padding: 60px 0;
    overflow: hidden;
    position: relative;
}

.qween-hero::before {
    content: '';
    position: absolute;
    right: -100px;
    top: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(194,24,91,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.qween-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

.qween-hero-text .badge {
    display: inline-block;
    background: #fce4ec;
    color: #c2185b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 24px;
}

.qween-hero-text h1 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    color: #1a1a2e;
    margin: 0 0 20px;
}

.qween-hero-text h1 em {
    font-style: italic;
    color: #c2185b;
    font-weight: 800;
}

.qween-hero-text p {
    font-size: 17px;
    color: #666;
    line-height: 1.7;
    margin: 0 0 36px;
    max-width: 440px;
}

.qween-hero-btns {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    background: #c2185b;
    color: #fff !important;
    padding: 14px 32px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary:hover {
    background: #ad1457;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(194,24,91,0.3);
}

.btn-outline {
    background: transparent;
    color: #1a1a2e !important;
    padding: 14px 32px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    border: 2px solid #1a1a2e;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-outline:hover {
    background: #1a1a2e;
    color: #fff !important;
    transform: translateY(-2px);
}

/* Hero image grid */
.qween-hero-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.qween-hero-images .img-card {
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    aspect-ratio: 1;
}

.qween-hero-images .img-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.qween-hero-images .img-card:hover img {
    transform: scale(1.05);
}

/* ===== CATEGORIES SECTION ===== */
.qween-categories {
    padding: 80px 0;
    background: #fff;
}

.qween-categories .section-header {
    text-align: center;
    margin-bottom: 48px;
}

.qween-categories .section-header h2 {
    font-size: 36px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 12px;
}

.qween-categories .section-header p {
    color: #888;
    font-size: 16px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

.cat-card {
    background: linear-gradient(135deg, #fce4ec, #fff5f7);
    border-radius: 20px;
    padding: 36px 24px;
    text-align: center;
    text-decoration: none !important;
    transition: all 0.3s ease;
    border: 1px solid #fce4ec;
}

.cat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(194,24,91,0.15);
}

.cat-card .cat-icon {
    font-size: 40px;
    margin-bottom: 16px;
    display: block;
}

.cat-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 8px;
}

.cat-card p {
    font-size: 13px;
    color: #888;
    margin: 0;
}

/* ===== PRODUCTS SECTION ===== */
.qween-featured {
    padding: 80px 0;
    background: #fafafa;
}

.qween-featured .section-header {
    text-align: center;
    margin-bottom: 48px;
}

.qween-featured .section-header h2 {
    font-size: 36px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 12px;
}

/* ===== WOOCOMMERCE PRODUCT CARDS ===== */
/* 覆盖 Storefront 的 float 布局，使用 grid 统一卡片宽度 */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    float: none !important;
    clear: both !important;
}

/* 消除 Storefront clearfix 伪元素对 grid 布局的影响 */
ul.products::before,
ul.products::after {
    content: none !important;
    display: none !important;
}

/* 覆盖所有 columns-N li.product 的 float 和 width */
ul.products li.product,
ul.products.columns-1 li.product,
ul.products.columns-2 li.product,
ul.products.columns-3 li.product,
ul.products.columns-4 li.product,
ul.products.columns-5 li.product,
.columns-1 li.product,
.columns-2 li.product,
.columns-3 li.product,
.columns-4 li.product,
.columns-5 li.product {
    background: #fff !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06) !important;
    transition: all 0.3s ease !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    /* 关键：覆盖 float 布局 */
    float: none !important;
    width: auto !important;
    clear: none !important;
    display: flex !important;
    flex-direction: column !important;
}

ul.products li.product:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 40px rgba(0,0,0,0.12) !important;
}

/* 产品图片：统一高度 */
ul.products li.product a img,
ul.products li.product .woocommerce-LoopProduct-link img {
    width: 100% !important;
    height: 220px !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    background: #f9f9f9 !important;
}

/* 产品名称：限制行数，防止换行导致卡片高度不一 */
ul.products li.product .woocommerce-loop-product__title {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1a1a2e !important;
    padding: 12px 16px 4px !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-height: 40px !important;
    text-align: left !important;
}

ul.products li.product .price {
    color: #c2185b !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    padding: 4px 16px 12px !important;
    display: block !important;
    text-align: left !important;
    margin-top: auto !important;
}

ul.products li.product .button {
    background: #c2185b !important;
    color: #fff !important;
    border-radius: 0 0 16px 16px !important;
    width: 100% !important;
    text-align: center !important;
    padding: 12px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    border: none !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    display: block !important;
    margin-top: auto !important;
    box-sizing: border-box !important;
}

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

/* 修复 first/last 类的 clear 影响 */
ul.products li.product.first,
ul.products li.product.last {
    clear: none !important;
    float: none !important;
}

/* ===== SHOP PAGE ===== */
/* 删除分类页面顶部多余空白区域 */
.storefront-breadcrumb {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.woocommerce-products-header {
    display: none !important;
}

.woocommerce-products-header__title,
.woocommerce-page .page-title {
    font-size: 32px !important;
    font-weight: 800 !important;
    color: #1a1a2e !important;
    text-align: center !important;
    padding: 24px 0 8px !important;
    margin: 0 !important;
}

.woocommerce-ordering,
.woocommerce-result-count {
    margin-bottom: 16px !important;
}

/* 修复无图片产品的占位符样式（删除圆形轮廓） */
ul.products li.product .woocommerce-placeholder,
ul.products li.product img.woocommerce-placeholder {
    border-radius: 0 !important;
    border: none !important;
    background: #f5f5f5 !important;
    padding: 20px !important;
    width: 100% !important;
    height: 220px !important;
    object-fit: contain !important;
}

/* 产品图片容器 */
ul.products li.product .woocommerce-LoopProduct-link {
    display: block !important;
    overflow: hidden !important;
    background: #f9f9f9 !important;
    border-radius: 16px 16px 0 0 !important;
}

/* ===== FOOTER ===== */
.site-footer {
    background: #1a1a2e !important;
    color: #ccc !important;
    padding: 40px 0 20px !important;
}

.site-footer a {
    color: #f8bbd9 !important;
}

.site-info {
    color: #888 !important;
    font-size: 13px !important;
    text-align: center !important;
    padding: 20px 0 0 !important;
    border-top: 1px solid #333 !important;
    margin-top: 20px !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .qween-hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .qween-hero-text h1 { font-size: 36px; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    ul.products li.product,
    ul.products.columns-1 li.product,
    ul.products.columns-2 li.product,
    ul.products.columns-3 li.product,
    ul.products.columns-4 li.product {
        float: none !important;
        width: auto !important;
    }
}

@media (max-width: 480px) {
    ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .categories-grid { grid-template-columns: 1fr; }
}

/* ===== LOGIN / REGISTER BUTTON IN HEADER ===== */
.qween-account-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
}

.qween-account-nav a.qween-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* Login button: outline style */
.qween-account-nav a.qween-login-btn.login {
    border: 1.5px solid #c2185b;
    color: #c2185b;
    background: transparent;
}
.qween-account-nav a.qween-login-btn.login:hover {
    background: #c2185b;
    color: #fff;
}

/* Register button: filled style */
.qween-account-nav a.qween-login-btn.register {
    background: #c2185b;
    color: #fff;
    border: 1.5px solid #c2185b;
}
.qween-account-nav a.qween-login-btn.register:hover {
    background: #a31545;
    border-color: #a31545;
}

/* My Account button when logged in */
.qween-account-nav a.qween-login-btn.myaccount {
    background: #c2185b;
    color: #fff;
    border: 1.5px solid #c2185b;
}
.qween-account-nav a.qween-login-btn.myaccount:hover {
    background: #a31545;
    border-color: #a31545;
}

/* Position the account nav in the header */
.site-header-cart {
    display: flex;
    align-items: center;
}
