/* =========================================
   ROVER MART - GLOBAL STYLES (css/global.css)
   ========================================= */

/* --- VARIABLES (Color Theme) --- */
:root { 
    --primary: #0056b3;        /* Professional Trust Blue */
    --primary-dark: #003d82;   /* Darker Blue for hover */
    --secondary: #2C3E50;      /* Dark Navy for Text/Footer */
    --bg-color: #f4f6f9;       /* Light Grayish Background */
    --white: #ffffff; 
    --text-dark: #212529; 
    --border-color: #e9ecef;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* --- BASE STYLES --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Poppins', sans-serif; 
}

body { 
    background-color: var(--bg-color); 
    color: var(--text-dark); 
    overflow-x: hidden; 
    line-height: 1.6; 
}

h1, h2, h3, .logo { 
    font-family: 'Playfair Display', serif; 
}

a { 
    text-decoration: none; 
}

/* --- GLOBAL BUTTONS --- */
.btn-primary { 
    padding: 12px 35px; 
    background: var(--primary); 
    color: var(--white); 
    font-weight: 600; 
    border-radius: 5px; 
    transition: 0.3s ease; 
    border: 2px solid var(--primary); 
    display: inline-block;
    cursor: pointer;
}

.btn-primary:hover { 
    background: transparent; 
    color: var(--primary); 
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    padding: 12px 35px;
    border: 2px solid var(--primary);
    border-radius: 5px;
    font-weight: 600;
    transition: 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

/* =========================================
   NAVBAR (HEADER)
   ========================================= */
.navbar { 
    background: rgba(255, 255, 255, 0.98); 
    backdrop-filter: blur(10px); 
    padding: 15px 5%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.08); 
}

.nav-left { display: flex; align-items: center; gap: 15px; }
.menu-toggle { display: none; font-size: 24px; color: var(--text-dark); cursor: pointer; }

/* Desktop Navigation */
.nav-center ul { list-style: none; display: flex; gap: 30px; align-items: center; }
.nav-center ul li a { color: var(--text-dark); font-weight: 500; font-size: 15px; transition: 0.3s; }
.nav-center ul li a:hover, .nav-center ul li a.active { color: var(--primary); }
.mobile-header, .mobile-admin-link { display: none; }

.nav-right { display: flex; align-items: center; gap: 20px; }

.search-btn { font-size: 20px; color: var(--text-dark); cursor: pointer; transition: 0.3s; }
.search-btn:hover { color: var(--primary); }

.cart-btn { 
    position: relative; 
    cursor: pointer; 
    font-size: 22px; 
    color: var(--text-dark);
    transition: 0.3s; 
    display: flex;
    align-items: center;
}
.cart-btn:hover { color: var(--primary); }

.cart-count {
    position: absolute; top: -8px; right: -10px; 
    background: #ff4757; color: white; font-size: 0.7rem; font-weight: bold; 
    padding: 2px 6px; border-radius: 50%; border: 2px solid #fff;
}

/* =========================================
   SEARCH OVERLAY (Live Search UI)
   ========================================= */
/* HTML element should have display: none inline to prevent load flash */
.search-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px);
    z-index: 2005; justify-content: center; align-items: flex-start;
    padding-top: 80px; opacity: 0; transition: opacity 0.3s ease;
}

.search-overlay.active { opacity: 1; }

.search-container { 
    width: 90%; max-width: 650px; display: flex; flex-direction: column; gap: 10px; 
    transform: translateY(-20px); transition: transform 0.3s ease;
}

.search-overlay.active .search-container { transform: translateY(0); }

.search-input-wrapper { position: relative; width: 100%; display: flex; align-items: center; }
.search-icon-inside { position: absolute; left: 20px; font-size: 1.2rem; color: var(--primary); }
#searchInput { 
    width: 100%; padding: 18px 55px 18px 50px; font-size: 1.1rem; 
    border: 2px solid var(--primary); border-radius: 8px; outline: none; 
    box-shadow: 0 10px 25px rgba(0, 86, 179, 0.15); background: #fff; 
}

.close-search { 
    position: absolute; right: 20px; background: none; border: none; 
    font-size: 24px; color: #555; cursor: pointer; transition: 0.2s; 
}
.close-search:hover { color: red; transform: scale(1.1); }

