/*
Theme Name: StoneStudio
Theme URI: https://stonestudiodiy.com/
Author: cavel
Author URI: https://stonestudiodiy.com/
Description: StoneStudio DIY Custom Jewelry Theme
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: custom-background, custom-header, custom-menu, threaded-comments, translation-ready
Text Domain: stone-studio
*/

/* 基础与变量 */
:root {
    --primary-color: #5b8c73; /* 从你的Logo提取的森系绿 */
    --primary-dark: #3a634e;
    --text-main: #333333;
    --text-light: #666666;
    --bg-light: #f9f9f9;
    --border-color: #eaeaea;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    color: var(--text-main);
    background-color: #ffffff;
    line-height: 1.6;
    display: grid;
    grid-template-rows: auto 1fr auto; /* Header固定, 内容区自动填充, Footer固定 */
    min-height: 100vh; /* 强制页面至少占满全屏 */
}

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

/* 导航栏 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo span { font-size: 0.8rem; color: var(--text-light); font-weight: normal; }

.nav-links { display: flex; gap: 2rem; font-weight: 500;}
.nav-links a:hover { color: var(--primary-color); }

.header-actions .btn-outline {
    border: 1px solid var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s;
}
.header-actions .btn-outline:hover {
    background: var(--text-main);
    color: white;
}

/* 按钮通用样式 */
.btn-primary {
    background-color: #333; /* 呼应你设计图里黑色的"完成设计"按钮 */
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-size: 1.1rem;
    display: inline-block;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}
.btn-primary:hover { background-color: var(--primary-color); }

/* 用户下拉菜单容器 */
/* 修改部分 */
.user-menu-dropdown {
    position: relative;
    display: inline-block;
}

/* 按钮样式优化 */
.user-menu-trigger {
    background: none;
    border: 1px solid #111;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    outline: none;
}

/* 现代浮动卡片式下拉菜单 */
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 50px; /* 离按钮近一点 */
    background: #ffffff;
    min-width: 140px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); /* 柔和阴影 */
    border-radius: 12px; /* 圆角 */
    padding: 8px 0;
    z-index: 9999;
    border: 1px solid #f1f1f1;
    overflow: hidden;
}

.dropdown-content a {
    display: block;
    padding: 10px 20px;
    color: #4a5568 !important; /* 字体颜色 */
    font-size: 14px !important;
    text-decoration: none !important;
    transition: 0.2s;
}

.dropdown-content a:hover {
    background: #f7fafc;
    color: #000 !important;
}

/* 头部长条占位box  购物车，我的账户等 */
.entry-header{
    display: none;
}

/* 鼠标悬停显示 */
.user-menu-dropdown:hover .dropdown-content {
    display: block;
}

/* Header 布局 */
/* 修复 Header 布局 */
.site-header { 
    padding: 15px 30px; 
    border-bottom: 1px solid #eee; 
    background: #fff; 
}

.header-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    display: flex; 
    justify-content: space-between; /* 拉开左右距离 */
    align-items: center; 
    gap: 20px; /* 增加元素间的最小间距 */
}

/* 强制 Logo 不被压缩 */
.site-logo { 
    font-weight: 800; 
    font-size: 24px; 
    text-decoration: none; 
    color: #111; 
    white-space: nowrap; /* 保证 Logo 不换行 */
}

/* 让导航菜单更紧凑但有间距 */
.nav-links { 
    display: flex; 
    gap: 30px; /* 增加链接间距 */
    white-space: nowrap; 
}

/* 修复 Header-actions 挤压 */
.header-actions {
    display: flex;
    align-items: center;
    white-space: nowrap; /* 保证按钮不被挤压变形 */
}

/* 响应式适配：防止在中等屏幕下菜单过长 */
@media (max-width: 1024px) {
    .nav-links { gap: 15px; font-size: 14px; }
}
.nav-links a { text-decoration: none; color: #333; font-weight: 500; }
.menu-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }

/* 默认：在大屏幕隐藏 mobile-only-actions */
.mobile-only-actions { display: none; }

/* 手机端响应式 */
@media (max-width: 768px) {
    /* 1. 显示 mobile-only-actions */
    .mobile-only-actions { 
        display: flex; 
        flex-direction: column; 
        margin-top: 20px; 
        padding-top: 20px; 
        border-top: 1px solid #eee; 
    }
    .mobile-only-actions a { padding: 10px 0; font-weight: bold; }

    /* 2. 保持原有的 header-actions 在手机端隐藏，避免重复 */
    .header-actions { display: none; }
}

/* 响应式：小于 768px */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-links { 
        display: none; flex-direction: column; position: absolute; top: 60px; left: 0; width: 100%; 
        background: #fff; padding: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); z-index: 1000;
    }
    .nav-links.active { display: flex; }
    .header-actions { display: none; } /* 手机端隐藏账户区，按需调整 */
}

