/*
 * auras-reviews.css
 * Styles for: Featured Reviews shortcode + WooCommerce product page card layout + Photo lightbox
 * Loaded only on: single product pages + pages containing [auras_featured_reviews]
 */

/* ── Design tokens ──────────────────────────────────────────── */
:root {
    --ar-radius:   12px;
    --ar-shadow:   0 2px 12px rgba(0,0,0,.08);
    --ar-star-on:  #f59e0b;
    --ar-star-off: #e5e7eb;
    --ar-text:     #1f2937;
    --ar-muted:    #6b7280;
    --ar-border:   #f3f4f6;
}

/* ── Shared card shell ──────────────────────────────────────── */
.auras-card,
.woocommerce-Reviews ol.commentlist li.review {
    background: #fff;
    border: 1px solid var(--ar-border);
    border-radius: var(--ar-radius);
    box-shadow: var(--ar-shadow);
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.auras-card:hover,
.woocommerce-Reviews ol.commentlist li.review:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.13);
    transform: translateY(-2px);
}

/* ── Shared photo block ─────────────────────────────────────── */
.auras-photo-wrap,
.ar-pp-photo {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f9fafb;
    cursor: pointer;           /* indicates the photo is clickable */
}
.auras-photo-wrap img,
.ar-pp-photo img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform .35s ease;
}
.auras-card:hover .auras-photo-wrap img,
.woocommerce-Reviews ol.commentlist li.review:hover .ar-pp-photo img {
    transform: scale(1.04);
}

