@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css');

body {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 400;
    color: #666;
    font-size: 14px;
    line-height: 20px;
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Ubuntu', sans-serif;
    color: #7d8703;
    font-weight: 400;
}

h4, h4 a { font-size: 20px; color: #7d8703; font-weight: bold; }

a { 
    color: #555533; 
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover { color: #7d8703; }

/* --- THE TOP BAR (Account Links) --- */
#top {
    background-color: #FFFFFF;
    min-height: 30px;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 9999 !important; 
}

#top-links {
    padding-top: 5px;
    text-align: right;
}

/* --- THE HEADER (LOGO, SEARCH, CART) --- */
header {
    margin-top: -30px !important; 
    padding-top: 0px !important;
    padding-bottom: 0px !important;
    position: relative;
    z-index: 10; 
}

#logo {
    margin: 0 !important;
    padding: 0 !important;
}

#logo img {
    margin-top: 0 !important;
    max-height: 180px; 
    width: auto;
    display: block;
}

/* --- SEARCH BAR & MAGNIFYING GLASS --- */
#search .input-lg {
    margin-top: 60px !important; 
    height: 38px;      
    line-height: 20px;
}

#search .btn-lg {
    margin-top: 60px !important; 
    height: 38px;
    background-color: #555533 !important; 
    background-image: none !important;
    border: 1px solid #444422 !important;
    color: #FFFFFF !important; 
    text-shadow: none;
    border-radius: 0 4px 4px 0; 
    display: flex !important;
    align-items: center;    
    justify-content: center; 
    padding: 0 15px !important;
}

#search .btn-lg i {
    color: #FFFFFF !important;
    font-size: 16px !important; 
    line-height: 1;
}

#search .btn-lg:hover {
    background-color: #7d8703 !important;
}

/* --- SHOPPING BASKET --- */
#cart > .btn {
    margin-top: 60px !important; 
    height: 38px;      
    background-color: #555533 !important; 
    background-image: none !important;
    border: 1px solid #444422 !important;
    color: #FFFFFF !important; 
    font-size: 13px;
    font-weight: bold;
    text-shadow: none;
    border-radius: 4px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 15px !important;
}

#cart > .btn i {
    color: #FFFFFF !important;
    font-size: 16px !important; 
    margin-right: 10px;
}

#cart > .btn:hover {
    background-color: #7d8703 !important;
}


/* --- SHOPPING CART DROPDOWN REFINEMENTS --- */

/* 1. Make the dropdown wider than the button for better spacing */
#cart .dropdown-menu {
    min-width: 350px !important;
    padding: 15px;
    border-radius: 4px;
}

/* 2. Increase thumbnail size */
#cart .img-thumbnail {
    width: 60px !important;
    height: auto !important;
    max-width: none !important;
}

/* 3. Fix 'x 1' spreading across two lines */
#cart table .text-right {
    white-space: nowrap !important;
    vertical-align: middle;
}

#cart table .text-left {
    vertical-align: middle;
    padding-right: 15px;
}

/* 4. Center the 'View Cart' and 'Checkout' links */
#cart .dropdown-menu p.text-right {
    text-align: center !important;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

#cart .dropdown-menu p.text-right a {
    display: inline-block;
    margin: 0 10px;
}

/* 5. Style the mini-cart table text to match your theme */
#cart .table-striped > tbody > tr > td {
    color: #666;
    font-size: 13px;
}

#cart .table-bordered td {
    background-color: #f9f9f9;
}


/* --- NAVIGATION BAR & DROPDOWN FIXES --- */
#menu {
    margin-top: 10px !important; 
    margin-bottom: 0px !important; 
    background-color: #7d8703;
    border-color: #7d8703;
    min-height: 40px;
}

#menu .nav > li > a {
    color: #fff;
    font-weight: 700;
    padding: 10px 15px;
}

#menu .nav > li:hover > a, 
#menu .nav > li.open > a {
    background-color: #6b7203 !important; 
    color: #ffffff !important;
}