/* 用户菜单 */
.user-menu-dropdown { position: relative; }
.dropdown-content { display: none; position: absolute; right: 0; top: 100%; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.1); padding: 10px; border-radius: 8px; width: 150px; z-index: 99; }
.dropdown-content a { display: block; padding: 8px; color: #333; text-decoration: none; }
.logout-link { color: #e63946 !important; }

/* --- 响应式 Header --- */
.mobile-account-section { display: none; margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee; }
.mobile-label { font-weight: bold; color: #888; margin-bottom: 10px; font-size: 13px; text-transform: uppercase; }

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .header-actions { display: none; } /* 手机端隐藏 PC 下拉菜单 */
    .mobile-account-section { display: flex; flex-direction: column; gap: 12px; }
    .nav-links { 
        display: none; flex-direction: column; position: absolute; top: 65px; left: 0; width: 100%; 
        background: #fff; padding: 30px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); z-index: 999;
    }
    .nav-links.active { display: flex; }
}

@media (min-width: 769px) {
    .menu-toggle { display: none; }
    .mobile-account-section { display: none; }
}

/* 第1屏：Hero Section */
.hero {
    height: 80vh;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    /* 这里未来可以换成一张精美的背景图 */
    background-image: linear-gradient(to bottom, #f9f9f9, #eef3f0); 
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero 区域：增加冲击力 */
.hero-section {
    padding: 100px 20px;
    background: #f4f4f4; /* 稍微深一点点的灰，更有质感 */
    text-align: center;
}
.hero-section h1 { font-size: 3rem; margin-bottom: 20px; }
.hero-section p { font-size: 1.2rem; color: #666; max-width: 600px; margin: 0 auto 30px; }

/* 轻松三步：改成网格卡片，不要让文字连成一片 */
.steps-section {
    padding: 80px 20px;
    max-width: 1000px;
    margin: 0 auto;
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 50px;
}
@media (max-width: 768px) {
    .steps-grid { grid-template-columns: 1fr; gap: 30px; }
}

.step-card {
    text-align: center;
    padding: 20px;
}
.step-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #e0e0e0; /* 极简灰色数字 */
    margin-bottom: 10px;
}
.step-card h3 { font-size: 1.4rem; margin-bottom: 10px; }
.step-card p { color: #888; line-height: 1.6; }

/* 章节通用样式 */
section { padding: 5rem 5%; }
.section-title { text-align: center; font-size: 2rem; margin-bottom: 3rem;}

/* 第2屏：它是如何运作的 */
.how-it-works { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 2rem; text-align: center; }
.step-box { flex: 1; min-width: 250px; }
.step-icon {
    width: 80px; height: 80px;
    background: var(--bg-light);
    border-radius: 50%;
    margin: 0 auto 1.5rem auto;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: var(--primary-color);
}
.step-box h3 { margin-bottom: 0.5rem; }
.step-box p { color: var(--text-light); font-size: 0.95rem; }

/* 第3屏：灵感画廊 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #eee;
    aspect-ratio: 1 / 1;
}
.gallery-item img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s;
}
.gallery-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s;
    color: white;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay h4 { margin-bottom: 1rem; font-size: 1.2rem; }
.btn-small { background: white; color: var(--text-main); padding: 0.5rem 1.5rem; border-radius: 20px; font-weight: bold; }

/* 第4屏：材质与工艺 */
.materials {
    display: flex; align-items: center; gap: 4rem; flex-wrap: wrap; background-color: var(--bg-light); border-radius: 20px; padding: 4rem;
}
.materials-text { flex: 1; min-width: 300px; }
.materials-text h2 { font-size: 2.2rem; margin-bottom: 1rem; color: var(--primary-color);}
.materials-text p { color: var(--text-light); margin-bottom: 1.5rem; }
.materials-img { flex: 1; min-width: 300px; height: 400px; background: #ddd; border-radius: 12px; overflow: hidden; }
.materials-img img { width: 100%; height: 100%; object-fit: cover; }

/* 页脚 */
footer { background: var(--text-main); color: white; padding: 4rem 5% 2rem 5%; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { margin-bottom: 1.5rem; color: var(--primary-color); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.8rem; color: #bbb; cursor: pointer; transition: 0.3s; }
.footer-col ul li:hover { color: white; }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid #444; color: #888; font-size: 0.9rem; }

/* 响应式调整 */
@media (max-width: 768px) {
    .nav-links { display: none; } /* 移动端暂时隐藏导航，后续可加汉堡菜单 */
    .hero-content h1 { font-size: 2.5rem; }
    .materials { padding: 2rem; }
}

/* ================= 弄个石头 MineStone 自定义购物车增强版 ================= */
.return-to-shop {
    display: none;
}
/* 1. 强制隐藏 WooCommerce 默认的表格标题和无关元素 */
.woocommerce-cart .cart-collaterals,
.woocommerce-cart .shop_table.cart {
    display: none !important;
}

/* 2. 容器主样式 */
.minestone-cart-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: inherit;
    color: #333;
    text-align: left; /* 确保文字左对齐 */
}

.cart-title {
    font-size: 28px;
    color: #5b8c73;
    margin-bottom: 40px;
    font-weight: bold;
}

/* 3. 左右布局布局 */
.cart-flex-wrapper {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

@media (max-width: 768px) {
    .cart-flex-wrapper { flex-direction: column; }
}

.cart-items-list { flex: 2; }
.cart-summary-card { 
    flex: 1; 
    background: #f9f9f9; 
    padding: 30px; 
    border-radius: 15px;
    position: sticky;
    top: 20px;
}

/* 4. 单个商品卡片 */
.minestone-cart-item {
    display: flex;
    gap: 25px;
    padding: 25px 0;
    border-bottom: 1px solid #eee;
    align-items: flex-start;
}

.item-visual img {
    width: 140px !important; /* 加大图片显示 */
    height: 140px !important;
    object-fit: cover;
    border-radius: 10px;
    background: #f5f5f5;
}

.item-details h3 {
    font-size: 20px;
    margin: 0 0 10px 0;
    color: #333;
}

.item-meta {
    font-size: 14px;
    line-height: 1.8;
    color: #666;
}

/* 修改“设计明细”等字样的样式 */
.item-meta dt {
    font-weight: bold;
    color: #5b8c73;
    margin-top: 5px;
}

.item-price-tag {
    margin-left: auto;
    font-size: 22px;
    font-weight: bold;
    color: #333;
}

/* 5. 按钮美化 */
.btn-checkout {
    display: block;
    background: #333;
    color: #fff !important;
    text-align: center;
    padding: 18px;
    border-radius: 35px;
    text-decoration: none;
    font-weight: bold;
    margin: 25px 0;
    transition: 0.3s;
}

.btn-checkout:hover {
    background: #5b8c73;
    transform: translateY(-2px);
}

.remove-btn {
    color: #ff4d4d;
    font-size: 13px;
    text-decoration: none;
    margin-top: 15px;
    display: inline-block;
}




/* =======================================================
   WooCommerce "我的账户" 页面布局美化 (左菜单, 右内容)
   ======================================================= */

/* 彻底隐藏账户页面旁边的侧边栏 (Widget Area) */
.woocommerce-account #secondary, .woocommerce-account .widget-area {
    display: none !important;
}

/* 隐藏 WooCommerce 默认那排丑陋的竖排列表 */
.woocommerce-MyAccount-navigation {
    display: none !important;
}

/* 让右侧内容区域占满全屏 */
.woocommerce-MyAccount-content {
    width: 100% !important;
    float: none !important;
}

/* 彻底隐藏账户页面所有默认组件 */
.woocommerce-account .page-title,           /* 隐藏标题 */
.woocommerce-account .entry-title,          /* 隐藏文章标题 */
.woocommerce-account #secondary,            /* 隐藏侧边栏 */
.woocommerce-account .widget-area,          /* 隐藏所有小工具区域 */
.woocommerce-account .woocommerce-MyAccount-navigation { /* 隐藏原版菜单 */
    display: none !important;
}

/* 让我的账户内容区直接顶格，并占满全宽 */
.woocommerce-account .woocommerce {
    display: block !important;
    max-width: 100% !important;
    padding: 0 !important;
}

.woocommerce-MyAccount-content {
    width: 100% !important;
    padding: 0 !important;
}

/* 只隐藏 WooCommerce 账户页面里的那个特定导航栏 */
.woocommerce-account .woocommerce-MyAccount-navigation {
    display: none !important;
}

/* 顺便隐藏掉那个“...你的内容...”的文字，如果你不需要的话 */
.woocommerce-MyAccount-content p:first-child {
    display: none !important;
}


/* ==========================================================================
   Checkout Page Styles (经典模式结账页美化)
   ========================================================================== */
.woocommerce-checkout {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* 桌面端：双栏网格布局 */
@media (min-width: 992px) {
    form.woocommerce-checkout {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: flex-start;
    }

    /* 左侧：表单填写区占 55% */
    #customer_details {
        width: 55%;
        margin-bottom: 0;
    }

    /* 强制左侧的内部栏（账单、备注）上下排列，不再左右挤压 */
    #customer_details .col-1,
    #customer_details .col-2 {
        width: 100%;
        float: none;
        padding: 0;
    }

    /* 隐藏原生的“您的订单”标题，让右侧更整洁 */
    #order_review_heading {
        display: none; 
    }

    /* 右侧：订单明细占 40%，并吸顶悬浮 */
    #order_review {
        width: 40%;
        position: sticky;
        top: 30px; 
        background-color: #fcfcfc;
        border: 1px solid #eee;
        border-radius: 16px;
        padding: 30px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    }
}

/* 优化表单输入框外观 */
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s ease;
}

/* 美化付款按钮 */
#place_order {
    width: 100%;
    padding: 18px;
    background-color: #111; 
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 20px;
}
#place_order:hover {
    background-color: #333;
}

/* 修复结账页布局被错误提示撑开的问题 */
form.woocommerce-checkout {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start; /* 关键：确保右侧吸顶容器始终顶部对齐 */
}

/* 即使出现错误提示，也让左侧内容区始终保持最大宽度 */
.woocommerce-checkout #customer_details {
    width: 55%;
    flex: 0 0 55%;
}

