/* Base Styles & Reset */
html { scroll-behavior: smooth; }

* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --- MODERN SCROLLBAR --- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

body {
    background-color: #f8f9fa; color: #333;
    display: flex; flex-direction: column; min-height: 100vh;
    line-height: 1.6; position: relative; 
}

a { text-decoration: none; transition: all 0.3s ease; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
img { max-width: 100%; height: auto; }

/* --- HEADER STYLES --- */
.hb-header {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03); 
    border-bottom: 1px solid rgba(0,0,0,0.02);
    position: sticky; top: 0; z-index: 1000;
}

.header-top {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 20px; border-bottom: 1px solid #f1f5f9;
}

.header-logo img { max-height: 40px; display: block; }

.header-actions-right { display: flex; align-items: center; gap: 20px; }

.header-search {
    display: flex; align-items: center; background: #f8f9fa;
    border: 1px solid #e2e8f0; border-radius: 6px; padding: 8px 15px; width: 300px;
    margin-bottom: 0 !important; /* Overrides WHMCS form margin */
}
.header-search i { color: #94a3b8; margin-right: 10px; }
.header-search input { border: none; background: transparent; outline: none; width: 100%; font-size: 14px; }

.cart-btn {
    position: relative; color: #18254f !important; font-size: 20px;
    padding: 10px; border: 1px solid #e2e8f0; border-radius: 6px;
    transition: all 0.3s ease; display: flex; align-items: center; justify-content: center;
}
.cart-btn:hover { color: #f89920 !important; border-color: #f89920; }
.cart-badge {
    position: absolute; top: -5px; right: -5px;
    background: #f89920; color: #fff; font-size: 11px; font-weight: bold;
    height: 18px; width: 18px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
}

.header-bottom { padding: 0 20px; }

.main-nav ul { display: flex; gap: 25px; align-items: center; margin: 0; flex-wrap: wrap; }

.main-nav > ul > li > a, .main-nav > ul > li > span.nav-trigger {
    color: #18254f !important; font-weight: 500; font-size: 15px;
    padding: 15px 0; display: block; cursor: pointer; transition: color 0.3s ease;
}

.main-nav > ul > li > a:hover, .main-nav > ul > li > span.nav-trigger:hover {
    color: #f89920 !important; text-decoration: none;
}

/* Dropdown */
.dropdown { position: relative; }
.dropdown .fa-chevron-down { font-size: 11px; margin-left: 5px; vertical-align: middle; transition: transform 0.3s ease; }
.dropdown:hover .fa-chevron-down { transform: rotate(180deg); }
.dropdown-content {
    position: absolute; background-color: #ffffff; min-width: 220px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); z-index: 10; border-radius: 8px;
    top: 100%; left: 0; padding: 10px 0; border: 1px solid rgba(0,0,0,0.04);
    opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.3s ease;
}
.dropdown:hover .dropdown-content { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-content a {
    color: #4a5568 !important; padding: 10px 20px; display: block; font-size: 14px; font-weight: 500;
    border-left: 3px solid transparent; transition: all 0.2s ease;
}
.dropdown-content a:hover {
    background-color: #fcfcfd !important; color: #f89920 !important; border-left-color: #f89920 !important; padding-left: 25px; text-decoration: none;
}

/* Fix the Account Button specific to WHMCS */
.nav-account-btn { margin-left: auto; }
.client-area-btn {
    background-color: #18254f !important; color: #ffffff !important; padding: 8px 20px !important; border-radius: 6px;
    font-weight: 600; transition: all 0.3s ease; display: inline-block;
}
.client-area-btn:hover { background-color: #f89920 !important; color: #ffffff !important; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(248, 153, 32, 0.2); }

/* --- BULLETPROOF FOOTER OVERLAP FIX --- */
section#main-body {
    display: flow-root !important; /* Modern clearfix: Forces WHMCS sidebars to stay inside the body */
    min-height: 50vh;
    padding-bottom: 60px !important;
}

.hb-footer {
    background-color: #18254f !important; /* Dark Blue */
    color: #a0aec0 !important;
    padding-top: 60px;
    clear: both !important;
    float: none !important;
    display: block !important;
    width: 100%;
    position: relative !important;
    z-index: 9999 !important;
    margin-top: 80px !important; /* Pushes it firmly below the cart */
}

.footer-grid { display: grid; grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr; gap: 40px; margin-bottom: 40px; }
.footer-logo { max-height: 45px; margin-bottom: 20px; display: block; }
.brand-col p { font-size: 14px; line-height: 1.6; margin-bottom: 20px; max-width: 90%; }
.social-links { display: flex; gap: 10px; flex-wrap: wrap; }
.social-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; background-color: rgba(255, 255, 255, 0.05); color: #ffffff; border-radius: 50%; font-size: 16px; transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease; }
.social-icon:hover { background-color: #f89920; color: #ffffff; transform: translateY(-3px); }
.footer-col h4 { color: #ffffff; font-size: 16px; margin-bottom: 20px; font-weight: 600; letter-spacing: 0.5px; }
.footer-col ul { display: flex; flex-direction: column; gap: 12px; padding-left: 0; }
.footer-col ul a { color: #a0aec0; font-size: 14px; }
.footer-col ul a:hover { color: #ffffff; padding-left: 5px; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.05); padding: 24px 0; text-align: center; }
.footer-bottom p { font-size: 14px; color: #718096; margin-bottom: 0; }

/* WhatsApp Button */
.floating-whatsapp {
    position: fixed; bottom: 30px; right: 30px; background-color: #25d366; color: white;
    border-radius: 50%; width: 60px; height: 60px; display: flex; justify-content: center; align-items: center;
    font-size: 32px; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); z-index: 9999; transition: all 0.3s ease;
}
.floating-whatsapp:hover { transform: scale(1.1) translateY(-5px); color: white; box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6); }

/* Responsive Design */
@media (max-width: 992px) {
    .header-search { width: 200px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .brand-col { grid-column: span 2; }
}

@media (max-width: 768px) {
    .header-top { flex-direction: column; gap: 15px; padding: 15px; }
    .header-search { width: 100%; }
    .main-nav ul { justify-content: center; gap: 15px; }
    .nav-account-btn { margin-left: 0; }
    .dropdown-content { position: static; box-shadow: none; background-color: #f1f3f5; display: none; border: none; }
    .dropdown:hover .dropdown-content { display: block; }
    .footer-grid { grid-template-columns: 1fr; }
    .brand-col { grid-column: span 1; }
}

/* =========================================
   WHMCS DEFAULT BOOTSTRAP OVERRIDES
   ========================================= */

/* Override Default Green Checkout & Action Buttons */
.btn-success, 
#btnCompleteProductConfig, 
#btnCheckout {
    background-color: #f89920 !important; /* Light Orange */
    border-color: #f89920 !important;
    color: #ffffff !important;
    transition: all 0.3s ease;
}
.btn-success:hover, 
#btnCompleteProductConfig:hover, 
#btnCheckout:hover {
    background-color: #ed7223 !important; /* Dark Orange */
    border-color: #ed7223 !important;
}

/* Override Default Blue Table Headers (Cart & Invoices) */
table.table > thead > tr > th,
.view-cart-items-header {
    background-color: #18254f !important; /* Dark Blue */
    color: #ffffff !important;
    border-color: #18254f !important;
}

/* Override Default Blue Active Sidebar Links */
.list-group-item.active,
.list-group-item.active:hover,
.list-group-item.active:focus {
    background-color: #18254f !important; /* Dark Blue */
    border-color: #18254f !important;
    color: #ffffff !important;
}