#menu .dropdown-menu {
    padding: 15px;
    z-index: 1001;
    border-radius: 0;
    min-width: 100%; 
}

#menu .dropdown-inner {
    display: flex !important; 
    flex-wrap: nowrap;
}

#menu .dropdown-inner ul {
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 150px;
}

#menu .dropdown-inner li a {
    color: #666;
    font-family: 'Ubuntu', sans-serif;
    font-size: 13px;
    display: block;
    padding: 5px 15px;
}

#menu .dropdown-inner li a:hover {
    background-color: #7d8703 !important; 
    color: #ffffff !important;
}

@media (min-width: 768px) {
    .product-layout { 
    width: 100% !important; 
    }
    #content .row {
        display: flex !important;
        flex-wrap: wrap !important;
    }
    #menu .nav > li.dropdown:hover > .dropdown-menu {
        display: block;
    }
}

/* --- BREADCRUMBS --- */
.breadcrumb {
    margin-top: 2px !important; 
    margin-bottom: 20px;
    background-color: #cbcbb0;
    color: #555533;
    padding: 8px 15px;
    border-radius: 0px; 
}

/* --- PRODUCT LISTINGS (TEXT, PRICES, & BUTTONS) --- */

.product-layout {
    display: flex !important;
    margin-bottom: 30px !important;
}


.product-thumb {
    border: 1px solid #ddd;
    background: #fff;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

.product-thumb .image {
    padding: 20px 15px 10px 15px; 
    text-align: center; 
}

.product-thumb .image img {
    margin: 0 auto;
    display: inline-block;
}

.product-thumb .caption {
    padding: 0 15px;
    text-align: center; 
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.product-thumb h4 {
    margin-top: 10px;
    font-size: 18px;
    font-weight: bold;
    min-height: 50px;
}

.product-thumb .price {
    font-weight: bold;
    color: #444;
    margin-top: auto !important;
    display: block;
    font-size: 20px; 
    text-align: center; 
    padding: 10px 0 15px 0;
}

.price-old {
    color: #999 !important;
    text-decoration: line-through !important;
    font-weight: normal !important;
    margin-right: 5px;
    font-size: 16px;
}

.price-tax {
    display: none !important;
}

.product-thumb .button-group {
    margin-top: auto !important;
    border-top: 1px solid #ddd;
    background-color: #eeeeee; 
    display: flex !important;
    width: 100%;
    margin-top: 0 !important;
}

.product-thumb .button-group button {
    background-color: #eeeeee;
    border: none;
    padding: 12px 5px;
    color: #888;
    transition: all 0.2s;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.product-thumb .button-group button:first-child {
    flex: 3; 
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
}

.product-thumb .button-group button:nth-child(2),
.product-thumb .button-group button:nth-child(3) {
    flex: 1;
    border-left: 1px solid #ddd; 
}

.product-thumb .button-group button i {
    font-size: 18px !important;
    margin-right: 5px;
}

.product-thumb .button-group button:hover {
    background-color: #ddd;
    color: #7d8703;
}





/* --- PRODUCT PAGE FIXES --- */
#button-cart {
    background-color: #555533 !important;
    border-color: #444422 !important;
    color: #FFFFFF !important;
    font-size: 14px !important; 
    font-weight: bold;
    text-transform: uppercase;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#button-cart::before {
    content: "\f07a"; 
    font-family: 'FontAwesome';
    margin-right: 8px;
}

.thumbnails {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    list-style: none;
    padding: 0;
}

.thumbnails > li:first-child { 
    width: 100%; 
    text-align: center; 
    margin-bottom: 10px; 
}

.thumbnails > li.image-additional { 
    display: inline-block; 
    margin-right: 10px; 
}

.image-additional img { 
    width: 75px; 
    height: auto; 
    border: 1px solid #ddd; 
    padding: 5px; 
    
}

/* --- FOOTER & MISC --- */
footer {
    margin-top: 30px;
    padding: 30px 0;
    background-color: #555533;
    color: #ffffff;
}

footer a { color: #cbcbb0; }

.list-group a.active {
    background-color: #7d8703 !important;
    border-color: #7d8703 !important;
    color: #fff;
}

/* --- GLOBAL BUTTON OVERRIDES --- */

/* Targets the 'Continue' and 'Login' buttons from your image */
body .btn-primary {
    background-color: #7d8703;
    background-image: none; /* Removes the Bootstrap blue gradient */
    border: 1px solid #6b7203;
    color: #ffffff;
    text-shadow: none;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Hover and Active states for a professional feel */
body .btn-primary:hover, 
body .btn-primary:active, 
body .btn-primary:focus {
    background-color: #555533; /* Darker olive for hover */
    border-color: #444422;
    color: #ffffff;
    background-image: none;
}

/* --- MOBILE VIEW  --- */

@media (max-width: 767px) {
    #content .row {
        display: block !important; /* FIXED: Stops products from squashing */
    }

    .product-layout {
        width: 100% !important; /* FIXED: One product per row */
        float: none !important;
        padding: 0 15px !important;
        margin-bottom: 20px !important;
    }

    .product-thumb {
        width: 100% !important;
        height: auto !important;
    }

    /* NAVIGATION FIXES */
    #menu .navbar-header {
        background-color: #7d8703 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important; /* FIXED: Pushes text and hamburger apart */
        padding: 0 15px !important;
        height: 50px;
    }

    #menu span#category {
        color: #ffffff !important; /* FIXED: Pure white text */
        font-weight: bold;
    }

    #menu .btn-navbar {
        color: #ffffff !important; /* FIXED: Pure white icon */
        margin: 0 !important;
        background: none !important;
        border: none !important;
        font-size: 24px;
    }

    /* DROPDOWN MENU FIXES */
    #menu .dropdown-inner, #menu .dropdown-inner ul, #menu .dropdown-inner li {
        display: block !important;
        width: 100% !important;
    }

    #menu .dropdown-inner li a {
        color: #ffffff !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding: 12px 15px !important;
    }
}



