/*
Theme Name: Quality Furniture
Theme URI: https://example.com/quality-furniture
Author: AI Developer
Author URI: https://example.com
Description: Consolidated stylesheet for Quality Furniture WordPress Theme. Built with custom variables, grid systems, and absolute design parity.
Version: 1.0.0
Text Domain: quality-furniture
*/

/* --- 1. Design System & Dynamic Custom Variables --- */
:root {
    --primary-gold: #D4AF37;
    --primary-gold-dark: #8C6239;
    --primary-gold-light: #E3C490;
    --gold-gradient: linear-gradient(135deg, #8C6239 0%, #D4AF37 50%, #E3C490 100%);
    --bg-dark: #121212;
    --bg-dark-accent: #1C1C1E;
    --bg-light: #FDFBF7;
    --bg-light-accent: #F4F0EA;
    --text-light: #1D1D1F;
    --text-dark: #F5F5F7;
    --text-gray: #8E8E93;

    --theme-bg: var(--bg-light);
    --theme-bg-accent: var(--bg-light-accent);
    --theme-text: var(--text-light);

    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Montserrat', sans-serif;
    --card-shadow: 0 10px 30px rgba(0,0,0,0.05);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --border-gold: 1px solid rgba(197, 168, 128, 0.3);
}

[data-theme="dark"] {
    --theme-bg: var(--bg-dark);
    --theme-bg-accent: var(--bg-dark-accent);
    --theme-text: var(--text-dark);
    --card-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* --- 2. Typography & Structural Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--theme-bg);
    color: var(--theme-text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font-family: inherit;
    border: none;
    outline: none;
    background: none;
}

/* --- 3. Shared Utility Classes --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-padding {
    padding: 80px 0;
}

.text-center { 
    text-align: center; 
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    color: var(--theme-text);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--gold-gradient);
    margin: 15px auto 0;
}

.btn-gold {
    display: inline-block;
    padding: 12px 30px;
    background: var(--gold-gradient);
    color: #fff !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    border-radius: 2px;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(140, 98, 57, 0.4);
}

.btn-outline {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid var(--primary-gold);
    color: var(--theme-text);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    border-radius: 2px;
    transition: var(--transition-smooth);
    cursor: pointer;
    text-align: center;
}

.btn-outline:hover {
    background: var(--gold-gradient);
    color: #fff;
    border-color: transparent;
}

/* --- 4. Header & Dropdown Navigation --- */
.main-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: var(--border-gold);
    padding: 15px 0;
    transition: var(--transition-smooth);
}

[data-theme="dark"] .main-nav {
    background: rgba(18, 18, 18, 0.95);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-svg {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-gold-dark);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gold);
    transition: var(--transition-smooth);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-btn {
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    color: var(--theme-text);
}

.badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--primary-gold-dark);
    color: #fff;
    border-radius: 50%;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--theme-text);
}

/* --- 5. Hero Banner & Carousel Layout --- */
.hero-slider {
    position: relative;
    height: 80vh;
    overflow: hidden;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.slide.active {
    opacity: 1;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.7) 30%, rgba(0,0,0,0.2) 100%);
}

.slide-content {
    position: relative;
    z-index: 10;
    color: #fff;
    max-width: 600px;
    padding-left: 5%;
}

.slide-content h2 {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.slide-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #eaeaea;
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 20;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.dot.active {
    background: var(--primary-gold-light);
    transform: scale(1.3);
}

/* --- 6. Modern Grid System & Product Cards --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--theme-bg-accent);
    border: var(--border-gold);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow);
    border-color: var(--primary-gold-light);
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.product-card:hover .card-img-wrapper img {
    transform: scale(1.08);
}

.card-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 5;
}

.badge-best {
    background: var(--gold-gradient);
    color: #fff;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 2px;
}

.card-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-info h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--theme-text);
}

.card-cat {
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--primary-gold-dark);
    letter-spacing: 1px;
    margin-bottom: 5px;
    font-weight: 600;
}

.card-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.card-price {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--primary-gold-dark);
    margin-bottom: 10px;
}

/* --- 7. Site Footer Columns --- */
.site-footer {
    background: var(--bg-dark);
    color: var(--text-dark);
    padding: 80px 0 30px;
    font-size: 0.9rem;
    border-top: 3px solid var(--primary-gold);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--primary-gold);
    margin-bottom: 25px;
}

