/* ============================================================
   Vazirmatn Font Integration
   ============================================================ */
@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn.woff2") format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: "Vazirmatn", Tahoma, Arial, sans-serif !important;
    line-height: 1.7;
    background-color: #f8f9fa;
}

/* ============================================================
   Navbar
   ============================================================ */
.navbar-brand {
    font-size: 1.5rem;
    display: inline-flex !important;
    align-items: center !important;
    max-height: 45px !important;
    overflow: visible !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.navbar-brand svg {
    max-height: 45px !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    flex-shrink: 0 !important;
}

/* ============================================================
   Product Cards
   ============================================================ */
.product-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: 12px;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important;
}

.product-img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.price-box {
    font-size: 0.95rem;
}

/* ============================================================
   Cart Toast Notifications
   ============================================================ */
.cart-toast {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    z-index: 9999;
    animation: toastIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.cart-toast.success {
    background-color: #198754;
}

.cart-toast.error {
    background-color: #dc3545;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================================================
   Content Pages & Articles
   ============================================================ */
.page-content,
.article-content {
    line-height: 2;
    font-size: 1rem;
}

.page-content img,
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.page-content h2,
.article-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.page-content h3,
.article-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.page-content ul,
.article-content ul {
    padding-right: 1.5rem;
    margin-bottom: 1rem;
}

.page-content a,
.article-content a {
    color: #0d6efd;
}

.page-content blockquote,
.article-content blockquote {
    border-right: 4px solid #0d6efd;
    padding-right: 1rem;
    margin: 1rem 0;
    color: #555;
}

/* ============================================================
   Captcha
   ============================================================ */
.captcha-img {
    cursor: pointer;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    transition: opacity 0.2s;
}

.captcha-img:hover {
    opacity: 0.8;
}

/* ============================================================
   Account Hover Dropdown
   ============================================================ */
.account-dropdown {
    position: relative;
}

.account-dropdown-toggle,
.account-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.65rem;
    line-height: 1;
}

.account-dropdown-toggle svg,
.account-login-btn svg {
    width: 22px;
    height: 22px;
    fill: #5f5f5f;
}

.account-dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
}

.account-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: auto;
    min-width: 210px;
    z-index: 1050;
    border-radius: 0.75rem;
    padding: 0.5rem 0;
}

.account-dropdown:hover .account-dropdown-menu,
.account-dropdown:focus-within .account-dropdown-menu {
    display: block;
}

.account-dropdown-menu .dropdown-item {
    font-size: 0.9rem;
    padding: 0.55rem 1rem;
}

.account-dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa;
}

/* ============================================================
   Mobile Menu
   ============================================================ */
@media (max-width: 768px) {
    #main-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: #fff;
        padding: 1rem;
        box-shadow: 0 10px 15px rgba(0,0,0,0.05);
        display: none;
        z-index: 1000;
    }
    #main-nav.active {
        display: block;
    }
}

/* ============================================================
   Floating Buy Box
   ============================================================ */
.floating-buy-box {
    position: sticky;
    top: 90px;
    z-index: 100;
    transition: all 0.3s ease;
}

.floating-buy-box .card {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.floating-buy-box .card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
}

@media (max-width: 767.98px) {
    .floating-buy-box {
        position: relative;
        top: 0;
        z-index: auto;
    }
}

@media (min-height: 800px) {
    .floating-buy-box {
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
    
    .floating-buy-box .card-body {
        max-height: calc(100vh - 180px);
        overflow-y: auto;
    }
    
    .floating-buy-box .card-body::-webkit-scrollbar {
        width: 4px;
    }
    
    .floating-buy-box .card-body::-webkit-scrollbar-thumb {
        background: #dee2e6;
        border-radius: 4px;
    }
    
    .floating-buy-box .card-body::-webkit-scrollbar-track {
        background: transparent;
    }
}

/* ============================================================
   Demo Download Section
   ============================================================ */
.demo-download-section .btn-outline-success {
    border-width: 2px;
    transition: all 0.3s ease;
    padding: 14px 20px;
    font-size: 1.1rem;
}

.demo-download-section .btn-outline-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(25, 135, 84, 0.2);
}

.demo-download-section .btn-outline-success svg {
    transition: transform 0.3s ease;
}

.demo-download-section .btn-outline-success:hover svg {
    transform: translateY(2px);
}

.demo-download-section .text-muted {
    font-size: 0.8rem;
}

/* ============================================================
   Search Button
   ============================================================ */
.search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.65rem;
    line-height: 1;
    color: #5f5f5f;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}

.search-btn:hover {
    color: #0d6efd;
}

.search-btn svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .search-btn {
        padding: 0.35rem 0.5rem;
    }
    .search-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* ============================================================
   Search Overlay
   ============================================================ */
#searchOverlay {
    animation: searchFadeIn 0.25s ease;
}

@keyframes searchFadeIn {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#searchClose:hover {
    opacity: 1 !important;
}

@media (max-width: 576px) {
    #searchOverlay {
        padding-top: 40px;
    }
    
    #searchOverlay form {
        flex-direction: column;
    }
    
    #searchOverlay form .btn {
        width: 100%;
    }
    
    #searchClose {
        font-size: 32px !important;
        top: 12px !important;
        right: 16px !important;
    }
}

/* ============================================================
   Site Logo - Consistent across layouts
   ============================================================ */
.account-logo,
.fs-5 svg,
#sidebar-wrapper .sidebar-heading svg {
    max-height: 40px !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
}

.sidebar-heading svg,
.sidebar-heading .fs-5 svg {
    max-height: 38px !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

.navbar-brand *,
.sidebar-heading *,
.account-logo * {
    overflow: visible !important;
}

img,
svg {
    max-width: 100%;
    height: auto;
}
/* Cart Icon Button - No border */
.cart-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.5rem;
    line-height: 1;
    color: #5f5f5f;
    text-decoration: none;
    transition: color 0.2s;
}

.cart-icon-btn:hover {
    color: #0d6efd;
}

.cart-icon-btn svg {
    width: 22px;
    height: 22px;
}

/* Account login button - match style */
.account-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.5rem;
    line-height: 1;
    color: #5f5f5f;
    text-decoration: none;
    transition: color 0.2s;
}

.account-login-btn:hover {
    color: #0d6efd;
}

.account-login-btn svg {
    width: 20px;
    height: 20px;
}
.footer-social a:hover {
    color: #5eead4 !important;
    border-color: #5eead4 !important;
}
/* ============================================================
   Article Sidebar Widget
   ============================================================ */
.article-sidebar-widget {
    position: sticky;
    top: 90px;
    z-index: 10;
}

.article-sidebar-widget .card-body {
    padding: 1.5rem;
}

.article-sidebar-widget img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.article-sidebar-widget a {
    color: #0d6efd;
    text-decoration: none;
}

.article-sidebar-widget a:hover {
    text-decoration: underline;
}

/* Mobile: sidebar goes below article */
@media (max-width: 767.98px) {
    .article-sidebar-widget {
        position: relative !important;
        top: auto !important;
        margin-top: 24px;
    }
    
    .order-1 {
        order: 1 !important;
    }
    
    .order-2 {
        order: 2 !important;
    }
}



/* Or make all containers wider */
@media (min-width: 1300px) {
    .container {
        max-width: 1290px;
    }
}
