/* =========================================
   FANOMART - Global Styles (Premium Dynamic Theme)
   ========================================= */

:root {
    /* These variables will be overridden dynamically by the Admin Panel */
    --primary-color: #FF7A00;
    --secondary-color: #2ecc71;
    --accent-color: #3498db; /* NEW: Added for links and highlights */
    --main-font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    /* Static layout variables */
    --header-bg: #ffffff;
    --footer-bg: #1a1b1e;
    --body-bg: #f5f7fa;
    --text-main: #111111;
    --text-muted: #555555;
    --white: #ffffff;
    
    --transition-fast: 0.3s ease;
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.1); /* NEW: Added for hover effects */
    --border-radius: 6px;
}

/* --- General Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--main-font);
    background-color: var(--body-bg);
    color: var(--text-main);
    line-height: 1.6;
    font-weight: 500; 
    overflow-x: hidden;
}

/* --- Links --- */
a {
    text-decoration: none;
    color: var(--text-main); 
    font-weight: 600; 
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Headings --- */
h1, h2, h3, h4, h5, h6 {
    color: #000000;
    margin-bottom: 10px;
    font-weight: 800; 
}

/* --- Global Buttons (Using dynamic variables) --- */
.hero-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white) !important; 
    padding: 12px 25px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 800; 
    cursor: pointer;
    text-align: center;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-light);
}

.hero-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* --- Inputs --- */
input, select, textarea {
    font-family: var(--main-font);
    color: var(--text-main); 
    font-weight: 500;
    border: 1px solid #dddddd;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* =========================================
   FOOTER - Professional Style
   ========================================= */
footer, .footer, #footer-placeholder > div {
    background-color: var(--footer-bg) !important;
    color: #ffffff !important;
    border-top: 4px solid var(--primary-color) !important;
    padding: 50px 0 20px;
    margin-top: 40px;
}

footer h4, .footer h4 {
    color: var(--primary-color) !important;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 16px;
    font-weight: 800;
}

footer a, .footer a {
    color: #a0aab2 !important;
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
}

footer a:hover, .footer a:hover {
    color: var(--primary-color) !important;
}

/* =========================================
   Mobile View: 2 Products in a Row
   ========================================= */
@media (max-width: 768px) {
    .products-grid { 
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 10px !important; 
    }

    .product-card {
        padding: 10px !important;
    }
    
    .product-card h3 {
        font-size: 12px !important;
        margin-bottom: 5px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .product-card .price {
        font-size: 14px !important;
    }
    
    .product-card button, 
    .product-card .hero-btn {
        padding: 8px 5px !important;
        font-size: 11px !important;
        width: 100% !important;
    }
}

/* =========================================
   Mobile View: Empty White Space & Overflow Fix
   ========================================= */
html, body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important; 
    position: relative;
}

* {
    box-sizing: border-box !important;
}

header, 
.header, 
#header-placeholder, 
.search-box, 
.top-nav {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important; 
}

/* =========================================
   MOBILE BOTTOM NAVIGATION BAR (100% FIX)
   ========================================= */
.mobile-bottom-nav {
    display: none !important; 
}

@media (max-width: 768px) {
    /* یہ چیز پروڈکٹس کو مینو کے پیچھے چھپنے سے روکے گی */
    body, main, .container { 
        padding-bottom: 85px !important; 
    }

    .mobile-bottom-nav {
        display: flex !important; 
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        background: #ffffff !important;
        background-color: #ffffff !important;
        opacity: 1 !important; /* ٹرانسپیرنسی ختم کرنے کے لیے */
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15) !important;
        z-index: 2147483647 !important; /* سب سے اوپر شو کرنے کے لیے */
        justify-content: space-around !important;
        align-items: center !important;
        padding: 12px 0 15px 0 !important;
        border-top: 1px solid #e1e8ed !important;
        margin: 0 !important;
    }

    .mobile-bottom-nav a {
        text-decoration: none !important;
        color: #7f8fa6 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        font-size: 11px !important;
        font-weight: bold !important;
        gap: 5px !important;
        transition: 0.3s;
        background: transparent !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .mobile-bottom-nav a i { 
        font-size: 22px !important; 
    }

    .mobile-bottom-nav a.active, 
    .mobile-bottom-nav a:hover, 
    .mobile-bottom-nav a.active i, 
    .mobile-bottom-nav a:hover i { 
        color: var(--primary-color, #FF7A00) !important; 
    }

    .nav-cart-wrapper { position: relative !important; }
    .nav-cart-badge {
        position: absolute !important;
        top: -6px !important;
        right: -12px !important;
        background-color: #e74c3c !important;
        color: #ffffff !important;
        font-size: 10px !important;
        font-weight: 900 !important;
        padding: 2px 6px !important;
        border-radius: 12px !important;
        border: 2px solid #ffffff !important;
    }
}
