/*
Theme Name:        WDCOMS Custom Core Framework
Theme URI:         https://wdcoms.au
Description:       Custom engineered, un-templated block-canvas core layout. Built with an amber-gold sticky top header, greyish structural left navigation sidebar, and custom WooCommerce CSS grid resets.
Author:            WDCOMS Development
Author URI:        https://wdcoms.au
Version:           1.0.1
Text Domain:       wdcoms
*/

/* Global Layout & Variables */
:root {
    /*--header-bg-color: #ffa400;*/     /* Amber-Gold Top Banner */
  /*  --page-bg-color: #ffffff;       /* Your Signature Teal Page Background */
 /*   --sidebar-bg-color: #2185a6;    /* Neutral Greyish Sidebar */
    --text-color: #1a1a1a;          /* High-Contrast Charcoal Text */
}

/* ==========================================================================
   GLOBAL LAYOUT & FRAMEWORK BASES
   ========================================================================== */
html, body, main.site-content {
    background-color: var(--main-page-bg-color, #ffffff) !important;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color, #1a1a1a);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 1. Master Header Frame - Connected directly to your dashboard wheel */
.master-header-frame {
    background-color: var(--header-frame-bg-color) !important; /* Managed by the Top/Bottom Accent Strips picker */
    padding: 10px 0 !important;                                  /* Creates the blue bars above and below the menu */
    width: 100% !important;
    display: block !important;
}

/* 2. Sticky Navigation Banner - Full Width with Dual Symmetrical Header Gradients */
header.site-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background-color: var(--menu-header-gradient-bottom, #ffa700) !important;
    background-image: linear-gradient(to bottom, var(--menu-header-gradient-top, #ffe600) 0%, var(--menu-header-gradient-bottom, #ffa700) 100%) !important;
    border-bottom: 2px solid #e09000 !important;
    padding: 0 30px !important; 
    margin: 0 !important;                                 
    width: 100% !important;                               
    box-sizing: border-box !important;
}

/* 3. Header Container - Forces the tight button-height spacing collapse */
.header-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    min-height: 48px !important; /* Snaps the amber banner thickness to match your button heights perfectly */
}

/* 4. Layered Multi-Tier Branding Text Layout */
.site-logo a {
    display: flex !important;
    flex-direction: column !important;
    text-decoration: none !important;
    line-height: 1.0 !important;
    padding: 4px 0 !important; 
}

/* Layered Multi-Tier Branding text color mappings linked straight to dashboard */
.logo-main {
    font-size: 2.2rem !important;
    font-weight: 900 !important;
    color: var(--logo-title-color, #0046ea) !important; /* Controlled by Site Title Color wheel */
    letter-spacing: -0.5px !important;
}

.logo-sub {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: var(--logo-tagline-color, #ff0000) !important; /* Controlled by Site Tagline Color wheel */
    letter-spacing: 0.5px !important;
    margin-top: 2px !important;
}

/* Master Layout Wrapper - Fortified with explicit priority */
.site-wrapper {
    display: flex !important;
    flex: 1 !important;
}

/* 5. 260px Fixed Structural Sidebar Column */
aside.site-sidebar {
    width: 260px !important;
    background-color: var(--sidebar-bg-color) !important; /* Points directly to your root sidebar variable */
    border-right: 1px solid #eaeaea !important;
    padding: 30px 20px !important;
    box-sizing: border-box !important;
}

/* 6. Main Content Area Canvas Container */
main.site-content {
    flex: 1 !important;
    padding: 40px !important;
    box-sizing: border-box !important;
}

/* Ensure all baseline headings and text fragments inherit your master body text choice */
main.site-content h1, 
main.site-content h2, 
main.site-content h3, 
main.site-content h4, 
main.site-content p, 
main.site-content li,
main.site-content span {
    color: var(--text-color, #1a1a1a) !important; /* FIXED: Swapped to text-color so it doesn't cross with button selectors! */
}

/* 7. Structural Reset Loops for Headers & Sidebars */
.site-header ul, 
.site-sidebar ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.site-header li {
    display: inline-block !important;
    position: relative !important;
    margin-right: 25px !important;
}

/* 8. Header Navigation Structural Link Base */
.site-header li a {
    text-decoration: none !important;
    font-size: 1.25rem !important; /* Larger Top Nav links */
    font-weight: 600 !important;
    /* REMOVED: color property deleted so your menu buttons look up their gradient variables flawlessly! */
}

/* 9. Sidebar Navigation Layout Properties */
.sidebar-navigation li a, 
.widget-container ul li a {
    font-size: 1.15rem !important; /* Enhanced easy-read side links */
    text-decoration: none !important;
    display: block !important;
    padding: 6px 0 !important;
}

/* 10. Submenu Hover Logic (Up to 3 levels protected) */
.site-header li ul {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background: #ffffff !important;
    border: 1px solid #eaeaea !important;
    display: none !important;
    min-width: 190px !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important;
}

.site-header li:hover > ul {
    display: block !important;
}

.site-header li ul li {
    display: block !important;
    margin: 0 !important;
}

/* 11. Multi-Tier Header Dropdown Typography Layouts */
.site-header li ul li a {
    padding: 10px 15px !important;
    font-size: 1.1rem !important;
    /* REMOVED: hardcoded color deleted so it follows your dynamic button text variable! */
}

.site-header li ul li a:hover {
    background-color: #f4f4f4 !important;
}

.site-header li ul ul {
    left: 100% !important;
    top: 0 !important;
}

/* 12. WooCommerce Modern CSS Grid Engine Layout */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none !important;
}

/* 13. WooCommerce Individual Product Card Wrapper */
.woocommerce ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    padding: 15px !important;
    border-radius: 4px !important;
    color: var(--text-color, #1a1a1a) !important; /* FIXED: Tied cleanly to your master body text choice! */
}

/* 14. Responsive Mobile Breakpoints (Tablet & Phone Views) */
@media (max-width: 768px) {
    .site-wrapper {
        flex-direction: column !important;
    }
    aside.site-sidebar {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid #eaeaea !important;
        padding: 20px !important;
    }
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Hide your actual menu navigation row by default on mobile */
    .site-header nav {
        display: none !important;
        width: 100% !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        background-color: var(--menu-header-gradient-bottom, #ffa700) !important;
        padding: 10px 20px !important;
        box-sizing: border-box !important;
        border-bottom: 3px solid var(--btn-border-color, #e09000) !important;
    }

    /* Force the menu block to drop open cleanly the millisecond the hidden checkbox is clicked */
    .menu-toggle-checkbox:checked ~ nav {
        display: block !important;
    }

    /* Hide the checkbox entity completely from view */
    .menu-toggle-checkbox {
        display: none !important;
    }

    /* Build and shape a beautiful, uniform 3-line hamburger bar */
    .hamburger-button {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        width: 24px !important;
        height: 18px !important;
        cursor: pointer !important;
        padding: 5px !important;
    }

    .hamburger-button span {
        display: block !important;
        width: 100% !important;
        height: 2px !important;
        background-color: var(--btn-text-color, #1a1a1a) !important; /* Dynamically tracks your menu text color wheel! */
        border-radius: 1px !important;
        transition: all 0.2s ease-in-out !important;
    }

    /* Format your stacked buttons inside the drop-down menu panel box */
    .site-header nav ul,
    .top-navigation ul {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .site-header nav ul li,
    .top-navigation ul li.menu-item {
        display: block !important;
        width: 100% !important;
        margin: 4px 0 !important;
    }

    .top-navigation ul li.menu-item > a,
    .site-header nav ul li a {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        text-align: left !important;
        padding: 12px 15px !important;
        border: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    }
}

/* Hide your mobile hamburger controls instantly if a user displays on a desktop laptop */
@media (min-width: 769px) {
    .menu-toggle-checkbox,
    .hamburger-button {
        display: none !important;
    }
}

/* 15. Custom Segmented Menu Buttons (Structural Containers & Micro-Gaps) */
.site-header nav ul li,
.site-header li,
.top-navigation ul li.menu-item {
    display: inline-block !important;
    margin-right: 0 !important; /* FIXED: Consolidated into your precise narrow 1mm separation gap! */
    margin-left: 0 !important;
    padding: 0 !important;
}

/* 16. Custom Segmented Buttons - Connected Directly to Clean Matching System Variables */
.top-navigation ul li.menu-item > a,
.site-header nav ul li a {
    background-color: var(--menu-btn-gradient-top, #ffe600) !important; /* Swapped to top variable so it doesn't block the gradient blend */     
    background-image: linear-gradient(to bottom, var(--menu-btn-gradient-top, #ffe600) 0%, var(--menu-btn-gradient-bottom, #ffa700) 100%) !important; /* Symmetrical tracking pair */
    color: var(--btn-text-color) !important;                 
    padding: 12px 20px !important;                           
    border-radius: 0px !important;                           
    border: none !important;                                 
    border-left: 1px solid var(--btn-border-color) !important; 
    border-right: 1px solid var(--btn-border-color) !important;
    font-weight: 400 !important;                             
    display: inline-block !important;
    text-decoration: none !important;
    transition: all 0.2s ease-in-out !important;
}

/* 17. Menu Button Hover States (Blocks cleanly invert to solid charcoal) */
.top-navigation ul li.menu-item > a:hover,
.site-header nav ul li a:hover {
    background-image: none !important; /* Strips out the gradient on hover so it becomes a flat color block */
    background-color: var(--btn-hover-bg-color) !important;  
    color: var(--btn-hover-text-color) !important;          
    border-left-color: var(--btn-hover-bg-color) !important;
    border-right-color: var(--btn-hover-bg-color) !important;
}

/* 18. Dropdown Spacing Submenu Partition Limits */
.site-header li.menu-item ul {
    top: 100% !important;
}

/* 19. Sidebar Link Interactions - Dynamic Hover Blend & Fade Feedback */
.site-sidebar a:hover,
.sidebar-navigation ul li a:hover,
.site-sidebar li:hover > a,
.site-sidebar .widget-container a:hover,
.sidebar-navigation ul li:hover > a {
    color: var(--sidebar-hover-text-color, #ffa400) !important; /* FIXED: Now tracking your customizer dial flawlessly! */
    opacity: 0.85 !important;
}

/* 20. Custom Sidebar Typography Connected Directly to Dashboard Customizer Wheel Controls */
.site-sidebar, 
aside.site-sidebar, 
.site-sidebar a, 
.site-sidebar li, 
.site-sidebar p, 
.site-sidebar h1, 
.site-sidebar h2, 
.site-sidebar h3, 
.site-sidebar .widget-container a, 
.sidebar-navigation ul li a,
.site-sidebar h2.wp-block-heading,
.site-sidebar h3.widget-title,
.site-sidebar .wp-block-search__label {
    color: var(--sidebar-text-color, #ffffff) !important;
    text-decoration: none !important; /* Keeps your links clean and free of underlines */
}

/* Link Bottom Footer Element Directly to Your New Dashboard Color Variable */
footer.site-footer,
.site-footer {
    background-color: var(--footer-bg-color, #1a1a1a) !important; /* Managed by the Bottom Footer Background wheel */
    padding: 25px !important;
    text-align: center !important;
    border-top: 1px solid rgba(255,255,255,0.1) !important;
    box-sizing: border-box !important;
    width: 100% !important;
    margin-top: auto !important; /* Guarantees the bar stays pinned to the absolute bottom of shorter pages */
}

/* Ensure the text strings inside the footer remain dynamic and fully controllable */
footer.site-footer p,
.site-footer p,
footer.site-footer a,
.site-footer a {
    color: var(--footer-text-color, #ffffff) !important; /* Controlled by the Bottom Footer Text Links wheel */
    margin: 0 !important;
    font-size: 0.95rem !important;
    font-weight: 400 !important;
    text-decoration: none !important;
}