/*
Theme Name: Boxed 3D Store
Author: Techtix
Description: A premium, boxed-layout theme with dynamic features and a tech-forward aesthetic.
Version: 2.3
*/

/* --- Base & Slicer Grid Background --- */
body {
    /* Creates a cool 3D slicer grid background */
    background-color: #0f172a;
    background-image:
            linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #334155;
    margin: 0;
    padding: 50px 20px;
    line-height: 1.6;
}

/* --- The Boxed Container (Fixed for Footer Overlap) --- */
.boxed-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 12px;
    /* Neon-cyan ambient glow */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 20px rgba(6, 182, 212, 0.1);
    overflow: hidden;

    /* THE FIX: Flexbox forces the footer to the bottom */
    display: flex;
    flex-direction: column;
    min-height: 85vh;
}

.site-header {
    /* YOUR ORIGINAL STYLES RESTORED */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 50px;
    background: #ffffff;
    border-bottom: 2px solid #f1f5f9;

    /* THE FIXES (Hidden but active) */
    position: relative;
    z-index: 99999 !important;
    border-radius: 12px 12px 0 0; /* Keeps the top corners of your box rounded */
}

/* Also ensure this anchor is set so the dropdown stays relative to the icon */
.site-header-cart {
    position: relative !important;
    display: flex;
    align-items: center;
}

