/*
Theme Name: Astra Child
Template: astra
*/

/* Фікс карточки — відносне позиціонування */
.tutor-course-card {
    position: relative;
    overflow: visible !important;
}

/* Бейдж — всередині thumbnail, не поверх сусідньої карточки */
.tutor-course-lock-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    pointer-events: none;
}

.tutor-lock-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 0, 0, 0.70);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Кнопка — нормальна ширина і горизонтальний текст */
.tutor-course-locked .tutor-btn {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    white-space: nowrap;
    padding: 10px 16px;
    box-sizing: border-box;
}

/* Грід — мінімальна ширина карточки */
.tutor-grid.tutor-grid-3 {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
}

@media (max-width: 900px) {
    .tutor-grid.tutor-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .tutor-grid.tutor-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ─── Header ─────────────────────────────────────────────── */
.km-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.km-header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 70px;
}

/* Ліве меню */
.km-nav-left {
    display: flex;
    align-items: center;
}

.km-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.km-menu a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

.km-menu a:hover,
.km-menu .current-menu-item > a {
    color: #e63329;
}

/* Лого — по центру */
.km-logo {
    display: flex;
    justify-content: center;
}

.km-logo img {
    height: 48px;
    width: auto;
}

.km-site-name {
    font-size: 20px;
    font-weight: 700;
}

/* Праві віджети */
.km-nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

/* Кошик */
.km-cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    color: #111;
    text-decoration: none;
}

.km-cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e63329;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Пошук */
.km-search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: #111;
    display: flex;
    align-items: center;
    padding: 0;
}

.km-search-bar {
    border-top: 1px solid rgba(0,0,0,0.08);
    background: #fff;
    padding: 12px 24px;
}

.km-search-inner {
    display: flex;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
    gap: 12px;
}

.km-search-inner .search-form {
    flex: 1;
}

.km-search-inner input[type="search"] {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.km-search-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #666;
}

/* Мобільний */
@media (max-width: 768px) {
    .km-nav-left { display: none; }
    .km-header-inner { grid-template-columns: auto 1fr; }
    .km-logo { justify-content: flex-start; }
}