/*
Theme Name: Romeway Ltd
Theme URI: https://www.romeway.cn
Author: Romeway Ltd
Author URI: https://www.romeway.cn
Description: 东莞市隆威实业有限公司定制WordPress主题 - 专业的防霉防潮解决方案展示网站，采用环保绿色设计风格
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
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: romeway
Tags: custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

东莞市隆威实业有限公司（Romeway Ltd）专业防霉防潮解决方案主题。
*/

/* ============================================
   CSS Reset & Base Styles
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: #2e7d32;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #1b5e20;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* ============================================
   Layout Components
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
}

/* ============================================
   Header & Navigation
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.site-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 50px;
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2e7d32;
}

.logo-sub {
    font-size: 0.75rem;
    color: #666;
}

/* Main Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    font-weight: 500;
    color: #333;
    padding: 0.5rem 0;
    position: relative;
}

.main-nav a:hover,
.main-nav .current-menu-item a {
    color: #2e7d32;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #2e7d32;
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: #333;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: #2e7d32;
    color: #fff;
    border-color: #2e7d32;
}

.btn-primary:hover {
    background: #1b5e20;
    border-color: #1b5e20;
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: #2e7d32;
    border-color: #2e7d32;
}

.btn-outline:hover {
    background: #2e7d32;
    color: #fff;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(30, 86, 49, 0.9), rgba(46, 125, 50, 0.85)),
                url('assets/images/hero-bg.jpg') center/cover no-repeat;
    color: #fff;
    text-align: center;
    padding: 4rem 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #fff;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #4caf50;
}

.stat-text {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ============================================
   Product Categories
   ============================================ */
.product-section {
    padding: 4rem 0;
    background: #f8f9fa;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.25rem;
    color: #2e7d32;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #666;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.category-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.category-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
}

.category-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
}

.category-desc {
    font-size: 0.9375rem;
    color: #666;
    margin-bottom: 1.5rem;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: #1a1a1a;
    color: #fff;
    padding: 4rem 0 2rem;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-widget h4 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.footer-widget p {
    color: #ccc;
    line-height: 1.8;
}

.footer-nav ul {
    list-style: none;
}

.footer-nav li {
    margin-bottom: 0.75rem;
}

.footer-nav a {
    color: #ccc;
}

.footer-nav a:hover {
    color: #4caf50;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #2e7d32;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
}

.footer-bottom p {
    color: #888;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* Newsletter Form */
.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #444;
    border-radius: 8px;
    background: #2a2a2a;
    color: #fff;
}

.newsletter-form input:focus {
    outline: none;
    border-color: #2e7d32;
}

.form-message {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    display: none;
}

.form-message.success {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    display: block;
}

.form-message.error {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    display: block;
}

/* ============================================
   Content Styles
   ============================================ */
.site-main {
    padding: 3rem 0;
}

.entry-header {
    margin-bottom: 2rem;
}

.entry-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.entry-content {
    max-width: 800px;
    margin: 0 auto;
}

.entry-content img {
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* ============================================
   404 Page
   ============================================ */
.error-404 {
    text-align: center;
    padding: 4rem 0;
}

.error-icon {
    font-size: 5rem;
    color: #f44336;
    margin-bottom: 1.5rem;
}

/* ============================================
   Search Form
   ============================================ */
.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 600px;
    margin: 2rem auto;
}

.search-form input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.search-form input:focus {
    outline: none;
    border-color: #2e7d32;
}

.search-form button {
    padding: 0.875rem 1.5rem;
}

/* ============================================
   Sidebar
   ============================================ */
.widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.125rem;
    color: #2e7d32;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #2e7d32;
}

