/* فونت اصلی */
@font-face {
  font-family: 'IranSansWeb';
  src: url('fonts/IRANSansWeb.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

body {
    font-family: 'IranSansWeb', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    background-color: #f5f5f5;
    color: #333;
}

.search-container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    text-align: center;
}

#search-input {
    padding: 12px;
    width: 60%;
    max-width: 500px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin: 0 10px 10px 0;
}

#search-btn {
    padding: 12px 25px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

#search-btn:hover {
    background-color: #45a049;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 10px;
}

.book-card {
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.book-card h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.2em;
    margin-bottom: 10px;
}

.book-card p {
    margin: 8px 0;
    color: #555;
}

.price-line, .inventory-line, .position-line, .position2-line {
    display: flex;
    justify-content: space-between;
}

.price-value, .inventory-value, .position-value, .position2-line {
    font-weight: bold;
    color: #2c3e50;
}

.price-value {
    color: #e74c3c;
    font-family: Tahoma, Arial, sans-serif;
    direction: ltr;
}

.inventory-value {
    font-family: Tahoma, Arial, sans-serif;
    direction: ltr;
}

.error, .no-results {
    color: #e53935;
    text-align: center;
    padding: 20px;
    font-size: 1.1em;
}

html[dir="rtl"] .price-value,
html[dir="rtl"] .inventory-value {
    direction: ltr;
    unicode-bidi: embed;
}

.toggle-advanced {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    margin-top: 10px;
    font-size: 14px;
    text-decoration: underline;
    padding: 5px;
}

.toggle-advanced:hover {
    color: #2980b9;
}

.advanced-search {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    margin-top: 15px;
}

.advanced-search input {
    margin-bottom: 10px;
}

input,
button,
select,
textarea {
    font-family: 'IranSansWeb', Tahoma, sans-serif !important;
}

/* لینک‌های کلیک‌پذیر نویسنده / مترجم / ناشر در نتایج */
.book-card a.person-link,
.book-card a.publisher-link {
    color: #0077cc;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    cursor: pointer;
    transition: color 0.2s, border-bottom-color 0.2s;
}

.book-card a.person-link:hover,
.book-card a.publisher-link:hover {
    color: #e67e22;
    border-bottom-color: currentColor;
}