.footer-col p {
    color: var(--text-gray);
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-gray);
}

.footer-col ul li a:hover {
    color: var(--primary-gold);
    padding-left: 5px;
}

.footer-newsletter input {
    width: 100%;
    padding: 12px;
    background: #1C1C1E;
    color: #fff;
    border: 1px solid #3A3A3C;
    margin-bottom: 10px;
    border-radius: 2px;
}

.footer-newsletter button {
    width: 100%;
}

.footer-bottom {
    border-top: 1px solid #3A3A3C;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--text-gray);
    font-size: 0.8rem;
}

/* --- 8. Premium Responsive Media Queries --- */
@media (max-width: 992px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--theme-bg);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--card-shadow);
        gap: 15px;
        border-bottom: var(--border-gold);
    }
    .nav-links.active {
        display: flex;
    }
    .hamburger {
        display: block;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .slide-content h2 {
        font-size: 2.2rem;
    }
    .slide-content p {
        font-size: 0.95rem;
    }
}
/* ==========================================================================
   10. PREMIUM PRODUCT DETAILS PAGE MODULES
   ========================================================================== */
.product-details-grid {
    display: grid;
    grid-template-columns: 12fr 12fr;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
    text-align: left;
}

.gallery-main {
    height: 450px;
    border: var(--border-gold);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
    background-color: var(--theme-bg-accent);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.gallery-thumbs {
    display: flex;
    gap: 15px;
}

.thumb-img {
    width: 80px;
    height: 80px;
    border: var(--border-gold);
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
    background-color: var(--theme-bg-accent);
    transition: var(--transition-smooth);
}

.thumb-img:hover {
    border-color: var(--primary-gold);
    transform: scale(1.05);
}

.thumb-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-meta {
    text-align: left;
}

.product-meta h1 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--theme-text);
    line-height: 1.2;
}

.meta-price {
    font-size: 1.8rem;
    color: var(--primary-gold-dark);
    font-weight: 700;
    margin-bottom: 20px;
}

.product-specs-list {
    margin: 25px 0;
    border-top: 1px solid rgba(197, 168, 128, 0.2);
    padding-top: 20px;
    list-style: none;
    padding-left: 0;
}

.product-specs-list li {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(197, 168, 128, 0.05);
    padding-bottom: 8px;
    color: var(--theme-text);
}

.product-specs-list li strong {
    color: var(--primary-gold-dark);
    font-family: var(--font-sans);
}

.action-box {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 30px;
}

.qty-selector {
    display: flex;
    align-items: center;
    border: var(--border-gold);
    border-radius: 2px;
    background: var(--theme-bg-accent);
}

.qty-selector button {
    padding: 10px 15px;
    cursor: pointer;
    color: var(--theme-text);
    font-weight: bold;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
    background: none;
    border: none;
}

.qty-selector button:hover {
    color: var(--primary-gold-dark);
}

.qty-selector input {
    width: 45px;
    text-align: center;
    color: var(--theme-text);
    font-weight: bold;
    font-size: 1rem;
    border: none;
    background: none;
}

/* Tabs Module styling */
.tab-container {
    margin-top: 60px;
    text-align: left;
}

.tab-headers {
    display: flex;
    border-bottom: var(--border-gold);
}

.tab-btn {
    padding: 15px 30px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--text-gray);
    border-bottom: 3px solid transparent;
    transition: var(--transition-smooth);
}

.tab-btn.active, .tab-btn:hover {
    border-bottom-color: var(--primary-gold);
    color: var(--primary-gold-dark);
}

.tab-content {
    display: none;
    padding: 30px 0;
    color: var(--theme-text);
    font-size: 1rem;
    line-height: 1.7;
}

.tab-content.active {
    display: block;
}

@media (max-width: 768px) {
    .product-details-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .gallery-main {
        height: 300px;
    }
}
/* ==========================================================================
   11. UNIVERSAL DARK MODE OVERRIDES & FALLBACKS
   ========================================================================== */
[data-theme="dark"], body.dark-mode {
    background-color: var(--bg-dark) !important;
    color: var(--text-dark) !important;
}

[data-theme="dark"] body, body.dark-mode {
    background-color: var(--bg-dark) !important;
    color: var(--text-dark) !important;
}

