/* General Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif; /* Primary font for body text */
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8; /* Light background */
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif; /* Secondary font for headings */
    color: #222;
    margin-bottom: 15px;
}

h1 { font-size: 2.8em; }
h2 { font-size: 2.2em; }
h3 { font-size: 1.8em; }

p {
    margin-bottom: 1em;
}

a {
    color: #E63B34; /* Primary link color */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    transition: background-color 0.3s ease;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
}

.primary-btn {
    background-color: #E63B34; /* Primary brand color */
    color: #fff;
    border: 2px solid #E63B34;
}

.primary-btn:hover {
    background-color: #B02026; /* Darker shade on hover */
    border-color: #B02026;
}

.secondary-btn {
    background-color: transparent;
    color: #E63B34;
    border: 2px solid #E63B34;
}

.secondary-btn:hover {
    background-color: #e6f2ff; /* Light background on hover */
    color: #B02026;
    border-color: #B02026;
}


/* Header */
header {
    background-color: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

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

/* Base Logo Styling (for all screen sizes, but acts as default) */
.header-logo {
    height: 50px; /* Default height for desktop and larger screens */
    width: auto; /* Maintain aspect ratio */
    max-width: 100%; /* Ensures the image doesn't exceed its parent's width */
    display: block; /* Important for preventing extra space below if it's an inline element */
}

/* --- Mobile-Specific Styles --- */
@media (max-width: 768px) { /* Adjust breakpoint as needed (e.g., 600px, 480px) */
    .header-logo {
        height: 40px; /* Smaller height for mobile devices */
        /* width: auto; max-width: 100%; display: block; are inherited from above */
    }

    /* You'll likely need to adjust the header and nav for mobile too */
    .header-content {
        flex-direction: column; /* Stack logo and nav vertically on mobile */
        text-align: center;
    }

    .logo {
        margin-bottom: 15px; /* Add space between logo and nav on mobile */
    }

    nav ul {
        flex-direction: column; /* Stack nav items vertically */
        align-items: center; /* Center nav items */
    }

    nav ul li {
        margin: 10px 0; /* Adjust spacing between stacked nav items */
    }
}

/* For even smaller phones, you might want an even smaller logo */
@media (max-width: 480px) {
    .header-logo {
        height: 35px; /* Even smaller for very narrow screens */
    }
}

/* You might want to remove or adjust the .logo a styles if they interfere */
.logo a {
    /* font-family: 'Montserrat', sans-serif; */
    /* font-size: 1.8em; */
    /* font-weight: 700; */
    /* color: #222; */
    text-decoration: none; /* Keep this if you want to remove underline from image link */
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: #555;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #E63B34;
    text-decoration: none;
}

/* Hero Section */
#hero, #page-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0,0,0,0.7)), url('images/hero-bg.png') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 100px 0;
    margin-bottom: 40px;
}

#hero h1, #page-hero h1 {
    color: #fff;
    font-size: 3.5em;
    margin-bottom: 10px;
}
#hero h2, #page-hero p {
    color: #eee;
    font-size: 1.5em;
    font-weight: 300;
    margin-bottom: 30px;
}

/* Section Styling */
section {
    padding: 60px 0;
    text-align: center;
    background-color: #fff; /* Default background for content sections */
    margin-bottom: 30px; /* Space between sections */
    border-radius: 0px; /* Slightly rounded corners */
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); /* Subtle shadow */
}

section:nth-of-type(even) { /* Alternate background for better visual separation */
    background-color: #f0f4f8;
}

section h3 {
    margin-bottom: 40px;
    font-size: 2.2em;
    color: #222;
}

/* Features Section (Homepage) */
#features .service-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.icon-item {
    flex-basis: 200px; /* Adjust as needed */
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.icon-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.icon-item img {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    /*filter: invert(24%) sepia(87%) saturate(3015%) hue-rotate(203deg) brightness(98%) contrast(100%); */ /* Example: make icon blue */
}

.icon-item h4 {
    font-size: 1.2em;
    margin-bottom: 5px;
    color: #E63B34;
}

.icon-item p {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 0;
}

/* About Section */
#about {
    background-color: #f0f4f8;
}
#about p {
    max-width: 800px;
    margin: 0 auto 30px auto;
    font-size: 1.1em;
}

/* Location Preview Section */
#location-preview .map-placeholder {
    width: 100%;
    max-width: 600px;
    height: 250px; /* Fixed height for consistency */
    background-color: #e0e0e0;
    margin: 0 auto 20px auto;
    display: block;
    object-fit: cover; /* Ensures image covers area */
    border-radius: 8px;
}
#location-preview p {
    margin-bottom: 20px;
    font-size: 1.1em;
    font-weight: 600;
}


/* All Services Page */
#all-services {
    background-color: #fff;
    text-align: left; /* Align text left within service categories */
}

.service-category {
    margin-bottom: 40px;
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fefefe;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: box-shadow 0.3s ease;
}
.service-category:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.service-category h3 {
    color: #E63B34;
    font-size: 1.6em;
    margin-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.service-category ul {
    list-style: disc; /* Use bullets for service lists */
    margin-left: 20px;
}

.service-category ul li {
    margin-bottom: 8px;
    color: #555;
}

.call-to-action-bottom {
    margin-top: 40px;
    text-align: center;
    display: block; /* Make button full width if needed */
}

/* Booking & Contact Forms */
.booking-form-section, #contact-details {
    background-color: #f0f4f8;
    padding: 60px 0;
}

