/* ============================================================
   OroCafe – product gallery, reviews and review reminder.
   Split out of site.css to keep the product detail page's
   styles together and site.css navigable.
   ============================================================ */

/* Gallery layout/carousel styling lives in site.css (.gallery, .gallery__stage,
   .gallery__track, .gallery__slide, .gallery__nav, .gallery__badge, .gallery__thumbs) —
   this file used to duplicate those rules with a conflicting width:84%/justify-self:center,
   which left a lopsided gap before the product image instead of filling its column. */

/* Temporarily hidden on product detail; pricing/review data and admin features remain intact. */
.product-detail__rating {
    display: none !important;
}

/* ---------- Reviews ---------- */
.product-reviews__heading {
    font-size: clamp(1.45rem, 2.7vw, 2.35rem);
    line-height: 1.16;
    max-width: none;
    width: 100%;
}

#reviews .section-head {
    margin-bottom: 24px;
}

#reviews .section-head > div {
    flex: 1 1 100%;
    width: 100%;
}

#reviews .section-head h2.product-reviews__heading {
    display: block;
    width: 100%;
    max-width: none;
}

.related-products__heading {
    font-size: clamp(1.4rem, 2.5vw, 2.2rem);
    line-height: 1.4;
}

/* Both detail-page product carousels share the same full-width presentation.
   Their headings remain aligned to the content shell. */
.product-carousel-section .product-rail {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.product-carousel-section .section-head,
.product-carousel-section .section-head > div,
.product-carousel-section .section-head h2.related-products__heading {
    width: 100%;
    max-width: none;
    text-align: center;
}

#product-articles .section-head,
#product-articles .section-head > div,
#product-articles .section-head h2.related-products__heading {
    width: 100%;
    max-width: none;
    text-align: center;
}

/* Keep every recommendation and recently-viewed item visually separated
   from the page background after the rails are expanded edge-to-edge. */
.product-rail__track > .product-card {
    background: var(--white);
    border-color: rgba(92, 42, 18, .11);
    box-shadow: 0 8px 24px rgba(58, 27, 13, .07);
}

.product-rail__track > .product-card .product-card__media {
    background: #fffaf2;
}

@media (max-width: 680px) {
    .product-reviews__heading {
        font-size: clamp(1.3rem, 6vw, 1.75rem);
        line-height: 1.2;
    }

    .related-products__heading {
        font-size: clamp(1.25rem, 5.8vw, 1.7rem);
    }
}

.badge-new {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 11px;
    background: rgba(238, 122, 46, .16);
    color: var(--orange-2);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.reviews-layout {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: clamp(18px, 3vw, 38px);
    align-items: start;
}

.reviews-summary {
    background: var(--cream-2);
    border-radius: var(--radius);
    padding: 22px 20px;
    text-align: center;
    position: sticky;
    top: 96px;
}

.reviews-summary__score {
    font-family: var(--display);
    font-size: 3rem;
    color: var(--brown);
    line-height: 1;
    margin: 0 0 10px;
}

.reviews-summary__count {
    margin: 10px 0 0;
    font-size: 1rem;
    color: var(--muted);
}

.reviews-bars {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    gap: 7px;
}

.reviews-bars li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 26px;
    gap: 8px;
    align-items: center;
    font-size: .9rem;
    color: var(--muted);
}

.reviews-bars__track {
    height: 7px;
    border-radius: 999px;
    background: rgba(92, 42, 18, .14);
    overflow: hidden;
}

.reviews-bars__fill {
    display: block;
    height: 100%;
    background: var(--orange);
}

.review-form {
    background: var(--cream-2);
    border-radius: var(--radius);
    padding: 26px 24px;
    margin-bottom: 24px;
    display: grid;
    gap: 16px;
}

.review-form h3 {
    font-size: 1.18rem;
    margin: 0;
}

.review-form input[type="text"],
.review-form input:not([type]),
.review-form textarea,
.review-form input[type="file"] {
    width: 100%;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    font-family: var(--body);
    font-size: 1rem;
    color: var(--ink);
}

.review-form textarea {
    min-height: 120px;
    resize: vertical;
}

.review-form__delete {
    margin: -12px 0 24px;
}

/* Star picker: rendered right-to-left so hovering a star also fills the lower ones. */
.rating-input {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}

.rating-input input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rating-input label {
    font-size: 1.7rem;
    line-height: 1;
    color: rgba(92, 42, 18, .25);
    cursor: pointer;
    transition: color .15s ease, transform .15s ease;
}

.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
    color: var(--orange);
}

.rating-input label:hover {
    transform: scale(1.12);
}

.rating-input input:focus-visible + label {
    outline: 3px solid var(--orange);
    outline-offset: 3px;
    border-radius: 4px;
}

.review-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.review {
    background: var(--white);
    border: 1px solid rgba(92, 42, 18, .12);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: 0 8px 24px rgba(58, 27, 13, .06);
}

.review--mine {
    border: 2px solid var(--orange);
}

.review__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 9px;
}

.review__actions {
    margin-left: auto;
    display: flex;
    gap: 6px;
    flex: none;
}

.review__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    color: var(--brown);
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.review__action svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.review__action:hover {
    border-color: var(--brown);
    background: var(--cream-2);
}

.review__action--danger {
    color: #b3261e;
    border-color: rgba(179, 38, 30, .3);
}

.review__action--danger:hover {
    background: #b3261e;
    border-color: #b3261e;
    color: #fff;
}

.review-form-wrap[hidden] {
    display: none;
}

.review__avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: contain;
    flex: none;
    background: var(--cream-3);
}

.review__avatar--initial {
    display: grid;
    place-items: center;
    font-family: var(--display);
    font-size: 1.1rem;
    color: var(--brown);
}

.review__author {
    margin: 0 0 3px;
    font-family: var(--display);
    font-weight: 700;
    color: var(--brown);
    font-size: 1.06rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    line-height: 1.25;
}

.review__verified,
.review__mine-tag {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 3px 9px;
}

.review__verified {
    background: #e7f4ea;
    color: #1e5c22;
}

.review__mine-tag {
    background: rgba(238, 122, 46, .18);
    color: var(--orange-2);
}

.review__meta {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .9rem;
    color: var(--muted);
}

.review__title {
    margin: 0 0 4px;
    font-family: var(--display);
    font-size: 1.1rem;
    text-transform: none;
    line-height: 1.28;
}

.review__body {
    margin: 0;
    font-family: var(--display);
    color: var(--muted);
    font-size: 1.04rem;
    line-height: 1.48;
}

/* ---------- Review reminder after an order completes ---------- */
.review-nudge {
    background: var(--brown);
    color: var(--cream-2);
    border-radius: var(--radius);
    padding: 18px 22px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
    justify-content: space-between;
}

.review-nudge p {
    margin: 0;
    font-size: 1.04rem;
}

.review-nudge strong {
    color: var(--white);
}

.review-nudge__items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.review-nudge__items a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 250, 242, .12);
    border-radius: 999px;
    padding: 6px 14px 6px 6px;
    color: var(--cream);
    font-size: .92rem;
}

.review-nudge__items a:hover {
    background: rgba(255, 250, 242, .22);
    color: var(--white);
}

.review-nudge__items img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: contain;
}

@media (max-width: 900px) {
    .reviews-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .reviews-summary {
        position: static;
    }
}
