/**
 * CroPuff — recenzije (Snippet 2 od 3)
 * Zalijepi u: Izgled → Prilagodi → Dodatni CSS (ili CSS stranice u Elementoru)
 */

.cr-wrap {
    padding: 64px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    color: #1a1a1a;
}

.cr-wrap *,
.cr-wrap *::before,
.cr-wrap *::after {
    box-sizing: border-box;
}

.cr-summary-card {
    max-width: 1140px;
    margin: 0 auto 24px;
    background: #ffffff;
    border: 1px solid #e8e8e6;
    border-radius: 20px;
    padding: 36px 44px;
    display: flex;
    align-items: center;
    gap: 52px;
}

.cr-summary-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 120px;
}

.cr-big-avg {
    font-size: 64px;
    font-weight: 700;
    color: #0f0f0f;
    line-height: 1;
    letter-spacing: -3px;
}

.cr-summary-stars {
    display: flex;
    gap: 3px;
}

.cr-summary-stars .cr-s-on {
    font-size: 22px;
    color: #008cba;
}

.cr-summary-stars .cr-s-off {
    font-size: 22px;
    color: #d4d4d4;
}

.cr-summary-count {
    font-size: 13px;
    color: #8a8a8a;
    white-space: nowrap;
    font-weight: 500;
}

.cr-summary-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cr-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cr-bar-label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    min-width: 14px;
    text-align: right;
}

.cr-bar-track {
    flex: 1;
    height: 8px;
    background: #ebebea;
    border-radius: 99px;
    overflow: hidden;
}

.cr-bar-fill {
    height: 100%;
    background: #008cba;
    border-radius: 99px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.cr-bar-pct {
    font-size: 12px;
    color: #aaa;
    min-width: 32px;
    text-align: right;
}

.cr-body-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    max-width: 1140px;
    margin: 0 auto;
    align-items: start;
}

.cr-form-card,
.cr-list-card {
    background: #ffffff;
    border: 1px solid #e8e8e6;
    border-radius: 20px;
    padding: 32px 32px;
}

.cr-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f0f0f;
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0ee;
}

.cr-field {
    margin-bottom: 18px;
}

.cr-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 7px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.cr-req {
    color: #008cba;
}

.cr-optional {
    font-weight: 400;
    color: #aaa;
    text-transform: none;
    font-size: 11px;
    letter-spacing: 0;
}

.cr-wrap .cr-input {
    display: block !important;
    width: 100% !important;
    padding: 11px 14px !important;
    border: 1.5px solid #e0e0de !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: #1a1a1a !important;
    background: #fafaf9 !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.cr-wrap .cr-input:focus {
    border-color: #008cba !important;
    box-shadow: 0 0 0 3px rgba(0, 140, 186, 0.12) !important;
    background: #fff !important;
}

.cr-wrap .cr-textarea {
    resize: vertical !important;
    min-height: 106px !important;
    line-height: 1.55 !important;
}

.cr-star-widget {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    padding: 4px 0;
}

.cr-wrap .cr-star-btn {
    background: none !important;
    border: none !important;
    padding: 4px 2px !important;
    font-size: 38px !important;
    color: #d8d8d6 !important;
    cursor: pointer !important;
    line-height: 1 !important;
    transition: color 0.1s, transform 0.12s !important;
    display: inline-block !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    min-width: 44px !important;
    text-align: center !important;
    margin: 0 !important;
}

.cr-wrap .cr-star-btn:hover {
    transform: scale(1.18) !important;
}

.cr-wrap .cr-star-btn:active {
    transform: scale(0.92) !important;
}

.cr-wrap .cr-star-btn.cr-star-active {
    color: #008cba !important;
}

.cr-drop {
    position: relative;
    border: 1.5px dashed #d8d8d6;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #fafaf9;
    overflow: hidden;
}

.cr-file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.cr-drop:hover,
.cr-drop.cr-drop--over {
    border-color: #008cba;
    background: rgba(0, 140, 186, 0.03);
}

.cr-drop-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 22px 18px;
    text-align: center;
    pointer-events: none;
}

.cr-drop-text {
    font-size: 13px;
    color: #555;
}

.cr-drop-hint {
    font-size: 11px;
    color: #aaa;
    display: block;
}

.cr-thumbs {
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    position: relative;
    z-index: 5;
}

.cr-thumbs.cr-thumbs--visible {
    display: flex;
}

.cr-thumb {
    position: relative;
    width: 78px;
    height: 78px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: visible;
}

.cr-thumb img {
    width: 78px;
    height: 78px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    border: 1px solid #e8e8e6;
}

.cr-wrap .cr-thumb-rm {
    position: absolute !important;
    top: -8px !important;
    right: -8px !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    background: #1a1a1a !important;
    color: #fff !important;
    font-size: 14px !important;
    line-height: 22px !important;
    text-align: center !important;
    cursor: pointer !important;
    border: 2px solid #fff !important;
    padding: 0 !important;
    font-family: inherit !important;
    font-weight: 700 !important;
    transition: background 0.15s, transform 0.15s !important;
    z-index: 20 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18) !important;
}

.cr-wrap .cr-thumb-rm:hover {
    background: #c0392b !important;
    transform: scale(1.12) !important;
}

.cr-field-err {
    font-size: 12px;
    color: #c0392b;
    margin: 6px 0 0;
    min-height: 15px;
    font-weight: 500;
}

.cr-submit-err {
    font-size: 13px;
    color: #c0392b;
    font-weight: 500;
    margin: 0 0 14px;
    min-height: 0;
}

