/* 1. Global Setup (Vintage Garage Theme) */
body {
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
    margin: 0;
    padding: 0;
    background-color: #f4edde; 
    color: #332d29; 
}

/* 2. Header & Navigation */
header {
    background-color: #2a3b4c; 
    color: #f4edde; 
    padding: 30px 20px;
    text-align: center;
    border-bottom: 4px solid #9e3b33; 
}

header h1 {
    margin-top: 0;
    letter-spacing: 1px;
    text-transform: uppercase; 
}

nav a {
    text-decoration: none;
    color: #a8b2bd; 
    margin: 0 15px;
    font-family: Arial, sans-serif;
    font-size: 0.9em;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #f4edde; 
}

/* 3. Main Content Layout */
main {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    text-align: center;
}

.product-card-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap; 
}

/* 4. Product Cards */
.product-card {
    background-color: #ffffff;
    border: 2px solid #d9cdb8; 
    border-radius: 4px; 
    padding: 20px;
    width: 260px;
    box-shadow: 4px 4px 0px #d9cdb8; 
    transition: transform 0.2s ease;
    font-family: Arial, sans-serif; 
}

.product-card:hover {
    transform: translate(-2px, -2px); 
    box-shadow: 6px 6px 0px #d9cdb8;
}

.product-card h3 {
    margin-top: 0;
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
    color: #2a3b4c; 
    font-size: 1.3em;
}

/* 5. Buttons */
button {
    background-color: #9e3b33; 
    color: #ffffff;
    border: 2px solid #7a2a24;
    padding: 12px 20px;
    border-radius: 2px; 
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.2s ease;
}

button:hover {
    background-color: #7a2a24; 
}

/* 6. Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    font-family: Arial, sans-serif;
    font-size: 0.8em;
    color: #6a625a;
    text-transform: uppercase;
    letter-spacing: 1px;
}
/* Product Images */
.product-image {
    width: 100%; /* Makes the image fit perfectly inside the card */
    height: 200px; /* Keeps all images the exact same height */
    object-fit: cover; /* Crops the image nicely without squishing it */
    border-radius: 2px;
    margin-bottom: 15px;
    border: 2px solid #2a3b4c; /* Adds a nice petrol blue border to the photos */
}
/* 7. Cart Modal (Popup) */
#cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(42, 59, 76, 0.9); /* Dark petrol blue transparent overlay */
    z-index: 1000; /* Keeps it on top of everything else */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* This special class hides the modal when we don't need it */
.hidden {
    display: none !important;
}

.cart-content {
    background-color: #f4edde; /* Cream paper look */
    padding: 30px;
    border: 2px solid #d9cdb8;
    border-radius: 4px;
    width: 90%;
    max-width: 400px;
    box-shadow: 8px 8px 0px #9e3b33; /* Faded red shadow */
    position: relative;
    text-align: left;
}

.cart-content h2 {
    color: #2a3b4c;
    margin-top: 0;
    border-bottom: 2px solid #2a3b4c;
    padding-bottom: 10px;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5em;
    font-weight: bold;
    color: #9e3b33;
    cursor: pointer;
}

#cart-items-list {
    list-style-type: none; /* Removes default bullet points */
    padding: 0;
}

#cart-items-list li {
    margin-bottom: 10px;
    padding-bottom: 5px;
    display: flex;
    justify-content: space-between;
    font-family: Arial, sans-serif;
    font-weight: bold;
}

.cart-divider {
    display: block; /* Turns our hidden line back on for the receipt */
    border-top: 2px dashed #a8b2bd;
    margin: 20px 0;
}
/* 8. Contact Section */
.contact-section {
    background-color: #e8dfc8; /* Slightly darker cream to stand out */
    padding: 40px 20px;
    margin: 60px auto;
    max-width: 800px;
    border: 2px dashed #a8b2bd; /* Vintage dashed border */
    text-align: center;
    box-shadow: 4px 4px 0px #2a3b4c; /* Petrol blue shadow */
}

.contact-section h2 {
    color: #9e3b33;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 2em;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.contact-details p {
    margin: 12px 0;
    font-size: 1.2em;
    color: #332d29;
}
/* 10. Newsletter Section */
.newsletter-section {
    padding: 50px 20px;
    margin: 40px auto;
    max-width: 600px;
    text-align: center;
    background-color: #e8dfc8;
    border: 2px solid #2a3b4c;
    box-shadow: 4px 4px 0px #2a3b4c;
}

.newsletter-section h2 {
    color: #9e3b33;
    font-size: 2em;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0;
}

.newsletter-section p {
    font-size: 1.1em;
    color: #332d29;
    margin-bottom: 30px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Adds perfect spacing between the input boxes */
}

.newsletter-form input {
    padding: 12px;
    font-size: 1em;
    font-family: 'Courier New', Courier, monospace;
    border: 1px solid #a8b2bd;
    background-color: #f4f1ea;
}

.newsletter-form input:focus {
    outline: none;
    border-color: #2a3b4c;
    box-shadow: 0 0 5px rgba(42, 59, 76, 0.5);
}

.subscribe-btn {
    padding: 15px;
    font-size: 1.2em;
    font-weight: bold;
    color: #f4f1ea;
    background-color: #2a3b4c;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.2s;
}

.subscribe-btn:hover {
    background-color: #9e3b33;
}
/* 11. Car Categories */
.car-category {
    margin: 40px auto;
    max-width: 1000px;
    padding: 0 20px;
}

.car-category h2 {
    color: #2a3b4c;
    border-bottom: 3px solid #9e3b33; /* A bold red racing stripe underneath */
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 2em;
    text-transform: uppercase;
    letter-spacing: 1px;
}