/* =========================================================
   ريحانة — صفحات تفاصيل المنتج
   ========================================================= */

body {
    background: var(--cream);
}

/* ---------- ترويسة المنتج ---------- */

.product-header {
    position: relative;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: #ffffff;
    text-align: center;
    padding: 56px 20px;
    overflow: hidden;
}

.product-header::after {
    content: "";
    position: absolute;
    inset: -40% -10% auto auto;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.product-header h1 {
    position: relative;
    font-size: clamp(1.7rem, 4.5vw, 2.6rem);
    font-weight: 800;
    margin: 0 0 10px;
    color: #ffffff;
}

.product-header p {
    position: relative;
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    margin: 0;
    color: #dcecd2;
}

/* ---------- معرض الصور ---------- */

.gallery {
    max-width: var(--container);
    margin: 0 auto;
    padding: 44px 20px 10px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 22px;
    justify-content: center;
    justify-items: center;
}

.gallery img {
    width: 100%;
    max-width: 380px;
    height: 260px;
    object-fit: contain;
    padding: 18px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery img:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-md);
}

/* ---------- تفاصيل المنتج ---------- */

.product-details {
    max-width: 800px;
    margin: 40px auto;
    padding: 32px 34px;
    background: #ffffff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.product-details h2 {
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    font-weight: 800;
    color: var(--green);
    margin: 0 0 14px;
}

.product-details p {
    font-size: 1.05rem;
    color: var(--muted);
    line-height: 1.9;
    margin: 0;
}

.product-details .ghost-button {
    margin-top: 24px;
    padding: 10px 24px;
    font-size: 0.95rem;
}

/* ---------- التعليقات ---------- */

.comments {
    max-width: 800px;
    margin: 0 auto 60px;
    padding: 32px 34px;
    background: #ffffff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.comments h2 {
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    font-weight: 800;
    color: var(--green);
    text-align: center;
    margin: 0 0 22px;
}

.comments h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--green-dark);
    margin: 26px 0 12px;
}

.comments form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

#comment-input {
    width: 100%;
    min-height: 110px;
    padding: 14px 16px;
    border: 1px solid #d8e0d1;
    border-radius: var(--radius-sm);
    background: #fbfcf9;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ink);
    resize: vertical;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

#comment-input:focus {
    border-color: var(--green-light);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(106, 156, 79, 0.16);
}

.comments form button {
    align-self: flex-start;
    padding: 12px 30px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--green);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.comments form button:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
}

#comment-list {
    text-align: right;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-item {
    position: relative;
    background: #f6f8f3;
    border: 1px solid #e6ece0;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
}

.comment-item p {
    margin: 0 0 8px;
    font-size: 1rem;
    color: var(--ink);
    line-height: 1.7;
    word-break: break-word;
}

.comment-item span {
    display: block;
    font-size: 0.85rem;
    color: #8a9582;
}

.delete-button {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    font-family: inherit;
    font-size: 0.82rem;
    color: #ffffff;
    background: var(--red);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

.delete-button:hover {
    background: var(--red-dark);
}

/* =========================================================
   الاستجابة للشاشات
   ========================================================= */

@media (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        padding: 32px 16px 6px;
    }

    .gallery img {
        height: 220px;
    }

    .product-details,
    .comments {
        margin-left: 16px;
        margin-right: 16px;
        padding: 24px 22px;
    }
}

@media (max-width: 560px) {
    .product-header {
        padding: 40px 16px;
    }

    .gallery {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .gallery img {
        height: 230px;
        max-width: 420px;
    }

    .product-details,
    .comments {
        margin-left: 12px;
        margin-right: 12px;
        padding: 20px 18px;
    }

    .comments form button {
        align-self: stretch;
        width: 100%;
    }
}