/* ============================================
   Back to Top Button
   ============================================ */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: #2e7d32;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background: #1b5e20;
    transform: translateY(-3px);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
    }
    
    .main-nav {
        display: none;
        order: 3;
        width: 100%;
        padding: 1rem 0;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-nav a {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid #eee;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .header-actions {
        display: none;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .search-form {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .hero-section {
        min-height: auto;
        padding: 3rem 0;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.img-fluid { max-width: 100%; height: auto; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 999999;
}

.skip-link:focus {
    display: block;
    left: 0;
    top: 0;
    width: auto;
    height: auto;
    padding: 1rem;
    background: #2e7d32;
    color: #fff;
}

/* ============================================
   Product Card Styles
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.product-card .product-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/2;
}

.product-card .product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-thumbnail img {
    transform: scale(1.05);
}

.product-card .product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #2e7d32;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
}

.product-card .product-content {
    padding: 1.5rem;
}

.product-card .product-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.product-card .product-title a {
    color: #333;
}

.product-card .product-title a:hover {
    color: #2e7d32;
}

.product-card .product-excerpt {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.product-card .product-meta {
    margin-bottom: 1rem;
}

.product-card .product-category {
    font-size: 0.75rem;
    color: #888;
}

.product-card .product-category i {
    margin-right: 0.25rem;
}

/* ============================================
   Product Archive Styles
   ============================================ */
.products-archive-section {
    padding: 3rem 0;
}

.product-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border: 2px solid #ddd;
    border-radius: 25px;
    background: #fff;
    color: #666;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: #2e7d32;
    background: #2e7d32;
    color: #fff;
}

/* ============================================
   Product Single Styles
   ============================================ */
.product-single .product-detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.product-gallery .product-main-image {
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
    margin-bottom: 1rem;
}

.product-gallery .product-main-image img {
    width: 100%;
    height: auto;
}

.product-placeholder {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 12px;
    color: #ccc;
}

.product-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.product-header {
    margin-bottom: 1.5rem;
}

.product-header .product-title {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.product-categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.category-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 20px;
    font-size: 0.75rem;
}

.product-specifications {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 12px;
}

.specs-title {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #333;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table th,
.specs-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.specs-table th {
    color: #666;
    font-weight: 500;
    width: 100px;
}

.product-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.product-detail-content {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid #eee;
}

.product-detail-content .section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.product-detail-content .product-content {
    line-height: 1.8;
}

.product-detail-content .product-content img {
    border-radius: 8px;
    margin: 1rem 0;
}

/* ============================================
   Blog Card Styles
   ============================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.blog-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.blog-card .post-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.blog-card .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.blog-card .post-format {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: #2e7d32;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card .post-content {
    padding: 1.5rem;
}

.blog-card .entry-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.blog-card .entry-title a {
    color: #333;
}

.blog-card .entry-title a:hover {
    color: #2e7d32;
}

.blog-card .entry-meta {
    font-size: 0.875rem;
    color: #888;
    margin-bottom: 1rem;
}

.blog-card .entry-meta i {
    margin-right: 0.25rem;
}

.blog-card .read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #2e7d32;
    font-weight: 500;
}

.blog-card .read-more:hover {
    color: #1b5e20;
}

/* ============================================
   Blog Single Styles
   ============================================ */
.post-single .post-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.post-single .post-categories {
    margin-bottom: 1rem;
}

.post-single .entry-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.post-single .entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.post-single .post-tags {
    color: #888;
}

.post-featured-image {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
}

.post-single .entry-content {
    line-height: 1.8;
    font-size: 1.0625rem;
}

.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.post-navigation a {
    display: block;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.post-navigation a:hover {
    background: #e8f5e9;
}

.post-navigation .nav-label {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.post-navigation .nav-title {
    font-weight: 500;
    color: #333;
}

.nav-next {
    text-align: right;
}

.related-posts {
    margin-top: 3rem;
}

.related-posts .section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.related-posts article {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.related-posts .post-thumbnail {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.related-posts .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-posts .post-info {
    padding: 1rem;
}

.related-posts h3 {
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.related-posts h3 a {
    color: #333;
}

.related-posts h3 a:hover {
    color: #2e7d32;
}

.related-posts .post-date {
    font-size: 0.75rem;
    color: #888;
}

/* ============================================
   Product/Post Responsive
   ============================================ */
@media (max-width: 768px) {
    .product-detail-wrapper {
        grid-template-columns: 1fr !important;
    }

    .products-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .post-navigation {
        grid-template-columns: 1fr;
    }

    .product-actions {
        flex-direction: column;
    }

    .product-actions .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}
