/*
Theme Name: 4030it Theme V2 (MegaElectronic Style)
Theme URI: https://4030it.com
Author: Mehdi Karimi
Description: قالب فروشگاهی اختصاصی نسخه ۲، طراحی شده با الهام از ساختار مگا الکترونیک. دارای هدر سه لایه، فوتر پیشرفته و پشتیبانی کامل از ووکامرس.
Version: 2.0
Text Domain: 4030it
*/

@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.0.0/Vazirmatn-font-face.css');

:root {
    --primary-color: #005BB5; /* آبی آسمانی پررنگ */
    --secondary-color: #0073e6;
    --dark-color: #222222;
    --bg-color: #f5f5f5;
    --white: #ffffff;
    --border-color: #e5e5e5;
}

* { box-sizing: border-box; }

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--bg-color);
    color: var(--dark-color);
    margin: 0;
    padding: 0;
    direction: rtl;
}

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

/* ---------------- HEADER ---------------- */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Top Bar */
.top-bar {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    padding: 8px 20px;
    color: #666;
}
.top-bar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar-left ul { display: flex; gap: 15px; }
.top-bar-left ul li a:hover { color: var(--primary-color); }

/* Middle Header */
.middle-header {
    padding: 25px 20px;
    border-bottom: 1px solid var(--border-color);
}
.middle-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}
.site-logo { font-size: 32px; font-weight: 900; color: var(--primary-color); letter-spacing: 1px; }

/* Search with Category */
.header-search {
    flex: 1;
    max-width: 650px;
}
.header-search form {
    display: flex;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    overflow: hidden;
}
.search-category-select {
    background: #f9f9f9;
    border: none;
    border-left: 1px solid var(--border-color);
    padding: 0 15px;
    font-family: inherit;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    outline: none;
}
.header-search input[type="search"] {
    flex: 1;
    padding: 12px 15px;
    border: none;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}
.header-search button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0 25px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}
.header-search button:hover { background: var(--secondary-color); }

/* Header Actions */
.header-actions { display: flex; gap: 20px; align-items: center; }
.header-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 13px;
    font-weight: bold;
    color: var(--dark-color);
}
.header-icon-btn span.icon {
    font-size: 24px;
    margin-bottom: 5px;
    color: var(--primary-color);
}
.cart-price { color: var(--primary-color); margin-top: 3px; font-weight: 900;}

/* Bottom Header / Navigation */
.bottom-header {
    background: var(--white);
    padding: 0 20px;
}
.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}
.all-categories-btn {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 25px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.main-nav { flex: 1; padding-right: 20px; }
.main-nav ul { display: flex; gap: 25px; }
.main-nav ul li a {
    font-weight: bold;
    font-size: 15px;
    padding: 15px 0;
    display: block;
    position: relative;
}
.main-nav ul li a:hover { color: var(--primary-color); }

/* ---------------- MAIN CONTENT ---------------- */
.site-main {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
    min-height: 50vh;
}
.hero-section {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}
.main-slider {
    background: #e0e7ff;
    border-radius: 12px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 24px;
    font-weight: bold;
}
.side-banners {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.banner {
    background: #ffe4e6;
    border-radius: 12px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e11d48;
    font-weight: bold;
}

/* ---------------- FOOTER ---------------- */
.site-footer {
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 60px 20px 20px;
    margin-top: 60px;
}
.footer-widgets {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 40px;
    margin-bottom: 40px;
}
.widget-title {
    font-size: 18px;
    color: var(--dark-color);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}
.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
}
.footer-widget p, .footer-widget ul li a {
    color: #666;
    font-size: 14px;
    line-height: 1.8;
}
.footer-widget ul li { margin-bottom: 10px; }
.footer-widget ul li a:hover { color: var(--primary-color); padding-right: 5px; transition: 0.3s; }

.newsletter-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 10px;
    font-family: inherit;
}
.newsletter-form button {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
}
.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 992px) {
    .middle-container { flex-direction: column; }
    .header-search { width: 100%; max-width: 100%; }
    .bottom-header { display: none; } /* Hide main nav on mobile for simplicity, use hamburger in real scenario */
    .hero-section { grid-template-columns: 1fr; }
    .footer-widgets { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .footer-widgets { grid-template-columns: 1fr; }
    .top-bar { display: none; }
}
