/* ===== آهنینو — Design 1: Industrial Modern ===== */
:root {
    --bg: #10151b;
    --bg-raised: #171f27;
    --bg-card: #1b232c;
    --border: #2a333d;
    --ink: #eef1f4;
    --ink-dim: #9aa5b1;
    --ember: #ff6a35;
    --ember-dim: #cc4d20;
    --ok: #2ecc71;
}

body {
    font-family: "IRANSans", "Vazir", "Tahoma", sans-serif;
    background-color: var(--bg);
    color: var(--ink);
    line-height: 1.8;
    font-size: 16px;
    padding-bottom: 0;
}

a { text-decoration: none; }

/* ---------- Ticker ---------- */
.ticker-wrap {
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    white-space: nowrap;
}
.ticker-track {
    display: inline-flex;
    gap: 3rem;
    padding: 0.4rem 0;
    animation: ticker-scroll 28s linear infinite;
    color: var(--ink-dim);
    font-size: 0.82rem;
}
.ticker-track span::before {
    content: "◆";
    color: var(--ember);
    margin-left: 0.6rem;
    font-size: 0.6rem;
}
@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .ticker-track { animation: none; }
}

/* ---------- Navbar ---------- */
.app-nav {
    background-color: var(--bg-raised) !important;
    border-bottom: 1px solid var(--border);
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}
.brand-word { color: var(--ink); font-size: 1.1rem; }
.navbar-nav .nav-link {
    color: var(--ink-dim);
    font-weight: 500;
    margin: 0 8px;
    transition: color 0.2s ease;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--ember);
}
.dropdown-menu {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
}
@media (min-width: 992px) {
    .qb-hover-dropdown { position: relative; }
    .qb-hover-dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}
.mega-menu {
    min-width: 320px;
    max-height: 75vh;
    overflow-y: auto;
    padding: 0.5rem 0;
}
@media (min-width: 992px) {
    .mega-menu {
        min-width: 560px;
        column-count: 2;
        column-gap: 0;
    }
}
.mega-menu-group {
    display: block;
    padding: 0.5rem 1rem 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ember);
    text-transform: none;
    break-inside: avoid;
}
.mega-menu .dropdown-item {
    break-inside: avoid;
}
.dropdown-item {
    color: var(--ink-dim);
}
.dropdown-item:hover, .dropdown-item:focus {
    background-color: var(--bg-raised);
    color: var(--ember);
}
.nav-search .form-control {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--ink);
}
.nav-search .form-control::placeholder { color: var(--ink-dim); }
.nav-search .form-control:focus {
    background-color: var(--bg-card);
    color: var(--ink);
    border-color: var(--ember);
    box-shadow: 0 0 0 0.2rem rgba(255,106,53,0.2);
}

.btn-ember {
    background-color: var(--ember);
    border-color: var(--ember);
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
}
.btn-ember:hover { background-color: var(--ember-dim); border-color: var(--ember-dim); color: #fff; }
.btn-ember-outline {
    color: var(--ember);
    border: 1px solid var(--ember);
    border-radius: 50px;
    padding: 6px 18px;
    font-weight: 700;
    transition: all 0.2s ease;
}
.btn-ember-outline:hover { background-color: var(--ember); color: #fff; }

/* ---------- Mobile drawer nav ---------- */
.mobile-nav-toggle {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 1050;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--ink);
    font-size: 1.3rem;
    display: none;
}
@media (max-width: 991.98px) {
    .mobile-nav-toggle { display: flex; align-items: center; justify-content: center; }
    .app-nav .navbar-collapse { display: none !important; }
    .app-nav .navbar-toggler { display: none; }
}
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 1055;
}
.mobile-nav-overlay.open { opacity: 1; pointer-events: auto; }
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 78%;
    max-width: 320px;
    background: var(--bg-raised);
    border-left: 1px solid var(--border);
    z-index: 1060;
    transform: translateX(100%);
    transition: transform 0.28s ease;
    display: flex;
    flex-direction: column;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
}
.mobile-nav-close {
    background: none;
    border: none;
    color: var(--ink-dim);
    font-size: 1.1rem;
}
.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    overflow-y: auto;
    flex: 1;
}
.mobile-nav-list li a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 1.2rem;
    color: var(--ink-dim);
    border-bottom: 1px solid var(--border);
}
.mobile-nav-list li a i { color: var(--ember); font-size: 1.05rem; }
.mobile-nav-call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem;
    padding: 0.8rem;
    background: var(--ember);
    color: #fff;
    border-radius: 10px;
    font-weight: 700;
}

