/*
Theme Name: Law Trucks
Theme URI: https://www.onlinemarketingsurgery.co.uk/
Author: Andrew Timmins, Online Marketing Surgery Ltd
Author URI: https://www.onlinemarketingsurgery.co.uk/
Description: Custom theme for Law Trucks website
Version: 1.0
Text Domain: lawtrucks
*/

/* Reset and Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "interstate", sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Bar Styles */
.top-bar {
    background-color: #fff;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1003;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.currency-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.currency-selector span {
    color: #333;
    font-size: 14px;
}

.currency-buttons {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.currency-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.currency-btn:not(:last-child) {
    border-right: 1px solid #ddd;
}

.currency-btn.active {
    background-color: #e9e9e9;
}

.currency-btn img {
    width: 20px;
    height: auto;
}

/* Head Office Styles */
.head-office {
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.head-office a {
    color: #C4122F;
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 12px;
    margin-left: 20px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.social-icon svg {
    width: 20px;
    height: 20px;
    transition: opacity 0.3s;
}

.social-icon:hover svg {
    opacity: 0.8;
}

/* Main Header Styles */
.site-header {
    padding: 20px 0;
    background: #fff;
    position: sticky;
    top: 40px; /* Height of top-bar (8px padding * 2 + content height) */
    z-index: 1002;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.site-branding img {
    height: 45px;
    width: auto;
}

/* Navigation Styles */
.main-navigation {
    flex: 1;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 16px;
    padding: 5px 5px 5px 5px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.main-navigation a:hover {
    color: #C4122F;
}

/* Stock Menu Item Styles */
.stock-menu-item {
    position: static;
}

/* Overlay for site-main when dropdown is open */
.site-main-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 990; /* Below the dropdown but above everything else */
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Allows mouse events to pass through to elements below */
}

.stock-dropdown-wrapper {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    margin-top: 15px;
}

/* Create a bridge between menu item and dropdown */
.stock-dropdown-wrapper::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}

/* Show dropdown on hover */
.stock-menu-item:hover .stock-dropdown-wrapper {
    display: block;
}

/* Stock Dropdown Styles */
.stock-dropdown {
    background: white;
    min-width: 1100px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 22px;
    position: relative;
    padding: 40px;
    overflow: hidden;
    margin: 0 auto;
}

.stock-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid white;
}

/* Dropdown Arrow */
.dropdown-arrow {
    margin-left: 4px;
    transition: transform 0.3s;
    display: inline-block;
}

/* About Us dropdown arrow */
.menu-item-has-children:not(.stock-menu-item) .dropdown-arrow {
    font-size: 12px;
}

/* Our Stock dropdown arrow */
.stock-menu-item .dropdown-arrow {
    font-size: 15px;
}

/* Target the arrow when hovering over the menu item */
.menu-item:hover > a .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-container {
    display: flex;
    padding: 0;
}

/* Vehicle Types List in Menu */
.menu-vehicle-types-list {
    flex: 1.2;
    padding: 0;
    border-right: 0px;
    display: flex;
    flex-direction: column;
    margin-right: 75px;
}

/* Vehicles Header */
.menu-vehicle-types-list::before {
    content: 'Vehicles';
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    padding: 9px;
    border-bottom: 1px solid #000000;
    width: 100%;
    margin-bottom: 0;
}

/* Two column layout container */
.vehicle-columns-container {
    display: flex;
    flex: 1;
    width: 100%;
    justify-content: space-between;
}

/* Left column - vehicle types */
.vehicle-types-column {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    border-right: 0px;
    padding: 15px 0px;
    box-sizing: border-box;
}

/* Right column - brands (empty for now) */
.vehicle-brands-column {
    flex: 0 0 50%;
    padding: 15px 20px;
    box-sizing: border-box;
}

/* Prepare the brands column (empty for now) */
.vehicle-brands-column::before {
    content: '';
    display: block;
    height: 1px;
}

.menu-vehicle-type-link {
    text-decoration: none;
    color: #333;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-vehicle-type-link:last-child {
    border-bottom: none;
}

.menu-vehicle-type-link::after {
    content: '›';
    color: #999;
    font-size: 18px;
    font-weight: 300;
}

.menu-vehicle-type-link:hover {
    color: #C4122F;
    background-color: rgba(196, 18, 47, 0.05);
}

.menu-vehicle-type-link:hover::after {
    color: #C4122F;
}

/* Deal Section in Menu */
.menu-deal-section {
    flex: 1.2;
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

.menu-deal-header {
    background: #005480;
    color: white;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 20px;
    border-radius: 22px;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
}

.menu-deal-content {
    padding: 0;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.menu-deal-content h3 {
    position: absolute;
    top: 30px;
    left: 20px;
    right: 20px;
    margin: 0;
    font-size: 28px;
    color: white;
    z-index: 2;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    line-height: 1.3;
}

.menu-deal-image {
    position: relative;
    margin-bottom: 0;
    height: 260px;
    overflow: hidden;
    flex: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom-right-radius: 22px;
    border-bottom-left-radius: 22px;
    min-height: 400px;
}

.menu-deal-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1;
}

.menu-deal-pricing {
    background: white;
    margin: 0 20px 20px;
    padding: 10px 20px;
    border-radius: 8px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: space-between;
}

.menu-price-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.flag-column {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    top: -10px !important;
}

.flag-column img {
    width: 24px;
    height: auto;
}

.menu-price {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 14px;
}

.menu-original-price {
    font-size: 14px;
    color: #666;
    text-decoration: line-through;
}

.menu-price-column.gbp .menu-price {
    color: #C4122F;
}

.menu-price-column.usd .menu-price {
    color: #0052cc;
}

.menu-enquire-btn {
    background: #C4122F;
    color: white !important;
    padding: 10px 25px !important;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    font-size: 14px;
}

.menu-enquire-btn:hover {
    background: #a30f27;
    color: white !important;
}

/* Submenu Styles */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    min-width: 220px;
    z-index: 100;
    padding: 10px 0;
    flex-direction: column;
    gap: 0;
    border-radius: 4px;
}

.main-navigation ul ul::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #fff;
}

.main-navigation ul li:hover > ul {
    display: flex;
}

.main-navigation ul ul li {
    display: block;
    width: 100%;
}

.main-navigation ul ul a {
    padding: 8px 20px;
    display: block;
    font-size: 14px;
    white-space: nowrap;
}

.main-navigation ul ul a:hover {
    background-color: rgba(196, 18, 47, 0.05);
}

/* Third Level Dropdown */
.main-navigation ul ul ul {
    left: 100%;
    top: 0;
    transform: none;
}

.main-navigation ul ul ul::before {
    display: none;
}

.main-navigation ul ul li:hover > ul {
    display: flex;
}

/* Search Form Styles */
.search-form-container {
    position: relative;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-field {
    padding: 10px 40px 10px 20px;
    border: 1px solid #ddd;
    border-radius: 50px;
    width: 250px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.search-field:focus {
    border-color: #C4122F;
}

.search-submit {
    background: none;
    border: none;
    padding: 0;
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.search-submit img {
    width: 16px;
    height: 16px;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.search-submit:hover img {
    opacity: 1;
}

/* Features Bar Styles */
.features-bar {
    background: #005480;
    padding: 15px 0;
    color: #fff;
    position: sticky;
    top: 125px; /* Height of top-bar + site-header (approx 40px + 85px) */
    z-index: 1001;
}

.features-bar .container {
    max-width: 1100px;
}

.feature-items {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon img {
    width: 24px;
    height: 24px;
}

.feature-item span {
    font-size: 16px;
    font-weight: 900;
    color: #fff;
}

.contact-info {
    display: flex;
    align-items: center;
}

/* Sticky Header Compensation */
/* Ensure content doesn't get hidden behind sticky headers */
body {
    /* Add scroll padding to account for sticky headers when jumping to anchors */
    scroll-padding-top: 170px; /* Approximate total height of all sticky headers */
}

/* Footer Styles */
.site-footer {
    background-color: #262626;
    color: #fff;
    padding: 60px 0;
}

.footer-content {
    margin-bottom: 40px;
}

/* Footer Logo and Search Row */
.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.footer-logo img {
    height: 45px;
    width: auto;
}

.footer-search .search-form {
    position: relative;
}

.footer-search .search-field {
    background: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    width: 450px;
    font-size: 14px;
    color: #333;
}

/* Footer Columns */
.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer-column {
    position: relative;
}

.footer-column h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-column p {
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
}

.footer-column a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-column a:hover {
    opacity: 0.8;
}

.footer-accordion-toggle {
    display: none;
    position: absolute;
    right: 0;
    top: 18px;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.footer-accordion-toggle .toggle-icon {
    display: block;
    position: relative;
    width: 12px;
    height: 12px;
}

.footer-accordion-toggle .toggle-icon::before,
.footer-accordion-toggle .toggle-icon::after {
    content: "";
    position: absolute;
    background-color: #fff;
    transition: transform 0.3s;
}

.footer-accordion-toggle .toggle-icon::before {
    width: 2px;
    height: 12px;
    left: 5px;
    top: 0;
}

.footer-accordion-toggle .toggle-icon::after {
    width: 12px;
    height: 2px;
    left: 0;
    top: 5px;
}

.footer-column.active .footer-accordion-toggle .toggle-icon::before {
    transform: scaleY(0);
}

.footer-column-content {
    display: block;
}

/* Contact Us Column */
.footer-info {
    margin-bottom: 30px;
}

.footer-address {
    margin-bottom: 20px;
}

.footer-contact {
    margin-bottom: 20px;
}

.footer-emails p:nth-child(odd) {
    margin-top: 15px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-emails p:nth-child(even) {
    margin-bottom: 5px;
}

/* Direct Numbers */
.direct-numbers p:nth-child(odd) {
    margin-top: 15px;
    color: rgba(255, 255, 255, 0.7);
}

.direct-numbers p:nth-child(even) {
    margin-bottom: 5px;
}

/* Quick Links Menu */
.quick-links-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quick-links-menu li {
    margin-bottom: 12px;
}

.quick-links-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.3s;
}

.quick-links-menu a:hover {
    opacity: 0.8;
}

/* Opening Times */
.footer-column:last-child {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.time-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.time-row span:first-child {
    color: rgba(255, 255, 255, 0.7);
}

/* Footer Social Icons */
.footer-social {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
}

.footer-social .social-icons {
    display: flex;
    gap: 12px;
    margin-left: 0;
}

.footer-social .social-icon {
    width: 24px;
    height: 24px;
}

.footer-social .social-icon svg {
    width: 24px;
    height: 24px;
}

/* Footer Bottom */
.footer-bottom {
    background: #494949;
    padding: 20px 0;
}
 
.footer-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.8;
}

.footer-links span {
    color: rgba(255, 255, 255, 0.3);
}

/* First Column Layout */
.footer-column:first-child {
    display: flex;
    flex-direction: column;
}

/* Footer Responsive Styles */
@media (max-width: 991px) {
    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .footer-row {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        margin-bottom: 40px;
    }
    
    .footer-search .search-field {
        width: 350px;
    }
    
    .footer-social {
        justify-content: flex-start;
        margin-top: 20px;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .site-footer {
        padding: 40px 0;
    }
    
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .footer-column {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 15px 0;
    }
    
    .footer-column h3 {
        margin-bottom: 15px;
        font-size: 16px;
        cursor: pointer;
        position: relative;
    }
    
    .footer-accordion-toggle {
        display: block;
    }
    
    .footer-column-content {
        display: none;
        padding-bottom: 20px;
    }
    
    .footer-column.active .footer-column-content {
        display: block;
    }
    
    .footer-row {
        margin-bottom: 30px;
    }
    
    .footer-search .search-field {
        width: 100%;
    }
    
    .footer-social {
        margin-top: 20px;
        justify-content: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .footer-links span {
        display: none;
    }
    
    /* Hide features bar on mobile */
    .features-bar {
        display: none;
    }
    
    .top-bar .currency-selector {
        display: none;
    }
    
    /* Ensure mobile menu currency selector remains visible */
    .mobile-nav-contact .mobile-currency-selector {
        display: block;
    }
}

@media (max-width: 480px) {
    .site-footer {
        padding: 30px 0;
    }
    
    .footer-logo img {
        height: 35px;
    }
    
    .time-row {
        font-size: 13px;
    }
}

/* Regular dropdown styles for other menu items */
.menu-item-has-children:not(.stock-menu-item) .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    min-width: 200px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 8px 0;
}

.menu-item-has-children:not(.stock-menu-item):hover .sub-menu {
    display: block;
}

.menu-item-has-children:not(.stock-menu-item) .sub-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid white;
}

.menu-item-has-children:not(.stock-menu-item) .sub-menu a {
    padding: 8px 20px;
    display: block;
    white-space: nowrap;
    font-size: 14px;
}

/* Banner Heading Styles */
.banner-heading .blue-text {
    color: #005A87;
    margin-bottom: 5px;
    font-weight: 900;
}

.banner-heading .blue-text, .banner-heading .red-text {
    display: block;
    font-size: 72px;
    font-weight: 700;
}

/* Vehicle Archive Page Styles */
.vehicle-archive-wrapper {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 50px;
}

.vehicle-filters-sidebar {
    flex: 0 0 250px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
    align-self: flex-start;
}

.vehicle-results {
    flex: 1;
}

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

.filters-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: normal;
    color: #333;
}

.clear-link {
    color: #333;
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
}

.clear-link span {
    margin-left: 3px;
    font-size: 14px;
    line-height: 1;
}

.clear-link:hover {
    text-decoration: underline;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group h4 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

.filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    cursor: pointer;
}

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.filter-option label {
    cursor: pointer;
    font-size: 14px;
    color: #555;
    margin-left: 30px;
}

/* Custom radio button */
.filter-option input[type="radio"] + label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: #fff;
    transition: all 0.2s ease;
}

.filter-option input[type="radio"]:checked + label:before {
    border-color: #C4122F;
    background: #fff;
}

.filter-option input[type="radio"]:checked + label:after {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #C4122F;
    transition: all 0.2s ease;
}

.filter-option input[type="radio"]:focus + label:before {
    box-shadow: 0 0 0 3px rgba(196, 18, 47, 0.1);
}

/* Stock status section styling */
.stock-status {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

/* Search fields for vehicle filters */
.vehicle-filters-form .vehicle-filter-field {
    margin-bottom: 15px;
    position: relative;
}

.vehicle-filters-form select {
    width: 100%;
    padding: 15px 30px 15px 15px;
    border: 1px solid #ddd;
    border-radius: 22px;
    background-color: #FFFFFF;
    font-size: 16px;
    color: #666;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6" viewBox="0 0 12 6"><path d="M0 0l6 6 6-6z" fill="%23666"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    cursor: pointer;
    box-shadow: none;
    outline: none;
}

.vehicle-filters-form select:focus {
    outline: none;
}

/* Vehicle filter button style */
.vehicle-filter-button {
    width: 100%;
    background-color: #C4122F;
    color: white;
    border: none;
    border-radius: 22px;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    margin-top: 10px;
}

.vehicle-filter-button:hover {
    background-color: #A30F27;
}

/* Results Header Styles */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.view-toggle {
    display: flex;
}

.view-toggle button {
    background: none;
    border: 1px solid #ddd;
    padding: 8px 12px;
    cursor: pointer;
    outline: none;
    color: #777;
    transition: all 0.2s ease;
}

.view-toggle button:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.view-toggle button:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    border-left: none;
}

.view-toggle button.active {
    background-color: #8cc641;
    border-color: #8cc641;
    color: white;
}

.sort-by select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
    outline: none;
    cursor: pointer;
    min-width: 150px;
}

/* Vehicle Grid Styles */
.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.vehicles-grid.list-view {
    grid-template-columns: 1fr;
}

.vehicles-grid.list-view .vehicle-card {
    display: flex;
    flex-direction: row;
}

.vehicles-grid.list-view .vehicle-image {
    flex: 0 0 40%;
    height: 100%;
}

.vehicles-grid.list-view .vehicle-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.vehicle-card {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.sale-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #e74c3c;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 3px;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.vehicle-image {
    position: relative;
    height: 220px;
    background-color: #f5f5f5;
    overflow: hidden;
}

.vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.vehicle-card:hover .vehicle-image img {
    transform: scale(1.05);
}

.vehicle-info {
    padding: 20px;
}

.vehicle-title {
    margin: 0 0 15px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.vehicle-price {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.price-gbp {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.price-gbp .flag-icon {
    margin-right: 8px;
}

.price-gbp .price {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.price-gbp .ex-vat {
    margin-left: 5px;
    font-size: 13px;
    color: #777;
}

.price-vat {
    display: flex;
    align-items: center;
}

.price-vat .price {
    font-size: 15px;
    color: #777;
}

.price-vat .inc-vat {
    margin-left: 5px;
    font-size: 13px;
    color: #999;
}

.vehicle-specs {
    margin-bottom: 20px;
}

.spec-group {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.spec-icon {
    width: 20px;
    height: 20px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    margin-right: 10px;
    opacity: 0.7;
}

.registration-icon {
    background-image: url('images/icon-registration.svg');
}

.mileage-icon {
    background-image: url('images/icon-mileage.svg');
}

.axle-icon {
    background-image: url('images/icon-axle.svg');
}

.spec-text {
    font-size: 14px;
    color: #666;
}

.vehicle-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.btn-view, .btn-enquire {
    flex: 1;
    display: inline-block;
    padding: 10px 0;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-view {
    background-color: #f8f8f8;
    color: #333;
    border: 1px solid #ddd;
}

.btn-enquire {
    background-color: #8cc641;
    color: white;
    border: 1px solid #8cc641;
}

.btn-view:hover {
    background-color: #eee;
    border-color: #ccc;
}

.btn-enquire:hover {
    background-color: #78b32f;
}

.btn-call {
    background-color: #005480;
    color: white;
    border: 1px solid #005480;
}

.btn-call:hover {
    background-color: #003d5c;
}

.btn svg,
.btn img {
    margin-right: 6px;
}

/* Pagination */
.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

.pagination li {
    display: inline-block;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #ddd;
    color: #333;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.pagination li span.current {
    background-color: #8cc641;
    border-color: #8cc641;
    color: white;
    font-weight: 600;
}

.pagination li a:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

/* No Results */
.no-results {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.no-results h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.no-results p {
    color: #666;
    font-size: 16px;
}

.no-results a {
    color: #8cc641;
    text-decoration: none;
    font-weight: 500;
}

.no-results a:hover {
    text-decoration: underline;
}

/* Responsive styles */
@media (max-width: 992px) {
    .vehicles-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .vehicle-archive-wrapper {
        flex-direction: column;
    }
    
    .vehicle-filters-sidebar {
        flex: 0 0 100%;
        margin-bottom: 20px;
    }
    
    .vehicles-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .vehicles-grid.list-view .vehicle-card {
        flex-direction: column;
    }
    
    .vehicles-grid.list-view .vehicle-image {
        flex: 0 0 200px;
    }
}

@media (max-width: 480px) {
    .vehicles-grid {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

/* Search Results Page Styles */
.search-results .page-header {
    margin-bottom: 30px;
}

.search-results .page-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.search-results .stock-count {
    color: #8cc641;
    font-weight: 700;
}

.search-results .archive-description {
    color: #666;
    font-size: 16px;
    max-width: 800px;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Fix potential icon issues */
.fa, .fas, .far, .fal, .fab {
    display: inline-block;
}

.view-toggle .fa {
    font-size: 14px;
}

/* Ensure list view works properly */
.vehicles-grid.list-view .vehicle-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.vehicles-grid.list-view .vehicle-image {
    flex: 0 0 300px;
    max-width: 300px;
    height: auto;
}

.vehicles-grid.list-view .vehicle-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.vehicles-grid.list-view .vehicle-title {
    font-size: 20px;
}

.vehicles-grid.list-view .vehicle-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (max-width: 768px) {
    .vehicles-grid.list-view .vehicle-card {
        flex-direction: column;
    }
    
    .vehicles-grid.list-view .vehicle-image {
        flex: 0 0 100%;
        max-width: 100%;
        height: 200px;
    }
    
    .vehicles-grid.list-view .vehicle-specs {
        grid-template-columns: 1fr;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #005480;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.scroll-to-top:hover {
    background-color: #003d5e;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .scroll-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
    
    .scroll-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* Typography adjustments to use Interstate throughout */
h1, h2, h3, h4, h5, h6,
.banner-heading,
.menu-deal-header,
.error-title,
.error-subtitle,
.vehicle-title,
.price-gb .price,
.price-us .price,
.search-button,
.btn,
.main-navigation a,
.footer-column h3,
.head-office {
    font-family: "interstate", sans-serif;
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 4px;
    z-index: 1004; /* Higher than sticky headers */
    cursor: pointer;
    padding: 0;
}

.hamburger {
    display: block;
    position: relative;
    width: 20px;
    height: 2px;
    background: #333;
    margin: 0 auto;
    transition: background 0.3s;
}

.hamburger::before,
.hamburger::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    background: #333;
    left: 0;
    transition: transform 0.3s, top 0.3s;
}

.hamburger::before {
    top: -6px;
}

.hamburger::after {
    top: 6px;
}

/* Hamburger to X transformation */
.mobile-menu-toggle.active .hamburger {
    background: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.mobile-menu-toggle.active .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Mobile Nav Container */
.mobile-nav-container {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background: #fff;
    z-index: 1001;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    transition: right 0.3s ease;
}

.mobile-nav-container.active {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #eee;
    margin-top: 40px;
    margin-bottom: -14px;
}

.mobile-logo {
    margin-left: -5px;
    margin-bottom: -13px;
}

.mobile-logo img {
    height: 30px;
    width: auto;
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    right: -10px;
    top: 3px;
    z-index: 1001 !important;
}

.close-icon {
    position: relative;
    width: 24px;
    height: 24px;
}

.close-icon::before, .close-icon::after {
    content: "";
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: #000000;
}

.close-icon::before {
    transform: rotate(45deg);
}

.close-icon::after {
    transform: rotate(-45deg);
}

.mobile-nav-search {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.mobile-nav-search .search-form {
    display: flex;
    position: relative;
}

.mobile-nav-search .search-field {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.mobile-nav-search .search-submit {
    padding: 8px 12px;
    background: #C4122F;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.mobile-nav-menu {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.mobile-menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-items li {
    position: relative;
}

.mobile-menu-items a {
    display: block;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid #f5f5f5;
}

.mobile-menu-items a:hover {
    background: #f9f9f9;
    color: #C4122F;
}

.mobile-nav-contact {
    padding: 15px;
}

.mobile-currency-selector {
    margin-bottom: 20px;
}

.mobile-currency-selector span {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: #333;
}

.mobile-contact-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.mobile-contact-info .head-office {
    font-size: 14px;
}

.mobile-contact-info .social-icons {
    margin-left: 0;
}

body.mobile-menu-open {
    overflow: hidden;
}

/* Site overlay when mobile menu is active */
.site-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.site-overlay.active {
    display: block;
}

/* Responsive media queries */
@media (max-width: 1100px) {
    .main-navigation ul {
        gap: 20px;
    }
    
    .site-branding img {
        height: 40px;
    }
    
    .search-form-container {
        margin-left: 10px;
    }
}

@media (max-width: 991px) {
    /* Header adjustments */
    .header-content {
        gap: 20px;
    }
    
    .main-navigation ul {
        gap: 15px;
    }
    
    .main-navigation a {
        font-size: 14px;
    }
    
    .search-field {
        width: 150px;
    }
    
    /* Features bar adjustments */
    .feature-items {
        flex-wrap: wrap;
    }
    
    .feature-item {
        width: 50%;
        padding: 10px 0;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        background: transparent;
        border: none;
        width: 40px;
        height: 40px;
        padding: 0;
        margin-left: auto;
        order: 3;
    }
    
    .main-navigation {
        display: none;
    }
    
    .top-bar-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .currency-label {
        display: none;
    }
    
    .contact-info {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 5px;
    }
    
    .site-header {
        padding: 15px 0;
    }
    
    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }
    
    .site-branding {
        flex: 1;
        padding-right: 0;
    }
    
    .search-form-container {
        display: none;
    }
    
    .feature-items {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .feature-item {
        padding: 15px 10px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .feature-icon {
        margin-right: 0;
    }
    
    .feature-icon img {
        width: 24px;
        height: 24px;
    }
    
    .top-bar .currency-selector {
        display: none;
    }
    
    /* Ensure mobile menu currency selector remains visible */
    .mobile-nav-contact .mobile-currency-selector {
        display: block;
    }
    
    /* Hide features bar on mobile */
    .features-bar {
        display: none !important;
    }
    
    /* Mobile menu dropdown styles - convert all dropdowns to accordion style */
    .mobile-menu-items .stock-menu-item .stock-dropdown-wrapper {
        display: none !important;
    }
    
    /* Make all menu items with children behave consistently in mobile */
    .mobile-menu-items .stock-menu-item,
    .mobile-menu-items .menu-item-has-children {
        position: relative !important;
    }
    
    /* Override desktop submenu behaviors for mobile */
    .mobile-menu-items .menu-item-has-children:not(.stock-menu-item) .sub-menu,
    .mobile-menu-items .stock-menu-item .sub-menu,
    .mobile-menu-items .menu-item-has-children .sub-menu {
        display: none !important;
        position: static !important;
        width: 100% !important;
        left: 0 !important;
        transform: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        background-color: #f9f9f9 !important;
        top: auto !important;
    }
    
    .mobile-menu-items .menu-item-has-children:not(.stock-menu-item) .sub-menu::before {
        display: none !important;
    }
    
    /* Only display submenu when parent has submenu-open class */
    .mobile-menu-items .menu-item-has-children.submenu-open > .sub-menu,
    .mobile-menu-items .stock-menu-item.submenu-open > .sub-menu {
        display: block !important;
    }
    
    /* Style submenu toggle buttons consistently */
    .mobile-menu-items .submenu-toggle {
        position: absolute;
        right: 0;
        top: 5px;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 5;
        background: transparent;
        border: none;
        cursor: pointer;
    }
    
    /* Hide the original dropdown arrows in mobile menu */
    .mobile-menu-items .stock-menu-item .dropdown-arrow,
    .mobile-menu-items .menu-item-has-children .dropdown-arrow {
        display: none !important;
    }
    
    /* Remove hover behaviors for all menu items */
    .mobile-menu-items li:hover > .sub-menu,
    .mobile-menu-items .menu-item-has-children:hover .sub-menu {
        display: none !important;
    }
    
    /* Create triangle toggle icon for mobile menu */
    .mobile-menu-items .toggle-icon {
        display: block;
        position: relative;
        width: 10px;
        height: 10px;
    }
    
    .mobile-menu-items .toggle-icon::before,
    .mobile-menu-items .toggle-icon::after {
        content: "";
        position: absolute;
        background-color: #666;
        transition: transform 0.3s;
    }
    
    /* Replace the T-shape with a triangle by using only border for a triangle */
    .mobile-menu-items .toggle-icon::before {
        display: none; /* Hide the vertical line */
    }
    
    .mobile-menu-items .toggle-icon::after {
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 6px 0 6px 8px;
        border-color: transparent transparent transparent #666;
        background-color: transparent;
        top: -1px;
        left: -1px;
    }
    
    /* Rotate triangle to point down when expanded */
    .mobile-menu-items .submenu-open > .submenu-toggle .toggle-icon::after {
        transform: rotate(90deg);
    }
}

@media (max-width: 480px) {
    /* Smaller screens adjustments */
    .top-bar {
        padding: 5px 0;
    }
    
    .currency-buttons {
        width: 100%;
    }
    
    .currency-btn {
        flex: 1;
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .currency-text {
        display: none;
    }
    
    .currency-btn img {
        width: 16px;
    }
    
    .head-office {
        font-size: 12px;
    }
    
    .feature-item {
        width: 100%;
        text-align: center;
    }
}

/* Mobile submenu styles */
.mobile-menu-items .sub-menu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
}

.mobile-menu-items .sub-menu li {
    border-left: 3px solid #eee;
}

.mobile-menu-items .sub-menu a {
    padding-left: 30px;
    font-size: 14px;
}

.submenu-toggle {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    position: absolute;
    right: 0;
    top: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.toggle-icon {
    display: block;
    position: relative;
    width: 10px;
    height: 10px;
}

.toggle-icon::before,
.toggle-icon::after {
    content: "";
    position: absolute;
    background-color: #666;
    transition: transform 0.3s;
}

.toggle-icon::before {
    width: 2px;
    height: 10px;
    left: 50%;
    margin-left: -1px;
}

.toggle-icon::after {
    width: 10px;
    height: 2px;
    top: 50%;
    margin-top: -1px;
}

.submenu-open > .submenu-toggle .toggle-icon::before {
    transform: scaleY(0);
}

/* Mobile menu item with children */
.mobile-menu-items .menu-item-has-children {
    position: relative;
}

.mobile-menu-items .menu-item-has-children > a {
    padding-right: 40px;
}

/* Always show footer content on mobile */
.footer-column.always-open .footer-column-content {
    display: block !important;
}

.footer-column.always-open h3 {
    cursor: default;
}

@media (max-width: 768px) {
    .footer-column.always-open {
        padding-bottom: 15px;
    }
    
    .footer-column.always-open h3 {
        margin-bottom: 15px;
    }
    
    .footer-column.always-open .footer-column-content {
        padding-bottom: 0;
    }
}

@media (max-width: 768px) {
    /* Header adjustments for mobile */
    .search-form-container {
        display: none;
    }
    
    .site-branding {
        flex: 1;
        text-align: left;
    }
    
    .site-branding img {
        height: 35px;
    }
    
    /* Mobile logo adjustments */
    .mobile-logo {
        margin-left: 0;
        margin-bottom: -13px;
        text-align: left;
    }
    
    .mobile-logo img {
        height: 40px;
        width: auto;
    }
    
    /* Footer mobile display */
    .footer-column.always-open {
        padding-bottom: 15px;
    }
    
    .footer-column.always-open h3 {
        margin-bottom: 15px;
    }
    
    .footer-column.always-open .footer-column-content {
        padding-bottom: 0;
    }
    
    /* Hide footer search */
    .footer-search {
        display: none;
    }
    
    .footer-row {
        justify-content: flex-start;
        margin-bottom: 5px;
    }
    
    .footer-logo {
        text-align: left;
    }
    
    .footer-links {
        flex-direction: row;
        gap: 30px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    /* Further mobile adjustments */
    .mobile-logo img {
        height: 45px;
    }
    
    .footer-logo img {
        height: 60px;
    }
} 