/* Site Branding Styling */
.site-branding {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.site-title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.site-title a {
    color: #0f172a;
    text-decoration: none;
}

.site-description {
    margin: 0;
    font-size: 13px;
    color: #06b6d4; /* Cyan accent */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Dynamic Navigation Menu --- */
.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.site-nav a {
    text-decoration: none;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.site-nav a:hover {
    color: #06b6d4; /* Cyan hover */
    border-bottom: 2px solid #06b6d4;
}

/* --- Content Area (Fixed) --- */
.site-content {
    padding: 50px;
    /* THE FIX: flex-grow tells this area to stretch and push the footer down */
    flex-grow: 1;
    background-color: #ffffff;
}

/* Make sure uploaded images don't break the box */
.site-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.site-content h1, .site-content h2, .site-content h3 {
    color: #0f172a;
    font-weight: 700;
}

/* --- Dynamic Footer --- */
.site-footer {
    background-color: #0f172a; /* Matches the dark background outside the box */
    color: #e2e8f0;
    padding: 40px 50px;
    border-top: 4px solid #06b6d4; /* Sharp cyan separator line */
}

/* Clean up widget lists (in case WordPress dumped pages here) */
.footer-widgets {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget {
    flex: 1;
    min-width: 200px;
}

.footer-widget h4 {
    color: #ffffff;
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 15px;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget ul li {
    margin-bottom: 8px;
}

.footer-widget a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-widget a:hover {
    color: #06b6d4;
}

.site-copyright {
    text-align: center;
    border-top: 1px solid #1e293b;
    padding-top: 20px;
    font-size: 14px;
    color: #64748b;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    body { padding: 15px; }
    .site-header { flex-direction: column; gap: 20px; text-align: center; }
    .site-nav ul { flex-wrap: wrap; justify-content: center; }
    .site-content, .site-footer { padding: 30px 20px; }
}

/* ==========================================================================
   LayerLab Theme - 3DPrint Lite Plugin Overrides
   ========================================================================== */

/* 1. Target the Email, Comment, and Quantity fields by their visible attributes */
input[placeholder*="E-mail"],
textarea[placeholder*="comment"],
input[name*="qty"],
input[name*="quantity"] {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 18px !important;
    margin-bottom: 20px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background-color: #f8fafc !important;
    color: #0f172a !important;
    font-family: inherit !important;
    font-size: 15px !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

/* Make sure the comment box stays tall */
textarea[placeholder*="comment"] {
    min-height: 120px !important;
    resize: vertical !important;
}

/* 2. Focus/Glow States for Inputs */
input[placeholder*="E-mail"]:focus,
textarea[placeholder*="comment"]:focus,
input[name*="qty"]:focus,
input[name*="quantity"]:focus {
    outline: none !important;
    border-color: #06b6d4 !important;
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15) !important;
    background-color: #ffffff !important;
}

/* 3. The "Request a Quote" Button */
input[value="Request a Quote"],
input[value*="Quote"] {
    background-color: #06b6d4 !important; /* LayerLab Cyan */
    color: #0f172a !important;
    border: none !important;
    padding: 14px 28px !important;
    border-radius: 8px !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.2) !important;
    width: 100% !important;
    display: block !important;
    margin-top: 10px !important;
}

input[value="Request a Quote"]:hover,
input[value*="Quote"]:hover {
    background-color: #0891b2 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4) !important;
}

/* 4. Fix the Material Box Border */
fieldset, .p3dlite-material-box {
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin-top: 20px !important;
    background-color: #ffffff !important;
}

legend {
    font-weight: 700 !important;
    color: #334155 !important;
    padding: 0 10px !important;
    text-transform: uppercase !important;
    font-size: 14px !important;
    letter-spacing: 0.5px !important;
}

/* 5. Override the big green "UPLOAD MODEL" button */
.p3dlite-btn-success,
div[style*="background-color: #4CAF50"],
.p3dlite_upload_button {
    background-color: #0f172a !important; /* Dark slate to anchor the 3D viewer */
    color: #06b6d4 !important; /* Cyan text */
    border-radius: 0 0 8px 8px !important; /* Rounds the bottom corners */
    font-weight: 800 !important;
    letter-spacing: 1px !important;
    transition: all 0.3s ease !important;
}

.p3dlite-btn-success:hover,
div[style*="background-color: #4CAF50"]:hover,
.p3dlite_upload_button:hover {
    background-color: #1e293b !important;
    color: #ffffff !important;
}

/* ==========================================================================
   FINAL FIX: Comment Box & Buttons
   ========================================================================== */

/* 1. The Comment Field (Targeting as an input instead of a textarea) */
input[placeholder*="comment" i] {
    width: 100% !important;
    padding: 14px 18px !important;
    margin-bottom: 20px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background-color: #f8fafc !important;
    color: #0f172a !important;
    font-size: 15px !important;
    box-sizing: border-box !important;
    height: auto !important;
}

input[placeholder*="comment" i]:focus {
    outline: none !important;
    border-color: #06b6d4 !important;
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15) !important;
    background-color: #ffffff !important;
}

/* 2. The "Request a Quote" Button */
input[type="button"][value*="quote" i],
input[type="submit"][value*="quote" i],
button[class*="quote" i],
[id*="quote" i] {
    background-color: #06b6d4 !important; /* Cyan */
    color: #0f172a !important; /* Dark text */
    border: none !important;
    padding: 14px 28px !important;
    border-radius: 8px !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    width: 100% !important;
    display: block !important;
    margin-top: 15px !important;
}

/* 3. The Green "UPLOAD MODEL" Area */
/* Targeting all possible ways the plugin renders that green background */
div[style*="4CAF50" i],
div[style*="rgb(76, 175, 80)" i],
[class*="upload_button" i],
[id*="upload_button" i] {
    background-color: #0f172a !important; /* LayerLab Dark Slate */
    color: #06b6d4 !important; /* Cyan text */
    border-radius: 0 0 8px 8px !important;
    text-transform: uppercase !important;
    font-weight: 800 !important;
}

/* ==========================================================================
   Remove Blue Background from Loading Indicator
   ========================================================================== */

/* Target the progress bar container and strip its background/borders */
#p3dlite_progress_bar,
.p3dlite_progress_bar,
.ui-progressbar,
.ui-widget-header,
div[id*="progress" i],
div[class*="progress" i],
div[id*="loader" i],
div[class*="loader" i] {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Optional: Make the actual loading dashes/animation match your LayerLab Cyan */
.ui-progressbar-value,
div[class*="progress-value" i],
div[class*="loader-value" i] {
    background: #06b6d4 !important;
    background-color: #06b6d4 !important;
    border-radius: 8px !important;
}
/* ==========================================================================
   Remove Blue Loading Box (Bootstrap Progress Container)
   ========================================================================== */

/* Nuke the background of the outer progress container */
.progress,
div.progress,
.p3d-progress-wrap,
div[class*="progress-wrap" i] {
    background-image: none !important;
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Ensure the inner striped bars still show up, but make them Cyan to match LayerLab */
.progress-bar,
.progress .bar,
.ui-progressbar-value {
    background-color: #06b6d4 !important;
    background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent) !important;
}

/* ==========================================================================
   Vaporize the Blue Loading Box (Found it!)
   ========================================================================== */

#p3dlite-quote-loading,
.p3dlite-info {
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Optional: If you want the little loading GIF to be centered cleanly */
#p3dlite-quote-loading img {
    display: block !important;
    margin: 0 auto !important;
}

/* --- Style the inner WooCommerce Mini-Cart elements --- */
.header-mini-cart ul.cart_list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 15px 0 !important;
}

/* 1. The List Item (Forces everything into a neat row) */
.header-mini-cart ul.cart_list li {
    padding-bottom: 15px !important;
    margin-bottom: 15px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

/* 2. The Remove 'X' Button */
.header-mini-cart ul.cart_list li a.remove {
    color: #ef4444 !important; /* Soft Red */
    font-size: 18px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    margin-right: 15px !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: #fee2e2 !important;
    transition: all 0.2s ease !important;
    line-height: 1 !important;
}

.header-mini-cart ul.cart_list li a.remove:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
}

/* 3. The Product Image & Title Link */
.header-mini-cart ul.cart_list li a:not(.remove) {
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important; /* Removes the ugly blue underline */
    color: #0f172a !important; /* LayerLab Dark Slate */
    font-weight: 700 !important;
    transition: color 0.2s ease !important;
    font-size: 14px !important;
}

.header-mini-cart ul.cart_list li a:not(.remove):hover {
    color: #06b6d4 !important; /* Cyan hover */
}

/* 4. The Product Image */
.header-mini-cart ul.cart_list li img {
    width: 45px !important;
    height: 45px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    margin: 0 15px 0 0 !important; /* Pushes text to the right */
    border: 1px solid #e2e8f0 !important;
}

/* 5. The Quantity and Price */
.header-mini-cart ul.cart_list li .quantity {
    margin-left: auto !important; /* Magically pushes the price to the far right */
    font-weight: 600 !important;
    color: #64748b !important;
    font-size: 13px !important;
}

/* 6. Subtotal Area */
.header-mini-cart .total {
    border-top: 2px solid #e2e8f0 !important;
    padding-top: 15px !important;
    font-weight: 800 !important;
    text-align: center !important;
    color: #0f172a !important;
    font-size: 16px !important;
}

/* --- Mini Cart Buttons --- */
.header-mini-cart .buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.header-mini-cart .buttons a {
    display: block !important;
    text-align: center !important;
    padding: 12px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 13px !important;
    letter-spacing: 0.5px !important;
    transition: all 0.2s ease !important;
}

/* View Cart Button */
.header-mini-cart .buttons a:not(.checkout) {
    background-color: #f1f5f9 !important;
    color: #334155 !important;
}

.header-mini-cart .buttons a:not(.checkout):hover {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}

/* Checkout Button */
.header-mini-cart .buttons a.checkout {
    background-color: #06b6d4 !important; /* LayerLab Cyan */
    color: #0f172a !important;
}

.header-mini-cart .buttons a.checkout:hover {
    background-color: #0891b2 !important;
    color: #ffffff !important;
}
/* ==========================================================================
   Mini-Cart Polish (Spacing & Icon Color Fixes)
   ========================================================================== */

/* 1. Kill the default purple browser link styling on the Cart Icon */
a.cart-contents,
a.cart-contents:visited,
.site-header-cart a {
    text-decoration: none !important;
    color: #0f172a !important; /* Forces LayerLab Dark Slate */
    border: none !important;
}

a.cart-contents:hover,
.site-header-cart a:hover {
    color: #06b6d4 !important; /* Cyan hover */
}

/* 2. Fix the squished text between Product Title and Price */
.header-mini-cart ul.cart_list li a:not(.remove) {
    flex: 1 1 auto !important; /* Tells the title to take up space but leave room */
    margin-right: 15px !important; /* Forces a gap after the title */
}

.header-mini-cart ul.cart_list li .quantity {
    margin-left: auto !important; /* Pushes the price block to the far right */
    white-space: nowrap !important; /* Prevents the price from breaking into two lines */
    display: inline-block !important;
}

.header-mini-cart {
    position: absolute !important;
    top: 100% !important; /* Pushes it exactly below the cart icon */
    right: 0 !important;  /* Aligns it to the right edge */
    width: 320px;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15); /* Stronger shadow to pop it out */
    padding: 20px;
    transform: translateY(15px);
    transition: all 0.3s ease;

    /* THE FIX: A massive z-index to guarantee it floats over the 3D viewer */
    z-index: 100000 !important;

    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* THE FIX: Force it to show ONLY on hover */
.site-header-cart:hover .header-mini-cart {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0);
}

/* ==========================================================================
   Logo Resizing & Alignment
   ========================================================================== */

.site-branding .custom-logo-link img {
    max-width: 180px !important; /* Adjust this number (e.g., 150px or 200px) to get the exact size you want */
    height: auto !important;
    display: block !important;
    transition: transform 0.3s ease;
}

/* Optional: Slight lift effect when hovering over the logo */
.site-branding .custom-logo-link:hover img {
    transform: translateY(-2px);
}

/* Ensure the branding container stays vertical if there is text under the logo */
.site-branding {
    display: flex;
    flex-direction: column;
    justify-content: center;
}