/* 
   CSS FILE: "The Designer"
   Here we define colors, animations, and how things are positioned.
*/

:root {
    /* Maysan Laundry Shop Colors */
    --bg-color: #160f12;
    --text-color: #ffffff;
    --accent-purple: #ce6c3d; /* Changed to Orange/Rust */
    --accent-blue: #51bde4;   /* Changed to Light Blue */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Additional Palette Colors */
    --accent-lightblue: #87cde0;
    --accent-darkblue: #335c75;
    --accent-peach: #dc9a7d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif; /* Applying the Google Font */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- ANIMATED BUBBLES BACKGROUND --- */
.stars {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    z-index: -2;
    /* Changed background to the dark blue from your palette */
    background: var(--accent-darkblue); 
    background-image: 
        radial-gradient(var(--accent-blue) 4px, transparent 6px),
        radial-gradient(var(--accent-lightblue) 6px, transparent 8px),
        radial-gradient(rgba(255,255,255,0.4) 8px, transparent 12px),
        radial-gradient(var(--accent-peach) 5px, transparent 8px);
    /* Made the repeating pattern larger so the bubbles feel bigger and more spread out */
    background-size: 300px 300px, 450px 450px, 250px 250px, 350px 350px; 
    background-position: 0 0, 40px 60px, 130px 270px, 70px 100px;
    animation: drift 15s linear infinite; /* Slightly faster drift */
    opacity: 0.85; /* Increased opacity to make them much more visible */
}

/* This animation makes the bubbles slowly float up */
@keyframes drift {
    from { background-position: 0 0, 40px 60px, 130px 270px, 70px 100px; }
    to { background-position: 0 -200px, 40px -290px, 130px -130px, 70px -150px; }
}

/* --- NAVIGATION BAR --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    /* Glassmorphism effect: semi-transparent with a blur behind it */
    background: rgba(5, 5, 16, 0.5);
    backdrop-filter: blur(10px); 
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
}

.logo-img {
    height: 80px; /* Resize the logo to fit the navigation bar */
    width: auto;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3)); /* Adds a subtle glow behind it */
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05); /* Slightly enlarges when hovered over */
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 300;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-blue); /* Changes color when you hover over it */
}

/* --- CART DISPLAY --- */
.cart-display {
    color: var(--accent-blue);
    font-weight: 700;
    margin-left: 2rem;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-bounce {
    transform: scale(1.4);
    color: var(--accent-purple);
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    position: relative;
}

/* This creates a large, blurry purple glow behind the text */
.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 60%);
    opacity: 0.15;
    top: 20%; left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: -1;
    filter: blur(60px);
    animation: pulse 8s infinite alternate;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.15; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.25; }
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1.5s ease-out; /* Fades in smoothly when page loads */
}

h1 {
    font-size: 5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

p {
    font-size: 1.2rem;
    font-weight: 300;
    color: #b0b0c0;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* --- CALL TO ACTION BUTTON --- */
.cta-button {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(45deg, var(--accent-purple), #5e60ce);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.4);
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px); /* Moves up slightly */
    box-shadow: 0 0 30px rgba(0, 245, 212, 0.6); /* Glows blue */
    background: linear-gradient(45deg, #5e60ce, var(--accent-blue));
}

/* --- WASH NOW ANIMATION --- */
/* The Javascript class added when clicked */
.warp-speed {
    animation: washCycle 0.8s forwards; 
    pointer-events: none; 
}

@keyframes washCycle {
    0% { transform: scale(1) rotate(0deg); opacity: 1; filter: blur(0); border-radius: 50px; }
    20% { transform: scale(0.9) rotate(-10deg); filter: blur(2px); border-radius: 50%; background: var(--accent-blue); } 
    40% { transform: scale(1.1) rotate(10deg); filter: blur(4px); border-radius: 50%; background: var(--accent-lightblue); }
    80% { transform: scale(0.5) rotate(360deg) translateY(-50px); filter: opacity(0.5) blur(6px); border-radius: 50%; } 
    100% { transform: scale(0) rotate(720deg) translateY(-100px); opacity: 0; filter: blur(10px); } 
}

/* --- FEATURES SECTION (CARDS) --- */
.features {
    display: grid;
    /* This makes sure the cards align side-by-side or stack on small screens */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 5rem 10%;
    position: relative;
    z-index: 10;
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: transform 0.4s ease, border-color 0.4s ease;
    cursor: pointer;
}

/* Animations for when you hover a mouse over the cards */
.card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 245, 212, 0.1);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.3));
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-blue);
}

/* --- ADD TO CART BUTTON --- */
.add-to-cart-btn {
    margin-top: 1.5rem;
    padding: 0.6rem 1.5rem;
    background: transparent;
    color: var(--accent-blue);
    border: 2px solid var(--accent-blue);
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
    background: var(--accent-blue);
    color: var(--bg-color);
    box-shadow: 0 0 15px rgba(0, 245, 212, 0.4);
}

.price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-top: 1rem;
}

/* --- SLIDE OUT CART MENU --- */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px; /* Start hidden off-screen to the right */
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: rgba(10, 10, 25, 0.95);
    backdrop-filter: blur(15px);
    border-left: 1px solid var(--accent-purple);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}

/* This class is added by JS to slide it in */
.cart-sidebar.open {
    right: 0; 
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.cart-header h2 {
    color: var(--accent-blue);
    font-size: 1.8rem;
}

.close-cart {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-cart:hover {
    color: #ff4757;
}

.cart-items {
    flex: 1; /* Takes up remaining space */
    padding: 2rem;
    overflow-y: auto;
}

.empty-cart-msg {
    text-align: center;
    color: #888;
    font-style: italic;
    margin-top: 2rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.cart-item-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.cart-item-price {
    color: var(--accent-blue);
    font-weight: bold;
}

.cart-footer {
    padding: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(45deg, var(--accent-purple), var(--accent-blue));
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(157, 78, 221, 0.4);
}

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



/* --- FOOTER --- */
footer {
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid var(--glass-border);
    padding: 4rem 10% 2rem;
    color: var(--text-color);
    position: relative;
    z-index: 10;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h3 {
    color: var(--accent-peach);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    color: #a0a0b0;
    line-height: 1.6;
}

.footer-section a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--accent-purple);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #6a6a80;
    font-size: 0.9rem;
}

/* Mobile Responsiveness: Adjusting sizes for phone screens */
@media (max-width: 768px) {
    h1 { font-size: 3rem; }
    .nav-links { display: none; } /* Hides links on small screens for simplicity */
}
