﻿/* =========================
   REVIEW PAGE
========================= */

.top-box {
    display: flex;
    gap: 40px;
    margin-top: 14px;
    align-items: stretch;
}

.card--item,
.card--create {
    width: 100%;
    max-width: 270px;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
}

/* =========================
   CARDS
========================= */

.card--item,
.card--create,
.card--reviews {
    background-color: #0f0f0f;
    border-radius: 12px;
    border: 1px solid #2c2c2c;
}

.card--item {
    position: relative;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.card--create {
    align-items: center;
    gap: 14px;
    padding: 1.5rem;
}

.card--reviews {
    width: 580px;
    padding: 1.5rem;
}

/* =========================
   CREATE REVIEW
========================= */

.card--create textarea,
.card--create select,
.card--create input,
.card--create button {
    width: 100%;
    border-radius: 12px;
    background-color: #0f0f0f;
    color: #e0e0e0;
    border: 1px solid #e0e0e0;
    padding: 6px 10px;
    transition: 0.2s ease;
}

    .card--create textarea:hover,
    .card--create select:hover,
    .card--create input:hover,
    .card--create button:hover {
        border-color: #6aa9ff;
    }

.card--create button {
    cursor: pointer;
}

.card--create textarea {
    min-height: 60px;
    resize: none;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.card--create select {
    margin-bottom: 10px;
}

/* =========================
   ITEM IMAGE
========================= */

.item-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* =========================
   REVIEWS SECTION
========================= */

.reviews-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.review-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 15px;
    margin-bottom: 15px;
    background: #0f0f0f;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    transition: 0.2s ease;
}

    .review-item:hover {
        border-color: #6aa9ff;
        transform: scale(1.01);
    }

.review-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    object-fit: cover;
}

.review-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.review-title {
    color: #4ea3ff;
    font-weight: bold;
    font-size: 18px;
    text-decoration: none;
}

.review-text,
.review-rating {
    font-size: 14px;
    color: #ccc;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* =========================
   BUTTONS
========================= */

.custom-btn-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.like-btn,
.back-btn,
.load-more-btn {
    background: #0f0f0f;
    color: #e0e0e0;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 8px 12px;
    text-decoration: none;
    transition: 0.2s ease;
    cursor: pointer;
}

    .like-btn:hover,
    .back-btn:hover,
    .load-more-btn:hover {
        border-color: #6aa9ff;
        transform: scale(1.02);
        color: #e0e0e0;
        text-decoration: none;
    }

    .like-btn:active,
    .back-btn:active,
    .load-more-btn:active {
        transform: scale(1);
    }

/* =========================
   PAGING
========================= */

.paging-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    gap: 8px;
    width: 580px;
}

/* =========================
   TABLET
========================= */

@media (max-width: 1024px) {

    .top-box {
        gap: 24px;
        padding: 0 20px;
    }

    .card--item,
    .card--create {
        max-width: 320px;
    }

    .card--reviews,
    .paging-container {
        width: 90%;
        max-width: 700px;
    }

    .review-item {
        gap: 16px;
    }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    .top-box {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .card--item,
    .card--create {
        max-width: 90%;
        width: 100%;
    }

    .card--reviews,
    .paging-container {
        width: 100%;
        max-width: 90%;
    }

    .review-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .review-content {
        align-items: center;
    }

    .review-img {
        width: 60px;
        height: 60px;
    }

    .paging-container {
        flex-direction: column;
        gap: 12px;
    }

    .back-btn,
    .load-more-btn {
        width: 100%;
        text-align: center;
    }
}

/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 480px) {

    .create-page {
        gap: 20px;
        padding: 12px;
    }

    .card--item,
    .card--create,
    .card--reviews {
        max-width: 100%;
    }

    .review-item {
        padding: 12px;
        gap: 12px;
    }

    .review-title {
        font-size: 16px;
    }

    .review-text,
    .review-rating {
        font-size: 13px;
    }

    .review-img {
        width: 50px;
        height: 50px;
    }

    .card--create textarea,
    .card--create select,
    .card--create input,
    .card--create button {
        font-size: 14px;
    }
}
