/* main.css */
@import url('colorpalette.css');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IRANSans', 'Vazirmatn', 'Tahoma', sans-serif;
    direction: rtl;
    text-align: right;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background-color: var(--primary-red);
    color: var(--white);
    padding: 8px 0;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.location-filter {
    display: flex;
    align-items: center;
    gap: 15px;
}

.location-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.location-select option {
    color: var(--text-dark);
}

.header-main {
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-align: center;
}

.logo h1 {
    color: var(--primary-red);
    font-size: 24px;
    font-family: 'IRANSans', sans-serif;
    font-weight: bold;
    margin: 0; /* حذف margin-bottom */
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

/* اگر نیاز به فاصله بین لوگو و متن دارید */
.space-x-3 > * + * {
    margin-right: 0.75rem; /* فاصله 12px */
}

.space-x-reverse > * + * {
    margin-right: 0;
    margin-left: 0.75rem; /* برای RTL */


.logo p {
    color: var(--text-light);
    font-size: 14px;
    font-family: 'IRANSans', sans-serif;
}

.nav-main {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
    font-family: 'IRANSans', sans-serif;
}

.nav-links a:hover {
    color: var(--primary-red);
}

.auth-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.auth-links a {
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s;
    font-family: 'IRANSans', sans-serif;
}

.login-btn {
    color: var(--primary-red);
    border: 1px solid var(--primary-red);
}

.login-btn:hover {
    background-color: var(--primary-red);
    color: var(--white);
}

.register-btn {
    background-color: var(--primary-red);
    color: var(--white);
}

.register-btn:hover {
    background-color: var(--light-red);
}

.categories-dropdown {
    position: relative;
}

.categories-btn {
    background: none;
    border: none;
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'IRANSans', sans-serif;
}

.categories-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    min-width: 250px;
    padding: 15px 0;
    display: none;
    z-index: 1000;
}

.categories-dropdown:hover .categories-menu {
    display: block;
}

.category-item {
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-light);
}

.category-item:last-child {
    border-bottom: none;
}

.category-item a {
    color: var(--text-dark);
    text-decoration: none;
    display: block;
    transition: color 0.3s;
    font-family: 'IRANSans', sans-serif;
}

.category-item a:hover {
    color: var(--primary-red);
}

/* Mobile Menu Styles */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.open {
    transform: translateX(0);
}

.overlay {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
}

.close-menu {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-dark);
    cursor: pointer;
}

.mobile-nav-links {
    list-style: none;
    margin-bottom: 30px;
}

.mobile-nav-links li {
    margin-bottom: 15px;
}

.mobile-nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-family: 'IRANSans', sans-serif;
}

.mobile-auth-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-auth-links a {
    text-decoration: none;
    padding: 12px;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
    font-family: 'IRANSans', sans-serif;
}

/* Footer Styles */
.footer {
    background-color: var(--bg-dark);
    color: var(--text-white);
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: var(--golden-yellow);
    margin-bottom: 20px;
    font-size: 18px;
    font-family: 'IRANSans', sans-serif;
    font-weight: bold;
}

.footer-section h4 {
    font-family: 'IRANSans', sans-serif;
    font-weight: 500;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-white);
    text-decoration: none;
    transition: color 0.3s;
    font-family: 'IRANSans', sans-serif;
}

.footer-links a:hover {
    color: var(--golden-yellow);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'IRANSans', sans-serif;
}

/* Home Page Styles */
.hero-section {
    background: linear-gradient(135deg, var(--primary-red), var(--light-red));
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
    font-family: 'IRANSans', sans-serif;
    font-weight: bold;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
    font-family: 'IRANSans', sans-serif;
}

.cta-button {
    display: inline-block;
    background-color: var(--golden-yellow);
    color: var(--text-dark);
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    font-family: 'IRANSans', sans-serif;
}

.cta-button:hover {
    background-color: #FFB830;
    transform: translateY(-2px);
}

.featured-categories {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-red);
    font-size: 28px;
    font-family: 'IRANSans', sans-serif;
    font-weight: bold;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.category-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-header {
    background: var(--primary-red);
    color: var(--white);
    padding: 15px 20px;
}

.category-header h3 {
    margin: 0;
    font-size: 18px;
    font-family: 'IRANSans', sans-serif;
    font-weight: bold;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

.product-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-image {
    width: 100%;
    height: 200px;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.product-info {
    padding: 15px;
}

.product-price {
    color: var(--primary-red);
    font-weight: bold;
    font-size: 18px;
    margin: 10px 0;
    font-family: 'IRANSans', sans-serif;
}

.branches-section {
    padding: 60px 0;
    background: var(--white);
}

.branches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.branch-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.branch-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.branch-name {
    color: var(--primary-red);
    font-size: 20px;
    margin-bottom: 5px;
    font-family: 'IRANSans', sans-serif;
    font-weight: bold;
}

.branch-location {
    color: var(--text-light);
    font-size: 14px;
    font-family: 'IRANSans', sans-serif;
}

.branch-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-align: center;
    font-family: 'IRANSans', sans-serif;
}

.btn-contact {
    background-color: var(--primary-red);
    color: var(--white);
}

.btn-contact:hover {
    background-color: var(--light-red);
}

.btn-map {
    background-color: var(--golden-yellow);
    color: var(--text-dark);
}

.btn-map:hover {
    background-color: #FFB830;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-top {
        display: none;
    }
    
    .desktop-header {
        display: none;
    }
    
    .mobile-header {
        display: flex;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .hero-content h2 {
        font-size: 28px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .branches-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .hero-section {
        padding: 50px 0;
    }
    
    .featured-categories,
    .branches-section {
        padding: 40px 0;
    }
}

/* Font Utility Classes */
.font-iransans {
    font-family: 'IRANSans', 'Vazirmatn', 'Tahoma', sans-serif !important;
}

.font-iransans-medium {
    font-family: 'IRANSans', 'Vazirmatn', 'Tahoma', sans-serif !important;
    font-weight: 500 !important;
}

.font-iransans-bold {
    font-family: 'IRANSans', 'Vazirmatn', 'Tahoma', sans-serif !important;
    font-weight: bold !important;
}