body {
    background-color: #f8f9fa;
    margin: 0;
}

.vse {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

button.buton {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background-color 0.3s ease;
}

button.buton:hover {
    background-color: #0056b3;
}

#edit-form {
    background-color: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
}

/* Основной контейнер: профиль и заказы */
.profile-and-orders {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 30px auto;
    align-items: flex-start;
}

/* Левая колонка: профиль + кнопки */
.profile-left {
    flex: 0 0 35%;
    display: flex;
    flex-direction: column;
}

/* Профиль */
.profile-box {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.profile-box p {
    margin: 10px 0;
}

.profile-box img {
    margin-top: 15px;
    border-radius: 10px;
    max-width: 100%;
    min-width: 60%;
    height: auto;
}

/* Контейнер с кнопками */
.profile-buttons {
    display: flex;
    flex-direction: column;
}

/* Кнопки занимают всю ширину колонки */
.profile-buttons .buton,
.profile-buttons form button.buton {
    width: 100%;
}

.orders-container {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.orders-section {
    padding: 20px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.orders-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.orders-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.orders-section li {
    background-color: #f6f8fa;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: box-shadow 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.orders-section li:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.orders-section li a {
    color: black;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

/* Купленные товары */
.orders-section + h2 {
    margin-top: 40px;
}

.text_ava,
.opisanie_ava {
    width: 100%;
    padding: 12px 15px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    background-color: #fdfdfd;
}

.image_ava {
    margin: 10px 0;
    font-size: 16px;
}

.stats-box {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.stat-item {
    background: #ffffff;
    border-radius: 10px;
    padding: 10px 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100px;
    font-size: 14px;
}

.stat-item h3 {
    margin: 0;
    color: #007bff;
    font-size: 20px;
}

.reviews-container {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.review {
    background-color: #ffffff;
    border-left: 5px solid #007bff;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.review ul {
    list-style: none;
    padding-left: 0;
}

.review li {
    padding: 2px 0;
}

.product-tile a {
    text-decoration: none;
    color: black;
}

.product-tile a:hover {
    color: black;
    text-decoration: none;
}

.reviews-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.review-card {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.review-avatar img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #ccc;
}

.avatar-placeholder {
    width: 48px;
    height: 48px;
    background-color: #ccc;
    color: white;
    font-weight: bold;
    font-size: 20px;
    text-align: center;
    line-height: 48px;
    border-radius: 50%;
}

.review-meta {
    margin-left: 12px;
}

.review-username {
    font-weight: bold;
    color: #222;
    text-decoration: none;
    font-size: 16px;
}

.review-username:hover {
    text-decoration: underline;
}

.review-stars {
    margin-top: 4px;
}

.star {
    font-size: 16px;
    color: #ccc;
}

.star.filled {
    color: #ffc107;
}

.review-body {
    padding-left: 60px;
}

.review-comment {
    font-size: 15px;
    color: #333;
    margin-bottom: 8px;
}

.review-card .report-btn {
    font-size: 13px;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0;
}

.review-card .report-btn:hover {
    color: red;
}

.profile-right {
    flex: 1; /* Занимает всё оставшееся */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.delivery-order {
    background-color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
}

.delivery-info-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.delivery-info-row p {
    margin: 0;
}
.delivery-order p {
    margin: 4px 0;
}

.delivery-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.review-card-form {
    max-width: 500px;
    margin: 0 auto;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.star-rating {
    direction: rtl;
    unicode-bidi: bidi-override;
    display: inline-block;
    margin-bottom: 10px;
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating label {
    font-size: 32px;
    color: #ccc;
    cursor: pointer;
}

.star-rating input[type="radio"]:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #ffc107;
}

@media (max-width: 768px) {
    .profile-and-orders {
        flex-direction: column;
        gap: 20px;
        max-width: 100%;
        padding: 0 10px;
    }

    .profile-left, .profile-right {
        flex: 1 1 100%;
        width: 100%;
    }

    .profile-box img {
        width: 100%;
        min-width: auto;
    }

    .stats-box {
        justify-content: space-around;
    }

    .stat-item {
        width: 30%;
        font-size: 13px;
        padding: 8px 10px;
    }

    .review-card-form {
        max-width: 100%;
        padding: 15px;
    }

    .product-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;

    }

    .product-tile {
        border-radius: 8px;
        overflow: hidden;
    }

    .delivery-info-row {
        flex-direction: column;
        gap: 5px;
    }

    button.buton {
        width: 100%;
        font-size: 16px;
    }

    .review-body {
        padding-left: 50px;
    }

    /* Немного уменьшим размер шрифта в отзывах */
    .review-comment {
        font-size: 14px;
    }
    .vse {
        padding: 10px 10px;
        margin: 0 auto;
        max-width: 100%;
        box-sizing: border-box;
    }
}