/* ========================================
   HOMEPAGE.CSS - HOMEPAGE SPECIFIC STYLES
   Desert Diamond Auto Detailing
   ======================================== */

/* --- FIXED NAVIGATION (Homepage Only) --- */
header.fixed-nav {
    background: rgba(18, 18, 18, 0.95);
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    border-bottom: 1px solid #333;
    position: fixed; /* Ensures it stays at the top of the viewport */
    top: 0;
    left: 0;
    transition: transform 0.3s ease-in-out; /* This makes it slide smoothly */
}
/* The class the JS will toggle */
header.fixed-nav.nav-hidden {
    transform: translateY(-100%); /* Slides the header up out of view */
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1601362840469-51e4d8d58785?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
    margin-top: 17.5vh;
}

.hero-content p {
    font-size: 1.15rem;
    margin: 12px 0px;
    color: #ffa4d2;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.82), 0 0 15px rgba(0, 0, 0, 0.82);
}

/* --- SERVICES GRID (Homepage) --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--gray);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: 0.3s;
    border: 1px solid #333;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.service-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

/* --- BEFORE & AFTER (Simple Hover) --- */
.ba-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.ba-card {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--primary);
}

.ba-img {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background-size: cover;
    background-position: center;
}

.label {
    position: absolute;
    top: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    font-weight: bold;
    font-size: 0.8rem;
    z-index: 2;
}

.label-before { 
    left: 10px; 
    background: #ff4444; 
}

.label-after { 
    right: 10px; 
    background: var(--primary); 
    color: black; 
}

.ba-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}

.ba-half {
    width: 50%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.ba-half img {
    width: 200%;
    height: 100%;
    max-width: none;
    position: absolute;
}

.ba-half:first-child img { 
    left: 0; 
}

.ba-half:last-child img { 
    left: -100%; 
}

/* --- BEFORE & AFTER SLIDER (Interactive) --- */
.comparison-section {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 50px auto;
    border: 4px solid var(--primary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.comparison-container {
    position: relative;
    width: 100%;
    height: 450px;
}

.img-background {
    position: absolute;
    top: 0;
    left: 0%;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.img-foreground {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 75%;
    background-size: cover;
    background-position: center;
    border-right: 3px solid white;
    overflow: hidden;
}

.slider-range {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: ew-resize;
    z-index: 10;
    margin: 0;
}

.slider-label {
    position: absolute;
    top: 20px;
    padding: 5px 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    pointer-events: none;
    border-radius: 4px;
}

.label-before { 
    left: 20px; 
    z-index: 5; 
}

.label-after { 
    right: 20px; 
    z-index: 4; 
}

.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    color: var(--dark);
}

/* --- GALLERY GRID (Homepage) --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-item {
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.gallery-item video {
    border-radius: .75rem;
    width: 100%;
    object-fit: cover;
    transition: transform .2s;
}

.gallery-item:hover img { 
    transform: scale(1.1); 
    transition: 0.5s; 
}

.play-icon {
    position: absolute;
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    opacity: 0.8;
}

/* --- SHOP SECTION --- */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    justify-items: center;
}

.product-card {
    background: #fff;
    color: var(--dark);
    border-radius: 10px;
    overflow: hidden;
}

.product-img {
    background: linear-gradient(125deg, #555152, #222025);
    display: flex;
    justify-content: center;
}

.product-info { 
    padding: 25px 15px; 
    text-align: center; 
}

.product-price { 
    font-weight: bold; 
    color: var(--primary); 
    font-size: 1.2rem; 
    display: block; 
    margin: 10px 0; 
}

.btn-shop {
    background: var(--dark);
    color: white;
    padding: 9px 15px;
    font-size: 0.9rem;
    border-radius: 4px;
}

/* --- BOOKING SECTION --- */
.booking-embed-area {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

/* --- MOBILE RESPONSIVE (Homepage Specific) --- */
@media (max-width: 768px) {
    .hero-content h1 { 
        font-size: 2.25rem; 
    }
    .hero-content p { font-size: 1rem; }
    .comparison-container {
        height: 300px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .shop-grid {
        grid-template-columns: 1fr;
    }
}

.booking-hidden {
    display: none;
}

.booking-visible {
    display: flex;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}