/* استایل‌های اصلی سایت */
:root {
    --primary-color: #4e73df;
    --secondary-color: #6f42c1;
    --success-color: #1cc88a;
    --danger-color: #e74a3b;
    --warning-color: #f6c23e;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
}

/* تبدیل اعداد به فارسی در تمام سایت */
* {
    font-variant-numeric: normal;
}

body, body * {
    font-feature-settings: "ss01" 1;
}

/* Font applied to text elements only - see fonts.css for icon exceptions */
body {
    font-family: 'IRANSans', 'Vazir', 'Tahoma', sans-serif !important;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fc;
}

.page-hero-section.gradient-hero {
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    color: #fff;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.1);
}
.page-hero-section .breadcrumb {
    background: transparent;
    padding: 0;
}
.page-hero-section .breadcrumb a {
    color: rgba(255,255,255,0.85);
}
.hero-stats-card {
    background: rgba(15,23,42,0.35);
    border-radius: 18px;
    padding: 1.2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(90px,1fr));
    gap: 1rem;
}
.hero-stats-card .label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.75);
    display: block;
}
.hero-stats-card strong {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
}

.hero-slider {
    background: transparent;
    color: white;
    padding: 0;
    text-align: center;
    margin-bottom: 0;
}

.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.2);
}

.product-image {
    max-height: 300px;
    object-fit: cover;
}

.price {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

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

.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 40px 0;
    margin-top: 60px;
}

/* استایل‌های پنل مدیریت */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background-color: var(--light-color);
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 0.75rem 1rem;
}

.sidebar .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(78, 115, 223, 0.1);
}

.sidebar-heading {
    font-size: .75rem;
    text-transform: uppercase;
}

/* استایل‌های صفحه لاگین */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 0.5rem 2rem 0 rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

/* استایل‌های واکنش‌گرا - به responsive.css منتقل شد */
/* این استایل‌ها در responsive.css به صورت کامل و حرفه‌ای پیاده‌سازی شده‌اند */

/* استایل‌های فرم */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #3a59c7;
    border-color: #3a59c7;
}

/* استایل‌های جدول */
.table th {
    border-top: none;
    font-weight: 600;
    color: var(--dark-color);
}

/* استایل‌های کارت */
.card {
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    font-weight: 600;
}

/* استایل‌های ناوبری */
.navbar {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.site-header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 900;
}

.header-main {
    padding: 15px 0;
    border-bottom: 1px solid #f1f1f1;
}

.header-main .container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
}

.header-logo .logo-img {
    height: 50px;
    object-fit: contain;
}

.search-form .form-control {
    border-radius: 12px;
}

.search-form .btn {
    border-radius: 12px;
    min-width: 60px;
}

.header-actions .icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111;
    text-decoration: none;
    font-size: 0.85rem;
    gap: 6px;
    transition: all 0.2s ease;
}

.header-actions .icon-btn i {
    font-size: 1.2rem;
}

.header-actions .icon-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(17, 24, 39, 0.08);
}

.header-nav {
    position: relative;
    background: #fff;
}

.category-dropdown {
    position: relative;
}

.category-toggle {
    background: transparent;
    border: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 12px;
    color: #111;
}

.category-menu {
    position: absolute;
    top: 105%;
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
    padding: 10px 0;
    display: none;
    z-index: 1000;
}

.category-dropdown.open .category-menu {
    display: block;
}

.category-item {
    padding: 10px 18px;
    position: relative;
}

.category-item > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #111;
    font-weight: 500;
}

.category-item:hover {
    background: #f5f7fb;
}

.category-submenu {
    position: absolute;
    top: 0;
    right: 100%;
    width: 260px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.15);
    padding: 15px;
    display: none;
    z-index: 1000;
}

.category-item:hover .category-submenu {
    display: grid;
    gap: 8px;
}