/* ---------- Main ---------- */
.app-main { min-height: 60vh; }
.card {
    --bs-card-color: var(--ink);
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--ink);
}
.card-title { color: var(--ink); }
.card-text { color: var(--ink); }
.text-muted { color: var(--ink-dim) !important; }
.text-secondary { color: var(--ink-dim) !important; }
.table {
    --bs-table-color: var(--ink);
    --bs-table-bg: var(--bg-card);
    --bs-table-striped-bg: var(--bg-raised);
    --bs-table-hover-bg: rgba(255,106,53,0.08);
    --bs-table-striped-color: var(--ink);
    --bs-table-hover-color: var(--ink);
    --bs-table-border-color: var(--border);
    color: var(--ink);
}
.table > :not(caption) > * > * {
    color: var(--ink);
}
.form-control, .form-select {
    background-color: var(--bg-card);
    border-color: var(--border);
    color: var(--ink);
}
.form-control:focus, .form-select:focus {
    background-color: var(--bg-card);
    color: var(--ink);
    border-color: var(--ember);
    box-shadow: 0 0 0 0.2rem rgba(255,106,53,0.2);
}
.form-label { color: var(--ink-dim); }
.alert-primary {
    background-color: rgba(255,106,53,0.12);
    border-color: rgba(255,106,53,0.35);
    color: var(--ember);
}

/* Buttons */
.btn-primary {
    background-color: var(--ember);
    border-color: var(--ember);
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.btn-primary:hover {
    background-color: var(--ember-dim);
    border-color: var(--ember-dim);
    transform: translateY(-2px);
}
.btn-outline-primary, .btn-outline-secondary {
    color: var(--ember);
    border-color: var(--ember);
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: bold;
    transition: all 0.3s ease;
}
.btn-outline-primary:hover, .btn-outline-secondary:hover {
    background-color: var(--ember);
    color: white;
    border-color: var(--ember);
    transform: translateY(-2px);
}

/* tabular numbers for prices */
.fw-bold, td, .card-text { font-variant-numeric: tabular-nums; }

/* Breadcrumbs */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}
.breadcrumb-item a { color: var(--ink-dim); }
.breadcrumb-item.active { color: var(--ember); }

/* ---------- نوار لودینگ بین صفحات ---------- */
#pageLoadingBar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ember), var(--ember-dim));
    width: 0%;
    z-index: 2000;
    opacity: 0;
    transition: width 0.5s cubic-bezier(0.1, 0.7, 0.5, 1), opacity 0.2s ease;
    box-shadow: 0 0 8px rgba(255, 106, 53, 0.6);
    pointer-events: none;
}
#pageLoadingBar.loading {
    opacity: 1;
    width: 82%;
}
@media (prefers-reduced-motion: reduce) {
    #pageLoadingBar { transition: opacity 0.2s ease; }
}

/* ---------- Back button ---------- */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--ink-dim);
    border-radius: 10px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.btn-back:hover { border-color: var(--ember); color: var(--ember); }

/* ---------- Page layout (content + ad rail) ---------- */
.page-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}
@media (min-width: 992px) {
    .page-layout:not(.no-aside) {
        grid-template-columns: 1fr 260px;
    }
}
.page-main { min-width: 0; }

.ad-rail {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    overflow-x: auto;
}
@media (min-width: 992px) {
    .ad-rail {
        flex-direction: column;
        position: sticky;
        top: 90px;
    }
}
.ad-card {
    position: relative;
    display: block;
    flex: 0 0 220px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--ink);
    transition: border-color 0.2s ease;
}
@media (min-width: 992px) {
    .ad-card { flex: none; }
}
.ad-card:hover { border-color: var(--ember); color: var(--ink); }
.ad-card-label {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    font-size: 0.62rem;
    color: var(--ink-dim);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.1rem 0.4rem;
}
.ad-card-logo { height: 26px; margin-bottom: 0.5rem; }
.ad-card h6 { font-weight: 700; margin-bottom: 0.4rem; font-size: 0.9rem; }
.ad-card p { color: var(--ink-dim); font-size: 0.78rem; margin: 0; line-height: 1.7; }

/* ---------- Hero ---------- */
.hero {
    background: radial-gradient(120% 140% at 20% 0%, rgba(255,106,53,0.16), transparent 55%), var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.4rem 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}
.hero h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}
.hero p.lead {
    color: var(--ink-dim);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}
