/* =============================
   FILTER SECTION — FIGMA EXACT
   ============================= */

.masters-filter-section {
    margin-bottom: 32px;
}

.masters-filter-section-wrap {
    display: flex;
    justify-content: space-between;
   
}

.masters-filter-section-wrap ul {
    display: flex;
    gap: 20px;
    padding: 0;
    margin: 0;
    list-style: none;
	 align-items: flex-start;
}

.masters-filter-section-wrap li {
   display: flex;
    gap: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #000;
    line-height: 25px;
}

/* Квадратики фильтра (точно как в макете) */
.sw-check {
    width: 16px;
    height: 16px;
    border: 1px solid #000;
    border-radius: 4px;
    transition: 0.2s ease;
	margin-top: 3px;
}

/* Активный квадратик — полностью чёрный */
.sw-check-active .sw-check {
    background: #000;
}

/* Количество мастеров */
.master-quantity {
    font-size: 16px;
    font-weight: 500;
}


/* ==================================
   GRID — EXACT 4 COL LAYOUT
   ================================== */

.masters-grid-wrap {
    display: flex;
    flex-wrap: wrap;
    gap:24px;
	 min-height: 830px;
   
}


/* ==================================
   CARD — 329 × 494px (FIGMA EXACT)
   ================================== */

.masters-grid-card {
   
    color: #000;
    
  
}

/* Hover — ровно -3px + мягкая тень */
.masters-grid-card:hover {
    transform: translateY(-3px);
   
}

/* Woodmart фикс — не перекрашивать title */
.masters-grid-card:hover .masters-grid-card-title,
.masters-grid-card:hover .masters-grid-way ul li {
    color: #000 !important;
}


/* ======== IMAGE ======== */

.masters-grid-card-image img, .image-master-custom {
    object-fit: cover;
    border-radius: 12px;
    height: 361px;
    width: 314px;
}


/* ======== TEXT BLOCK ======== */

/* 16px между фото и текстом */
.masters-grid-card-info {
    margin-top: 16px;
    
}

/* TITLE — 24px, Medium, отступ 8px */
.masters-grid-card-title {
    font-family: inherit;
    font-size: 24px;
    font-weight: 500;
    margin: 0 0 8px 0;
    line-height: 1.2;
    color: #000 !important;
}

/* профессия */
.masters-grid-way ul {
    padding: 0;
    margin: 0;
    list-style: none;
    font-size: 16px;
    color: #444;
}


/* =============================
   ADAPTIVE — EXACT FIGMA RULES
   ============================= */

/* 3 карточки на планшете */
@media (max-width: 1024px) {
    .masters-grid-wrap {
        gap: 24px;
		min-height: 300px;
    }
}

/* 2 карточки на мобильном */
@media (max-width: 768px) {
    .masters-grid-card {
        width: calc(50% - 10px);
        height: auto;
        max-width: 329px;
    }

    .masters-grid-wrap {
        gap: 20px;
        
    }
}

/* компактный мобильный */
@media (max-width: 768px) {
    .masters-grid-card {
        width: calc(50% - 8px);
    }

    .masters-grid-wrap {
        gap: 12px;
    }

    .masters-filter-section-wrap {
        
        align-items: flex-start;
        gap: 16px;
    }

    .masters-filter-section-wrap ul {
        gap: 16px 20px;
        flex-wrap: wrap;
    }
}

/* =============================
   MOBILE DROPDOWN FOR FILTERS
   ============================= */

.masters-filter-mobile {
    display: none;
    
}

.masters-filter-mobile select {
    border:none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='20' width='20' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    
}

/* Показываем дропдаун на мобильном */
@media (max-width: 768px) {
    .masters-filter-mobile {
        display: block;
    }

    /* Скрываем старые фильтры */
    .masters-filter-section-wrap ul {
        display: none;
    }
}

/* =============================
   MOBILE CARD TYPOGRAPHY FIXES
   ============================= */
@media (max-width: 768px) {
    .masters-grid-card-title {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .masters-grid-way ul {
        font-size: 14px;
    }
}


@media (max-width: 768px) {
    .masters-filter-section-wrap {
       
         align-items: center  !important;
        gap: 16px;
    }
	.masters-grid-card-image img, .image-master-custom {
      height: 262px;
}
}



/* ========== ANIMATION FOR FILTER SWITCH (NO FADES) ========== */

.masters-grid-card {
    transition: transform .20s ease;
}

.masters-grid-card.filter-animate {
    transform: scale(0.97);
}

.masters-grid-card.filter-reset {
    transform: scale(1);
}







.masters-grid-card {
    position: relative;
    overflow: hidden;
}

.masters-card-arrow {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    transform: translateY(8px);
    transition: 0.3s ease;
    pointer-events: none;
}

.masters-grid-card:hover .masters-card-arrow {
    opacity: 1;
    transform: translateY(0);
}

