/* ============================================
   Global Styles
   ============================================ */
.grm-reviews-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ============================================
   Review Items - Common Styles
   ============================================ */
.grm-review-item,
.grm-review-item-modern,
.grm-review-item-compact {
    margin-bottom: 20px;
}

/* Vertical centering for all review items */
.grm-review-item,
.grm-review-item-modern,
.grm-review-item-compact,
.grm-review-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ============================================
   Default Template
   ============================================ */
.grm-review-item {
    background: var(--grm-card-bg, #fff);
    border: 1px solid var(--grm-card-border, #f0f0f1);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.grm-review-item:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.grm-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.grm-reviewer-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.grm-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.grm-avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

.grm-reviewer-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.grm-reviewer-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.grm-rating {
    color: var(--grm-rating-color, #ffc107);
    font-size: 14px;
    letter-spacing: 2px;
}

.grm-rating-stars {
    display: inline-block;
}

.grm-rating-number {
    margin-left: 5px;
    font-size: 12px;
    color: #666;
}

.grm-review-date {
    color: #999;
    font-size: 12px;
}

.grm-review-content {
    color: var(--grm-text-color, #555);
    line-height: 1.6;
    font-size: 14px;
    margin-top: 10px;
}

/* Verified Badge */
.grm-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    font-size: 11px;
    color: #2e7d32;
    background: #e8f5e9;
    padding: 4px 8px;
    border-radius: 4px;
    width: fit-content;
}

.grm-verified-icon {
    font-size: 12px;
    font-weight: bold;
}

/* Helpful Buttons */
.grm-helpful-buttons {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.grm-helpful-btn,
.grm-unhelpful-btn {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.grm-helpful-btn:hover {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.grm-unhelpful-btn:hover {
    background: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

.grm-helpful-btn:active,
.grm-unhelpful-btn:active {
    transform: scale(0.95);
}

/* ============================================
   Modern Template
   ============================================ */
.grm-template-modern .grm-review-item-modern {
    margin-bottom: 20px;
}

.grm-template-modern .grm-review-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.03);
}

.grm-template-modern .grm-review-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.grm-template-modern .grm-review-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 15px;
}

.grm-template-modern .grm-reviewer-info-modern {
    display: flex;
    gap: 12px;
    align-items: center;
}

.grm-template-modern .grm-avatar-modern {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.grm-template-modern .grm-avatar-placeholder-modern {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00897B, #00695C);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
}

.grm-template-modern .grm-reviewer-details-modern {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.grm-template-modern .grm-reviewer-name-modern {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
}

.grm-template-modern .grm-review-date-modern {
    color: #888;
    font-size: 13px;
}

.grm-template-modern .grm-rating-row-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.grm-template-modern .grm-rating-modern {
    color: var(--grm-rating-color, #ffc107);
    font-size: 14px;
    letter-spacing: 1px;
}

.grm-template-modern .grm-verified-badge-modern {
    display: flex;
    align-items: center;
}

.grm-template-modern .grm-review-content-modern {
    color: var(--grm-text-color, #222);
    line-height: 1.7;
    font-size: 14px;
    padding-left: 0;
    font-style: normal;
}

/* ============================================
   Compact Template
   ============================================ */
.grm-template-compact .grm-review-item-compact {
    border-bottom: 1px solid #e5e5e5;
    padding: 12px 0;
    transition: background 0.2s ease;
}

.grm-template-compact .grm-review-item-compact:last-child {
    border-bottom: none;
}

.grm-template-compact .grm-review-item-compact:hover {
    background: #f9f9f9;
    padding-left: 8px;
    padding-right: 8px;
}

.grm-template-compact .grm-review-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.grm-template-compact .grm-reviewer-info-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}

.grm-template-compact .grm-avatar-compact {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.grm-template-compact .grm-avatar-placeholder-compact {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

.grm-template-compact .grm-reviewer-name-compact {
    font-size: 14px;
    font-weight: 600;
}

.grm-template-compact .grm-rating-compact {
    color: var(--grm-rating-color, #ffc107);
    font-size: 14px;
}

.grm-template-compact .grm-review-content-compact {
    flex: 1;
    font-size: 13px;
    color: var(--grm-text-color, #666);
    line-height: 1.4;
}

.grm-template-compact .grm-review-date-compact {
    font-size: 12px;
    color: #999;
}

/* ============================================
   Badge Template
   ============================================ */
.grm-badge-wrapper {
    display: inline-block;
}

.grm-badge {
    display: inline-flex;
    background: var(--grm-card-bg, #fff);
    border: 1px solid var(--grm-card-border, #f0f0f1);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.grm-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.grm-badge-align-center {
    margin: 0 auto;
    display: inline-flex;
}

.grm-badge-align-right {
    float: right;
}

.grm-badge-align-left {
    float: left;
}

.grm-badge-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
}

.grm-badge-divider {
    width: 1px;
    background: var(--grm-card-border, #f0f0f1);
}

.grm-badge-content {
    padding: 10px 18px 10px 14px;
}

.grm-badge-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.grm-badge-stars {
    color: var(--grm-rating-color, #ffc107);
    font-size: 16px;
    letter-spacing: 1px;
}

.grm-badge-rating-number {
    font-weight: bold;
    font-size: 18px;
    color: #1a1a1a;
    margin-left: 6px;
}

.grm-badge-heading {
    font-weight: 700;
    font-size: 15px;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.grm-badge-count {
    font-size: 12px;
    color: #666;
}

/* ============================================
   Carousel Layout with Summary Sidebar
   ============================================ */
.grm-carousel-layout {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    background: transparent;
    margin: 20px 0;
}

/* Left Side - Summary Sidebar */
.grm-carousel-summary {
    flex: 0 0 280px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 32px 24px;
    align-self: flex-start;
}

.grm-summary-card {
    color: #fff;
    text-align: center;
}

.grm-summary-logo {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.grm-summary-logo svg {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.grm-summary-number {
    font-size: 56px;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 12px;
}

.grm-summary-stars {
    font-size: 24px;
    color: var(--grm-rating-color, #ffc107);
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.grm-summary-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.grm-summary-count {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 24px;
}

.grm-summary-button {
    display: inline-block;
    background: #fff;
    color: #667eea;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.grm-summary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: #fff;
    color: #667eea;
}

.grm-summary-distribution {
    margin-top: 24px;
    text-align: left;
}

.grm-distribution-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 12px;
}

.grm-distribution-label {
    width: 35px;
}

.grm-distribution-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    overflow: hidden;
}

.grm-distribution-fill {
    height: 100%;
    background: var(--grm-rating-color, #ffc107);
    border-radius: 3px;
}

.grm-distribution-count {
    width: 35px;
    text-align: right;
}

/* Right Side - Carousel */
.grm-carousel-main {
    flex: 1;
    min-width: 0;
}

.grm-carousel-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.grm-carousel-wrapper {
    overflow: hidden;
    position: relative;
    border-radius: 12px;
    margin: -15px 0;
    padding: 15px 0;
}

.grm-carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.grm-carousel-slide {
    flex: 0 0 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

.grm-carousel-layout:not(.grm-carousel-simple-layout) .grm-carousel-slide {
    flex: 0 0 33.333%;
}

@media (max-width: 900px) {
    .grm-carousel-layout:not(.grm-carousel-simple-layout) .grm-carousel-slide { flex: 0 0 50%; }
}

@media (max-width: 600px) {
    .grm-carousel-layout:not(.grm-carousel-simple-layout) .grm-carousel-slide { flex: 0 0 100%; }
}

/* Carousel Cards */
.grm-carousel-card {
    background: var(--grm-card-bg, #fff);
    border: 1px solid var(--grm-card-border, #f0f0f1);
    border-radius: 12px;
    padding: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.grm-card-placeholder {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Card Header - Avatar + Name/Date */
.grm-carousel-card-header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.grm-carousel-avatar {
    flex-shrink: 0;
}

.grm-carousel-avatar img,
.grm-carousel-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.grm-carousel-avatar-placeholder {
    background: linear-gradient(135deg, #4285F4, #34A853);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

.grm-carousel-card-info {
    flex: 1;
    min-width: 0;
}

.grm-carousel-name {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
    margin-bottom: 2px;
    line-height: 1.3;
}

.grm-carousel-date {
    font-size: 12px;
    color: #999;
    line-height: 1.3;
}

/* Rating Stars */
.grm-carousel-rating {
    color: var(--grm-rating-color, #ffc107);
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.grm-carousel-card-content {
    color: var(--grm-text-color, #555);
    line-height: 1.6;
    font-size: 14px;
    margin-bottom: 12px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    transition: all 0.3s ease;
}

/* Navigation Buttons */
.grm-carousel-prev,
.grm-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 10;
    transition: all 0.3s ease;
}

.grm-carousel-prev:hover,
.grm-carousel-next:hover {
    background: rgba(0,0,0,0.8);
    transform: translateY(-50%) scale(1.05);
}

.grm-carousel-prev:active,
.grm-carousel-next:active {
    transform: translateY(-50%) scale(0.95);
}

.grm-carousel-prev {
    left: -15px;
}

.grm-carousel-next {
    right: -15px;
}

/* Dots Navigation */
.grm-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}

.grm-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #e5e5e5;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.grm-carousel-dot:hover {
    transform: scale(1.2);
    background: #2271b1;
}

.grm-carousel-dot.active {
    background: #2271b1;
    transform: scale(1.2);
}

/* ============================================
   Summary & Statistics Styles
   ============================================ */
.grm-summary-container {
    background: var(--grm-card-bg, #fff);
    border: 1px solid var(--grm-card-border, #f0f0f1);
    border-radius: 16px;
    padding: 25px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.grm-summary-header {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.grm-average-rating {
    text-align: center;
    flex: 1;
}

.grm-average-number {
    font-size: 48px;
    font-weight: bold;
    color: #2271b1;
    line-height: 1;
}

.grm-average-stars {
    color: var(--grm-rating-color, #ffc107);
    font-size: 20px;
    margin: 10px 0;
}

.grm-total-reviews {
    color: #666;
    font-size: 12px;
}

.grm-total-score {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.grm-rating-distribution {
    flex: 2;
}

.grm-rating-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.grm-rating-label {
    width: 45px;
    font-size: 13px;
    font-weight: 500;
}

.grm-rating-bar {
    flex: 1;
    height: 28px;
    background: #f0f0f0;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}

.grm-rating-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--grm-rating-color, #ffc107), #ffb300);
    border-radius: 14px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.grm-rating-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.2), transparent);
    border-radius: 14px;
}

.grm-rating-count {
    width: 55px;
    font-size: 12px;
    color: #666;
    text-align: right;
}

/* Simple Stats */
.grm-stats-simple {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.grm-stats-simple .grm-stat-item {
    text-align: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    min-width: 120px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(0,0,0,0.02);
}

.grm-stats-simple .grm-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.grm-stats-simple .grm-stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.grm-stats-simple .grm-stat-number {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #2271b1;
}

/* ============================================
   Pagination
   ============================================ */
.grm-pagination {
    text-align: center;
    margin-top: 30px;
}

.grm-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    background: #fff;
    border: 1px solid #f0f0f1;
    border-radius: 8px;
    text-decoration: none;
    color: #2271b1;
    transition: all 0.2s ease;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.grm-pagination .page-numbers.current {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
    cursor: default;
}

.grm-pagination .page-numbers:hover:not(.current) {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.06);
}

.grm-pagination .page-numbers:active {
    transform: translateY(0);
}

/* ============================================
   Minimal Card Template
   ============================================ */
.grm-template-minimal .grm-review-card-minimal {
    background: #fafafa;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--grm-card-border, #f0f0f1);
    transition: all 0.3s ease;
}

.grm-template-minimal .grm-review-card-minimal:hover {
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.grm-reviewer-header-minimal {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.grm-avatar-minimal, .grm-avatar-placeholder-minimal {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.grm-avatar-placeholder-minimal {
    background: #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #666;
}

.grm-reviewer-meta-minimal {
    display: flex;
    flex-direction: column;
}

.grm-reviewer-name-minimal {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
}

.grm-review-date-minimal {
    font-size: 12px;
    color: #888;
}

.grm-rating-minimal {
    color: var(--grm-rating-color, #ffc107);
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.grm-review-content-minimal {
    color: var(--grm-text-color, #444);
    font-size: 14px;
    line-height: 1.6;
}

/* ============================================
   Minimal Badge Template
   ============================================ */
.grm-badge-minimal {
    display: inline-flex;
    align-items: center;
    background: var(--grm-card-bg, #fff);
    border: 1px solid var(--grm-card-border, #f0f0f1);
    border-radius: 8px;
    padding: 10px 18px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    gap: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.grm-badge-minimal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

.grm-bm-icon {
    display: flex;
    align-items: center;
}

.grm-bm-stars {
    color: var(--grm-rating-color, #ffc107);
    font-size: 16px;
    letter-spacing: 1px;
}

.grm-bm-text {
    display: flex;
    align-items: center;
}

.grm-bm-score {
    font-weight: 700;
    font-size: 16px;
    color: #1a1a1a;
}

.grm-bm-divider {
    color: #dcdcdc;
    margin: 0 6px;
}

.grm-bm-count {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
}

/* ============================================
   Simple Centered Carousel Layout
   ============================================ */
.grm-carousel-simple-layout .grm-carousel-card-header {
    justify-content: center;
    text-align: center;
}

/* ============================================
   Grid Layouts for Widgets
   ============================================ */
.grm-grid-1 .grm-reviews-container, .grm-widget-container.grm-grid-1 { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 20px; 
}
.grm-grid-2 .grm-reviews-container, .grm-widget-container.grm-grid-2 { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px; 
}
.grm-grid-3 .grm-reviews-container, .grm-widget-container.grm-grid-3 { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px; 
}
.grm-grid-4 .grm-reviews-container, .grm-widget-container.grm-grid-4 { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px; 
}

/* ============================================
.grm-carousel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    border-color: transparent;
}

/* Simple Carousel Card Overrides */
.grm-carousel-simple-layout .grm-carousel-card-centered {
    text-align: center;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    padding: 40px 20px;
}

.grm-carousel-simple-layout .grm-carousel-card-content {
    font-size: 16px;
    font-style: italic;
    color: var(--grm-text-color, #444);
    margin-bottom: 25px;
}

/* Card Content */
.grm-carousel-card-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Read More Button */
.grm-read-more-btn {
    background: none;
    border: none;
    color: #2271b1;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0 4px;
    text-align: left;
    display: inline-block;
    width: auto;
    transition: color 0.2s ease;
}

.grm-read-more-btn:hover {
    color: #1557b0;
    text-decoration: underline;
    background: transparent !important;
}

/* ============================================
   Minimal Style Badge Template
   ============================================ */
.grm-minimal-badge-wrapper {
    display: inline-block;
}

.grm-minimal-badge {
    background: var(--grm-card-bg, #fff);
    border: 1px solid var(--grm-card-border, #f0f0f1);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    min-width: 180px;
}

.grm-minimal-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.grm-minimal-badge-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.grm-minimal-badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.grm-minimal-badge-logo {
    display: flex;
    align-items: center;
}

.grm-minimal-badge-stars {
    color: var(--grm-rating-color, #ffc107);
    font-size: 16px;
    letter-spacing: 1px;
}

.grm-minimal-badge-rating {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 13px;
    color: #666;
}

.grm-minimal-badge-number {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.grm-minimal-badge-separator::before {
    content: '•';
    color: #ccc;
    font-size: 12px;
}

/* ============================================
   Modern Carousel with Header Template
   ============================================ */
.grm-carousel-header-layout {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.grm-carousel-header {
    background: var(--grm-card-bg, #fff);
    border: 1px solid var(--grm-card-border, #f0f0f1);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.grm-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.grm-header-logo {
    display: flex;
    align-items: center;
}

.grm-header-rating-text {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.grm-rating-text {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
}

.grm-stars {
    color: var(--grm-rating-color, #ffc107);
    font-size: 18px;
    letter-spacing: 1px;
}

.grm-header-rating {
    font-weight: bold;
    font-size: 18px;
    color: #1a1a1a;
}

.grm-header-rating-reviews {
    color: #666;
    font-size: 14px;
    padding-left: 5px;
    border-left: 1px solid #e5e5e5;
}

.grm-header-write-btn-container {
    margin-left: auto;
}

.grm-header-write-btn {
    display: inline-block;
    background: #1a73e8;
    color: #fff;
    padding: 10px 24px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(26,115,232,0.3);
}

.grm-header-write-btn:hover {
    background: #1557b0;
    color: #fff;
    transform: translateY(-1px);
}

.grm-carousel-header-container {
    position: relative;
}

.grm-carousel-header-wrapper {
    overflow: hidden;
    border-radius: 12px;
    margin: -15px 0; 
    padding: 15px 0;
}

.grm-carousel-header-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.grm-carousel-header-slide {
    flex: 0 0 33.333%;
    padding: 0 10px;
    box-sizing: border-box;
}

.grm-carousel-header-card {
    background: var(--grm-card-bg, #fff);
    border: 1px solid var(--grm-card-border, #f0f0f1);
    border-radius: 12px;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.grm-carousel-header-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
    border-color: transparent;
}

.grm-carousel-header-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    position: relative;
}

.grm-carousel-header-profile-img img, 
.grm-carousel-header-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.grm-carousel-header-avatar-placeholder {
    background: linear-gradient(135deg, #4285F4, #34A853);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 20px;
}

.grm-carousel-header-profile-details {
    flex: 1;
    min-width: 0;
    padding-right: 30px;
}

.grm-carousel-header-name {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grm-carousel-header-date {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.grm-carousel-header-platform-icon {
    position: absolute;
    top: 0;
    right: 0;
}

.grm-carousel-header-stars {
    margin-bottom: 12px;
}

.grm-carousel-header-review-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.grm-carousel-header-review-content {
    color: var(--grm-text-color, #444);
    font-size: 14px;
    line-height: 1.6;
}

.grm-carousel-header-read-more {
    background: transparent !important;
    border: none;
    color: #1a73e8;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0 0;
    text-align: left;
    margin-top: auto;
}

.grm-carousel-header-read-more:hover {
    text-decoration: underline;
    background: transparent !important;
    color: #1557b0;
}

.grm-carousel-header-prev, 
.grm-carousel-header-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 10;
    color: #333;
    transition: all 0.2s ease;
    font-size: 18px;
}

.grm-carousel-header-prev:hover, 
.grm-carousel-header-next:hover {
    background: #f8f9fa;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    color: #1a73e8;
}

.grm-carousel-header-prev { left: -22px; }
.grm-carousel-header-next { right: -22px; }

.grm-carousel-header-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.grm-carousel-header-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e0e0e0;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.grm-carousel-header-dot.active {
    background: #1a73e8;
    transform: scale(1.3);
}

@media (max-width: 900px) {
    .grm-carousel-header-slide { flex: 0 0 50%; }
}

@media (max-width: 600px) {
    .grm-carousel-header-slide { flex: 0 0 100%; }
    .grm-header-content { flex-direction: column; text-align: center; }
    .grm-header-rating-text { justify-content: center; }
    .grm-header-rating-reviews { border-left: none; padding-left: 0; display: block; width: 100%; margin-top: 4px; }
    .grm-header-write-btn-container { margin-left: 0; width: 100%; margin-top: 8px; }
    .grm-carousel-header-prev { left: 0; }
    .grm-carousel-header-next { right: 0; }
}

/* ============================================
   AJAX Loading Indicator
   ============================================ */
.grm-loading {
    text-align: center;
    padding: 20px;
}

.grm-loading-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.grm-load-more {
    text-align: center;
    margin-top: 20px;
}

.grm-load-more-btn {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.grm-load-more-btn:hover {
    background: #0a4b7a;
}

.grm-load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grm-review-item,
.grm-review-item-modern,
.grm-review-item-compact,
.grm-review-carousel,
.grm-carousel-card {
    animation: fadeIn 0.5s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.grm-carousel-dot.active {
    animation: pulse 0.3s ease-out;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .grm-carousel-layout {
        flex-direction: column;
    }
    
    .grm-carousel-summary {
        flex: none;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 900px) {
    .grm-carousel-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .grm-carousel-prev {
        left: -10px;
    }
    
    .grm-carousel-next {
        right: -10px;
    }
}

@media (max-width: 768px) {
    /* General */
    .grm-review-header,
    .grm-template-modern .grm-review-header-modern {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .grm-review-date,
    .grm-template-modern .grm-review-date-modern {
        margin-top: 10px;
    }
    
    .grm-summary-header {
        flex-direction: column;
    }
    
    /* Compact template */
    .grm-template-compact .grm-review-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .grm-template-compact .grm-review-content-compact {
        margin-left: 50px;
        width: calc(100% - 50px);
    }
    
    .grm-template-compact .grm-review-date-compact {
        margin-left: 50px;
    }
    
    /* Carousel */
    .grm-carousel-prev,
    .grm-carousel-next {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .grm-carousel-prev {
        left: 5px;
    }
    
    .grm-carousel-next {
        right: 5px;
    }
    
    .grm-carousel-card {
        min-height: auto;
    }

    .grm-carousel-cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .grm-grid-2 .grm-reviews-container,
    .grm-grid-3 .grm-reviews-container,
    .grm-grid-4 .grm-reviews-container,
    .grm-widget-container.grm-grid-2,
    .grm-widget-container.grm-grid-3,
    .grm-widget-container.grm-grid-4 { 
        grid-template-columns: 1fr; 
    }
    
    .grm-carousel-avatar img,
    .grm-carousel-avatar-placeholder {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .grm-carousel-name {
        font-size: 15px;
    }
    
    /* Badge template */
    .grm-badge-logo {
        padding: 8px 12px;
    }
    
    .grm-badge-content {
        padding: 5px 12px;
    }
    
    .grm-badge-stars {
        font-size: 11px;
    }
    
    .grm-badge-rating-number {
        font-size: 11px;
    }
    
    .grm-badge-heading {
        font-size: 10px;
    }
    
    .grm-badge-count {
        font-size: 9px;
    }
    
    /* Simple stats */
    .grm-stats-simple {
        flex-direction: column;
        gap: 10px;
    }
    
    .grm-stats-simple .grm-stat-item {
        width: 100%;
    }
    
    /* Helpful buttons */
    .grm-helpful-buttons {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    /* Default template */
    .grm-reviewer-info {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }
    
    .grm-review-header {
        align-items: center;
        text-align: center;
    }
    
    .grm-review-date {
        width: 100%;
        text-align: center;
    }
    
    /* Modern template */
    .grm-template-modern .grm-reviewer-info-modern {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }
    
    .grm-template-modern .grm-review-header-modern {
        align-items: center;
    }
    
    .grm-template-modern .grm-review-date-modern {
        width: 100%;
        text-align: center;
    }
    
    /* Compact template */
    .grm-template-compact .grm-reviewer-info-compact {
        width: 100%;
    }
    
    /* Carousel */
    .grm-carousel-summary {
        padding: 24px 20px;
    }
    
    .grm-summary-number {
        font-size: 40px;
    }
    
    .grm-summary-stars {
        font-size: 18px;
    }
    
    .grm-summary-text {
        font-size: 16px;
    }
    
    .grm-carousel-card {
        padding: 16px;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .grm-carousel-prev,
    .grm-carousel-next,
    .grm-carousel-dots,
    .grm-summary-button,
    .grm-helpful-buttons,
    .grm-load-more {
        display: none;
    }
    
    .grm-review-item,
    .grm-review-item-modern,
    .grm-review-item-compact,
    .grm-carousel-card,
    .grm-review-carousel {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #ccc;
        box-shadow: none;
    }
    
    .grm-badge {
        border: 1px solid #ccc;
    }
    
    .grm-carousel-layout {
        display: block;
    }
}

/* ============================================
   Accessibility & Focus States
   ============================================ */
.grm-carousel-prev:focus,
.grm-carousel-next:focus,
.grm-carousel-dot:focus,
.grm-pagination .page-numbers:focus,
.grm-summary-button:focus,
.grm-helpful-btn:focus,
.grm-unhelpful-btn:focus,
.grm-load-more-btn:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.grm-review-item:focus-within,
.grm-review-item-modern:focus-within,
.grm-carousel-card:focus-within {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Skip link for keyboard navigation */
.grm-skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.grm-skip-link:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 10px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    z-index: 9999;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .grm-review-item,
    .grm-review-item-modern,
    .grm-review-item-compact,
    .grm-review-carousel,
    .grm-carousel-card {
        border: 2px solid currentColor;
    }
    
    .grm-rating,
    .grm-badge-stars,
    .grm-average-stars,
    .grm-summary-stars {
        color: #ff0;
    }
    
    .grm-summary-button {
        border: 2px solid currentColor;
    }
    
    .grm-helpful-btn,
    .grm-unhelpful-btn {
        border: 1px solid currentColor;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .grm-review-item,
    .grm-review-item-modern,
    .grm-review-item-compact,
    .grm-review-carousel,
    .grm-carousel-track,
    .grm-rating-fill,
    .grm-badge,
    .grm-carousel-card,
    .grm-carousel-prev,
    .grm-carousel-next,
    .grm-carousel-dot,
    .grm-helpful-btn,
    .grm-unhelpful-btn {
        animation: none;
        transition: none;
    }
}