/* Application Styles */
/* Persian Fonts - Vazirmatn (Best for Persian) */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* Import theme styles */
@import url("theme-7zN9pmc.css");
/* Alternative: Tanha Font */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirfont@latest/dist/font-face.css');

/* Font Awesome Override - Must be before universal selector */
.fas, .fa-solid, .far, .fa-regular, .fab, .fa-brands, .fa {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands' !important;
}
.fas, .fa-solid {
    font-weight: 900 !important;
}
.far, .fa-regular {
    font-weight: 400 !important;
}
.fab, .fa-brands {
    font-family: 'Font Awesome 6 Brands' !important;
    font-weight: 400 !important;
}

* {
    font-family: 'Vazirmatn', 'Vazir', 'Tahoma', 'Arial', sans-serif !important;
}

/* Exclude Font Awesome icons from universal font-family */
.fas, .fa-solid, .far, .fa-regular, .fab, .fa-brands, .fa {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands' !important;
}

body {
    font-family: 'Vazirmatn', 'Vazir', 'Tahoma', 'Arial', sans-serif;
    direction: rtl;
    text-align: right;
    font-weight: 400;
    line-height: 1.8;
    color: #333;
}

/* RTL Support for Persian/Farsi */
html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

/* RTL Fixes */
html[dir="rtl"] .navbar-nav {
    flex-direction: row-reverse;
}

html[dir="rtl"] .dropdown-menu {
    text-align: right;
    right: 0;
    left: auto;
}

html[dir="rtl"] .card {
    text-align: right;
}

html[dir="rtl"] .btn {
    text-align: center;
}

/* Persian Number Formatting */
.persian-number {
    font-family: 'Vazirmatn', sans-serif;
    direction: ltr;
    display: inline-block;
}

/* Better RTL spacing */
html[dir="rtl"] .me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

