/* ==============================================================================
 * AUTHOR: Domenico Tomé
 * FILE LOCATION: /assets/css/style.css
 * DATABASE TABLES CONNECTED: N/A (Styling Document)
 * DATE WORKED ON: 2026-08-20
 * NOTES: 
 *   - Transformed color scheme from green to purple/black/white.
 *   - Ensured standard desktop navigation tabs remain visible and are NOT hidden.
 *   - Upgraded Footer to a premium white aesthetic with a purple top-border to accommodate white-background logos.
 * ============================================================================== */

/* CSS VARIABLES & RESET */
:root {
    --primary-white: #ffffff;
    --primary-black: #1a1a1a;
    --accent-purple: #8e44ad;
    --accent-purple-dark: #6c3483;
    --light-grey: #f4f4f4;
    --text-grey: #555555;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--primary-white);
    color: var(--primary-black);
    line-height: 1.6;
    overflow-x: hidden;
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; }

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

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    max-width: 1400px;
    margin: auto;
}

.logo {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.logo h1 {
    font-size: 1.8rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 2px;
}

.logo h1 span { color: var(--accent-purple); }
.logo p { font-size: 0.75rem; font-weight: bold; color: var(--text-grey); }

/* Standard desktop navigation visible by default */
nav ul {
    display: flex;
    gap: 25px;
}

nav a {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

nav a:hover, nav a.active { color: var(--accent-purple); }

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-count {
    background: var(--accent-purple);
    color: white;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 0.8rem;
}

/* MOBILE MENU TOGGLE - Hidden on desktop */
.menu-toggle { display: none; cursor: pointer; font-size: 1.5rem; }

/* PAGE VIEWS */
main { margin-top: 100px; min-height: 70vh; }
.page { animation: fadeIn 0.5s; }

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

/* HERO SLIDER (HOME) */
.hero {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--primary-black);
}

.slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
}

.slide.active { opacity: 0.6; }

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--primary-white);
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h2 { font-size: 3.5rem; margin-bottom: 20px; text-transform: uppercase; }
.hero-content p { font-size: 1.2rem; margin-bottom: 30px; }

.btn {
    background-color: var(--accent-purple);
    color: white;
    padding: 12px 30px;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
}

.btn:hover { background-color: var(--accent-purple-dark); transform: scale(1.05); }

/* SECTIONS */
.section { padding: 80px 5%; max-width: 1400px; margin: auto; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 40px; color: var(--primary-black); }
.section-title span { color: var(--accent-purple); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.two-col img { width: 100%; border-bottom: 5px solid var(--accent-purple); border-radius: 5px; }

/* HOME SERVICES 3-TILES */
.home-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

/* ROTATING MARQUEE (HOME) */
.marquee-wrapper {
    width: 100%;
    overflow: hidden;
    background: var(--light-grey);
    padding: 40px 0;
    white-space: nowrap;
    position: relative;
}
.marquee-content {
    display: inline-block;
    animation: marquee 25s linear infinite;
}
.marquee-content:hover {
    animation-play-state: paused;
}
.marquee-content img {
    height: 200px;
    width: 300px;
    object-fit: cover;
    margin: 0 15px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* PRODUCTS PAGE & SHOP EFFECTS */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--light-grey);
    border: 2px solid transparent;
    padding: 8px 20px;
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--primary-white);
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.product-card img { width: 100%; height: 200px; object-fit: cover; }
.product-info { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.product-info h3 { font-size: 1.2rem; margin-bottom: 10px; }
.product-info p { color: var(--text-grey); font-size: 0.9rem; margin-bottom: 15px; flex-grow: 1; }
.product-price { font-size: 1.3rem; font-weight: bold; color: var(--accent-purple); margin-bottom: 15px; }
.btn-add { width: 100%; background: var(--primary-black); }
.btn-add:hover { background: var(--accent-purple); }

/* SERVICES PAGE (MAIN TILES) */
.services-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 40px; 
}
.service-card { 
    background: var(--primary-white); 
    border: 1px solid #eee; 
    border-top: 4px solid var(--accent-purple); 
    border-radius: 8px; 
    overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.service-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.service-card-content {
    padding: 25px 20px;
    text-align: left;
    flex-grow: 1;
}
.service-card-content h3 { 
    margin-bottom: 15px; 
    font-size: 1.4rem; 
}
.service-card-content p {
    color: var(--text-grey);
    font-size: 0.95rem;
}

/* SERVICES COMPACT SECTION (2 TOP, 1 WIDE BOTTOM) */
.compact-services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}
.compact-card {
    padding: 30px 25px;
    background: var(--primary-white);
    border: 1px solid #eee;
    border-bottom: 4px solid var(--accent-purple); 
    border-radius: 8px;
    text-align: center; 
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.compact-card:nth-child(3) {
    grid-column: 1 / -1; 
}
.compact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.compact-card h4 {
    color: var(--primary-black);
    font-size: 1.4rem;
    margin-bottom: 15px;
}
.compact-card p {
    color: var(--text-grey);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* CONTACT PAGE */
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 15px; border: 1px solid #ccc; font-family: inherit; }
.contact-form textarea { height: 150px; resize: none; }

/* QUOTE CART MODAL */
.cart-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 2000;
    display: none; justify-content: flex-end;
}
.cart-overlay.active { display: flex; }
.cart-modal {
    width: 100%; max-width: 450px; background: var(--primary-white); height: 100%;
    padding: 30px; display: flex; flex-direction: column; transform: translateX(100%);
    animation: slideIn 0.3s forwards;
}
@keyframes slideIn { to { transform: translateX(0); } }
.cart-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--light-grey); padding-bottom: 15px; margin-bottom: 20px; }
.close-cart { cursor: pointer; font-size: 1.5rem; font-weight: bold; }
.cart-items { flex-grow: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 10px; background: var(--light-grey); }
.cart-item-info h4 { font-size: 0.9rem; }
.cart-qty { display: flex; align-items: center; gap: 10px; }
.qty-btn { background: var(--primary-black); color: white; border: none; width: 25px; height: 25px; cursor: pointer; }

