.ar-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 360px;
    max-width: 85vw;
    height: 100vh;
    background: #f9fafb;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.14);
    border-right: 1px solid #e5e7eb;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Учет черной админ-панели WordPress, если вы авторизованы */
body.admin-bar .ar-drawer {
    top: 32px;
    height: calc(100vh - 32px);
}

.ar-drawer.is-open {
    transform: translateX(0);
}

/* Кнопка с острыми углами в стиле "В корзину" */
.ar-tab-btn {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    background: #0056b3;
    color: #ffffff;
    border: none;
    border-radius: 0;
    padding: 12px 7px 14px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 3px 0 10px rgba(0, 86, 179, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
}

.ar-tab-btn:hover {
    background: #004494;
}

/* Блок из 5 звезд: 3 сверху и 2 снизу */
.ar-tab-stars {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fbbf24;
    font-size: 11px;
    line-height: 1.05;
    letter-spacing: 1px;
}

/* Вертикальный текст под звездами */
.ar-tab-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.ar-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.ar-drawer-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.ar-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 0 4px;
}

.ar-close-btn:hover {
    color: #111827;
}

.ar-drawer-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ar-review-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 14px 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.ar-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    gap: 10px;
}

.ar-author {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
}

.ar-stars {
    color: #f59e0b;
    font-size: 15px;
    letter-spacing: 1px;
    white-space: nowrap;
}

.ar-product-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: #0056b3;
    text-decoration: none;
    margin-bottom: 8px;
    line-height: 1.3;
}

.ar-product-link:hover {
    text-decoration: underline;
    color: #004494;
}

.ar-text {
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
}

.ar-text p {
    margin: 0;
}

.ar-date {
    margin-top: 8px;
    font-size: 12px;
    color: #9ca3af;
    text-align: right;
}

/* Адаптация для мобильных телефонов */
@media (max-width: 768px) {
    /* Делаем ярлычок компактнее, чтобы не закрывал контент */
    .ar-tab-btn {
        padding: 8px 4px 10px;
        font-size: 12px;
        gap: 5px;
    }

    .ar-tab-stars {
        font-size: 9px;
        letter-spacing: 0.5px;
    }

    /* Учитываем мобильную админ-панель WordPress (высота 46px) */
    body.admin-bar .ar-drawer {
        top: 46px;
        height: calc(100vh - 46px);
    }

    /* Когда панель открыта на телефоне, прячем торчащий ярлычок,
       чтобы панель поместилась на весь экран и не было горизонтальной прокрутки */
    .ar-drawer {
        width: 100vw;
        max-width: 100vw;
    }

    .ar-drawer.is-open .ar-tab-btn {
        opacity: 0;
        pointer-events: none;
    }

    .ar-drawer-header {
        padding: 14px 16px;
    }

    .ar-drawer-header h3 {
        font-size: 16px;
    }

    .ar-drawer-body {
        padding: 12px 16px;
    }
}