html[dir="rtl"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

html[dir="rtl"] .me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

html[dir="rtl"] .ms-2 {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

/* Persian Typography Improvements */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Vazirmatn', 'Vazir', 'Tahoma', sans-serif;
    font-weight: 700;
    line-height: 1.5;
}

p, span, div, a, li {
    font-family: 'Vazirmatn', 'Vazir', 'Tahoma', sans-serif;
}

/* Better spacing for Persian text */
p {
    margin-bottom: 1rem;
    text-align: justify;
    text-justify: inter-word;
}

/* Card improvements */
.card {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}

.card-img-top {
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* Button improvements */
.btn {
    font-family: 'Vazirmatn', 'Vazir', 'Tahoma', sans-serif;
    font-weight: 500;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Navbar improvements */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: 'Vazirmatn', 'Vazir', 'Tahoma', sans-serif;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* Hero section improvements */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 5rem 2rem;
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-section .lead {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
}

/* Section title improvements */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(to left, #667eea, #764ba2);
    border-radius: 2px;
}

/* Feature cards */
.feature-card {
    height: 100%;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    border-color: #667eea;
}

/* Product cards */
.product-card {
    height: 100%;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* Price display */
.text-primary {
    color: #667eea !important;
    font-weight: 700;
}

/* Empty state */
.empty-state {
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state i {
    color: #dee2e6;
    margin-bottom: 1rem;
}

    /* Footer improvements */
    footer {
        margin-top: 4rem;
    }

    .footer-enhanced {
        background: #1a1a1a;
    }

    .footer-top {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .footer-widget h5 {
        font-weight: 700;
        margin-bottom: 1.5rem;
        font-size: 1.1rem;
    }

    .footer-links a:hover,
    .contact-info a:hover {
        color: #fff !important;
        transform: translateX(-5px);
        transition: all 0.3s ease;
    }

    .social-icon:hover {
        transform: translateY(-5px) scale(1.1);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }

    .newsletter-form .form-control:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    }

    .footer-bottom {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Top Bar Improvements */
    .top-bar {
        font-size: 0.9rem;
    }

    .top-bar a {
        transition: all 0.3s ease;
    }

    .top-bar a:hover {
        opacity: 0.8;
        text-decoration: underline !important;
    }

    /* Navbar Improvements */
    .navbar-nav .nav-link {
        transition: all 0.3s ease;
        padding: 0.5rem 1rem !important;
    }

    .navbar-nav .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 5px;
    }

    .navbar-nav .nav-link.active {
        background: rgba(102, 126, 234, 0.2);
        border-radius: 5px;
    }

    .navbar-brand {
        font-size: 1.5rem;
        transition: all 0.3s ease;
    }

    .navbar-brand:hover {
        transform: scale(1.05);
    }

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* Hero Section Enhanced */
.hero-section {
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero-content h1 {
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    letter-spacing: -1px;
}

.hero-content .lead {
    text-shadow: 1px 1px 4px rgba(0,0,0,0.2);
}

/* Feature Items */
.feature-item {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-item:hover {
    transform: translateY(-8px);
    border-color: #667eea;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2) !important;
}

.feature-icon i {
    transition: transform 0.3s ease;
}

.feature-item:hover .feature-icon i {
    transform: scale(1.1);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.cta-section > * {
    position: relative;
    z-index: 1;
}

/* Product Card Enhanced */
.product-card .card-img-top {
    border-radius: 12px 12px 0 0;
}

.product-card .card-body {
    padding: 1.5rem;
}

/* Category Card Enhanced */
.feature-card .card-img-top {
    border-radius: 12px 12px 0 0;
}

/* Badge improvements */
.badge {
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* Advanced Search Section - Like Hypertire */
.advanced-search-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.advanced-search-card h3 {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Hero Section Enhanced */
.hero-section {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e8ba3 100%) !important;
    border-radius: 20px;
    padding: 5rem 2rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-buttons .btn {
    margin: 0.5rem;
    min-width: 180px;
}

/* Product Cards on Homepage */
.home-product-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    height: 100%;
    overflow: hidden;
}

.home-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.home-product-card .card-img-top {
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.home-product-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Section Spacing */
.section-spacing {
    margin: 4rem 0;
}

/* Popular Products Section */
.popular-products-section {
    background: #f8f9fa;
    padding: 3rem 0;
    border-radius: 20px;
    margin: 3rem 0;
}

/* Category Cards */
.category-card-home {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.category-card-home:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.category-card-home i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Blog and News Cards on Homepage */
.home-blog-card, .home-news-card {
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    overflow: hidden;
}

.home-blog-card:hover, .home-news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.home-blog-card .card-img-top, .home-news-card .card-img-top {
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.home-blog-card:hover .card-img-top, .home-news-card:hover .card-img-top {
    transform: scale(1.05);
}

.home-blog-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.home-news-icon {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Products Hero */
.products-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 3rem;
    border-radius: 0 0 30px 30px;
}

/* Product Cards Improvements */
.product-card .card-img-top {
    height: 220px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

/* Top Bar */
.bg-primary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
}

/* Navbar Improvements */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.navbar-brand {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #fff !important;
    background-color: rgba(255,255,255,0.1);
    border-radius: 5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 80%;
}

/* Footer Improvements */
footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
}

footer a {
    transition: all 0.3s ease;
}

footer a:hover {
    color: #fff !important;
    padding-right: 0.5rem;
}

.social-links a {
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.1);
}

/* Sticky Navbar */
.sticky-top {
    z-index: 1020;
}

/* Cart Badge Animation */
#cart-badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Responsive improvements */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 1.5rem;
        min-height: 400px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .top-bar-enhanced {
        font-size: 0.8rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem !important;
    }
    
    .footer-widget {
        margin-bottom: 2rem;
    }
}

/* Top Bar Enhanced Styles */
.top-bar-enhanced {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-bottom: 2px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

.top-bar-enhanced a {
    transition: all 0.3s ease;
}

.top-bar-enhanced a:hover {
    color: #fff !important;
    text-decoration: underline !important;
}

/* Navbar Enhanced Styles */
.navbar {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    background: rgba(102, 126, 234, 0.3);
    color: #fff !important;
}

.navbar-nav .nav-link i {
    margin-left: 0.5rem;
}

/* Dropdown Menu Enhanced */
.dropdown-menu {
    border: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
    padding-right: 2rem;
}

.dropdown-item i {
    margin-left: 0.75rem;
    color: #667eea;
}

/* Footer Enhanced Styles */
.footer-enhanced {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    position: relative;
    overflow: hidden;
}

.footer-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(102,126,234,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
    pointer-events: none;
}

.footer-top {
    position: relative;
    z-index: 1;
}

.footer-widget h5 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-widget h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(to left, #667eea, #764ba2);
    border-radius: 2px;
}

.footer-links a {
    transition: all 0.3s ease;
    display: block;
    padding: 0.5rem 0;
}

.footer-links a:hover {
    color: #fff !important;
    padding-right: 1rem;
    transform: translateX(-5px);
}

.footer-links a i {
    transition: all 0.3s ease;
}

.footer-links a:hover i {
    color: #667eea !important;
    transform: scale(1.2);
}

.contact-info a {
    transition: all 0.3s ease;
}

.contact-info a:hover {
    color: #fff !important;
    text-decoration: underline !important;
}

.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.newsletter input {
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: #fff;
    padding: 0.75rem 1.5rem;
}

.newsletter input::placeholder {
    color: rgba(255,255,255,0.6);
}

.newsletter input:focus {
    background: rgba(255,255,255,0.15);
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    color: #fff;
}

.newsletter button {
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.newsletter button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .feature-item {
        margin-bottom: 1.5rem;
    }
    
    .advanced-search-card {
        padding: 1.5rem;
    }
    
    footer .col-lg-3 {
        margin-bottom: 2rem;
    }
}
