/**
 * Amanah Reviews — Styles v1.1
 *
 * New in v1.1:
 *   – .am-rv-heading-row, .am-rv-section-label, .am-rv-section-title, .am-rv-title-sep
 *   – .am-rv-trust-row, .am-rv-trust-item, .am-rv-trust-sep
 *   – .am-rv-schema-g, .am-rv-schema-m, .am-rv-schema-label
 *   – .am-rv-reply (Amanah Team block)
 *   – .am-rv-form-hdr, .am-rv-form-logo, .am-rv-form-hdr-text, .am-rv-schema-indicators
 *   – @keyframes amRvStarIn (entrance), amRvVerifiedShimmer (hover)
 *   – .am-rv-star-anim
 *
 * @package Amanah
 * @version 1.1.0
 */

/* ══════════════════════════════════════════════════════════
   VARIABLES
══════════════════════════════════════════════════════════ */

.am-reviews-section {
    --rv-gold:       #C9A84C;
    --rv-gold-light: #E2C272;
    --rv-gold-pale:  #F5E9C8;
    --rv-black:      #0A0A0A;
    --rv-dark:       #1A1A1A;
    --rv-grey:       #6B6B6B;
    --rv-light:      #B0B0B0;
    --rv-off-white:  #F8F5EF;
    --rv-white:      #FFFFFF;
    --rv-border:     rgba(201,168,76,.18);
    --rv-border-sub: #E8E2D6;
    --rv-radius:     4px;
    --rv-ease:       0.25s cubic-bezier(.4,0,.2,1);
    --rv-font-d:     'Cormorant Garamond', Georgia, serif;
    --rv-font-b:     'AkkuratPro', 'Helvetica Neue', Arial, sans-serif;
}

/* ══════════════════════════════════════════════════════════
   SECTION WRAPPER
══════════════════════════════════════════════════════════ */

.am-reviews-section {
    padding-left: var(--am-space-xl);
    padding-right: var(--am-space-xl);
    padding-bottom: var(--am-space-2xl);
    padding-top: var(--am-space-2xl);
    border-radius: var(--am-radius);
    background: var(--rv-white);
    border-top: 1px solid var(--rv-border-sub);
}

/* ══════════════════════════════════════════════════════════
   HEADING ROW
══════════════════════════════════════════════════════════ */

.am-rv-heading-row {
    margin-bottom: 12px;
}

.am-rv-section-label {
    display: block;
    font-size: 10px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--rv-gold);
    font-weight: 600;
    margin-bottom: 5px;
}

.am-rv-section-title {
    font-family: var(--rv-font-d);
    font-size: 28px;
    font-weight: 400;
    color: var(--rv-black);
    margin: 0;
    line-height: 1.2;
}

.am-rv-title-sep {
    margin: 0 8px;
    color: var(--rv-gold);
    opacity: .5;
}

/* ══════════════════════════════════════════════════════════
   TRUST ROW
══════════════════════════════════════════════════════════ */

.am-rv-trust-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.am-rv-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--rv-grey);
    font-weight: 600;
}

.am-rv-trust-sep {
    color: var(--rv-gold);
    opacity: .4;
    font-size: 12px;
}

/* Schema dots */
.am-rv-schema-g,
.am-rv-schema-m {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    font-size: 8px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    flex-shrink: 0;
}

