/*
Theme Name: Miaofan Sanitary Ware Store
Theme URI: https://www.mf1988.com
Author: Nan'an Chuangsheng Sanitary Ware Factory
Author URI: https://www.mf1988.com
Description: A vibrant and warm WordPress WooCommerce enterprise e-commerce theme designed for bathroom products and sanitary ware. Features category showcase, product catalog, factory info, OEM/ODM service display, and full terms & policies footer.
Version: 2.0.0
Requires at least: 5.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: miaofan-store
Tags: one-column, custom-colors, custom-logo, featured-images, full-width-template, theme-options, translation-ready, woocommerce
*/

*,*::before,*::after{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;padding:0;font-family:'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif;line-height:1.6;color:#1c1917;background:#fafaf9}
:root{--primary:#c2410c;--primary-light:#ea580c;--primary-dark:#9a3412;--warm:#d97706;--warm-light:#f59e0b;--accent:#059669;--bg:#fafaf9;--bg-white:#ffffff;--bg-card:#ffffff;--text:#1c1917;--text-light:#57534e;--text-lighter:#a8a29e;--border:#e7e5e4;--shadow:0 4px 6px -1px rgba(0,0,0,0.08);--shadow-lg:0 20px 40px rgba(0,0,0,0.1);--radius:0.75rem}
body.dark-mode{--bg:#1c1917;--bg-white:#292524;--bg-card:#292524;--text:#fafaf9;--text-light:#a8a29e;--text-lighter:#78716c;--border:#44403c;--shadow:0 4px 6px -1px rgba(0,0,0,0.3);--shadow-lg:0 20px 40px rgba(0,0,0,0.3)}
a{color:var(--primary);text-decoration:none;transition:color .2s}a:hover{color:var(--primary-light)}img{max-width:100%;height:auto}.container{max-width:1280px;margin:0 auto;padding:0 1rem}@media(min-width:640px){.container{padding:0 1.5rem}}@media(min-width:1024px){.container{padding:0 2rem}}

/* Top Bar */
.top-bar{background:var(--primary);color:#fff;font-size:.75rem;padding:.5rem 0}
.top-bar .container{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.5rem}
.top-bar a{color:rgba(255,255,255,.9)}.top-bar a:hover{color:#fff}
@media(max-width:1024px){.top-bar{display:none}}

/* Header */
.site-header{position:fixed;top:0;left:0;right:0;z-index:1000;transition:all .3s;background:transparent;margin-top:2rem}
@media(max-width:1024px){.site-header{margin-top:0}}
.site-header.scrolled{background:rgba(255,255,255,.95);backdrop-filter:blur(12px);box-shadow:var(--shadow);margin-top:0}
body.dark-mode .site-header.scrolled{background:rgba(28,25,23,.95)}
.header-inner{display:flex;align-items:center;justify-content:space-between;height:72px}@media(min-width:1024px){.header-inner{height:80px}}
.site-logo{display:flex;align-items:center;gap:.5rem;text-decoration:none;color:#fff}
.site-header.scrolled .site-logo{color:var(--text)}
.site-logo-icon{width:40px;height:40px;border-radius:8px;background:var(--primary);display:flex;align-items:center;justify-content:center;color:#fff;font-size:1.2rem}
.site-logo-text{font-size:1.25rem;font-weight:700;letter-spacing:-.025em}
.site-logo-sub{font-size:.625rem;letter-spacing:.15em;text-transform:uppercase;opacity:.7}
.main-nav{display:none}@media(min-width:1024px){.main-nav{display:flex;gap:2rem;align-items:center}}
.main-nav a{font-size:.875rem;font-weight:500;color:rgba(255,255,255,.9)}.main-nav a:hover{color:var(--primary-light)}
.site-header.scrolled .main-nav a{color:var(--text-light)}.site-header.scrolled .main-nav a:hover{color:var(--primary)}
.header-actions{display:flex;align-items:center;gap:.75rem}
.header-phone{display:none;align-items:center;gap:.5rem;padding:.625rem 1.25rem;border-radius:9999px;font-size:.875rem;font-weight:500;background:var(--primary);color:#fff}
@media(min-width:1024px){.header-phone{display:flex}}.header-phone:hover{background:var(--primary-dark);color:#fff}
.theme-toggle,.mobile-toggle{background:none;border:none;cursor:pointer;padding:.5rem;border-radius:.5rem;color:rgba(255,255,255,.8)}
.site-header.scrolled .theme-toggle,.site-header.scrolled .mobile-toggle{color:var(--text-light)}
@media(min-width:1024px){.mobile-toggle{display:none}}
.mobile-menu{display:none;background:var(--bg-white);border-top:1px solid var(--border);box-shadow:var(--shadow-lg)}
.mobile-menu.open{display:block}.mobile-menu a{display:block;padding:.75rem 1rem;color:var(--text);font-size:.875rem;font-weight:500;border-radius:.5rem}
.mobile-menu a:hover{background:var(--bg)}

/* Hero */
.hero{position:relative;min-height:100vh;display:flex;align-items:center;overflow:hidden;margin-top:-2rem}
@media(max-width:1024px){.hero{margin-top:0}}
.hero-bg{position:absolute;inset:0}.hero-bg img{width:100%;height:100%;object-fit:cover}
.hero-overlay{position:absolute;inset:0;background:linear-gradient(135deg,rgba(154,52,18,.92) 0%,rgba(180,83,9,.88) 50%,rgba(120,53,15,.9) 100%)}
.hero-content{position:relative;z-index:10;max-width:1280px;margin:0 auto;padding:8rem 1rem 4rem}
@media(min-width:1024px){.hero-content{padding:10rem 2rem 6rem}}
.hero-badge{display:inline-flex;align-items:center;gap:.375rem;background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.2);border-radius:9999px;padding:.375rem 1rem;color:#fff;font-size:.875rem;margin-bottom:1.5rem}
.hero-title{font-size:2.25rem;font-weight:700;color:#fff;line-height:1.2;margin-bottom:1.5rem}
@media(min-width:640px){.hero-title{font-size:3rem}}@media(min-width:1024px){.hero-title{font-size:3.75rem}}
.hero-title-accent{background:linear-gradient(to right,#fde68a,#fdba74);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.hero-desc{font-size:1.125rem;color:rgba(255,255,255,.85);max-width:36rem;line-height:1.75;margin-bottom:2rem}
.hero-buttons{display:flex;flex-wrap:wrap;gap:1rem;margin-bottom:2.5rem}
.hero-stats{display:flex;align-items:center;gap:2rem}
.hero-stat-item{display:flex;flex-direction:column}
.hero-stat-value{font-size:1.875rem;font-weight:700;color:#fff}
.hero-stat-label{font-size:.875rem;color:rgba(255,255,255,.6)}
.hero-stat-divider{width:1px;height:3rem;background:rgba(255,255,255,.2)}
@media(max-width:1024px){.hero-stats{flex-wrap:wrap;gap:1rem}.hero-stat-divider{display:none}}

/* Buttons */
.btn{display:inline-flex;align-items:center;gap:.25rem;padding:.75rem 2rem;border-radius:9999px;font-size:1rem;font-weight:500;cursor:pointer;transition:all .2s;border:none;text-decoration:none}
.btn-primary{background:#fff;color:var(--primary)}.btn-primary:hover{background:rgba(255,255,255,.9);color:var(--primary)}
.btn-outline-light{background:transparent;border:1px solid rgba(255,255,255,.3);color:#fff}.btn-outline-light:hover{background:rgba(255,255,255,.1);color:#fff}
.btn-filled{background:var(--primary);color:#fff}.btn-filled:hover{background:var(--primary-dark);color:#fff}
.btn-outline{background:transparent;border:1px solid var(--border);color:var(--text)}.btn-outline:hover{background:var(--bg)}
.btn-sm{padding:.375rem 1rem;font-size:.8125rem;border-radius:.375rem;background:var(--primary);color:#fff;border:none}.btn-sm:hover{background:var(--primary-dark);color:#fff}

/* Sections */
.section{padding:5rem 0}@media(min-width:1024px){.section{padding:7rem 0}}
.section-white{background:var(--bg-white)}.section-gray{background:var(--bg)}
.section-header{text-align:center;margin-bottom:4rem}
.section-badge{display:inline-block;background:var(--bg);color:var(--text-light);font-size:.8125rem;font-weight:500;padding:.25rem .75rem;border-radius:9999px;border:1px solid var(--border);margin-bottom:1rem}
.section-title{font-size:1.875rem;font-weight:700;color:var(--text);margin-bottom:1rem}@media(min-width:1024px){.section-title{font-size:2.25rem}}
.section-desc{font-size:1rem;color:var(--text-light);max-width:42rem;margin:0 auto}

/* Category Grid */
.category-grid{display:grid;grid-template-columns:1fr;gap:1.5rem}
@media(min-width:640px){.category-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1024px){.category-grid{grid-template-columns:repeat(3,1fr)}}
@media(min-width:1280px){.category-grid{grid-template-columns:repeat(4,1fr)}}
.category-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;transition:transform .3s,box-shadow .3s;text-decoration:none;display:block}
.category-card:hover{transform:translateY(-5px);box-shadow:var(--shadow-lg);border-color:var(--primary)}
.category-image{position:relative;aspect-ratio:4/3;overflow:hidden;background:linear-gradient(135deg,#fef3c7,#fed7aa)}
.category-image img{width:100%;height:100%;object-fit:cover;transition:transform .5s}
.category-card:hover .category-image img{transform:scale(1.05)}
.category-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:var(--primary-light);font-size:3rem;opacity:.4}
.category-overlay{position:absolute;inset:0;background:linear-gradient(to top,rgba(154,52,18,.7),transparent 60%);opacity:0;transition:opacity .3s;display:flex;align-items:flex-end;justify-content:center;padding-bottom:1.5rem}
.category-card:hover .category-overlay{opacity:1}
.category-view{color:#fff;font-size:.875rem;font-weight:500;padding:.375rem 1rem;border:1px solid rgba(255,255,255,.5);border-radius:9999px}
.category-body{padding:1.25rem}
.category-name{font-size:1rem;font-weight:600;color:var(--text);margin:0 0 .375rem}
.category-desc{font-size:.8125rem;color:var(--text-light);margin:0 0 .5rem;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.category-count{font-size:.75rem;color:var(--primary);font-weight:500}

/* Features */
.features-grid{display:grid;grid-template-columns:1fr;gap:1.5rem}
@media(min-width:640px){.features-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1024px){.features-grid{grid-template-columns:repeat(4,1fr)}}
.feature-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:1.5rem;text-align:center;transition:all .3s}
.feature-card:hover{border-color:var(--primary);transform:translateY(-2px)}
.feature-icon{width:56px;height:56px;border-radius:1rem;background:rgba(194,65,12,.1);display:flex;align-items:center;justify-content:center;margin:0 auto 1rem;color:var(--primary);font-size:1.4rem}
.feature-card h3{font-size:1.125rem;font-weight:600;color:var(--text);margin:0 0 .5rem}
.feature-card p{font-size:.875rem;color:var(--text-light);margin:0;line-height:1.6}

/* Products */
.product-filters{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem;margin-bottom:3rem}
.filter-btn{padding:.375rem 1rem;border-radius:9999px;font-size:.875rem;border:1px solid var(--border);background:transparent;color:var(--text-light);cursor:pointer;transition:all .2s}
.filter-btn:hover,.filter-btn.active{background:var(--primary);border-color:var(--primary);color:#fff}
.product-grid{display:grid;grid-template-columns:1fr;gap:1.5rem}
@media(min-width:640px){.product-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1024px){.product-grid{grid-template-columns:repeat(3,1fr)}}
@media(min-width:1280px){.product-grid{grid-template-columns:repeat(4,1fr)}}
.product-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;transition:transform .3s,box-shadow .3s}
.product-card:hover{transform:translateY(-5px);box-shadow:var(--shadow-lg)}
.product-image{position:relative;aspect-ratio:1;overflow:hidden;background:var(--bg)}
.product-image img{width:100%;height:100%;object-fit:cover;transition:transform .5s}.product-card:hover .product-image img{transform:scale(1.05)}
.product-no-image{width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:var(--text-lighter);opacity:.4}
.product-badge{position:absolute;top:.75rem;left:.75rem;background:#ef4444;color:#fff;font-size:.75rem;font-weight:500;padding:.25rem .5rem;border-radius:.25rem}
.product-body{padding:1rem}
.product-category{font-size:.75rem;color:var(--primary);font-weight:500;margin-bottom:.25rem}
.product-name{font-size:.875rem;font-weight:600;color:var(--text);margin-bottom:.5rem}
.product-name a{color:var(--text)}.product-name a:hover{color:var(--primary)}
.product-price{font-size:1rem;font-weight:700;color:var(--primary);margin-bottom:.75rem}
.product-price del{font-size:.75rem;color:var(--text-lighter);font-weight:400;margin-left:.25rem}
.product-price ins{text-decoration:none}
.product-moq{font-size:.75rem;color:var(--text-lighter);margin-top:.25rem}
.view-all-wrap{text-align:center;margin-top:3rem}
.no-products{text-align:center;padding:3rem 1rem}
.no-products p{font-size:1.125rem;color:var(--text-light);margin-bottom:1.5rem}

/* About */
.about-grid{display:grid;grid-template-columns:1fr;gap:3rem;align-items:center}
@media(min-width:1024px){.about-grid{grid-template-columns:1fr 1fr}}
.about-info .contact-row{display:flex;align-items:flex-start;gap:.75rem;margin-bottom:.75rem}
.contact-label{width:7rem;flex-shrink:0;font-size:.875rem;font-weight:500;color:var(--text-light);padding-top:.125rem}
.contact-value{font-size:.875rem;font-weight:500;color:var(--text)}
.about-image{border-radius:1rem;overflow:hidden;box-shadow:var(--shadow-lg)}.about-image img{width:100%;height:100%;object-fit:cover}

/* CTA */
.cta-section{position:relative;padding:5rem 0;overflow:hidden}
@media(min-width:1024px){.cta-section{padding:7rem 0}}
.cta-bg{position:absolute;inset:0}.cta-bg img{width:100%;height:100%;object-fit:cover}
.cta-bg-overlay{position:absolute;inset:0;background:rgba(28,25,23,.85)}
.cta-content{position:relative;z-index:10;text-align:center;max-width:56rem;margin:0 auto}
.cta-badge{display:inline-flex;align-items:center;gap:.5rem;background:rgba(255,255,255,.1);border-radius:9999px;padding:.5rem 1rem;color:rgba(255,255,255,.8);font-size:.875rem;margin-bottom:1.5rem}
.cta-title{font-size:2.25rem;font-weight:700;color:#fff;margin-bottom:1.5rem}
@media(min-width:1024px){.cta-title{font-size:3rem}}
.cta-desc{font-size:1.125rem;color:rgba(255,255,255,.7);margin-bottom:2.5rem;max-width:42rem;margin-left:auto;margin-right:auto}

/* Footer */
.site-footer{background:#1c1917;color:#fff;padding:4rem 0 0}
.footer-grid{display:grid;grid-template-columns:1fr;gap:2.5rem;padding-bottom:2.5rem}
@media(min-width:640px){.footer-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1024px){.footer-grid{grid-template-columns:2fr 1fr 1fr 1fr}}
.footer-brand-desc{font-size:.875rem;color:#a8a29e;line-height:1.75;margin-bottom:1rem}
.footer-social{display:flex;gap:.75rem}
.footer-social a{width:36px;height:36px;border-radius:50%;background:#292524;display:flex;align-items:center;justify-content:center;color:#a8a29e;font-size:.75rem;transition:all .2s}
.footer-social a:hover{background:var(--primary);color:#fff}
.footer-col h4{font-size:.875rem;font-weight:600;margin:0 0 1rem}
.footer-col ul{list-style:none;padding:0;margin:0}.footer-col li{margin-bottom:.625rem}
.footer-col a{font-size:.875rem;color:#a8a29e;transition:color .2s}.footer-col a:hover{color:#fff}
.footer-bottom{border-top:1px solid #292524;padding:1.5rem 0;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:1rem}
.footer-copyright{font-size:.75rem;color:#78716c}
.footer-links{display:flex;flex-wrap:wrap;gap:1.5rem}
.footer-links a{font-size:.75rem;color:#78716c}.footer-links a:hover{color:#fff}

/* Page & Archive */
.page-content{padding-top:6rem;padding-bottom:4rem}
.entry-content{max-width:48rem;margin:0 auto;font-size:1rem;line-height:1.8;color:var(--text-light)}
.entry-content h1,.entry-content h2,.entry-content h3{color:var(--text)}
.archive-grid{display:grid;grid-template-columns:1fr;gap:2rem}
@media(min-width:640px){.archive-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1024px){.archive-grid{grid-template-columns:repeat(3,1fr)}}
.post-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;transition:transform .3s,box-shadow .3s}
.post-card:hover{transform:translateY(-4px);box-shadow:var(--shadow)}
.post-card-image{aspect-ratio:16/9;overflow:hidden;background:var(--bg)}.post-card-image img{width:100%;height:100%;object-fit:cover}
.post-card-body{padding:1.5rem}.post-card-meta{font-size:.75rem;color:var(--text-lighter);margin-bottom:.5rem}
.post-card-title{font-size:1.125rem;font-weight:600;color:var(--text);margin-bottom:.5rem}.post-card-title a{color:inherit}.post-card-title a:hover{color:var(--primary)}
.post-card-excerpt{font-size:.875rem;color:var(--text-light);line-height:1.6}

/* Back to Top */
.back-to-top{position:fixed;bottom:1.5rem;right:1.5rem;z-index:999;width:44px;height:44px;border-radius:50%;background:var(--primary);color:#fff;border:none;cursor:pointer;display:none;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(194,65,12,.3);transition:all .2s}
.back-to-top.visible{display:flex}.back-to-top:hover{background:var(--primary-dark)}

/* WP Alignment */
.alignleft{float:left;margin-right:1.5rem;margin-bottom:1rem}.alignright{float:right;margin-left:1.5rem;margin-bottom:1rem}.aligncenter{clear:both;display:block;margin-left:auto;margin-right:auto;margin-bottom:1rem}
.wp-caption{max-width:100%}.wp-caption-text{font-size:.875rem;color:var(--text-lighter);text-align:center;margin-top:.5rem}

/* WooCommerce Overrides */
.woocommerce{padding-top:6rem}
.woocommerce ul.products li.product{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;transition:transform .3s,box-shadow .3s}
.woocommerce ul.products li.product:hover{transform:translateY(-5px);box-shadow:var(--shadow-lg)}
.woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:.875rem;font-weight:600}
.woocommerce ul.products li.product .price{color:var(--primary);font-weight:700}
.woocommerce ul.products li.product a img{transition:transform .5s}
.woocommerce ul.products li.product:hover a img{transform:scale(1.05)}
.woocommerce .button{background:var(--primary);color:#fff;border-radius:.375rem;padding:.5rem 1rem;font-size:.8125rem;border:none}
.woocommerce .button:hover{background:var(--primary-dark);color:#fff}
.woocommerce span.onsale{background:var(--primary);border-radius:.25rem;line-height:1;padding:.375rem .625rem;font-size:.75rem}
