:root {
    --bg-color: #f7f9fa; 
    --bg-white: #ffffff;
    --text-dark: #111827;
    --text-gray: #6b7280;
    --text-light-gray: #9ca3af;
    --accent-blue: #2563eb;
    --accent-blue-hover: #1d4ed8;
    --border-color: #e5e7eb;
    --tag-bg: #f3f4f6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --btn-red: #ff0000;
    --btn-red-hover: #cc0000;
    --tag-oe-bg: #ff0000;
    --tag-oe-text: #ffffff;
    --tag-front-bg: #06e0d4; /* Turquoise */
    --tag-front-text: #ffffff;
    --tag-rear-bg: #9c27b0; /* Purple for Rear */
    --tag-rear-text: #ffffff;
    --tag-allround-bg: #3ba3ff; /* Blue */
    --tag-allround-text: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    overflow-x: hidden;
    line-height: 1.5;
}

/* Full Width Sections */
.section { padding: 60px 0; background-color: var(--bg-color); }

.config-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr); 
    gap: 40px;
    align-items: start !important; /* Aligns content to top per user request */
    padding-left: 5%; 
}

.config-info {
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start !important; /* Align to top */
    align-self: flex-start !important;
    padding-top: 16px;
}

.config-title { font-size: 1.8rem; font-weight: 700; color: var(--text-dark); margin-bottom: 15px; line-height: 1.2; }
.config-desc { font-size: 1rem; color: var(--text-gray); margin-bottom: 25px; line-height: 1.6; }

.view-all-link { color: var(--accent-blue); text-decoration: none; font-weight: 600; font-size: 0.95rem; display: inline-flex; align-items: center; gap: 5px; width: fit-content; }
.view-all-link:hover { text-decoration: underline; }

/* Horizontal Scroll Grids */
.config-carousel { min-width: 0; }

.horizontal-scroll-container { 
    display: flex; 
    overflow-x: auto; 
    gap: 24px; 
    padding-bottom: 24px; 
    padding-right: 5%; 
    scroll-snap-type: x mandatory; 
    scrollbar-width: none; 
}
.horizontal-scroll-container::-webkit-scrollbar { display: none; }

/* Card Setup - Updated */
.tyre-card { 
    background-color: var(--bg-white); 
    border: 1px solid var(--border-color); 
    border-radius: 12px; 
    display: flex; 
    flex-direction: column; 
    transition: all 0.3s ease; 
    box-shadow: var(--shadow-sm); 
    position: relative; 
    overflow: hidden;
}
.tyre-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #cbd5e1; }
.horizontal-scroll-container .tyre-card { flex: 0 0 320px; scroll-snap-align: start; }

/* Black Bar at top of image */
.card-top-bar {
    background-color: #000;
    height: 16px;
    margin: 16px 16px 0 16px;
    border-radius: 8px 8px 0 0;
}

.card-img-container { 
    width: 100%; 
    height: 280px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin-bottom: 16px; 
    position: relative; 
    padding: 0 1rem;
}
.card-img-container img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }

