/*
Theme Name: RoomFix
Theme URI: https://roomfix.shop
Description: Lightweight, SEO-optimized WordPress theme for Amazon affiliate blogging
Version: 2.0.0
Author: RoomFix Team
Author URI: https://roomfix.shop
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: roomfix
Tags: blog, e-commerce, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ===== Brand Colors from Logo ===== */
:root {
    --brand-primary: #5B5FDE;
    --brand-primary-dark: #4A4EB8;
    --brand-primary-light: #7B7FEE;
    --accent-color: #10b981;
    --text-dark: #1a1a2e;
    --text-medium: #4a4a5e;
    --text-light: #6b7280;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-lighter: #fafbfc;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1280px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-white);
    padding-top: 80px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--brand-primary-dark);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Advanced Header (2026 Style) ===== */
.site-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

/* Logo */
.site-logo img {
    height: 45px;
    width: auto;
    transition: var(--transition);
}

.site-header.scrolled .site-logo img {
    height: 40px;
}

/* Navigation */
.main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-navigation > ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
}

.main-navigation > ul > li > a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 15px;
    border-radius: 8px;
    transition: var(--transition);
}

.main-navigation > ul > li > a:hover {
    background: var(--bg-light);
    color: var(--brand-primary);
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    max-width: 90vw;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 32px;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.main-navigation li:hover .mega-menu {
    opacity: 1;
    visibility: visible;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.mega-menu-column h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.mega-menu-column ul {
    list-style: none;
}

.mega-menu-column a {
    display: block;
    padding: 8px 12px;
    color: var(--text-dark);
    border-radius: 6px;
    transition: var(--transition);
}

.mega-menu-column a:hover {
    background: var(--bg-light);
    color: var(--brand-primary);
    transform: translateX(4px);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-search-toggle,
.header-menu-toggle {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-dark);
    transition: var(--transition);
}

.header-search-toggle:hover,
.header-menu-toggle:hover {
    background: var(--bg-light);
    color: var(--brand-primary);
}

.header-menu-toggle {
    display: none;
}

/* Mobile Menu */
@media (max-width: 1024px) {
    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        height: 100vh;
        background: white;
        padding: 80px 24px 24px;
        overflow-y: auto;
        transition: var(--transition);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    }
    
    .main-navigation.active {
        right: 0;
    }
    
    .main-navigation > ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-navigation > ul > li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-navigation > ul > li > a {
        width: 100%;
        padding: 16px 0;
        justify-content: space-between;
    }
    
    .mega-menu {
        position: static;
        transform: none;
        width: 100%;
        margin-top: 0;
        padding: 16px;
        display: none;
        box-shadow: none;
        border: none;
        background: var(--bg-light);
    }
    
    .mega-menu.active {
        display: block;
    }
    
    .mega-menu-grid {
        grid-template-columns: 1fr;
    }
    
    .header-menu-toggle {
        display: flex;
    }
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

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: 1.5rem;
    line-height: 1.8;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--brand-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--brand-primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.btn-outline:hover {
    background: var(--brand-primary);
    color: white;
}

/* ===== Sections ===== */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
    color: white;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ===== Category Grid ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.category-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 32px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-primary);
}

.category-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: var(--bg-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.category-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.category-count {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===== Blog Layout (Professional) ===== */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 48px;
    padding: 40px 0;
}

.blog-main {
    min-width: 0;
}

.blog-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

/* Article Card */
.article-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 32px;
    transition: var(--transition);
}

.article-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.article-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-thumbnail img {
    transform: scale(1.05);
}

.article-content {
    padding: 32px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.875rem;
    color: var(--text-light);
}

.article-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-title a {
    color: var(--text-dark);
}

.article-title a:hover {
    color: var(--brand-primary);
}

.article-excerpt {
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Single Post */
.single-post-header {
    max-width: 800px;
    margin: 0 auto 48px;
    text-align: center;
}

.single-post-header h1 {
    font-size: 3rem;
    margin-bottom: 24px;
}

.post-content {
    max-width: 800px;
    margin: 0 auto;
}

.post-content p {
    margin-bottom: 24px;
    font-size: 1.0625rem;
    line-height: 1.9;
}

.post-content h2 {
    margin-top: 48px;
    margin-bottom: 20px;
    font-size: 2rem;
}

.post-content h3 {
    margin-top: 36px;
    margin-bottom: 16px;
    font-size: 1.5rem;
}

.post-content ul,
.post-content ol {
    margin-bottom: 24px;
    padding-left: 28px;
}

.post-content li {
    margin-bottom: 12px;
    line-height: 1.8;
}

/* Sidebar Widgets */
.widget {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 10px 0;
    border-bottom: 1px solid var(--bg-light);
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--text-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget a:hover {
    color: var(--brand-primary);
}

/* ===== Products Grid ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    background: var(--bg-lighter);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--brand-primary);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.0625rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stars {
    color: #FFA500;
    font-size: 14px;
}

.rating-count {
    color: var(--text-light);
    font-size: 0.875rem;
}

.product-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 16px;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--text-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h4 {
    color: white;
    margin-bottom: 20px;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 12px;
}

.footer-widget a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-widget a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .blog-layout {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        position: static;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.mb-small { margin-bottom: 16px; }
.mb-medium { margin-bottom: 24px; }
.mb-large { margin-bottom: 48px; }