.category-submenu a {
    text-decoration: none;
    color: #111;
    padding: 6px 8px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.category-submenu a:hover {
    background: #f1f5f9;
}

.header-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-links a {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.header-links a::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.2s ease;
}

.header-links a:hover::after,
.header-links a.active::after {
    width: 100%;
}

.cart-count {
    font-size: 0.65rem;
}

.breadcrumb {
    background-color: transparent;
    padding: 0.75rem 0;
    font-size: .85rem;
}
.breadcrumb-item a {
    color: #6b7280;
    text-decoration: none;
    transition: color .15s;
}
.breadcrumb-item a:hover { color: #e63950; }
.breadcrumb-item.active { color: #1f2937; font-weight: 600; }
.breadcrumb-item + .breadcrumb-item::before {
    content: "/" !important;
    color: #adb5bd !important;
    float: none !important;
    padding-left: 0.5rem !important;
}
.breadcrumb-item + .breadcrumb-item {
    padding-right: 0;
}

/* استایل‌های صفحه محصول */
.product-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.product-meta {
    border-top: 1px solid #e3e6f0;
    border-bottom: 1px solid #e3e6f0;
    padding: 1rem 0;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.meta-item:last-child {
    margin-bottom: 0;
}

.product-share {
    border-top: 1px solid #e3e6f0;
    padding-top: 1rem;
}

.product-description {
    background: white;
    padding: 2rem;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.description-content {
    line-height: 1.8;
    color: #5a5c69;
}

/* ===== Products Grid & Toolbar ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
@media (max-width: 1200px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
@media (max-width: 480px)  { .products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

.products-toolbar {
    background: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    flex-wrap: wrap;
    gap: 10px;
}
.products-count {
    font-size: 0.85rem;
    color: #888;
}
.sort-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.sort-tab {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    color: #555;
    text-decoration: none;
    border: 1px solid #eee;
    background: #fafafa;
    transition: all 0.2s;
    white-space: nowrap;
}
.sort-tab:hover { border-color: #e63950; color: #e63950; }
.sort-tab.active {
    background: #e63950;
    color: #fff;
    border-color: #e63950;
    font-weight: 600;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.empty-state i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 16px;
    display: block;
}
.empty-state p { color: #aaa; font-size: 1rem; margin-bottom: 20px; }

/* ===== Brand Page Header ===== */
.brand-page-header {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fff;
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.brand-page-logo {
    max-height: 60px;
    max-width: 140px;
    object-fit: contain;
}
.brand-page-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px;
}
.brand-page-desc { font-size: 0.85rem; color: #888; margin: 0 0 6px; }
.brand-page-count {
    font-size: 0.8rem;
    color: #e63950;
    background: #fff0f3;
    padding: 3px 10px;
    border-radius: 20px;
}

/* ===== Search Header ===== */
.search-header {
    background: #fff;
    border-radius: 12px;
    padding: 14px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    font-size: 0.9rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.search-header strong { color: #1a1a1a; }
.search-header-count {
    background: #f0f0f0;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #666;
}

/* ===== Pagination ===== */
.pagination .page-link {
    border-radius: 8px !important;
    margin: 0 2px;
    border: 1px solid #eee;
    color: #555;
    font-size: 0.88rem;
}
.pagination .page-item.active .page-link {
    background: #e63950;
    border-color: #e63950;
    color: #fff;
}
.pagination .page-link:hover { border-color: #e63950; color: #e63950; }

/* ===== Modern Scrollbar ===== */

/* scrollbar اصلی صفحه — مدرن و ظریف */
html {
    overflow-y: scroll;
    scrollbar-width: thin;
    scrollbar-color: #475569 transparent;
}
html::-webkit-scrollbar {
    width: 8px;
}
html::-webkit-scrollbar-track {
    background: transparent;
}
html::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #64748b, #334155);
    border-radius: 99px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
html::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #475569, #1e293b);
    background-clip: padding-box;
}

/* حذف کامل دکمه‌های فلش بالا/پایین */
html::-webkit-scrollbar-button,
html::-webkit-scrollbar-button:start,
html::-webkit-scrollbar-button:end,
html::-webkit-scrollbar-button:start:decrement,
html::-webkit-scrollbar-button:end:increment {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}


/* بقیه المان‌ها (carousel، dropdown و ...) بدون scrollbar */
*:not(html):not(body) {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
*:not(html):not(body)::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* ===== Fix: دکمه‌های Bootstrap همیشه نمایش داده شوند ===== */
.btn { color: inherit; }
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active { color: #fff !important; }

.btn-secondary,
.btn-secondary:hover { color: #fff !important; }

.btn-success,
.btn-success:hover { color: #fff !important; }

.btn-danger,
.btn-danger:hover { color: #fff !important; }

.btn-warning,
.btn-warning:hover { color: #212529 !important; }

.btn-info,
.btn-info:hover { color: #fff !important; }

.btn-dark,
.btn-dark:hover { color: #fff !important; }

.btn-light,
.btn-light:hover { color: #212529 !important; }

.btn-outline-primary { color: #4e73df !important; }
.btn-outline-primary:hover { color: #fff !important; }

.btn-outline-secondary { color: #6c757d !important; }
.btn-outline-secondary:hover { color: #fff !important; }

.btn-outline-success { color: #1cc88a !important; }
.btn-outline-success:hover { color: #fff !important; }

.btn-outline-danger { color: #e74a3b !important; }
.btn-outline-danger:hover { color: #fff !important; }
