/* --- CSS VARIABLES & GLOBAL STYLES --- */
:root {
    --color-primary: #3498DB; /* A trustworthy blue */
    --color-secondary: #F1C40F; /* A vibrant accent yellow */
    --color-dark: #2C3E50; /* Dark blue/charcoal for text and headers */
    --color-light: #ECF0F1; /* Light grey background */
    --color-white: #FFFFFF;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --header-height: 80px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-white);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

.section-padding { padding: 60px 0; }
.page-padding { padding-top: calc(var(--header-height) + 40px); padding-bottom: 60px; }
.bg-light { background-color: var(--color-light); }
.text-center { text-align: center; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
ul { list-style: none; }
/* Compact container padding on small screens */
.container { padding-left: 8px; padding-right: 8px; }

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}
.btn-primary { background-color: var(--color-primary); color: var(--color-white); }
.btn-primary:hover { background-color: #2980B9; }
.btn-secondary { background-color: var(--color-secondary); color: var(--color-dark); }
.btn-secondary:hover { background-color: #f39c12; }
.btn-primary-outline { border-color: var(--color-primary); color: var(--color-primary); }
.btn-primary-outline:hover { background-color: var(--color-primary); color: var(--color-white); }

/* --- HEADER & NAVIGATION --- */
.main-header {
    background-color: var(--color-white);
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.brand-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-dark);
}

.nav-links { display: flex; gap: 25px; }
.nav-links a { font-weight: 600; color: var(--color-dark); transition: color 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--color-primary); }

.nav-toggle { display: none; } /* Hidden on desktop */

/* Cart link */
.cart-link { position: relative; }
.badge {
    background: var(--color-secondary);
    color: var(--color-dark);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.8rem;
    margin-left: 6px;
}

/* --- HERO SECTION --- */
.hero {
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('assets/images/hero_garage.jpg');
    background-size: cover;
    background-position: center;
    color: var(--color-white);
    min-height: 60vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: var(--header-height);
}

.hero-content { margin: 0 auto; }
.hero-title { font-size: 3rem; margin-bottom: 0.2em; }
.hero-subtitle { font-size: 1.2rem; margin-bottom: 1.5em; max-width: 600px; }
.hero-cta { display: flex; justify-content: center; gap: 15px; }

/* --- PAGE TITLES --- */
.page-title { font-size: 2.5rem; text-align: center; }
.page-subtitle { font-size: 1.1rem; text-align: center; margin-bottom: 40px; color: #555; }
.section-title { font-size: 2rem; text-align: center; margin-bottom: 40px; }


/* --- CARDS & GRIDS --- */
.card-grid, .product-grid, .team-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card, .product-card {
    background-color: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.card-img, .product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body, .product-card .btn { padding: 20px; }
.card-body { flex-grow: 1; }
.card-title { font-size: 1.25rem; }
.card-link { font-weight: 600; }
.product-name { font-size: 1.1rem; margin-bottom: 10px; }
.product-price { font-size: 1.2rem; font-weight: 700; color: var(--color-primary); margin-bottom: 15px; }
.featured-products .text-center { margin-top: 40px; }

/* --- SHOP PAGE LAYOUT --- */
.shop-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
}

/* Filters toggle (hidden on desktop) */
.filters-toggle { display: none; }

.shop-filters h3, .shop-filters h4 { margin-bottom: 15px; }
.filter-group { margin-bottom: 30px; }
.filter-list li { margin-bottom: 8px; }
.filter-options label { display: block; margin-bottom: 5px; }
.price-slider { width: 100%; }

/* --- FORMS (Booking & Contact) --- */
.booking-form-section { border-radius: 8px; }
.booking-form, .contact-form {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr 1fr;
    max-width: 800px;
    margin: 0 auto;
}
.contact-form { grid-template-columns: 1fr; }
.contact-layout .contact-form { grid-template-columns: 1fr 1fr; }

.form-group { display: flex; flex-direction: column; }
.full-width { grid-column: 1 / -1; }
.form-group label { margin-bottom: 5px; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-body);
}

/* --- ABOUT PAGE --- */
.text-content { max-width: 800px; margin: 0 auto; }
.text-content h2 { margin-top: 2em; }
.content-image { width: 100%; border-radius: 8px; margin-bottom: 2em; }
.team-member { text-align: center; }
.team-member img { border-radius: 50%; width: 150px; height: 150px; object-fit: cover; margin: 0 auto 15px; }
.team-member h4 { font-size: 1.1rem; }
.team-member p { color: #555; }

/* --- CONTACT PAGE --- */
.contact-layout {
    display: grid;
    gap: 40px;
    grid-template-columns: 1fr 1.5fr;
}
.contact-info h3 { margin-top: 20px; }
.contact-info p { margin-bottom: 10px; }


/* --- FOOTER --- */
.main-footer {
    background-color: var(--color-dark);
    color: var(--color-light);
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* --- SERVICES PAGE --- */
.service-details-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.service-detail-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

/* --- CART PAGE --- */
.cart-page {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 20px;
}
.cart-items { display: grid; gap: 15px; }
.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr 120px 120px 40px;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
}
.cart-item img { width: 100px; height: 100px; object-fit: cover; border-radius: 6px; }
.cart-item .item-name { font-weight: 600; }
.cart-item .item-price { font-weight: 700; color: var(--color-primary); }
.qty-control { display: flex; align-items: center; gap: 8px; }
.qty-control input { width: 60px; text-align: center; padding: 8px; }
.remove-btn { background: transparent; border: none; font-size: 1.2rem; cursor: pointer; color: #888; }
.remove-btn:hover { color: #333; }

.cart-summary {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
}
.summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-weight: 600; }

@media (max-width: 900px) {
  .cart-page { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 80px 1fr; grid-auto-rows: auto; }
  .cart-item .item-price, .qty-control, .item-subtotal, .remove-btn { margin-top: 8px; }
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 900px) {
    .shop-layout, .contact-layout {
        grid-template-columns: 1fr;
    }
    .booking-form {
        grid-template-columns: 1fr;
    }
    .booking-form .full-width { grid-column: auto; }
    .contact-layout .contact-form { grid-template-columns: 1fr; }

    /* Make filters collapsible on mobile */
    .filters-toggle { display: inline-block; margin-bottom: 16px; }
    .shop-filters { display: none; }
    .shop-filters.open { display: block; }
    .product-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}


@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--color-white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }
    .nav-links.active { transform: translateX(0); }
    .nav-links a { font-size: 1.5rem; }

    .nav-toggle {
        display: block;
        background: transparent;
        border: none;
        cursor: pointer;
        width: 30px;
        height: 30px;
        position: relative;
    }
    .hamburger, .hamburger::before, .hamburger::after {
        content: '';
        position: absolute;
        width: 30px;
        height: 3px;
        background: var(--color-dark);
        border-radius: 5px;
        transition: all 0.3s;
    }
    .hamburger { top: 13px; }
    .hamburger::before { top: -10px; }
    .hamburger::after { top: 10px; }

    .nav-toggle.active .hamburger { background: transparent; }
    .nav-toggle.active .hamburger::before { transform: rotate(45deg) translate(6px, 8px); }
    .nav-toggle.active .hamburger::after { transform: rotate(-45deg) translate(6px, -8px); }
    
    .hero-title { font-size: 2.2rem; }
    .hero-cta { flex-direction: column; align-items: center; }
}

/* Extra small screens */
@media (max-width: 480px) {
  :root { --header-height: 64px; }
  .brand-logo { font-size: 1.2rem; }
  .section-padding { padding: 36px 0; }
  .page-padding { padding-top: calc(var(--header-height) + 20px); padding-bottom: 36px; }
  .hero { min-height: 50vh; }
  .hero-title { font-size: 1.8rem; }
  .hero-subtitle { font-size: 1rem; }
  .card-img, .product-img { height: 150px; }
  .product-grid, .card-grid, .team-grid { gap: 16px; }
  .hero-cta .btn { width: 100%; max-width: 320px; }
  .lang-widget { position: static; }
}

/* --- LANGUAGE WIDGET --- */
.lang-widget { position: relative; margin-left: 12px; }
.lang-btn {
  background: transparent; border: 1px solid #ddd; border-radius: 20px;
  padding: 6px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.lang-btn:hover { background: #f7f7f7; }
.lang-menu {
  position: absolute; right: 0; top: 110%; background: #fff; border: 1px solid #eee; border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08); padding: 6px; display: none; min-width: 140px;
}
.lang-menu.active { display: block; }
.lang-menu button { width: 100%; text-align: left; padding: 8px 10px; background: transparent; border: none; cursor: pointer; }
.lang-menu button:hover { background: #f2f2f2; }

/* --- CHAT WIDGET --- */
.chat-toggle {
  position: fixed; right: 20px; bottom: 20px; z-index: 1200;
  background: var(--color-primary); color: #fff; border: none; border-radius: 50%; width: 56px; height: 56px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2); cursor: pointer; font-size: 22px;
}
.chat-window {
  position: fixed; right: 20px; bottom: 90px; z-index: 1200; width: 320px; max-width: 90vw;
  background: #fff; border: 1px solid #eee; border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  display: none; overflow: hidden;
}
.chat-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: var(--color-primary); color: #fff; }
.chat-body { max-height: 360px; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.chat-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #eee; }
.chat-input input { flex: 1; padding: 10px; border: 1px solid #ddd; border-radius: 6px; }
.chat-input button { padding: 10px 14px; border: none; background: var(--color-secondary); color: var(--color-dark); border-radius: 6px; cursor: pointer; }
.msg { padding: 8px 10px; border-radius: 8px; max-width: 80%; }
.msg.user { align-self: flex-end; background: #e8f4ff; }
.msg.bot { align-self: flex-start; background: #f5f5f5; }
