/**
 * استایل صفحه اختصاصی برند
 * استفاده از کلاس‌های موجود در قالب لاله زار آنلاین
 * 
 * @package LZ_Brand_Manager
 */

/* ========================================
   1. تنظیم عرض container مشابه صفحه اصلی
   ======================================== */

/* یکسان سازی padding با صفحه اصلی */
#brand-page-view .catalog__container,
#category-view .catalog__container {
    padding: 0 24px; /* مشابه .container صفحه اصلی */
}

/* رفع مشکل breadcrumb تکراری در صفحه آرشیو دسته‌بندی */
#category-view .woocommerce-breadcrumb,
#category-view .woocommerce-breadcrumb-wrapper,
.tax-brand_product_category .woocommerce-breadcrumb,
.tax-brand_product_category .woocommerce-breadcrumb-wrapper {
    display: none !important; /* مخفی کردن breadcrumb ووکامرس (از catalog__breadcrumb استفاده می‌کنیم) */
}

/* فقط breadcrumb اول نمایش داده شود */
#category-view .catalog__breadcrumb:first-of-type {
    display: block !important;
}

/* ========================================
   2. نمایش کامل category-intro در صفحه برند
   ======================================== */

/* غیرفعال کردن محدودیت ارتفاع برای صفحات برند */
#brand-page-view .category-intro__description-text,
#category-view .category-intro__description-text {
    max-height: none !important; /* نمایش کامل محتوا */
    overflow: visible !important;
    direction: rtl; /* راست به چپ */
    text-align: right; /* تراز راست */
}

/* تضمین RTL برای تمام المان‌های داخلی */
#brand-page-view .category-intro__description-text *,
#category-view .category-intro__description-text * {
    direction: rtl;
    text-align: right;
}

/* ========================================
   3. زیرعنوان برند (catalog__subtitle)
   ======================================== */

.catalog__subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    margin: 8px 0 0 0;
    font-weight: 400;
    line-height: 1.6;
}

/* ========================================
   4. لوگو برند و دکمه وب‌سایت (در category-intro__image)
   ======================================== */

/* wrapper لوگو */
.brand-logo-wrapper {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #e5e7eb;
}

/* تصویر لوگو */
.brand-logo-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* دکمه وب‌سایت (زیر لوگو) */
.brand-website-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    padding: 10px 20px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-website-button:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.brand-website-button svg {
    flex-shrink: 0;
    opacity: 0.8;
}

.brand-website-button:hover svg {
    opacity: 1;
}

/* تنظیم category-intro__image برای صفحات برند */
#brand-page-view .category-intro__image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
}

/* ========================================
   5. اطلاعات تماس برند (در category-intro__content)
   ======================================== */

.brand-contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.brand-contact__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-contact__link:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.brand-contact__link:active {
    transform: translateY(0);
}

.brand-contact__link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
}

.brand-contact__link:hover svg {
    opacity: 1;
}

/* ========================================
   6. Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .catalog__subtitle {
        font-size: 1rem;
    }
    
    .brand-contact-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .brand-contact__link {
        width: 100%;
        justify-content: center;
    }
    
    /* لوگو کوچکتر در موبایل */
    .brand-logo-wrapper {
        width: 120px;
        height: 120px;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .catalog__subtitle {
        font-size: 0.9375rem;
    }
    
    .brand-contact__link {
        font-size: 0.8125rem;
        padding: 6px 12px;
    }
    
    .brand-contact__link svg {
        width: 14px;
        height: 14px;
    }
    
    /* لوگو کوچکتر در موبایل کوچک */
    .brand-logo-wrapper {
        width: 100px;
        height: 100px;
        margin-bottom: 12px;
    }
    
    .brand-website-button {
        font-size: 0.875rem;
        padding: 8px 16px;
    }
}

/* ========================================
   7. RTL Support
   ======================================== */

[dir="rtl"] .brand-contact__link svg {
    margin-left: 0;
    margin-right: 8px;
}

[dir="rtl"] .brand-website-button svg {
    margin-left: 0;
    margin-right: 8px;
}

/* ========================================
   8. Print Styles
   ======================================== */

@media print {
    .brand-contact-info {
        display: none;
    }
}

/* ========================================
   9. سازگاری با Dark Mode (اختیاری)
   ======================================== */

@media (prefers-color-scheme: dark) {
    .brand-contact__link {
        background: #1f2937;
        border-color: #374151;
        color: #d1d5db;
    }
    
    .brand-contact__link:hover {
        background: #1e3a8a;
        border-color: #3b82f6;
        color: #93c5fd;
    }
}