/* --- TABLET VIEW --- */


/* --- TABLET VIEW (768px - 991px) --- */
@media (min-width: 768px) and (max-width: 991px) {
    /* 1. Force the main container to fill the screen width */
    .container {
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* 2. Adjust the Sidebar and Content ratio for Tablet */
    #column-left {
        width: 25% !important; /* Sidebar takes 1/4 of the screen */
        float: left !important;
    }

    #content {
        width: 75% !important; /* Products take the remaining 3/4 */
        float: left !important;
    }

    /* 3. Force 2 products per row in this space */
    #column-left + #content .product-layout {
       width: 50% !important; 
       float: left !important;
    }

    /* 4. Ensure the row uses Flex to keep cards level */
    #content .row {
        display: flex !important;
        flex-wrap: wrap !important;
    }
}

/* --- DESKTOP VIEW --- */

@media (min-width: 992px) {
    /* If NO sidebar: 4 per row (25%) */
        #content.col-sm-12 .product-layout {
            width: 25% !important;
            float: left;
            padding: 0 15px;
        }

    /* Category Pages with Sidebar: 3 per row */
        #column-left + #content .product-layout,
        #column-right + #content .product-layout,
        .row #column-left ~ #content .product-layout {
            width: 33.3333% !important;
        }

    /* If SIDEBAR exists: 3 per row (33%) to prevent squeezing */
    #column-left + #content .product-layout,
    #column-right + #content .product-layout,
    .row #column-left ~ #content .product-layout {
        width: 33.3333% !important;
        float: left;
        padding: 0 15px;
    }
}


/* --- DYNAMIC RESPONSIVE COLUMN LAYOUT --- */
@media (min-width: 1200px) {
    #content .col-lg-3:nth-child(4n+1) { clear: left; }
    #content .col-lg-4:nth-child(3n+1) { clear: left; }
}