.hero-search {
    max-width: 560px;
    margin: 0 auto;
}
.hero-search .input-group {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.hero-search .form-control {
    border: none;
    background: transparent;
    padding: 0.9rem 1rem;
    font-size: 1rem;
}
.hero-search .form-control:focus { box-shadow: none; }
.hero-search .btn {
    border-radius: 0;
    padding: 0 1.4rem;
}

/* Quick action grid — designed for a first-time / non-technical mobile user */
.quick-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.7rem;
    margin: 1.6rem auto 0;
    max-width: 560px;
}
.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.9rem 0.3rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 600;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.quick-link i {
    font-size: 1.4rem;
    color: var(--ember);
}
.quick-link:hover {
    border-color: var(--ember);
    transform: translateY(-2px);
    color: var(--ink);
}

/* ---------- Section heading ---------- */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}
.section-head h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}
.section-head .see-all {
    font-size: 0.85rem;
    color: var(--ember);
    font-weight: 600;
}

/* Category tile grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (min-width: 768px) {
    .category-grid { grid-template-columns: repeat(4, 1fr); }
}
.category-tile {
    position: relative;
    display: block;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    height: 150px;
    background: var(--bg-card);
}
.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.65;
    transition: transform 0.4s ease, opacity 0.2s ease;
}
.category-tile:hover img { transform: scale(1.08); opacity: 0.8; }
.category-tile .tile-label {
    position: absolute;
    inset: auto 0 0 0;
    padding: 0.7rem 0.8rem;
    background: linear-gradient(0deg, rgba(0,0,0,0.75), transparent);
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.category-tile .tile-label small {
    font-weight: 400;
    font-size: 0.72rem;
    opacity: 0.8;
}
.category-tile.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
}
.category-tile.no-image .tile-label {
    position: static;
    background: none;
    color: var(--ink);
}

/* ---------- Price list (mobile-friendly replacement for tables) ---------- */
.price-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.price-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    transition: border-color 0.2s ease;
}
.price-row:hover { border-color: var(--ember); }
.price-row-main { flex: 1; min-width: 0; }
.price-row-title {
    font-weight: 700;
    color: var(--ink);
    font-size: 0.98rem;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.price-row-meta {
    color: var(--ink-dim);
    font-size: 0.8rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.price-row-meta span::before {
    content: "•";
    margin-left: 0.5rem;
    color: var(--border);
}
.price-row-meta span:first-child::before { content: none; margin: 0; }
.price-row-price {
    font-weight: 800;
    color: var(--ember);
    font-size: 0.95rem;
    white-space: nowrap;
    text-align: left;
    font-variant-numeric: tabular-nums;
}
.price-row-price small {
    display: block;
    color: var(--ink-dim);
    font-weight: 400;
    font-size: 0.68rem;
}
.price-row-go {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    background: rgba(255,106,53,0.12);
    color: var(--ember);
    font-size: 1.1rem;
}

/* ---------- Product detail ---------- */
.product-hero {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.product-hero img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
}
.product-price-tag {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    background: rgba(255,106,53,0.12);
    border: 1px solid rgba(255,106,53,0.35);
    color: var(--ember);
    border-radius: 10px;
    padding: 0.6rem 1rem;
    font-weight: 800;
    font-size: 1.15rem;
    font-variant-numeric: tabular-nums;
}
.product-price-tag small { font-size: 0.75rem; font-weight: 400; color: var(--ink-dim); }
.spec-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin: 1.2rem 0;
}
.spec-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 1rem;
    font-size: 0.92rem;
}
.spec-row:nth-child(even) { background: var(--bg-raised); }
.spec-row dt { color: var(--ink-dim); font-weight: 500; }
.spec-row dd { color: var(--ink); font-weight: 700; margin: 0; text-align: left; }
.action-row {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}
.action-row .btn { flex: 1; min-width: 140px; min-height: 48px; }

/* ---------- Quote builder ---------- */
.qb-row-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-bottom: 1rem;
}
.qb-row-card {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.9rem;
}
.qb-row-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7rem;
    margin-top: 0.8rem;
    align-items: end;
}
@media (min-width: 768px) {
    .qb-row-grid { grid-template-columns: 1fr 1fr 1fr 1fr auto; }
}
.qb-field label {
    display: block;
    font-size: 0.72rem;
    color: var(--ink-dim);
    margin-bottom: 0.25rem;
}
.qb-line-total-cell {
    min-height: 38px;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.qb-row-grid .qb-remove-row {
    height: 38px;
    align-self: end;
}
.qb-autocomplete { position: relative; }
.qb-suggestions {
    display: none;
    position: absolute;
    z-index: 30;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-top: 4px;
    max-height: 280px;
    overflow-y: auto;
    box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}
.qb-suggestions.open { display: block; }
.qb-suggestion-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.8rem;
    cursor: pointer;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
    min-height: 44px;
}
.qb-suggestion-item:last-child { border-bottom: none; }
.qb-suggestion-item:hover, .qb-suggestion-item:active { background: var(--bg-raised); }
.qb-suggestion-name { display: flex; flex-direction: column; gap: 0.1rem; }
.qb-suggestion-factory { font-size: 0.72rem; color: var(--ink-dim); font-weight: 400; }
.qb-suggestion-item small { color: var(--ember); white-space: nowrap; font-weight: 700; }

