/*
 * استایل‌های اصلی افزونه MAS Brands
 *
 * @package MAS_Brands
 */

/* استایل‌های عمومی */
.mas-brands-container {
    margin: 20px 0;
    font-family: 'Vazir', Tahoma, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* استایل کارت برندها */
.mas-brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.mas-brand-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-align: center;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

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

.mas-brand-logo {
    margin-bottom: 15px;
}

.mas-brand-logo img {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    margin: 0 auto;
    display: block;
}

.mas-brand-title {
    font-size: 16px;
    font-weight: 700;
    margin: 10px 0 5px;
}

.mas-brand-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mas-brand-title a:hover {
    color: #0073aa;
}

.mas-brand-count {
    font-size: 13px;
    color: #777;
    margin-top: 5px;
}

/* استایل صفحه آرشیو برند */
.tax-product_brand .woocommerce-breadcrumb {
    margin-bottom: 20px;
}

.brand-header {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.brand-logo {
    flex: 0 0 150px;
    margin-left: 20px;
}

.brand-logo img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.brand-info {
    flex: 1;
    min-width: 250px;
}

.brand-title {
    margin: 0 0 10px;
    font-size: 24px;
    color: #222;
}

.brand-description {
    margin: 15px 0;
    line-height: 1.7;
    color: #555;
}

/* استایل تب نویسنده در صفحه محصول */
.woocommerce-Tabs-panel--author_tab {
    padding: 20px 0;
}

.author-info-box {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
}

.author-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.author-avatar {
    flex: 0 0 100px;
    margin-left: 20px;
}

.author-avatar img {
    border-radius: 50%;
    max-width: 100%;
    height: auto;
}

.author-details {
    flex: 1;
}

.author-name {
    margin: 0 0 5px;
    font-size: 20px;
}

.author-name a {
    color: #333;
    text-decoration: none;
}

.author-name a:hover {
    color: #0073aa;
}

.author-role {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 3px;
    margin: 0;
}

.author-title {
    margin: 5px 0 0;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.author-bio {
    line-height: 1.8;
    margin-bottom: 20px;
    color: #444;
}

.author-more {
    text-align: left;
}

/* استایل ویجت برندها */
.widget_mas_brands_widget {
    margin-bottom: 30px;
}

.widget_mas_brands_widget .brand-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget_mas_brands_widget .brand-item {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.widget_mas_brands_widget .brand-item:last-child {
    border-bottom: none;
}

.widget_mas_brands_widget .brand-link {
    display: flex;
    align-items: center;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 5px 0;
}

.widget_mas_brands_widget .brand-link:hover {
    color: #0073aa;
    padding-right: 5px;
}

.widget_mas_brands_widget .brand-thumbnail {
    width: 30px;
    height: 30px;
    margin-left: 10px;
    border-radius: 50%;
    overflow: hidden;
}

.widget_mas_brands_widget .brand-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.widget_mas_brands_widget .brand-name {
    flex: 1;
    font-size: 14px;
}

/* استایل صفحه نویسندگان */
.author-archive {
    margin: 30px 0;
}

.author-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin: 25px 0;
}

.author-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-align: center;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

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

.author-avatar-large {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.author-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-card .author-name {
    font-size: 18px;
    margin: 10px 0 5px;
}

.author-card .author-title {
    font-size: 14px;
    color: #666;
    margin: 0 0 10px;
}

.author-card .author-bio-short {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 60px;
}

.author-card .author-link {
    display: inline-block;
    padding: 8px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.author-card .author-link:hover {
    background: #005177;
    color: #fff;
}

/* استایل‌های واکنش‌گرا */
@media (max-width: 768px) {
    .brand-header {
        flex-direction: column;
        text-align: center;
    }
    
    .brand-logo {
        margin: 0 0 20px;
        flex: 0 0 auto;
    }
    
    .author-header {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        margin: 0 0 15px;
    }
    
    .author-details {
        text-align: center;
    }
    
    .author-more {
        text-align: center;
    }
    
    .mas-brands-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* استایل‌های چاپ */
@media print {
    .mas-brands-container {
        font-size: 12pt;
    }
    
    .author-header, .brand-header {
        page-break-inside: avoid;
    }
    
    .author-link, .author-more {
        display: none;
    }
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mas-brand-card, .author-card {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

/* تأخیر در انیمیشن برای کارت‌ها */
.mas-brands-grid .mas-brand-card:nth-child(1) { animation-delay: 0.1s; }
.mas-brands-grid .mas-brand-card:nth-child(2) { animation-delay: 0.2s; }
.mas-brands-grid .mas-brand-card:nth-child(3) { animation-delay: 0.3s; }
.mas-brands-grid .mas-brand-card:nth-child(4) { animation-delay: 0.4s; }
.mas-brands-grid .mas-brand-card:nth-child(n+5) { animation-delay: 0.5s; }