/* 右侧吸顶容器固定 */
.woocommerce-checkout #order_review {
    width: 40%;
    flex: 0 0 40%;
    position: sticky;
    top: 30px;
    background-color: #fcfcfc;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

/* 错误提示美化：让它不会破坏整体结构 */
.woocommerce-error {
    width: 100%;
    margin-bottom: 20px !important;
    padding: 15px !important;
    background-color: #fff1f1 !important;
    color: #d32f2f !important;
    border-left: 4px solid #d32f2f !important;
    list-style: none !important;
}

/* 在 style.css 中加入 */
.woocommerce-order-received .woocommerce-order-overview,
.woocommerce-order-received .woocommerce-thankyou-order-received {
    display: none !important; /* 直接隐藏那行冷冰冰的订单汇总 */
}



/* 统一的页面容器，确保所有页面对齐 */
.site-main-container {
    max-width: 1200px; /* 保证与 Header 宽度一致 */
    margin: 60px auto; 
    padding: 0 20px;
}

/* 博客文章详情样式 */
.entry-header { margin-bottom: 40px; text-align: center; }
.entry-title { font-size: 2.5rem; margin-bottom: 20px; color: #111; line-height: 1.2; }
.entry-meta { color: #888; font-size: 0.9rem; margin-bottom: 30px; }
.entry-content { line-height: 1.8; font-size: 1.15rem; color: #333; }
.entry-content p { margin-bottom: 25px; }
.entry-content img { max-width: 100%; height: auto; border-radius: 12px; margin: 20px 0; }

/* SEO 引流模块：统一的按钮风格 */
.seo-cta-box { 
    margin-top: 60px; padding: 50px; background: #f9f9f9; 
    text-align: center; border-radius: 20px; border: 1px solid #eee;
}
.btn-diy-link { 
    display: inline-block; margin-top: 20px; padding: 15px 40px; 
    background: #111; color: #fff; border-radius: 50px; font-weight: bold;
}

/* 博客列表页专用样式 */
.blog-post-item { 
    border-bottom: 1px solid #eee; 
    padding-bottom: 40px; 
    margin-bottom: 40px; 
}

.blog-post-item h2 { 
    font-size: 1.8rem; 
    margin-bottom: 10px; 
}

.blog-post-item a { 
    text-decoration: none; 
    color: #111; 
}

.blog-post-item a:hover { 
    color: var(--primary-color); 
}

/* 分页按钮样式 */
.page-numbers {
    padding: 10px 15px;
    border: 1px solid #ddd;
    margin: 0 5px;
    border-radius: 4px;
    color: #333;
}
.page-numbers.current {
    background: #333;
    color: #fff;
    border-color: #333;
}


/* 让折叠标签有个小三角图标 */
summary::after {
    content: '+';
    float: right;
    font-weight: bold;
}
details[open] summary::after {
    content: '-';
}
/* 鼠标滑过变色 */
details summary:hover {
    color: var(--primary-color);
}


@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
}

/* 确保 contact-grid 使用 flex 或 grid 对齐 */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start; /* 顶部对齐 */
}

/* 如果是手机端，强制垂直排列 */
@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr; }
}

/* 美化表单外框 */
.wpcf7-form {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
}


/* 容器设置 overflow: hidden 保证放大时不溢出卡片 */
.design-card {
    position: relative;
    transition: all 0.3s ease;
}

/* 图片的基础状态 */
.design-card img {
    transition: transform 0.4s cubic-bezier(0.25, 0.45, 0.45, 0.95);
    transform-origin: center center;
}

/* 鼠标悬停时放大 1.2 倍 */
.design-card:hover img {
    transform: scale(2); 
    cursor: zoom-in;
}

/* 鼠标放上去时，让框里的图片变大 */
.img-box:hover .zoom-img {
    transform: scale(2); /* 放大 1.3 倍 */
    cursor: zoom-in;
}