/* +N badge */
.auras-photo-count,
.ar-pp-photo-count {
    position: absolute; bottom: 10px; right: 10px;
    background: rgba(0,0,0,.55); color: #fff;
    font-size: 12px; font-weight: 600;
    padding: 3px 8px; border-radius: 20px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

/* ── Card body ──────────────────────────────────────────────── */
.auras-card-body,
.ar-card-body {
    padding: 14px 16px 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Stars */
.auras-stars,
.ar-stars        { margin-bottom: 8px; line-height: 1; }
.auras-star,
.ar-star         { font-size: 16px; }
.auras-star.filled,
.ar-star.filled  { color: var(--ar-star-on); }
.auras-star.empty,
.ar-star.empty   { color: var(--ar-star-off); }

/* Author row */
.auras-author,
.ar-author       { display: flex; align-items: center; gap: 5px; margin-bottom: 6px; flex-wrap: wrap; }
.auras-name,
.ar-author-name  { font-size: 14px; font-weight: 600; color: var(--ar-text); }
.auras-verified svg,
.ar-verified svg { width: 15px; height: 15px; display: block; flex-shrink: 0; }
.ar-author-date  { font-size: 12px; color: var(--ar-muted); margin-left: auto; }

/* Review text */
.auras-content,
.ar-review-text  { font-size: 13.5px; color: var(--ar-muted); line-height: 1.6; margin: 0; }
.ar-review-text p { margin: 0; }
.auras-more      { color: #4b5563; font-size: 13px; font-weight: 500; text-decoration: none; margin-left: 2px; }
.auras-more:hover { text-decoration: underline; }

/* ── Featured reviews grid (shortcode) ─────────────────────── */
.auras-reviews-wrap { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.auras-grid         { display: grid; gap: 20px; }
/* Per-instance column counts are set inline by the shortcode renderer */

.auras-card.is-new  { animation: auraFadeIn .4s ease both; }
.auras-ea-card.is-new { animation: auraFadeIn .4s ease both; }
@keyframes auraFadeIn { from { opacity:0; transform:translateY(10px) } to { opacity:1; transform:none } }
@keyframes auraSpin   { to { transform: rotate(360deg) } }

/* East Artisan homepage review cards */
.auras-reviews-eastartisan {
    --ea-ink: #1f2933;
    --ea-soft: #5f6b76;
    --ea-line: #e7e1d8;
    --ea-gold: #c28a32;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.auras-reviews-eastartisan .auras-grid {
    gap: 18px;
}
.auras-ea-card {
    display: grid;
    grid-template-columns: minmax(150px, 42%) 1fr;
    min-height: 255px;
    background: #fff;
    border: 1px solid var(--ea-line);
    box-shadow: 0 12px 30px rgba(31, 41, 51, .08);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.auras-ea-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(31, 41, 51, .13);
}
.auras-ea-photo {
    position: relative;
    min-height: 255px;
    background: #f6f2ed;
    overflow: hidden;
    cursor: pointer;
}
.auras-ea-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .35s ease;
}
.auras-ea-card:hover .auras-ea-photo img {
    transform: scale(1.035);
}
.auras-ea-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 26px 26px 24px;
}
.auras-ea-stars {
    margin-bottom: 14px;
    line-height: 1;
}
.auras-ea-stars .auras-star {
    font-size: 15px;
}
.auras-ea-stars .auras-star.filled {
    color: var(--ea-gold);
}
.auras-ea-quote {
    margin: 0;
    color: var(--ea-ink);
    font-size: 16px;
    line-height: 1.65;
}
.auras-ea-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.auras-ea-name {
    color: var(--ea-ink);
    font-size: 14px;
    font-weight: 700;
}
.auras-ea-verified {
    color: var(--ea-soft);
    font-size: 12px;
}
.auras-ea-product {
    display: grid;
    gap: 5px;
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid var(--ea-line);
    color: var(--ea-ink);
    text-decoration: none;
}
.auras-ea-product span {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.35;
    color: var(--ea-soft);
}
.auras-ea-product strong {
    width: fit-content;
    color: var(--ea-gold);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.auras-ea-product:hover strong {
    text-decoration: underline;
}
@media (max-width: 900px) {
    .auras-ea-card {
        grid-template-columns: 1fr;
    }
    .auras-ea-photo {
        aspect-ratio: 4 / 3;
        min-height: 0;
    }
    .auras-ea-body {
        padding: 22px;
    }
}
@media (max-width: 600px) {
    .auras-ea-quote {
        font-size: 14px;
    }
}

.auras-product-link {
    display: block;
    padding: 11px 13px 12px;
    color: var(--ar-text);
    text-decoration: none;
    border-top: 1px solid var(--ar-border);
    background: #fff;
}
.auras-product-link:hover {
    color: var(--ar-text);
    background: #fafafa;
}
.auras-product-link-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 600;
}
.auras-product-link-cta {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.2;
    color: var(--ar-muted);
}

/* Load more button */
.auras-load-more-wrap { text-align: center; margin-top: 32px; }
.auras-load-more-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 28px; border-radius: 999px;
    border: 1px solid #d1d5db; background: #fff; color: var(--ar-text);
    font-size: 14px; font-weight: 500; cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.auras-load-more-btn:hover    { background: #f9fafb; border-color: #9ca3af; box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.auras-load-more-btn:disabled { opacity: .5; cursor: not-allowed; }

.auras-no-reviews { color: var(--ar-muted); text-align: center; padding: 40px 0; }

/* ── WooCommerce product page review grid ───────────────────── */
.woocommerce-Reviews ol.commentlist {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 24px !important;
}
@media (max-width: 600px) {
    .woocommerce-Reviews ol.commentlist {
        grid-template-columns: 1fr !important;
    }
}
.woocommerce-Reviews ol.commentlist li.review {
    padding: 0 !important;
    margin: 0 !important;
}

/* ── Photo lightbox ─────────────────────────────────────────── */
.ar-lightbox {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.85);
    opacity: 0; visibility: hidden;
    transition: opacity .25s, visibility .25s;
}
.ar-lightbox.is-open {
    opacity: 1; visibility: visible;
}
.ar-lightbox-inner {
    position: relative;
    max-width: min(90vw, 600px);
    max-height: 90vh;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
}

/* Main image */
.ar-lightbox-img-wrap {
    position: relative;
    width: 100%;
    border-radius: 10px; overflow: hidden;
    background: #111;
}
.ar-lightbox-img-wrap img {
    display: block;
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

/* Prev / Next arrows */
.ar-lb-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,.15); border: none;
    color: #fff; font-size: 20px; line-height: 1;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .15s;
    backdrop-filter: blur(4px);
    z-index: 2;
}
.ar-lb-arrow:hover     { background: rgba(255,255,255,.3); }
.ar-lb-arrow.prev      { left: 10px; }
.ar-lb-arrow.next      { right: 10px; }
.ar-lb-arrow[hidden]   { display: none; }

/* Dot indicators */
.ar-lightbox-dots {
    display: flex; gap: 7px;
}
.ar-lb-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(255,255,255,.35); border: none; padding: 0; cursor: pointer;
    transition: background .15s, transform .15s;
}
.ar-lb-dot.active {
    background: #fff; transform: scale(1.3);
}

/* Thumbnail strip */
.ar-lightbox-thumbs {
    display: flex; gap: 8px; overflow-x: auto;
    padding-bottom: 4px; max-width: 100%;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.3) transparent;
}
.ar-lb-thumb {
    width: 56px; height: 56px; flex-shrink: 0;
    border-radius: 6px; overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer; transition: border-color .15s, opacity .15s;
    opacity: .6;
}
.ar-lb-thumb img       { width: 100%; height: 100%; object-fit: cover; display: block; }
.ar-lb-thumb.active    { border-color: #fff; opacity: 1; }

/* Close button */
.ar-lb-close {
    position: absolute; top: -44px; right: 0;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,.15); border: none;
    color: #fff; font-size: 18px; line-height: 1;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .15s;
    backdrop-filter: blur(4px);
}
.ar-lb-close:hover { background: rgba(255,255,255,.3); }

/* Counter label */
.ar-lb-counter {
    position: absolute; top: 10px; left: 10px;
    background: rgba(0,0,0,.5); color: #fff;
    font-size: 12px; font-weight: 600;
    padding: 3px 8px; border-radius: 20px;
    backdrop-filter: blur(4px);
    z-index: 2;
}