/* Dynamic Tags Layout */
.card-tags {
    display: flex;
    gap: 8px;
    padding: 0 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.oe-tag { background-color: var(--tag-oe-bg); color: var(--tag-oe-text); font-size: 0.75rem; font-weight: 600; padding: 4px 12px; border-radius: 9999px; }
.tag-front { background-color: var(--tag-front-bg) !important; color: var(--tag-front-text) !important; font-size: 0.75rem; font-weight: 600; padding: 4px 12px; border-radius: 9999px; border: none !important;}
.tag-rear { background-color: var(--tag-rear-bg) !important; color: var(--tag-rear-text) !important; font-size: 0.75rem; font-weight: 600; padding: 4px 12px; border-radius: 9999px; border: none !important;}
.tag-allround { background-color: var(--tag-allround-bg) !important; color: var(--tag-allround-text) !important; font-size: 0.75rem; font-weight: 600; padding: 4px 12px; border-radius: 9999px; border: none !important;}

.card-content { display: flex; flex-direction: column; flex-grow: 1; padding: 0 24px 24px 24px;}

/* Typography Layout */
.tyre-size-title { font-size: 1.5rem; font-weight: 700; color: #1e3a8a; margin-bottom: 4px; line-height: 1.2; }
.tyre-size-label { font-size: 0.85rem; color: var(--text-light-gray); margin-bottom: 16px; }

.brand-name { font-size: 1rem; color: var(--text-dark); font-weight: 700; margin-bottom: 4px; }
.tyre-model-desc { font-size: 0.9rem; color: var(--text-light-gray); }

.card-footer { margin-top: auto; display: flex; flex-direction: column; padding: 20px 24px; border-top: 1px solid var(--border-color); }
.price-container { display: flex; align-items: baseline; gap: 6px; margin-bottom: 16px; }
.price { font-size: 1.5rem; font-weight: 700; color: var(--text-dark); line-height: 1.2; }
.price-label { font-size: 0.85rem; color: var(--text-gray); }

/* Full Width Add to Cart Button */
.btn-add-full { 
    background-color: var(--btn-red); 
    color: white; 
    border: none; 
    width: 100%; 
    padding: 12px; 
    border-radius: 8px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.2s; 
}
.btn-add-full:hover { background-color: var(--btn-red-hover); }
.btn-add-full svg { width: 18px; height: 18px; }

/* Filter Controls */
.filter-section { padding: 40px 5%; }
.filter-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 30px; 
    width: 100%;
}
.filter-header .config-title { margin-bottom: 0; }

.filter-controls { display: flex; gap: 12px; background: #e2e8f0; padding: 6px; border-radius: 12px; width: fit-content; }
.filter-btn { background: transparent; color: var(--text-gray); border: none; padding: 10px 24px; cursor: pointer; border-radius: 8px; font-weight: 600; font-size: 0.95rem; transition: all 0.2s ease; }
.filter-btn:hover { color: var(--text-dark); }
.filter-btn.active { background: var(--bg-white); color: var(--text-dark); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

/* All Tyres Grid */
.all-tyres-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }

/* New Hero CSS - 50/50 Spacing */
.hero-banner {
    background-color: #2b333a; 
    border-radius: 30px;
    margin: 40px 5%;
    padding: 50px 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    overflow: hidden;
    position: relative;
}
.hero-content {
    position: relative;
    z-index: 2;
    padding-right: 40px;
}
.hero-badge {
    background-color: var(--btn-red);
    color: white;
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 20px;
}
.hero-content h1 {
    color: white;
    font-size: 3rem; /* Increased size for variant/model title */
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    max-width: 12ch; /* Helps enforce a 4-word break strategy based on avg word length */
}
.hero-content p {
    color: #9ca3af;
    font-size: 1rem; 
    line-height: 1.5;
    margin-bottom: 30px;
    max-width: 90%;
}
.hero-features {
    display: flex;
    gap: 20px;
    color: #9ca3af;
    font-size: 0.85rem;
}
.hero-features span {
    display: flex;
    align-items: center;
    gap: 8px;
}
.hero-features .dot {
    color: var(--btn-red);
    font-size: 1.5rem;
    line-height: 0;
}
.hero-image {
    position: relative;
    z-index: 1;
    text-align: center; /* Center horizontally within its column */
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-image img {
    width: auto;
    max-width: 90%; /* Fits and contains within the column, does not touch container */
    max-height: 100%;
    object-fit: contain; /* Enforces contain logic */
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.4));
}

/* Responsive */
@media (max-width: 1024px) { 
    .config-grid { grid-template-columns: 1fr; padding-right: 5%; gap: 20px; }
    .config-info { padding-right: 0; max-width: 600px; }
    .filter-header { flex-direction: column; align-items: flex-start; gap: 20px; }
    .hero-banner { grid-template-columns: 1fr; padding: 40px; text-align: center; }
    .hero-content { padding-right: 0; }
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content p { margin: 0 auto 30px; }
    .hero-features { justify-content: center; flex-wrap: wrap; }
    .hero-image img { max-width: 100%; margin-right: 0; margin-top: 30px; }
}
@media (max-width: 768px) { 
    .horizontal-scroll-container .tyre-card { flex: 0 0 280px; } 
    .filter-controls { width: 100%; flex-wrap: wrap; justify-content: flex-start; } 
    .filter-btn { flex: 1 1 auto; text-align: center; } 
    .hero-banner { padding: 30px 20px; margin: 20px 5%; border-radius: 20px; }
}