.cr-submit-err:not(:empty) {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
}

.cr-wrap .cr-submit-btn {
    display: block !important;
    width: 100% !important;
    padding: 14px 24px !important;
    border-radius: 12px !important;
    background: #008cba !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    border: none !important;
    cursor: pointer !important;
    transition: background 0.2s, transform 0.15s !important;
    letter-spacing: 0.1px !important;
    text-align: center !important;
    text-decoration: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

.cr-wrap .cr-submit-btn:hover {
    background: #007aa3 !important;
    transform: translateY(-1px) !important;
}

.cr-wrap .cr-submit-btn:active {
    transform: translateY(0) !important;
    background: #006b8f !important;
}

.cr-wrap .cr-submit-btn:disabled {
    background: #b3d9e8 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.cr-success {
    text-align: center;
    padding: 48px 20px;
}

.cr-success-check {
    width: 60px;
    height: 60px;
    background: #008cba;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    color: #fff;
}

.cr-success h4 {
    font-size: 20px;
    font-weight: 700;
    color: #0f0f0f;
    margin: 0 0 8px;
}

.cr-success p {
    font-size: 14px;
    color: #777;
    margin: 0;
}

.cr-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cr-review-card {
    padding: 20px 0;
    border-bottom: 1px solid #f0f0ee;
    transition: none;
}

.cr-review-card:first-child {
    padding-top: 0;
}

.cr-review-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cr-review-card--new {
    animation: cr-fadein 0.3s ease;
}

@keyframes cr-fadein {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cr-review-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 12px;
}

.cr-review-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cr-review-author {
    font-size: 14px;
    font-weight: 700;
    color: #0f0f0f;
}

.cr-review-stars {
    display: flex;
    gap: 2px;
}

.cr-review-stars .cr-s-on {
    font-size: 14px;
    color: #008cba;
}

.cr-review-stars .cr-s-off {
    font-size: 14px;
    color: #d8d8d6;
}

.cr-review-date {
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 2px;
}

.cr-review-text {
    font-size: 14px;
    color: #444;
    line-height: 1.65;
    margin: 0 0 12px;
}

.cr-review-imgs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cr-review-imgs .cr-lb img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    cursor: pointer;
    border: 1px solid #e8e8e6;
    transition: opacity 0.15s, transform 0.15s;
}

.cr-review-imgs .cr-lb:hover img {
    opacity: 0.88;
    transform: scale(1.04);
}

.cr-empty {
    text-align: center;
    padding: 52px 20px;
}

.cr-empty p {
    font-size: 14px;
    color: #aaa;
    margin: 0;
}

.cr-wrap .cr-load-more-btn {
    display: block !important;
    width: 100% !important;
    margin-top: 20px !important;
    padding: 12px 20px !important;
    border-radius: 12px !important;
    border: 1.5px solid #e0e0de !important;
    background: transparent !important;
    color: #555 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    transition: border-color 0.2s, color 0.2s, background 0.2s !important;
    text-align: center !important;
    box-shadow: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.cr-wrap .cr-load-more-btn:hover {
    border-color: #008cba !important;
    color: #008cba !important;
    background: rgba(0, 140, 186, 0.04) !important;
}

.cr-wrap .cr-load-more-btn:disabled {
    border-color: #e0e0de !important;
    color: #ccc !important;
    cursor: not-allowed !important;
}

.cr-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.cr-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    cursor: default;
}

.cr-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.15) !important;
    border: none !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    color: #fff !important;
    font-size: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    padding: 0 !important;
    box-shadow: none !important;
    line-height: 1 !important;
}

.cr-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.28) !important;
}

@media (max-width: 920px) {
    .cr-body-grid {
        grid-template-columns: 1fr;
    }
    .cr-summary-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 28px 24px;
    }
    .cr-summary-score {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        min-width: unset;
    }
    .cr-big-avg {
        font-size: 52px;
    }
}

@media (max-width: 640px) {
    .cr-wrap {
        padding: 44px 14px;
    }
    .cr-form-card,
    .cr-list-card {
        padding: 24px 20px;
    }
    .cr-summary-card {
        padding: 22px 20px;
    }
    .cr-big-avg {
        font-size: 44px;
        letter-spacing: -2px;
    }
    .cr-wrap .cr-star-btn {
        font-size: 44px !important;
        min-width: 52px !important;
    }
    .cr-star-widget {
        gap: 2px;
        justify-content: space-between;
    }
    .cr-wrap .cr-submit-btn,
    .cr-wrap .cr-load-more-btn {
        padding: 16px 20px !important;
        font-size: 16px !important;
    }
}

/* Compact variant for VIP PDP (Task 13) */
.cr-wrap--compact {
    padding: 24px 16px !important;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.cr-wrap--compact .cr-summary-card {
    padding: 20px 24px;
    margin-bottom: 16px;
}

.cr-wrap--compact .cr-big-avg {
    font-size: 42px;
}

.cr-wrap--compact .cr-body-grid {
    grid-template-columns: 1fr;
    gap: 16px;
}

.cr-wrap--compact .cr-form-card {
    padding: 20px !important;
}

.cr-wrap--compact .cr-star-widget .cr-s-on,
.cr-wrap--compact .cr-star-widget .cr-s-off {
    font-size: 28px !important;
}

.cr-wrap--compact .cr-field {
    margin-bottom: 12px !important;
}

.cr-wrap--compact .cr-upload-zone {
    display: none;
}

.cr-wrap--compact.cr-upload-open .cr-upload-zone {
    display: block;
}