.am-rv-schema-g { background: #4285F4; }
.am-rv-schema-m { background: #1877F2; }

.am-rv-schema-label {
    font-size: 10px;
    color: var(--rv-grey);
    letter-spacing: .04em;
}

/* ══════════════════════════════════════════════════════════
   SUMMARY BAR
══════════════════════════════════════════════════════════ */

.am-rv-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 40px;
    align-items: center;
    padding: 28px 32px;
    background: var(--rv-off-white);
    border-radius: var(--rv-radius);
    margin-bottom: 40px;
}

.am-rv-summary-score { text-align: center; min-width: 110px; }

.am-rv-score-num {
    font-family: var(--rv-font-d);
    font-size: 52px;
    font-weight: 300;
    color: var(--rv-black);
    line-height: 1;
    margin-bottom: 6px;
}

.am-rv-score-stars {
    display: block;
    font-size: 20px;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.am-rv-score-count {
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--rv-grey);
    font-weight: 600;
}

.am-rv-breakdown { display: flex; flex-direction: column; gap: 6px; }

.am-rv-bar-row {
    display: grid;
    grid-template-columns: 28px 1fr 22px;
    gap: 10px;
    align-items: center;
}

.am-rv-bar-label { font-size: 11px; color: var(--rv-grey); text-align: right; }

.am-rv-bar-track {
    height: 5px;
    background: var(--rv-border-sub);
    border-radius: 3px;
    overflow: hidden;
}

.am-rv-bar-fill {
    height: 100%;
    background: var(--rv-gold);
    border-radius: 3px;
    transition: width .6s cubic-bezier(.4,0,.2,1);
}

.am-rv-bar-count { font-size: 10px; color: var(--rv-light); }

/* ══════════════════════════════════════════════════════════
   STAR ANIMATIONS
   Entrance: staggered fade + scale-up, 300ms, ease-out
   Hover on verified badge: single gold shimmer sweep
══════════════════════════════════════════════════════════ */

@keyframes amRvStarIn {
    from { opacity: 0; transform: scale(.6); }
    to   { opacity: 1; transform: scale(1);  }
}

.am-rv-star-anim {
    opacity: 0;
    display: inline-block;
    animation: amRvStarIn 280ms ease-out forwards;
}

@keyframes amRvVerifiedShimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center;  }
}

/* ══════════════════════════════════════════════════════════
   STARS (shared)
══════════════════════════════════════════════════════════ */

.am-rv-star        { display: inline-block; }
.am-rv-star--full  { color: var(--rv-gold); }
.am-rv-star--half  { color: var(--rv-gold); opacity: .55; }
.am-rv-star--empty { color: var(--rv-border-sub); }

/* ══════════════════════════════════════════════════════════
   REVIEW CARDS
══════════════════════════════════════════════════════════ */

.am-rv-list { display: flex; flex-direction: column; margin-bottom: 40px; }

.am-rv-card {
    padding: 24px 0;
    border-bottom: 1px solid var(--rv-border-sub);
}

.am-rv-card:first-child { border-top: 1px solid var(--rv-border-sub); }

.am-rv-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.am-rv-card-author {
    font-family: var(--rv-font-d);
    font-size: 17px;
    font-weight: 500;
    color: var(--rv-black);
    line-height: 1.2;
    margin-bottom: 3px;
}

.am-rv-card-date {
    font-size: 10px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--rv-light);
    font-weight: 600;
}

.am-rv-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    flex-shrink: 0;
}

.am-rv-card-stars { font-size: 15px; letter-spacing: 1px; }

/* Verified badge */
.am-rv-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 700;
    color: #155724;
    background: #D4EDDA;
    padding: 3px 9px;
    border-radius: 20px;
    cursor: default;
    position: relative;
    overflow: hidden;
    transition: background var(--rv-ease);
}

.am-rv-verified::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(201,168,76,.18) 50%, transparent 70%);
    background-size: 200% auto;
    opacity: 0;
    transition: opacity .2s;
}

.am-rv-verified:hover::after {
    opacity: 1;
    animation: amRvVerifiedShimmer .6s ease forwards;
}

.am-rv-card-body {
    font-size: 13px;
    line-height: 1.8;
    color: var(--rv-grey);
    margin-bottom: 10px;
}

.am-rv-card-body p { margin: 0 0 6px; }
.am-rv-card-body p:last-child { margin-bottom: 0; }

/* ══════════════════════════════════════════════════════════
   REVIEW PHOTOS (display)
══════════════════════════════════════════════════════════ */