/* استایل تیره برای مودال بوت‌استرپ (پیش‌فرضش سفیده) */
.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--ink);
}
.modal-header { border-bottom-color: var(--border); }
.modal-header .btn-close { filter: invert(1) grayscale(100%) brightness(1.6); }

/* پاپ‌آپ انتخاب دقیق محصول */
.qb-modal-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 55vh;
    overflow-y: auto;
}
.qb-modal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    width: 100%;
    text-align: right;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    min-height: 52px;
    cursor: pointer;
    transition: border-color 0.15s ease;
}
.qb-modal-item:hover, .qb-modal-item:active { border-color: var(--ember); }
.qb-modal-item-main { display: flex; flex-direction: column; gap: 0.15rem; }
.qb-modal-item-main strong { color: var(--ink); font-size: 0.92rem; }
.qb-modal-item-factory { color: var(--ink-dim); font-size: 0.78rem; }
.qb-modal-item-price { color: var(--ember); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }

.qb-summary {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    font-weight: 700;
}
.qb-captcha-eq {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0.9rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Print stylesheet for the proforma invoice */
@media print {
    .app-nav, .ticker-wrap, .mobile-nav-toggle, .mobile-nav, .mobile-nav-overlay,
    .tabbar, .footer, .btn-back, .ad-rail, .scroll-top-btn, .d-print-none {
        display: none !important;
    }
    body { background: #fff; color: #000; }
    .page-layout { display: block !important; }
    .card { background: #fff; border-color: #ccc; color: #000; }
    .qb-row-card { color: #000 !important; border-color: #ccc; }
    .qb-summary { color: #000; }
}

/* ---------- Footer ---------- */
.footer {
    background-color: var(--bg-raised);
    border-top: 1px solid var(--border);
    color: var(--ink-dim);
    padding: 3rem 0 1.5rem;
    font-size: 0.9rem;
    margin-top: 4rem;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    color: var(--ink);
    font-size: 1.15rem;
    margin-bottom: 0.9rem;
}
.footer-about { color: var(--ink-dim); line-height: 1.9; }
.footer-social { margin-top: 1rem; }
.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--ink-dim);
    margin-left: 8px;
    font-size: 1.05rem;
    transition: all 0.2s ease;
}
.footer-social a:hover { color: var(--ember); border-color: var(--ember); }
.footer-heading { color: var(--ink); font-weight: 700; margin-bottom: 1rem; }
.footer-links, .footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li, .footer-contact li { margin-bottom: 0.6rem; }
.footer-links a { color: var(--ink-dim); }
.footer-links a:hover { color: var(--ember); }
.footer-contact li { display: flex; align-items: flex-start; gap: 0.5rem; }
.footer-contact i { color: var(--ember); margin-top: 0.2rem; }
.footer-contact a { color: var(--ink-dim); direction: ltr; unicode-bidi: embed; }

/* آکاردئون فوتر، فقط موبایل — به‌جای دو ستون لینک بلند که روی موبایل کاربر رو خیلی می‌بره پایین */
.footer-accordion {
    border-bottom: 1px solid var(--border);
    padding: 0.2rem 0;
}
.footer-accordion:first-child { border-top: 1px solid var(--border); margin-top: 0.5rem; }
.footer-accordion summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0.2rem;
    cursor: pointer;
    margin-bottom: 0;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
}
.footer-accordion summary::-webkit-details-marker { display: none; }
.footer-accordion summary::after {
    content: "\f282"; /* bootstrap-icons chevron-down */
    font-family: "bootstrap-icons";
    font-size: 0.85rem;
    color: var(--ink-dim);
    transition: transform 0.2s ease;
}
.footer-accordion[open] summary::after { transform: rotate(180deg); }
.footer-accordion .footer-links {
    padding-bottom: 0.9rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.2rem 1rem;
}
.footer-accordion .footer-links li { margin-bottom: 0.4rem; }
.footer-accordion .footer-links a {
    display: block;
    padding: 0.3rem 0;
    min-height: 36px;
    display: flex;
    align-items: center;
}
.footer-bottom {
    border-top: 1px solid var(--border);
    margin-top: 2rem;
    padding-top: 1.2rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.82rem;
}

/* ---------- Mobile tabbar ---------- */
.tabbar {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: var(--bg-raised);
    border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--ink-dim);
    font-size: 0.68rem;
    min-width: 48px;
    min-height: 48px;
    justify-content: center;
    border-radius: 8px;
    transition: color 0.2s ease;
}
.tabbar-item i { font-size: 1.25rem; }
.tabbar-item:hover, .tabbar-item:active { color: var(--ember); }
.tabbar-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 50%;
    background: var(--ember);
    color: #fff;
    font-size: 1.35rem;
    margin-top: -26px;
    box-shadow: 0 6px 18px rgba(255,106,53,0.45);
    border: 3px solid var(--bg-raised);
}
@media (max-width: 991.98px) {
    body { padding-bottom: 78px; }
}

