/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Main Theme Colors */
:root {
    --primary: #D32F2F;    /* Automotive Red */
    --secondary: #212529;  /* Dark Grey/Black */
    --accent: #FFC107;     /* Amber for CTAs */
    --light: #ffffff;
    --dark: #1a1a1a;
    --gray: #6c757d;
    --light-gray: #f8f9fa;
    --dark-overlay: rgba(0, 0, 0, 0.7);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    line-height: 1.7;
}

/* =========================================
   FORCE WHITE TEXT ON DARK AREAS
   ========================================= */

/* 1. Navbar/Header Links */
.navbar-dark .navbar-nav .nav-link,
.navbar-dark .navbar-brand {
    color: #ffffff !important;
}
.navbar-dark .navbar-nav .nav-link:hover {
    color: #FFC107 !important; /* Yellow on hover */
}

/* 2. Hero Section / Banner Text */
.hero-section h1, 
.hero-section p,
.banner-text h1,
.banner-text p {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8); /* Black shadow for readability */
}

/* 3. Buttons Text */
.btn-primary, 
.btn-danger, 
.btn-dark {
    color: #ffffff !important;
}

/* 4. Footer Text */
footer, 
footer h5, 
footer p, 
footer a,
footer li {
    color: #ffffff !important;
}

footer a:hover {
    color: #FFC107 !important;
    text-decoration: none;
}

/* 5. Card Text (If background is dark) */
.bg-dark .card-title, 
.bg-dark .card-text {
    color: #ffffff !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.5rem; }

p {
    margin-bottom: 1.5rem;
    color: #555;
    font-size: 1.05rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #b71c1c;
    text-decoration: none;
}

/* Section Title */
.section-title {
    position: relative;
    margin-bottom: 3rem;
}

.section-title .title-divider {
    width: 80px;
    height: 3px;
    background: var(--primary);
    margin: 0 auto;
    position: relative;
}

.section-title .title-divider::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 3px;
    background: var(--accent);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Hero Section */
.hero-section {
    position: relative;
    background: url('https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?q=80&w=1920&auto=format&fit=crop') no-repeat center center/cover;
    min-height: 90vh;
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4));
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-section .btn {
    padding: 0.8rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.hero-section .btn-danger {
    background-color: var(--primary);
    border-color: var(--primary);
}

.hero-section .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Category Cards */
.category-card {
    background: #fff;
    border-radius: 10px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: rgba(211, 47, 47, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    background: var(--primary);
    color: #fff;
    transform: rotateY(180deg);
}

.category-icon i {
    font-size: 2rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.category-card:hover .category-icon i {
    color: #fff;
}

.category-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--secondary);
}

.category-card p {
    color: #6c757d;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Product Cards */
.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

.product-badge .badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-img {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.product-img img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    padding: 1.5rem;
    transition: all 0.5s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-actions {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 3;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateY(10px);
}

.product-card:hover .product-actions {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-action {
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    background: #fff;
    border: none;
    border-radius: 50%;
    color: #333;
    margin-bottom: 0.5rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-action:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
}

.product-info {
    padding: 1.25rem;
    background: #fff;
}

.product-category {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title a {
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a:hover {
    color: var(--primary);
}

.price {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
}

.rating {
    color: #ffc107;
    font-size: 0.9rem;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section p {
        font-size: 1.1rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        min-height: 80vh;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .category-card {
        margin-bottom: 1.5rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Add animation delays */
.animate-delay-1 { animation-delay: 0.2s; }
.animate-delay-2 { animation-delay: 0.4s; }
.animate-delay-3 { animation-delay: 0.6s; }

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Header Styles */
.navbar {
    background-color: var(--dark) !important;
    padding: 0.8rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--light) !important;
}

.nav-link {
    color: var(--light) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.2rem;
    border-radius: 4px;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Search Bar */
.search-form {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.search-form .form-control {
    border-radius: 20px;
    padding: 0.5rem 1.5rem;
    border: none;
}

.search-form .btn {
    border-radius: 20px;
    padding: 0.5rem 1.5rem;
    margin-left: -40px;
    background-color: var(--primary);
    border: none;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/hero-bg.jpg') no-repeat center center/cover;
    color: var(--light);
    padding: 6rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    border-radius: 25px;
    padding: 0.6rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #b71c1c;
    border-color: #b71c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Product Cards */
.product-card {
    background: var(--light);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-img {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0.5rem 0;
}

/* Category Boxes */
.category-box {
    background: var(--light);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.category-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.category-box i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.category-box h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Product Details */
.product-detail-img {
    background: var(--light-grey);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
}

.product-detail-img img {
    max-width: 100%;
    height: auto;
}

.product-detail-info {
    padding: 0 2rem;
}

.product-detail-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark);
}

.product-detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1.5rem 0;
}

.quantity-input {
    width: 100px;
    text-align: center;
    margin: 1rem 0;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Footer */
.footer {
    background-color: var(--dark);
    color: var(--light);
    padding: 4rem 0 0;
    margin-top: 4rem;
}

.footer h5 {
    color: var(--light);
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer h5::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary);
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li {
    margin-bottom: 0.8rem;
}

.footer ul li a {
    color: #bbb;
    transition: all 0.3s ease;
}

.footer ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.contact-info i {
    color: var(--primary);
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.copyright {
    background-color: #222;
    padding: 1.5rem 0;
    margin-top: 3rem;
    text-align: center;
    color: #aaa;
    font-size: 0.9rem;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .search-form {
        margin: 1rem 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .product-detail-info {
        margin-top: 2rem;
        padding: 0;
    }
}

@media (max-width: 767.98px) {
    .hero {
        padding: 4rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .product-card {
        margin-bottom: 1.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}