.am-rv-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.am-rv-photo-btn {
    width: 72px; height: 72px;
    border: 1px solid var(--rv-border-sub);
    border-radius: var(--rv-radius);
    overflow: hidden; padding: 0; cursor: zoom-in;
    background: var(--rv-off-white);
    transition: border-color var(--rv-ease);
    flex-shrink: 0;
}

.am-rv-photo-btn:hover { border-color: var(--rv-gold); }
.am-rv-photo-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ══════════════════════════════════════════════════════════
   AMANAH TEAM REPLY BLOCK
   Indented thread, gold left bar, logo badge
══════════════════════════════════════════════════════════ */

.am-rv-reply {
    margin: 14px 0 0 24px;
    border-left: 2px solid var(--rv-gold);
    border-radius: 0;
    background: var(--rv-off-white);
    padding: 14px 16px;
}

.am-rv-reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.am-rv-reply-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    background: var(--rv-black);
    color: var(--rv-gold);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
    border-radius: 3px;
    flex-shrink: 0;
    font-family: var(--rv-font-d);
}

.am-rv-reply-badge {
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--rv-gold);
    font-weight: 700;
}

.am-rv-reply-date {
    font-size: 10px;
    color: var(--rv-light);
    margin-left: auto;
}

.am-rv-reply-body {
    font-size: 12px;
    line-height: 1.75;
    color: var(--rv-grey);
}

.am-rv-reply-body p { margin: 0 0 4px; }
.am-rv-reply-body p:last-child { margin: 0; }

/* ══════════════════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════════════════ */

.am-rv-empty { text-align: center; padding: 40px 20px; margin-bottom: 40px; }
.am-rv-empty-icon { font-size: 26px; color: var(--rv-gold); opacity: .25; margin-bottom: 10px; display: block; }
.am-rv-empty-text { font-size: 13px; color: var(--rv-light); margin: 0; }

/* ══════════════════════════════════════════════════════════
   GATE MESSAGES
══════════════════════════════════════════════════════════ */

.am-rv-gate {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 18px 22px; border-radius: var(--rv-radius); margin-bottom: 20px;
}

.am-rv-gate svg { flex-shrink: 0; margin-top: 2px; }
.am-rv-gate p { margin: 0 0 8px; font-size: 13px; line-height: 1.7; }

.am-rv-gate-link {
    font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
    color: var(--rv-black); border-bottom: 1px solid var(--rv-gold); text-decoration: none;
    padding-bottom: 1px; transition: color var(--rv-ease);
}
.am-rv-gate-link:hover { color: var(--rv-gold); }

.am-rv-gate--reviewed      { background: #D4EDDA; color: #155724; border: 1px solid #C3E6CB; }
.am-rv-gate--reviewed svg  { stroke: #155724; }
.am-rv-gate--not-purchased,
.am-rv-gate--logged-out    { background: var(--rv-off-white); border: 1px solid var(--rv-border); color: var(--rv-grey); }
.am-rv-gate--not-purchased svg,
.am-rv-gate--logged-out svg { stroke: var(--rv-gold); }

/* ══════════════════════════════════════════════════════════
   REVIEW FORM
══════════════════════════════════════════════════════════ */

.am-rv-form-section { border-top: 1px solid var(--rv-border-sub); padding-top: 40px; }

.am-rv-form-wrap {
    background: var(--rv-off-white);
    border-radius: var(--rv-radius);
    padding: 28px;
}

/* Form header */
.am-rv-form-hdr {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--rv-border-sub);
    flex-wrap: wrap;
}

.am-rv-form-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    background: var(--rv-black);
    color: var(--rv-gold);
    font-family: var(--rv-font-d);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--rv-radius);
    flex-shrink: 0;
    letter-spacing: .04em;
}

.am-rv-form-hdr-text { flex: 1; min-width: 0; }

.am-rv-form-label-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--rv-black);
    margin-bottom: 2px;
}

.am-rv-form-sub { font-size: 10px; color: var(--rv-grey); letter-spacing: .04em; }