/* CART FORM STYLES */
.cart-form {
    margin-top: 20px;
    border-top: 2px solid var(--light-grey);
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.quote-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 0.9rem;
}
.cart-footer { border-top: 2px solid var(--light-grey); padding-top: 20px; margin-top: 20px; }

/* CART SUCCESS VIEW STYLES */
.cart-success-view {
    display: none;
    text-align: center;
    flex-direction: column;
    height: 100%;
    justify-content: center;
}
.cart-success-view img {
    max-height: 80px;
    margin: 0 auto 20px;
}
.cart-success-view h2 {
    color: var(--accent-purple);
    margin-bottom: 10px;
    font-size: 2.2rem;
}
.cart-success-view p {
    margin-bottom: 20px;
    color: var(--text-grey);
}
.success-items-box {
    text-align: left;
    background: var(--light-grey);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-size: 0.95rem;
    max-height: 250px;
    overflow-y: auto;
}

/* COOKIE CONSENT */
.cookie-popup {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: var(--primary-black);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    transition: bottom 0.5s ease-in-out;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.2);
}
.cookie-popup.show {
    bottom: 0;
}
.cookie-popup p { font-size: 0.9rem; max-width: 800px; }
.cookie-popup .btn { padding: 8px 20px; font-size: 0.9rem; margin-left: 20px; }

/* =========================================
   FOOTER (UPDATED FOR WHITE BACKGROUND LOGO)
   ========================================= */
footer { 
    background: var(--primary-white); 
    color: var(--primary-black); 
    padding: 60px 5% 20px; 
    border-top: 5px solid var(--accent-purple); 
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; max-width: 1400px; margin: auto; }
.footer-col h3 { color: var(--accent-purple); margin-bottom: 20px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li { color: var(--primary-black); font-weight: 500; transition: var(--transition); }
.footer-col ul li:hover, .footer-col ul li a:hover { color: var(--accent-purple); }
.footer-col p { color: var(--text-grey); font-size: 0.95rem; margin-bottom: 10px; }
.footer-bottom { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid #eee; color: var(--text-grey); font-size: 0.9rem; }

/* RESPONSIVE DESIGN */
@media(max-width: 900px) {
    .two-col { grid-template-columns: 1fr; }
    .hero-content h2 { font-size: 2.5rem; }
    
    .compact-services-grid {
        grid-template-columns: 1fr;
    }
    .compact-card:nth-child(3) {
        grid-column: auto; 
    }
}

@media(max-width: 768px) {
    .section-title { font-size: 2rem; }
    
    .section-title span.stack-mobile { display: block; }
    
    nav ul {
        display: none; flex-direction: column; position: absolute;
        top: 100%; 
        left: 0; width: 100%; background: var(--primary-white);
        padding: 20px; box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        border-top: 1px solid #eee; 
    }
    nav ul.active { display: flex; }
    .menu-toggle { display: block; }
    .nav-container { padding: 15px 20px; }
    .cookie-popup { flex-direction: column; text-align: center; gap: 15px; }
    .cookie-popup .btn { margin-left: 0; }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}