@font-face {
    font-family: 'farsifont';
    src: url('/farsifont.woff') format('woff');
    font-weight: normal; font-style: normal; font-display: swap;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --accent: #10b981;
    --bg: #f3f3f3;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-light: #64748b;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --header-height: 75px;
}

* { box-sizing: border-box; }

body {
    font-family: 'farsifont', Tahoma, sans-serif !important;
    background-color: var(--bg); color: var(--text-main);
    margin: 0; line-height: 1.7; padding-bottom: 0;
    display: flex; flex-direction: column; min-height: 100vh;
    overflow-x: hidden; width: 100%; direction: rtl;
}

a { text-decoration: none; transition: all 0.2s ease-in-out; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* Header */
.header {
    background: rgb(255 255 255 / 70%); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    height: var(--header-height); display: flex; align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    margin-bottom: 20px; position: sticky; top: 0; z-index: 1000;
}

.header-inner {
    max-width: 1280px; width: 100%; margin: 0 auto; padding: 0 24px;
    display: flex; justify-content: space-between; align-items: center; gap: 30px;
}

.logo { font-size: 24px; font-weight: 900; color: #0f172a; letter-spacing: -0.5px; }
.logo span { color: var(--primary); }

/* Search Box */
.search-box { flex: 1; max-width: 500px; position: relative; }
.search-input {
    width: 100%; padding: 10px 20px 10px 100px; border-radius: 50px;
    border: 1px solid #e2e8f0; background: var(--surface); font-family: inherit;
    font-size: 14px; transition: all 0.3s; box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}
.search-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.search-btn {
    position: absolute; left: 4px; top: 4px; bottom: 4px;
    background: var(--primary); color: #fff; border: none; border-radius: 50px;
    padding: 0 24px; cursor: pointer; font-family: inherit; font-weight: 600; transition: background 0.2s;
}
.search-btn:hover { background: var(--primary-dark); }

/* Layout Containers */
.container {
    max-width: 1280px; margin: 0 auto; padding: 0 24px;
    display: flex; gap: 30px; align-items: stretch; flex: 1; width: 100%; padding-bottom: 50px;
}

.card {
    background: var(--surface); border-radius: var(--radius); padding: 30px;
    box-shadow: var(--shadow); margin-bottom: 30px; border: 1px solid #f1f5f9; width: 100%;
}

.flex-between { display: flex; justify-content: space-between; align-items: center; }
.text-muted { color: var(--text-light); font-size: 14px; }

/* Grid & Cards */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }

.product-card {
    background: var(--surface); border-radius: var(--radius); overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02); border: 1px solid #f1f5f9;
    display: flex; flex-direction: column; transition: all 0.3s ease; position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.06); border-color: #e2e8f0; }

.pc-img-box { position: relative; padding-top: 65%; background: #f8fafc; overflow: hidden; border-bottom: 1px solid #f1f5f9; }
.pc-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .pc-img { transform: scale(1.03); }

.pc-badge {
    position: absolute; top: 12px; right: 12px; background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px); color: var(--primary); font-size: 11px; font-weight: 700;
    padding: 6px 14px; border-radius: 50px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border: 1px solid rgba(255,255,255,0.4);
}

.pc-content { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.pc-title {
    font-size: 15px; font-weight: 700; margin: 0 0 16px 0; color: var(--text-main);
    line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.pc-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
    padding: 12px; background: var(--surface); color: var(--text-main); border: 1px solid #e2e8f0;
    border-radius: 8px; font-weight: 600; font-size: 13px; transition: all 0.2s; cursor: pointer; text-align: center;
}
.pc-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pc-btn.solid { background: var(--primary); color: #fff; border: none; }
.pc-btn.solid:hover { background: var(--primary-dark); }

.tag-badge {
    display: inline-block; background: #f1f5f9; color: var(--text-light); padding: 6px 14px;
    border-radius: 6px; font-size: 12px; margin: 0 6px 8px 0; transition: 0.2s; font-weight: 500;
}
.tag-badge:hover { background: #e2e8f0; color: var(--text-main); }

/* Footer */
.site-footer {
    background: rgba(255, 255, 255, .4);
    backdrop-filter: blur(10px);
    text-align: center;
    padding: 10px 0;
    margin-top: 20px;
    border-top: 1px solid #e2e8f0;
    width: 100%;
}

/* ----- استایل باکس‌های تبلیغات لینکدونی ----- */
.main-ad-link {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 18px; margin-bottom: 15px; border-radius: 12px; text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); border: 1px solid transparent;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); text-align: center;
}
.main-ad-link:hover { transform: translateY(-3px); box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.08); }
.main-ad-title { font-size: 14px; font-weight: 800; margin-bottom: 6px; }
.glass-ad-desc { font-size: 12px; opacity: 0.85; line-height: 1.6; }

.theme-blue { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.theme-blue:hover { border-color: #3b82f6; }

.theme-green { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.theme-green:hover { border-color: #22c55e; }

.theme-purple { background: #faf5ff; border-color: #e9d5ff; color: #6b21a8; }
.theme-purple:hover { border-color: #a855f7; }

.theme-amber { background: #fffbeb; border-color: #fef3c7; color: #92400e; }
.theme-amber:hover { border-color: #f59e0b; }

.theme-sunset { background: linear-gradient(135deg, #ffedd5 0%, #fce7f3 100%); border-color: #fbcfe8; color: #9d174d; }
.theme-sunset:hover { border-color: #f43f5e; }

/* تم‌های شیشه‌ای */
.theme-glass-light { background: rgba(255, 255, 255, 0.45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.6); color: #0f172a; }
.theme-glass-light:hover { background: rgba(255, 255, 255, 0.65); border-color: rgba(255, 255, 255, 0.9); }

.theme-glass-dark { background: rgba(15, 23, 42, 0.06); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(15, 23, 42, 0.1); color: #1e293b; }
.theme-glass-dark:hover { background: rgba(15, 23, 42, 0.12); border-color: rgba(15, 23, 42, 0.2); }

/* Responsive */
@media (max-width: 768px) {
    .header { height: auto; padding: 15px 0; position: static; }
    .header-inner { flex-direction: column; gap: 15px; }
    .search-box { width: 100%; max-width: 100%; }
    .container { flex-direction: column; padding: 0 15px; }
    .card { padding: 20px; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}