.am-rv-schema-indicators {
    display: flex; align-items: center; gap: 4px;
    flex-shrink: 0;
}

/* Field group */
.am-rv-field-group { display: flex; flex-direction: column; gap: 20px; }

.am-rv-field { display: flex; flex-direction: column; gap: 6px; }

.am-rv-field-label {
    font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--rv-grey); font-weight: 700;
}

/* Star input */
.am-rv-star-select { display: flex; flex-direction: column; gap: 8px; }
.am-rv-stars-input { display: flex; gap: 4px; }

.am-rv-star-btn {
    font-size: 28px; color: var(--rv-border-sub); background: none; border: none;
    padding: 0 2px; cursor: pointer; line-height: 1;
    transition: color .15s ease, transform .15s ease;
}
.am-rv-star-btn:hover,
.am-rv-star-btn.active { color: var(--rv-gold); transform: scale(1.12); }

.am-rv-star-error { font-size: 11px; color: #721C24; font-weight: 600; }

/* Textarea */
.am-rv-textarea {
    width: 100%; min-height: 110px; padding: 13px 15px;
    border: 1px solid var(--rv-border-sub); border-radius: var(--rv-radius);
    font-family: var(--rv-font-b); font-size: 13px; color: var(--rv-black);
    background: var(--rv-white); resize: vertical; outline: none;
    transition: border-color var(--rv-ease); box-sizing: border-box;
}
.am-rv-textarea:focus { border-color: var(--rv-gold); }
.am-rv-textarea::placeholder { color: var(--rv-light); font-size: 12px; }

/* Photo upload */
.am-rv-photo-upload-area { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }

.am-rv-photo-add-btn {
    display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px;
    width: 80px; height: 80px; border: 1.5px dashed var(--rv-border-sub);
    border-radius: var(--rv-radius); cursor: pointer; font-size: 9px;
    letter-spacing: .06em; text-transform: uppercase; font-weight: 700;
    color: var(--rv-light); background: var(--rv-white); flex-shrink: 0;
    transition: border-color var(--rv-ease), color var(--rv-ease);
}
.am-rv-photo-add-btn:hover { border-color: var(--rv-gold); color: var(--rv-gold); }
.am-rv-photo-add-btn.am-rv-hidden { display: none; }

.am-rv-photo-previews { display: flex; gap: 8px; flex-wrap: wrap; }

.am-rv-photo-preview {
    position: relative; width: 80px; height: 80px; border-radius: var(--rv-radius);
    overflow: hidden; border: 1px solid var(--rv-border-sub); background: var(--rv-off-white); flex-shrink: 0;
}
.am-rv-photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.am-rv-photo-preview-loading {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(248,245,239,.85); font-size: 9px; color: var(--rv-grey); letter-spacing: .04em;
}
.am-rv-photo-remove {
    position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%;
    background: rgba(10,10,10,.7); color: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 10px;
    transition: background var(--rv-ease);
}
.am-rv-photo-remove:hover { background: rgba(10,10,10,.95); }

.am-rv-photo-hint { margin: 4px 0 0; font-size: 10px; color: var(--rv-light); }

.am-rv-submit-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 32px; background: var(--rv-black); color: var(--rv-white);
    font-family: var(--rv-font-b); font-size: 11px; letter-spacing: .16em;
    text-transform: uppercase; font-weight: 700; border: none;
    border-radius: var(--rv-radius); cursor: pointer; margin-top: 4px;
    transition: background var(--rv-ease); width: 100%; max-width: 260px;
}
.am-rv-submit-btn:hover { background: var(--rv-dark); }
.am-rv-submit-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ══════════════════════════════════════════════════════════
   LIGHTBOX
══════════════════════════════════════════════════════════ */

