/*
Theme Name: Asunder Coffee Theme
Theme URI: https://assundercoffee.com
Description: Custom theme for Asunder Coffee Roasters
Version: 4.1
Author: Rockbridge Digital Services
*/

:root {
    --header-sage: #6B766A;
    --accent-teal: #00897B;
    --order-button: #D2691E;
    --light-bg: #F5F5F5;
    --white: #FFFFFF;
    --dark-text: #212121;
    --gray: #757575;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: var(--dark-text);
    line-height: 1.6;
    background-image: url('https://asundercoffee.com/wp-content/uploads/2025/09/coffeebeans.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
}

/* Header */
.site-header {
    background: var(--header-sage);
    position: relative;
    z-index: 100;
    padding: 30px 0 15px 0;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    position: relative;
}

.logo-container {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 101;
}

.logo-circle {
    width: 180px;
    height: 180px;
    background: var(--header-sage);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 28px;
    cursor: pointer;
    padding: 5px;
    margin-left: 200px;
    z-index: 102;
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-left: 220px;
}

.main-nav .nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav .nav-menu li {
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 400;
    font-size: 14px;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--order-button);
}

.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
    color: var(--order-button);
    font-weight: bold;
}

/* Dropdown Menu */
.main-nav .menu-item-has-children {
    position: relative;
}

.main-nav .menu-item-has-children > a {
    color: var(--white);
    text-decoration: none;
    font-weight: 400;
    font-size: 14px;
    transition: color 0.3s;
}

.main-nav .menu-item-has-children > a:hover {
    color: var(--order-button);
}

.main-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--header-sage);
    min-width: 200px;
    padding: 10px 0;
    margin: 0;
    list-style: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
}

.main-nav .menu-item-has-children:hover .sub-menu {
    display: block;
}

.main-nav .sub-menu li {
    padding: 0;
    margin: 0;
}

.main-nav .sub-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}

.main-nav .sub-menu a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--order-button);
}

.header-actions {
    display: flex;
    gap: 25px;
    align-items: center;
    margin-left: auto;
}

.order-now-dropdown {
    position: relative;
}

.order-now-dropdown .order-now-btn {
    cursor: pointer;
}

.order-now-dropdown .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--header-sage);
    min-width: 200px;
    padding: 10px 0;
    margin: 8px 0 0 0;
    list-style: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* FIXED: Changed from :hover to .active for JavaScript control with delay */
.order-now-dropdown.active .sub-menu {
    display: block;
}

.order-now-dropdown .sub-menu li {
    padding: 0;
    margin: 0;
}

.order-now-dropdown .sub-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}

.order-now-dropdown .sub-menu a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--order-button);
}

.cart-icon, .user-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--white);
    font-size: 14px;
    transition: color 0.3s;
}

.cart-icon:hover, .user-icon:hover {
    color: var(--order-button);
}

.cart-icon svg, .user-icon svg {
    stroke: var(--white);
}

.cart-icon:hover svg, .user-icon:hover svg {
    stroke: var(--order-button);
}

.cart-count {
    font-size: 16px;
    font-weight: 500;
}

.order-now-btn {
    background: var(--order-button);
    border: none;
    color: var(--white);
    padding: 10px 28px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-block;
}

.order-now-btn:hover {
    background: #B8521A;
}

/* Hero Section */
.hero {
    background-image: url('https://asundercoffee.com/wp-content/uploads/2025/09/BV-Sign-Coffee.jpeg');
    background-size: cover;
    background-position: center;
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 100px 40px 80px 40px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.2);
}

.hero-content {
    background: rgba(255, 255, 255, 0.92);
    padding: 50px 60px;
    max-width: 480px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 36px;
    color: var(--dark-text);
    margin-bottom: 15px;
    line-height: 1.3;
    font-weight: 700;
}

.hero-content p {
    font-size: 15px;
    color: var(--gray);
    margin-bottom: 30px;
    font-style: italic;
}

.hero-cta {
    display: inline-block;
    background: #B8956B;
    color: var(--white);
    padding: 14px 36px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 15px;
    transition: background 0.3s;
}

.hero-cta:hover {
    background: #A0805A;
}

/* Content Area */
.content-wrapper {
    max-width: 1200px;
    margin: 60px auto;
    padding: 40px;
    min-height: 400px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Cart and other white content areas */
.site-main,
.cart-page,
.custom-shop-cart,
article,
.entry-content {
    background: transparent !important;
}

.content-wrapper article h1 {
    font-size: 36px;
    color: var(--dark-text);
    margin-bottom: 30px;
}

.entry-content {
    line-height: 1.8;
}

/* Footer */
.site-footer {
    background: var(--header-sage);
    color: var(--dark-text);
    padding: 30px 20px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-content p {
    margin-bottom: 5px;
    font-size: 14px;
}

/* Tablet */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 30px;
    }
    
    .logo-container {
        left: 30px;
    }
    
    .logo-circle {
        width: 150px;
        height: 150px;
        padding: 25px;
    }
    
    .main-nav {
        margin-left: 180px;
        gap: 25px;
    }
    
    .main-nav .nav-menu {
        gap: 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .site-header {
        padding: 15px 0;
    }
    
    .header-container {
        padding: 0 20px;
        flex-wrap: nowrap;
    }
    
    .logo-container {
        position: static;
        transform: none;
        left: auto;
        flex-shrink: 0;
    }
    
    .logo-circle {
        width: 60px;
        height: 60px;
        padding: 10px;
    }
    
    .mobile-menu-toggle {
        display: block;
        margin-left: 15px;
        order: 2;
    }
    
    .main-nav {
        display: none;
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: var(--header-sage);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 30px 30px;
        margin: 0;
        gap: 0;
        transition: left 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }
    
    .main-nav.active {
        display: flex;
        left: 0;
    }
    
    .main-nav .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    
    .main-nav .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .main-nav .nav-menu a {
        display: block;
        padding: 15px 0;
        font-size: 16px;
    }
    
    .main-nav .sub-menu {
        position: static;
        display: none;
        box-shadow: none;
        padding: 0 0 10px 15px;
        min-width: auto;
    }
    
    .main-nav .menu-item-has-children.open .sub-menu {
        display: block;
    }
    
    .main-nav .sub-menu a {
        padding: 10px 0;
        font-size: 15px;
    }
    
    .header-actions {
        margin-left: auto;
        gap: 15px;
        order: 3;
    }
    
    .order-now-dropdown .sub-menu {
        right: 0;
        left: auto;
    }
    
    .hero {
        padding: 80px 20px 60px;
        justify-content: center;
        min-height: calc(100vh - 90px);
    }
    
    .hero-content {
        padding: 30px;
        max-width: 100%;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-content p {
        font-size: 14px;
    }
    
    .content-wrapper {
        margin: 30px 20px;
        padding: 25px;
    }
    
    .content-wrapper article h1 {
        font-size: 28px;
    }
}

/* Mobile Menu Overlay */
@media (max-width: 768px) {
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 998;
    }
    
    .mobile-menu-overlay.active {
        display: block;
    }
}