@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

.tavoos-shop-wrapper,
.tavoos-shop-wrapper *,
.tavoos-modal,
.tavoos-modal * {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
}

.tavoos-shop-wrapper {
    display: flex;
    flex-direction: row;
    gap: 30px;
    direction: rtl;
}

.tavoos-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #f7f8f6;
    border-radius: 12px;
    padding: 25px 20px;
    height: fit-content;
}

.tavoos-filter-title {
    font-size: 18px;
    font-weight: 800;
    color: #123524;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #dfe4de;
}

.tavoos-cat-filter {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tavoos-cat-filter li {
    margin-bottom: 4px;
}

.tavoos-cat-item {
    margin-bottom: 4px;
}

.tavoos-cat-row {
    display: flex;
    align-items: center;
}

.tavoos-cat-link {
    display: block;
    flex: 1;
    padding: 9px 12px;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.tavoos-cat-link:hover {
    background: #e7efe9;
    color: #123524;
}

.tavoos-cat-link.active {
    background: #123524;
    color: #fff;
}

.tavoos-cat-sub {
    list-style: none;
    margin: 4px 0 4px 0;
    padding-right: 16px;
}

.tavoos-cat-sub .tavoos-cat-link {
    font-size: 14px;
    color: #555;
}

.tavoos-cat-sub .tavoos-cat-link.active {
    color: #fff;
}

.tavoos-products-area {
    flex: 1;
    min-width: 0;
}

.tavoos-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.tavoos-product-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f2f2f2;
    aspect-ratio: 1 / 1;
}

.tavoos-product-thumb {
    display: block;
    width: 100%;
    height: 100%;
}

.tavoos-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.tavoos-product-thumb:hover img {
    transform: scale(1.06);
}

.tavoos-no-products {
    text-align: center;
    padding: 40px;
    color: #777;
}

/* Modal */
.tavoos-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    direction: rtl;
}

.tavoos-modal.active {
    display: block;
}

.tavoos-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.tavoos-modal-box {
    position: relative;
    background: #fff;
    max-width: 900px;
    width: 92%;
    margin: 5% auto;
    border-radius: 16px;
    padding: 45px 30px 30px;
    max-height: 85vh;
    overflow-y: auto;
}

.tavoos-modal-close {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    background: #123524;
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    font-family: Arial, sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.tavoos-modal-close:hover {
    background: #1d4e37;
}

.tavoos-modal-loading {
    text-align: center;
    padding: 60px 0;
    font-size: 16px;
    color: #666;
}

.tavoos-modal-product {
    display: flex;
    gap: 30px;
}

.tavoos-modal-image {
    width: 45%;
    flex-shrink: 0;
}

.tavoos-modal-image img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
}

.tavoos-modal-info h2 {
    margin: 0 0 10px;
    color: #123524;
    font-size: 20px;
    font-weight: 800;
}

.tavoos-modal-cats {
    color: #888;
    margin-bottom: 15px;
    font-size: 14px;
}

.tavoos-modal-desc {
    margin-bottom: 15px;
    line-height: 1.9;
    color: #444;
    text-align: justify;
}

@media (max-width: 768px) {
    .tavoos-shop-wrapper {
        flex-direction: column;
    }
    .tavoos-sidebar {
        width: 100%;
    }
    .tavoos-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tavoos-modal-product {
        flex-direction: column;
    }
    .tavoos-modal-image {
        width: 100%;
    }
}