.am-rv-lightbox {
    position: fixed; inset: 0; background: rgba(10,10,10,.92); z-index: 9999;
    display: flex !important; align-items: center; justify-content: center;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); cursor: zoom-out;
}
.am-rv-lightbox[style*="display:none"],
.am-rv-lightbox[style*="display: none"] { display: none !important; }
.am-rv-lightbox-img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: var(--rv-radius); cursor: default; }
.am-rv-lightbox-close {
    position: absolute; top: 20px; right: 20px; width: 40px; height: 40px;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%; color: #fff; font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: background var(--rv-ease);
}
.am-rv-lightbox-close:hover { background: rgba(255,255,255,.2); }

/* ══════════════════════════════════════════════════════════
   MY ACCOUNT ORDER REVIEW PROMPT
══════════════════════════════════════════════════════════ */

.am-order-review-prompt { margin-top: 32px; border-top: 1px solid #E8E2D6; padding-top: 28px; }
.am-order-review-prompt-label { display: block; font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: #C9A84C; font-weight: 700; margin-bottom: 5px; }
.am-order-review-prompt-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 20px; font-weight: 400; color: #0A0A0A; margin: 0 0 5px; }
.am-order-review-prompt-sub { font-size: 12px; color: #6B6B6B; line-height: 1.7; margin: 0 0 18px; }

.am-order-review-items { display: flex; flex-direction: column; gap: 10px; }

.am-order-review-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; background: #F8F5EF;
    border: 1px solid #E8E2D6; border-radius: 4px;
    transition: border-color .25s ease;
}
.am-order-review-item:hover { border-color: rgba(201,168,76,.4); }

.am-order-review-item-img {
    width: 50px; height: 50px; flex-shrink: 0; background: #fff;
    border: 1px solid #E8E2D6; border-radius: 3px;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.am-order-review-item-img img { width: 90%; height: 90%; object-fit: contain; }
.am-order-review-item-info { flex: 1; min-width: 0; }
.am-order-review-item-name { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 14px; font-weight: 500; color: #0A0A0A; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.am-order-review-stars { display: flex; gap: 2px; }
.am-order-review-star { font-size: 18px; color: #E8E2D6; text-decoration: none; line-height: 1; transition: color .15s ease; }
.am-order-review-stars:hover .am-order-review-star { color: #C9A84C; }
.am-order-review-stars .am-order-review-star:hover ~ .am-order-review-star { color: #E8E2D6; }

.am-order-review-btn {
    display: inline-flex; align-items: center; gap: 5px; padding: 9px 16px;
    background: #0A0A0A; color: #fff; font-family: 'AkkuratPro', sans-serif;
    font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
    text-decoration: none; border-radius: 3px; flex-shrink: 0;
    transition: background .25s ease; white-space: nowrap;
}
.am-order-review-btn:hover { background: #1A1A1A; color: #fff; }

/* ══════════════════════════════════════════════════════════
   ARCHIVE STARS
══════════════════════════════════════════════════════════ */

.am-product-card-rating { display: flex; align-items: center; gap: 5px; margin-top: 4px; }
.am-product-card-stars { font-size: 12px; color: #C9A84C; letter-spacing: .5px; line-height: 1; }
.am-product-card-rating-count { font-size: 10px; color: #B0B0B0; font-weight: 500; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .am-rv-summary { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
    .am-rv-summary-score { display: flex; align-items: center; gap: 14px; text-align: left; }
    .am-rv-score-num { font-size: 40px; }
    .am-rv-card-header { flex-direction: column; gap: 8px; }
    .am-rv-card-right { flex-direction: row; align-items: center; }
    .am-rv-reply { margin-left: 12px; }
    .am-rv-form-wrap { padding: 20px; }
    .am-rv-form-hdr { flex-wrap: wrap; }
    .am-rv-schema-indicators { width: 100%; justify-content: flex-start; margin-top: 4px; }
    .am-rv-submit-btn { max-width: 100%; }
    .am-order-review-item { flex-wrap: wrap; }
    .am-order-review-btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .am-reviews-section { padding: 40px 0; }
    .am-rv-section-title { font-size: 22px; }
    .am-rv-trust-row { gap: 8px; }
    .am-rv-star-btn { font-size: 24px; }
}
