/* =========================================
   CORE STYLING: MINIMALISTIC, SIMPLE, WHITE
   ========================================= */
body {
    background-color: #ffffff;
    color: #333333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

.nsm-main-content {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.nsm-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 15px;
    padding-bottom: 10px;
}

.section-header h2 {
    font-size: 18px;
    margin: 0;
}

.see-more-link {
    text-decoration: none;
    color: #0073aa;
    font-size: 14px;
}

/* =========================================
   HEADER & NAVIGATION ALIGNMENT
   ========================================= */
.nsm-header {
    background-color: #ffffff;
    border-bottom: 1px solid #eeeeee;
    padding: 15px 20px;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between; 
    max-width: 1200px;
    margin: 0 auto;
    gap: 30px;
}

.nsm-logo h1 {
    margin: 0;
    font-size: 24px;
    color: #000;
}

.nsm-navigation-wrap {
    display: flex;
    align-items: center;
}

.nsm-menu-list {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Remove default bullet points from mobile nav */
.nsm-mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 15px;
}

/* =========================================
   PROMINENT SEARCH BAR STYLING
   ========================================= */
.nsm-search-bar {
    flex-grow: 1; 
    max-width: 600px; /* Allows the search bar to expand wider */
    margin: 0 20px; /* Adds breathing room between the logo and menu */
}

/* Make the form fill the container perfectly */
.nsm-search-bar form {
    display: flex;
    width: 100%;
    margin: 0;
}

/* Style the text input field */
.nsm-search-bar form input[type="search"],
.nsm-search-bar form input[type="text"] {
    flex-grow: 1;
    padding: 14px 20px; 
    font-size: 16px; 
    border: 2px solid #dddddd;
    border-right: none; 
    border-radius: 4px 0 0 4px; 
    outline: none;
    transition: border-color 0.3s ease;
}

.nsm-search-bar form input[type="search"]:focus,
.nsm-search-bar form input[type="text"]:focus {
    border-color: #333333; 
}

/* Style the Search button */
.nsm-search-bar form button,
.nsm-search-bar form input[type="submit"] {
    padding: 14px 30px;
    font-size: 16px;
    background-color: #333333; 
    color: #ffffff;
    border: 2px solid #333333;
    border-radius: 0 4px 4px 0; 
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.nsm-search-bar form button:hover,
.nsm-search-bar form input[type="submit"]:hover {
    background-color: #555555;
    border-color: #555555;
}

/* =========================================
   TWO-COLUMN DESKTOP LAYOUT & GRID
   ========================================= */
.nsm-layout-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.nsm-main-column {
    flex: 3; /* Takes up 75% of the width */
}

.nsm-sidebar-column {
    flex: 1; /* Takes up 25% of the width */
    border-left: 2px solid #f0f0f0;
    padding-left: 30px;
}

/* 6 Column Desktop Grid */
.nsm-grid-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

/* =========================================
   CUSTOM PRODUCT CARDS
   ========================================= */
.nsm-product-card {
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
}

.nsm-product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.nsm-product-card a {
    text-decoration: none;
    color: inherit;
}

.product-image-wrap img {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
}

.nsm-product-title {
    font-size: 14px;
    margin: 0 0 10px 0;
    line-height: 1.3;
    color: #333;
}

.nsm-price {
    display: block;
    font-weight: bold;
    color: #000;
    margin-bottom: 15px;
}

/* Style the native WooCommerce button */
.nsm-add-to-cart .button {
    display: inline-block;
    width: 100%;
    background: #0073aa; 
    color: #ffffff;
    padding: 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    box-sizing: border-box; /* Ensures padding doesn't break the container width */
}

.nsm-add-to-cart .button:hover {
    background: #005177;
}

/* =========================================
   MOBILE RESPONSIVENESS OVERRIDES
   ========================================= */
/* Hide the hamburger icon on desktop */
@media screen and (min-width: 769px) {
    .nsm-menu-icon {
        display: none;
    }
}

@media screen and (max-width: 768px) {
    /* Stack the split layout vertically on small screens */
    .nsm-layout-wrapper {
        flex-direction: column;
    }

    .nsm-sidebar-column {
        border-left: none;
        padding-left: 0;
        width: 100%;
        border-top: 2px solid #f0f0f0;
        padding-top: 30px;
    }
    
    /* Fixed Search Bar on Mobile */
    .nsm-search-bar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        background-color: #ffffff;
        padding: 12px 20px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
        z-index: 9999;
        box-sizing: border-box;
        margin: 0;
    }

    /* Prevent header content from hiding under the fixed search bar */
    .nsm-header {
        padding-top: 75px; 
        border-bottom: none;
    }

    /* 3 Column Mobile Grid */
    .nsm-grid-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px; 
    }

    /* Adjust typography and spacing for mobile alignment */
    .section-header h2 {
        font-size: 16px;
    }

    .see-more-link {
        font-size: 13px;
    }

    .nsm-section {
        margin-bottom: 25px;
    }

    /* Mobile Menu Toggle Alignment */
    .header-container {
        align-items: center;
    }

    .nsm-menu-icon {
        display: block; /* Ensure it is visible on mobile */
        cursor: pointer;
    }
}

/* ==========================================
   NSM MINIMALIST CART PAGE OVERRIDES
   ========================================== */

/* 1. Remove clunky table borders and backgrounds */
.woocommerce-cart table.shop_table,
.woocommerce-cart table.shop_table th,
.woocommerce-cart table.shop_table td {
    border: none !important;
    background: transparent !important;
}

/* 2. Hide the redundant "Cart Totals" heading */
.cart-collaterals h2 {
    display: none !important;
}

/* 3. Hide the redundant Subtotal row inside the totals box (since it's already above) */
.cart-collaterals .cart_totals tr.cart-subtotal {
    display: none !important;
}

/* 4. Streamline the Shipping Calculator to look like a clean form */
.woocommerce-shipping-calculator {
    margin-top: 15px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

/* 5. Clean up the Proceed to Checkout Button */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-radius: 6px;
    padding: 15px 20px;
    font-weight: bold;
    text-transform: uppercase;
    transition: background 0.3s ease;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
    background-color: #333333 !important;
}

/* Print strictly the Pick List */
@media print {
    /* Hide everything on the page */
    body * {
        visibility: hidden;
    }
    
    /* Make the hidden print area visible */
    #nsm-print-area, #nsm-print-area * {
        visibility: visible;
    }
    
    /* Position the print area perfectly at the top left of the A4 paper */
    #nsm-print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    /* Force clean white background and black text for thermal/laser printers */
    .nsm-pick-list {
        background: #fff;
        color: #000;
        font-family: Arial, sans-serif;
        font-size: 14pt;
        line-height: 1.5;
    }
}
/* Hide WooCommerce Native Shipping Row on Cart & Checkout Totals */
.woocommerce-cart .cart-collaterals .cart_totals tr.shipping,
.woocommerce-checkout .shop_table.woocommerce-checkout-review-order-table tr.shipping {
    display: none !important;
}