/* Scroll-top button */
.scroll-top-btn {
    display: none;
    position: fixed;
    bottom: 90px;
    left: 16px;
    z-index: 1030;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--ink);
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
@media (min-width: 992px) {
    .scroll-top-btn { bottom: 24px; }
}

/* ---------- بنر نصب اپ (Add to Home Screen) ---------- */
.install-banner {
    position: fixed;
    right: 12px;
    left: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom) + 10px);
    z-index: 1060;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.8rem 0.9rem;
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
    animation: install-banner-in 0.3s ease;
}
@media (min-width: 992px) {
    .install-banner {
        right: auto;
        left: 24px;
        bottom: 24px;
        max-width: 380px;
    }
}
@keyframes install-banner-in {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.install-banner-icon {
    color: var(--ember);
    font-size: 1.4rem;
    flex-shrink: 0;
}
.install-banner-text {
    flex: 1;
    font-size: 0.8rem;
    color: var(--ink);
    line-height: 1.6;
}
.install-banner-install { flex-shrink: 0; white-space: nowrap; }
.install-banner-close {
    background: none;
    border: none;
    color: var(--ink-dim);
    font-size: 1.3rem;
    line-height: 1;
    flex-shrink: 0;
    padding: 0.2rem;
    min-width: 32px;
    min-height: 32px;
}

/* Table Styling */
.table-hover tbody tr:hover {
    cursor: pointer;
}
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table td, .table th {
    vertical-align: middle;
    font-size: 15px;
    padding: 0.75rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    h1, h2, h3 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    p {
        font-size: 15px;
        line-height: 1.6;
    }
    .card {
        margin-bottom: 20px;
    }
    .table-responsive {
        margin-bottom: 30px;
    }
}
@media (max-width: 576px) {
    #featured-products .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}
#articles img {
    height: 280px;
    object-fit: cover;
}

@media (max-width: 768px) {
    #articles img {
        height: 350px !important;
    }
    #articles .card {
        width: 90% !important;
        margin: 0 auto;
    }
}
.card:hover img {
    transform: scale(1.05);
}
.card:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}
/* ---------- صفحه‌ی جزئیات مقاله ---------- */
.article-detail { max-width: 760px; margin: 0 auto; }
.article-hero-image {
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    max-height: 420px;
}
.article-hero-image img {
    width: 100%;
    height: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
}
.article-detail-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
    text-wrap: balance;
}
.article-detail-meta {
    color: var(--ink-dim);
    font-size: 0.85rem;
    margin-bottom: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.article-detail-body {
    color: var(--ink);
    line-height: 2;
    font-size: 1rem;
}
.article-detail-body p { margin-bottom: 1.2rem; }
.article-detail-body a {
    color: var(--ember);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.article-detail-body a:hover { color: var(--ember-dim); }
.article-detail-body img {
    max-width: 100%;
    border-radius: 10px;
    margin: 1rem 0;
}
.article-detail-body h2, .article-detail-body h3 {
    font-weight: 700;
    margin: 1.6rem 0 0.8rem;
}
.article-detail-footer {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.article-image-wrapper {
    height: 300px;
    overflow: hidden;
}
.article-image {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.article-card:hover .article-image {
    transform: scale(1.15);
}

/* اسکرول افقی مقالات، فقط موبایل */
.article-scroll {
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
    margin: 0 -0.1rem;
}
.article-scroll-card {
    flex: 0 0 78%;
    scroll-snap-align: start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: var(--ink);
    display: block;
}
.article-scroll-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}
.article-scroll-card-noimg {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-raised);
    color: var(--ink-dim);
    font-size: 2rem;
}
.article-scroll-card-body { padding: 0.9rem; }
.article-scroll-card-body h6 {
    font-weight: 700;
    margin-bottom: 0.4rem;
    font-size: 0.92rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-scroll-card-body p {
    color: var(--ink-dim);
    font-size: 0.8rem;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