/* Search Results Styling */
.search-results { 
    max-height: 60vh; overflow-y: auto; background: #fff; 
    border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); display: flex; flex-direction: column;
}
.search-results::-webkit-scrollbar { width: 5px; }
.search-results::-webkit-scrollbar-thumb { background: #ccc; border-radius: 5px; }

.search-item { 
    display: flex; align-items: center; gap: 15px; padding: 15px; 
    border-bottom: 1px solid var(--border-color); text-decoration: none; 
    color: var(--text-dark); transition: 0.2s; 
}
.search-item:hover { background: #f8fbff; padding-left: 20px; border-left: 4px solid var(--primary); }
.search-item img { width: 50px; height: 50px; border-radius: 5px; object-fit: contain; background: #f4f4f4; border: 1px solid #eee; }
.search-item-info h4 { font-size: 1rem; margin-bottom: 2px; color: #333; }
.search-item-info p { color: var(--primary); font-weight: 700; font-size: 0.95rem; }
.no-results { padding: 20px; text-align: center; color: #666; font-weight: 500; }

/* =========================================
   FOOTER
   ========================================= */
footer { background-color: var(--secondary); padding: 70px 5% 30px; color: var(--white); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; max-width: 1200px; margin: 0 auto 40px; }
.footer-col h3 { font-size: 20px; margin-bottom: 20px; color: var(--white); position: relative; padding-bottom: 10px; }
.footer-col h3::after { content: ''; position: absolute; left: 0; bottom: 0; width: 40px; height: 3px; background: var(--primary); }
.footer-col a, .footer-col p { display: block; color: #b3c0cc; margin-bottom: 12px; transition: 0.3s; }
.footer-col a:hover { color: #fff; transform: translateX(5px); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 25px; text-align: center; color: #b3c0cc; font-size: 14px; display: flex; justify-content: space-between; max-width: 1200px; margin: 0 auto; flex-wrap: wrap; gap: 15px; }
.footer-bottom a { color: #fff; font-weight: 600; }

/* =========================================
   FLOATING ACTIONS (Call/WhatsApp)
   ========================================= */
.action-float { transition: 0.3s ease; }
.action-float:hover { transform: translateY(-3px) scale(1.05); }

/* =========================================
   MOBILE RESPONSIVE (Global elements)
   ========================================= */
.bottom-nav { display: none; }

@media (max-width: 768px) {
    body { padding-bottom: 70px; } /* Space for bottom nav */

    .navbar { padding: 12px 15px; } 
    .logo { font-size: 20px; } 
    .menu-toggle { display: block; } 
    .nav-right { gap: 15px; } 
    
    /* Smooth Mobile Menu Slide */
    .nav-center { 
        position: fixed; top: 0; left: -100%; width: 280px; height: 100vh; 
        background: var(--white); padding: 0; box-shadow: 5px 0 20px rgba(0,0,0,0.2); 
        display: flex; flex-direction: column; transition: left 0.4s ease; z-index: 2000; 
    }
    .nav-center.active { left: 0; }
    
    .mobile-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--border-color); margin-bottom: 15px; }
    .close-btn { font-size: 24px; color: var(--text-dark); cursor: pointer; }
    
    .nav-center ul { flex-direction: column; align-items: flex-start; gap: 0; padding: 0 20px; }
    .nav-center ul li { width: 100%; border-bottom: 1px solid #f9f9f9; }
    .nav-center ul li a { display: block; padding: 15px 0; font-size: 16px; }
    .mobile-admin-link { display: block; margin-top: 10px; }
    .mobile-admin-link a { color: var(--primary) !important; font-weight: 600 !important; }

    .footer-bottom { flex-direction: column; justify-content: center; text-align: center; }

    .floating-actions { bottom: 85px !important; }

    /* Bottom Nav Styles */
    .bottom-nav {
        display: flex; position: fixed; bottom: 0; left: 0; width: 100%;
        background: #ffffff; box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
        justify-content: space-around; padding: 12px 0 10px; z-index: 1999;
        border-top: 1px solid var(--border-color);
    }

    .nav-item {
        display: flex; flex-direction: column; align-items: center; text-decoration: none;
        color: #a0aab5; font-size: 0.75rem; gap: 5px; transition: 0.3s; font-weight: 500;
    }
    .nav-item i { font-size: 20px; }
    .nav-item.active, .nav-item:hover { color: var(--primary); }
    .nav-item.active i { font-weight: 700; transform: translateY(-2px); }
}