[data-theme="dark"] .main-nav, body.dark-mode .main-nav {
    background: rgba(18, 18, 18, 0.95) !important;
    border-bottom-color: rgba(212, 175, 55, 0.4) !important;
}

[data-theme="dark"] main, 
[data-theme="dark"] section, 
[data-theme="dark"] div[style*="background"], 
[data-theme="dark"] aside[style*="background"], 
body.dark-mode main, 
body.dark-mode section, 
body.dark-mode div[style*="background"], 
body.dark-mode aside[style*="background"] {
    background-color: var(--bg-dark-accent) !important;
    color: var(--text-dark) !important;
    border-color: rgba(212, 175, 55, 0.3) !important;
}

[data-theme="dark"] .product-card, 
[data-theme="dark"] .form-card, 
[data-theme="dark"] .shop-toolbar, 
[data-theme="dark"] .filter-sidebar, 
body.dark-mode .product-card, 
body.dark-mode .form-card, 
body.dark-mode .shop-toolbar, 
body.dark-mode .filter-sidebar {
    background-color: var(--bg-dark-accent) !important;
    border-color: rgba(212, 175, 55, 0.3) !important;
    color: var(--text-dark) !important;
}

[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4, [data-theme="dark"] p, [data-theme="dark"] span, [data-theme="dark"] label, [data-theme="dark"] td, [data-theme="dark"] th, [data-theme="dark"] strong,
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4, body.dark-mode p, body.dark-mode span, body.dark-mode label, body.dark-mode td, body.dark-mode th, body.dark-mode strong {
    color: var(--text-dark) !important;
}

[data-theme="dark"] input, [data-theme="dark"] textarea, [data-theme="dark"] select,
body.dark-mode input, body.dark-mode textarea, body.dark-mode select {
    background-color: #1a1a1a !important;
    color: #fff !important;
    border-color: rgba(212, 175, 55, 0.4) !important;
}
/* ==========================================================================
   11. DYNAMIC WORDPRESS DROPDOWN SUB-MENUS
   ========================================================================== */

/* Ensure parent list items are positioned relatively to anchor the dropdowns */
.nav-links li {
    position: relative;
}

/* Hide the sub-menu dropdown by default and position it absolutely below the parent */
.nav-links li .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--theme-bg-accent);
    border: var(--border-gold);
    box-shadow: var(--card-shadow);
    min-width: 210px;
    padding: 10px 0;
    z-index: 999;
    flex-direction: column;
    border-radius: 4px;
    text-align: left;
    margin-top: 12px;
}

[data-theme="dark"] .nav-links li .sub-menu {
    background-color: var(--bg-dark-accent);
}

/* Sub-menu item overrides */
.nav-links li .sub-menu li {
    width: 100%;
    padding: 0;
    margin: 0;
}

.nav-links li .sub-menu li a {
    display: block;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: none; /* Keeps submenus looking clean and natural */
    letter-spacing: 0.5px;
    color: var(--theme-text);
    border: none;
    transition: var(--transition-smooth);
    width: 100%;
}

/* Disable the underline animation inside dropdown lists to keep them clean */
.nav-links li .sub-menu li a::after {
    display: none !important;
}

/* Hover effects for sub-menu items */
.nav-links li .sub-menu li a:hover {
    background-color: rgba(197, 168, 128, 0.1);
    color: var(--primary-gold-dark);
    padding-left: 25px;
}

/* Reveal the dropdown smoothly when hovering over the parent item */
.nav-links li:hover > .sub-menu {
    display: flex;
    animation: qfSubMenuFadeIn 0.3s ease forwards;
}

/* Smooth dropdown entry keyframe animation */
@keyframes qfSubMenuFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
/* ==========================================================================
   12. HEADER NAVIGATION ALIGNMENT & SPACING FIX
   ========================================================================== */

/* Ensure the outer container distributes space evenly across the row */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Force the logo container to maintain its size without shrinking */
.logo-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Force the navigation wrapper to fill the middle space and center its menu */
.main-navigation {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

/* Reset margins and ensure comfortable spacing between navigation links */
.nav-links {
    display: flex;
    gap: 25px; /* Comfortable gap prevents crowding on medium screens */
    align-items: center;
    margin: 0;
    padding: 0;
}

/* Force the utility icons to maintain their size and spacing without shrinking */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}