.booking-notes {
    background-color: #ffe6e6;
    border: 1px solid #ffb3b3;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
    text-align: left;
}
.booking-notes p {
    margin-bottom: 10px;
    color: #333;
}
.booking-notes p:last-child {
    margin-bottom: 0;
}


.booking-form, .contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: left;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    font-family: 'Lato', sans-serif;
}

.form-group input[type="date"] {
    appearance: none; /* Remove default date input styling */
}

.form-group textarea {
    resize: vertical; /* Allow vertical resizing */
}

.booking-form button, .contact-form button {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    margin-top: 20px;
}

/* Contact Details */
#contact-details .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    text-align: left;
}

.contact-info, .contact-form {
    flex: 1;
    min-width: 300px;
}

.contact-info h2 {
    color: #E63B34;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.contact-info p {
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #555;
}

.contact-info a {
    font-weight: 600;
}

/* Google Map */
#map {
    padding-top: 0; /* Remove top padding as it's often a continuation */
    background-color: #fefefe;
    margin-top: -30px; /* Reduce gap to previous section */
}

#map h2 {
    margin-bottom: 30px;
}

#map iframe {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* Responsive Google Map Embed */
.map-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
}

/* Taller map view for mobile screens */
@media (max-width: 600px) {
    .map-container {
        padding-top: 75%; /* Taller aspect ratio for better usability on mobile */
    }
}


.map-note {
    font-style: italic;
    color: #777;
    margin-top: 20px;
    font-size: 0.9em;
}


/* Footer */
footer {
    background-color: #222;
    color: #f8f8f8;
    padding: 30px 0;
    text-align: center;
    margin-top: 60px;
    border-top: 5px solid #E63B34; 
}

/* --- New Styles for Tires Page --- */

#tire-finder-section {
    padding: 60px 0;
    text-align: center; /* Center content within the section */
    background-color: #f8f8f8; /* Use your body background color */
    margin-bottom: 30px;
    /* No border-radius or box-shadow here, let the container handle it if needed */
}

.section-title { /* For the "Search Our Tire Inventory" heading */
    font-size: 2.2em;
    color: #222; /* Your heading color */
    margin-bottom: 40px;
}

.tire-filter-controls {
    display: flex;
    justify-content: center;
    align-items: center; /* Vertically align input and button */
    gap: 15px; /* Space between input and button */
    margin-bottom: 50px; /* Space between filter controls and results */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.tire-filter-controls input[type="text"] {
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 300px; /* A good default width */
    max-width: 90%; /* Ensure it's responsive */
    font-size: 1em;
    font-family: 'Lato', sans-serif;
    color: #333;
    transition: border-color 0.3s ease;
}

.tire-filter-controls input[type="text"]:focus {
    border-color: #E63B34; /* Highlight on focus with brand color */
    outline: none;
    box-shadow: 0 0 0 3px rgba(230, 59, 52, 0.2); /* Subtle glow */
}

.tire-filter-controls .primary-btn { /* Re-use your primary button style */
    padding: 12px 30px; /* Slightly adjusted padding for search button */
    font-size: 1em;
}


.tire-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Responsive grid */
    gap: 25px; /* Space between tire cards */
    padding-top: 20px; /* Space from controls */
}

.tire-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); /* Subtle shadow like your sections */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left; /* Align text within card */
    display: flex; /* Use flexbox for inner layout */
    flex-direction: column;
    justify-content: space-between; /* Push price/quantity to bottom */
}

.tire-card:hover {
    transform: translateY(-8px); /* More pronounced lift on hover */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.tire-card h3 { /* Renamed from h2 to h3 to match your hierarchy */
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4em;
    color: #222;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.3;
}

.tire-card p {
    margin: 6px 0;
    font-size: 0.95em;
    color: #555;
}

.tire-card .detail-label { /* Use a specific class for the label part */
    font-weight: 600; /* Your brand uses 600 for important text */
    color: #E63B34; /* Your primary brand color */
    margin-right: 5px; /* Small space after label */
}

.tire-card .product-details-group { /* Group price and quantity */
    margin-top: auto; /* Push to the bottom of the flex container */
    padding-top: 15px; /* Space from details above */
    border-top: 1px solid #eee;
    text-align: right;
}

.tire-card .price {
    font-size: 1.7em; /* Larger price for prominence */
    font-weight: 700;
    color: #28a745; /* A good green for price */
    margin-bottom: 5px;
}

.tire-card .quantity {
    font-size: 0.9em;
    color: #6c757d;
}

.no-results-message {
    grid-column: 1 / -1; /* Make it span all columns in the grid */
    text-align: center;
    font-style: italic;
    color: #888;
    padding: 30px 0;
    font-size: 1.1em;
}

/* Responsive adjustments for tire page */
@media (max-width: 768px) {
    .tire-filter-controls {
        flex-direction: column; /* Stack input and button */
    }
    .tire-filter-controls input[type="text"],
    .tire-filter-controls .primary-btn {
        width: 100%; /* Full width for input and button on mobile */
        max-width: 350px; /* Max width to prevent overly wide elements */
    }
    .tire-results-grid {
        grid-template-columns: 1fr; /* Single column on very small screens */
    }
}