/* -------------------------------------------------------------------------
 * NEST THEME - CORE DESIGN
 * ------------------------------------------------------------------------- */

:root {
    --nest-black: #111111;
    --nest-white: #ffffff;
    --nest-grey: #777777;
    --nest-light-grey: #f4f4f4;
    --nest-accent: #cdaa7d; /* Soft wood/artisan tone */
    --nest-border: #e5e5e5;
    --nest-font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    font-family: var(--nest-font-main);
    color: var(--nest-black);
    background-color: var(--nest-white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 30px;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: 0.3s ease;
}

a:hover {
    color: var(--nest-accent);
}

/* --- BOXSHOP STYLE HEADER --- */

.flex-header, .header-main-section, .flex-center {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Top Bar */
.header-top-bar {
    background: #f9f9f9;
    font-size: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    color: #666;
}

/* Middle Section */
.header-main-section {
    padding: 30px 0;
}

.header-search-box { width: 30%; }
.site-branding { width: 40%; text-align: center; }
.header-actions { width: 30%; display: flex; justify-content: flex-end; gap: 20px; }

.site-branding img {
    max-height: 60px; /* Adjust based on your Nest logo size */
    width: auto;
    margin: 0 auto;
}

/* Navigation */
.main-navigation-wrapper {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #222;
}

/* Cart Counter Bubble */
.cart-contents { position: relative; }
.cart-contents-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #cdaa7d; /* Your Nest accent color */
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 50%;
}

/* WPBakery Content Fix */
.site-main {
    padding: 40px 0;
}

/* --- WOOCOMMERCE GRID --- */
.products.columns-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product {
    text-align: center;
    margin-bottom: 40px;
}

.product img {
    width: 100%;
    height: auto;
    background: var(--nest-light-grey);
    padding: 20px;
    transition: 0.4s ease;
}

.product:hover img {
    filter: brightness(0.95);
}

.woocommerce-loop-product__title {
    font-size: 16px;
    margin: 15px 0 5px;
}

.price {
    color: var(--nest-accent);
    font-weight: 600;
}

/* --- AJAX SIDE CART --- */
.nest-side-cart {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100%;
    background: #fff;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    z-index: 10001;
    transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 30px;
}

.nest-side-cart.cart-open {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    visibility: hidden;
    opacity: 0;
    z-index: 10000;
    transition: 0.3s;
}

.nest-side-cart.cart-open + .cart-overlay,
.cart-overlay.is-active {
    visibility: visible;
    opacity: 1;
}

/* --- STICKY MOBILE FOOTER --- */
@media (max-width: 768px) {
    .nest-sticky-mobile-footer {
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 65px;
        background: #fff;
        border-top: 1px solid var(--nest-border);
        z-index: 999;
    }

    .mobile-footer-item a {
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 10px;
        color: var(--nest-black);
    }

    .mobile-footer-item .dashicons {
        font-size: 22px;
        margin-bottom: 4px;
    }

    .main-navigation {
        display: none;
    }

    .products.columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- GLOBAL RESET & GRID FIX --- */
* { box-sizing: border-box; }

body { 
    margin: 0; 
    padding: 0; 
    overflow-x: hidden; 
    font-family: 'Inter', sans-serif;
}

.site-branding img {
    max-width: 180px;
    height: auto;
    display: block;
}

/* WPBakery Row Fix: Ensures rows don't overflow the screen */
.vc_row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

/* Container logic for a clean, minimalist look */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- LOGO & HEADER DESIGN --- */
.site-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding img {
    max-height: 50px;
    width: auto;
}

/* --- WOOCOMMERCE GRID FIX --- */
ul.products {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    list-style: none;
    padding: 0;
}

ul.products li.product {
    width: calc(33.333% - 14px); /* 3 Columns */
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    ul.products li.product {
        width: calc(50% - 10px); /* 2 Columns on Mobile */
    }
}

/* --- FOOTER --- */
.site-footer {
    background: var(--nest-light-grey);
    padding: 80px 0 40px;
    margin-top: 100px;
    font-size: 14px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}