/* Import Michroma Font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Michroma&display=swap');
/* Pushes the footer to the bottom without stretching the navbar */
main {
    min-height: calc(100vh - 250px); /* 250px roughly accounts for your header and footer height combined */
}

/* --- Global Styles --- */
body {
    font-family: 'Michroma', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa; /* Light background for category pages */
    color: #333;
}

a {
    text-decoration: none;
}

/* --- Navigation Bar --- */
header {
    background-color: #000;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: bold;
}

.logo-container img {
    width: 30px; /* Adjust based on your actual site icon */
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 25px;
}

nav ul li {
    position: relative; /* Needed for dropdown positioning */
}

nav ul li a {
    color: #fff;
    font-size: 0.8rem;
    text-transform: uppercase;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Specific color for HOME link */
nav ul li a.active {
    color: #00d2ff; 
}

/* Yellow Hover Effect */
nav ul li a:hover {
    color: #ffcc00; 
}

/* --- Dropdown Menu --- */
.dropdown-menu {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #000;
    min-width: 220px;
    flex-direction: column;
    padding-top: 10px;
    z-index: 100;
}

/* Show dropdown on hover */
nav ul li:hover .dropdown-menu {
    display: flex; 
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu li a {
    padding: 12px 20px;
    text-transform: none; /* Normal casing for product names */
    border-top: 1px dashed #333; /* Dotted line separator */
    color: #fff;
}

.dropdown-menu li a:hover {
    color: #fff;
    background-color: #222;
}

/* --- Search Icon --- */
.search-icon {
    font-size: 1rem;
    cursor: pointer;
}

/* --- Hero Section (Homepage) --- */
.hero-banner {
    width: 100%;
    height: 300px;
    background: url('hero-bg.jpg') no-repeat center center/cover; /* Replace with your actual colorful background image */
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-banner h1 {
    color: #fff;
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* --- Category Page Layout --- */
.category-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.category-title {
    text-align: center;
    font-size: 2rem;
    color: #1a365d;
    margin-bottom: 40px;
    font-weight: normal;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 20px;
}

.toolbar select {
    padding: 8px;
    font-family: inherit;
    border: 1px solid #ddd;
}

/* Grid for Products */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.product-card img {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
}

.product-card h3 {
    font-size: 1rem;
    color: #1a365d;
    margin: 0 0 10px 0;
}

.product-price {
    font-size: 1rem;
    margin: 0 0 5px 0;
}

.product-category {
    font-size: 0.7rem;
    color: #666;
    margin: 0 0 15px 0;
    text-transform: uppercase;
}

.btn-quote {
    background-color: #3182ce;
    color: #fff;
    border: none;
    padding: 10px 15px;
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn-quote:hover {
    background-color: #2b6cb0;
}

/* --- Product Detail Page Styles --- */

.product-detail-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Image and Product Info Layout */
.product-top-section {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
    flex-wrap: wrap; /* Allows it to stack on smaller screens */
}

.product-image-wrapper {
    flex: 1;
    min-width: 300px;
    position: relative; /* Crucial for positioning the text over the image */
}

.product-image-wrapper img {
    width: 100%;
    display: block;
}

/* The text overlay on the bottom of the image */
.image-overlay-text {
    position: absolute;
    bottom: 15px;
    left: 15px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8); /* Makes text readable on light backgrounds */
    font-size: 0.85rem;
    font-family: sans-serif; /* Using standard sans-serif for clarity in small text */
}

.image-overlay-text p {
    margin: 2px 0;
}

.product-info-wrapper {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.product-info-wrapper h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: normal;
    color: #1a365d;
}

.product-info-wrapper .price {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 25px;
}

/* --- Tabs Section --- */
.product-tabs-section {
    padding-top: 20px;
}

.tabs-header {
    display: flex;
    justify-content: center;
    gap: 40px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 30px;
}

.tab-link {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    color: #4a5568;
    border-bottom: 3px solid transparent;
}

/* Active tab styling (The blue text and underline) */
.tab-link.active {
    color: #3182ce;
    border-bottom: 3px solid #3182ce;
}

.tab-content {
    display: none; /* Hide all tabs by default */
    color: #4a5568;
    line-height: 1.6;
}

.tab-content.active-tab {
    display: block; /* Show the active tab */
}

/* =========================================
   RESPONSIVE DESIGN (Mobile & Tablets)
   ========================================= */

/* 1. Prevent the entire page from scrolling sideways */
body, html {
    overflow-x: hidden;
    max-width: 100vw;
}

/* 2. Make sure the cart table can be swiped horizontally on small screens */
#quote-cart-container {
    overflow-x: auto;
    width: 100%;
    display: block;
}

/* 3. Hide hamburger on desktop */
#mobile-menu {
    display: none; 
    font-size: 1.8rem;
    color: #fff;
    cursor: pointer;
}

/* 4. Mobile screen adjustments (Phones and Tablets) */
@media screen and (max-width: 900px) {
    
    /* OVERRIDE: Force header to block and remove old padding */
    header {
        display: block !important;
        padding: 0 !important;
        width: 100%;
    }

    /* OVERRIDE: Force the top row to span the entire screen */
    header > div:first-child {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        padding: 15px 20px !important; 
        box-sizing: border-box !important;
    }

    /* Show the hamburger icon */
    #mobile-menu {
        display: block !important; 
        position: static !important; 
    }

    /* Force the nav container to take the full width below the logo */
    nav {
        width: 100%;
    }

    /* --- THE UPGRADED MOBILE MENU STYLING --- */
    nav ul#nav-links {
        display: none; 
        flex-direction: column;
        width: 100%;
        background-color: #111; 
        padding: 0; 
        margin: 0;
        position: absolute;
        top: 70px; /* Starts right below the header */
        left: 0;
        z-index: 1000;
        box-shadow: 0px 10px 15px rgba(0,0,0,0.5); /* Drop shadow over the page */
    }

    /* When JavaScript adds the 'show' class, display the links */
    nav ul#nav-links.show {
        display: flex !important;
    }

    /* Add separators and left-align the list items */
    nav ul#nav-links > li {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #333; 
        box-sizing: border-box;
    }

    /* Give the links a wide clickable area and push text away from the edge */
    nav ul#nav-links > li > a {
        display: block;
        padding: 15px 25px; 
        font-size: 1.1rem;
        color: #fff;
        text-decoration: none;
    }

    /* Sub-menu mobile styling (Indented) */
    .dropdown-menu {
        position: static !important; 
        background-color: #1a1a1a;
        width: 100%;
        box-shadow: none;
        margin: 0;
        padding: 0;
    }

    /* Push sub-menu items slightly further to the right */
    .dropdown-menu li a {
        display: block;
        padding: 12px 25px 12px 40px !important; 
        font-size: 0.95rem;
        color: #ccc;
    }

    /* Search Box Mobile Styling */
    .search-box {
        padding: 15px 25px !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box;
        background: #111 !important;
        border-bottom: none !important;
    }

    .search-box input {
        width: 100% !important;
        padding: 10px !important;
        background: #222 !important;
        border-radius: 4px !important;
        font-size: 1rem !important;
    }
}