/**
 * Grow More Reviews — Frontend Styles
 * Matches LetsGrowMore.com dark theme aesthetic.
 *
 * @package Grow_More_Reviews
 */

/* =========================================
   CSS Custom Properties (Theme Tokens)
   Override these in your theme to customise.
   ========================================= */
:root {
    --gmr-bg-primary: #0d0d1a;
    --gmr-bg-card: #1a1a2e;
    --gmr-bg-card-hover: #222240;
    --gmr-bg-header: #12122a;
    --gmr-text-primary: #ffffff;
    --gmr-text-secondary: #b0b0c8;
    --gmr-text-muted: #7a7a9a;
    --gmr-accent: #00d4ff;
    --gmr-accent-hover: #00b8e6;
    --gmr-accent-glow: rgba(0, 212, 255, 0.15);
    --gmr-star-color: #f5a623;
    --gmr-star-empty: #3a3a5a;
    --gmr-border: #2a2a4a;
    --gmr-badge-bg: rgba(0, 212, 255, 0.12);
    --gmr-badge-text: #00d4ff;
    --gmr-rank-bg: rgba(0, 212, 255, 0.08);
    --gmr-rank-text: #00d4ff;
    --gmr-radius: 12px;
    --gmr-radius-sm: 8px;
    --gmr-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --gmr-transition: 0.25s ease;
    --gmr-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* =========================================
   Wrapper
   ========================================= */
.gmr-reviews {
    font-family: var(--gmr-font-family);
    max-width: 1100px;
    margin: 1.5rem auto;
    padding: 0;
}

.gmr-no-reviews {
    text-align: center;
    color: var(--gmr-text-muted);
    padding: 2rem;
    font-size: 1rem;
}

/* =========================================
   Table — Desktop (compact, fixed layout)
   ========================================= */
.gmr-reviews-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
    background: transparent;
    table-layout: fixed;
}

/* Column widths */
.gmr-reviews-table .gmr-col-logo   { width: 80px; }
.gmr-reviews-table .gmr-col-brand  { width: 20%; }
.gmr-reviews-table .gmr-col-rating { width: 130px; }
.gmr-reviews-table .gmr-col-slogan { width: auto; }
.gmr-reviews-table .gmr-col-cta    { width: 130px; }

.gmr-reviews-table thead th {
    background: var(--gmr-bg-header);
    color: var(--gmr-text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 8px 10px;
    text-align: left;
    border: none;
    white-space: nowrap;
}

.gmr-reviews-table thead th:first-child {
    border-radius: var(--gmr-radius-sm) 0 0 var(--gmr-radius-sm);
}

.gmr-reviews-table thead th:last-child {
    border-radius: 0 var(--gmr-radius-sm) var(--gmr-radius-sm) 0;
}

/* =========================================
   Table Rows — Compact height
   ========================================= */
.gmr-review-row {
    background: var(--gmr-bg-card);
    transition: background var(--gmr-transition), box-shadow var(--gmr-transition);
}

.gmr-review-row:hover {
    background: var(--gmr-bg-card-hover);
    box-shadow: var(--gmr-shadow);
}

.gmr-review-row td {
    padding: 10px;
    vertical-align: middle;
    color: var(--gmr-text-primary);
    border: none;
    font-size: 0.88rem;
}

.gmr-review-row td:first-child {
    border-radius: var(--gmr-radius) 0 0 var(--gmr-radius);
}

.gmr-review-row td:last-child {
    border-radius: 0 var(--gmr-radius) var(--gmr-radius) 0;
}

/* =========================================
   Logo — Tight, inline
   ========================================= */
.gmr-col-logo {
    text-align: center;
    white-space: nowrap;
}

.gmr-rank {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    font-weight: 700;
    font-size: 0.7rem;
    border-radius: 50%;
    background: var(--gmr-rank-bg);
    color: var(--gmr-rank-text);
    margin-right: 4px;
    vertical-align: middle;
}

.gmr-brand-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    padding: 2px;
    vertical-align: middle;
}

/* =========================================
   Brand — Truncate long names
   ========================================= */
.gmr-col-brand {
    min-width: 0;
}

.gmr-brand-link {
    color: var(--gmr-text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color var(--gmr-transition);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gmr-brand-link:hover {
    color: var(--gmr-accent);
}

.gmr-badge {
    display: inline-block;
    margin-top: 2px;
    padding: 2px 7px;
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--gmr-badge-bg);
    color: var(--gmr-badge-text);
    border-radius: 20px;
    white-space: nowrap;
}

/* =========================================
   Star Rating — Compact inline
   ========================================= */
.gmr-stars-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.gmr-stars {
    display: inline-flex;
    gap: 1px;
    line-height: 1;
}

.gmr-star { flex-shrink: 0; }
.gmr-star-full { color: var(--gmr-star-color); }
.gmr-star-half { color: var(--gmr-star-color); }
.gmr-star-empty { color: var(--gmr-star-empty); }

.gmr-rating-number {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--gmr-star-color);
    white-space: nowrap;
}

/* =========================================
   Slogan — Truncated with expand toggle
   ========================================= */
.gmr-col-slogan {
    color: var(--gmr-text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
}

.gmr-slogan-short {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gmr-slogan-full {
    white-space: normal;
    word-break: break-word;
}

/* "Read more" link */
.gmr-read-more {
    display: inline-block;
    margin-top: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gmr-accent) !important;
    text-decoration: none;
    cursor: pointer;
    transition: opacity var(--gmr-transition);
}

.gmr-read-more:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Expanded state */
.gmr-col-slogan.gmr-expanded .gmr-slogan-short {
    display: none;
}

.gmr-col-slogan.gmr-expanded .gmr-slogan-full {
    display: block !important;
}

.gmr-col-slogan.gmr-expanded .gmr-read-more {
    /* Changes to "View review ›" via JS */
}

/* =========================================
   CTA Button — Compact
   ========================================= */
.gmr-col-cta {
    text-align: center;
}

.gmr-cta {
    display: inline-block;
    padding: 8px 14px;
    background: var(--gmr-accent);
    color: #000;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    border-radius: 5px;
    transition: background var(--gmr-transition), box-shadow var(--gmr-transition), transform var(--gmr-transition);
    white-space: nowrap;
}

.gmr-cta:hover,
.gmr-cta:focus {
    background: var(--gmr-accent-hover);
    box-shadow: 0 0 12px var(--gmr-accent-glow);
    transform: translateY(-1px);
    color: #000;
    text-decoration: none;
}

.gmr-cta:active {
    transform: translateY(0);
}

/* =========================================
   Responsive — Tablet: hide slogan
   ========================================= */
@media (max-width: 900px) {
    .gmr-col-slogan,
    .gmr-reviews-table thead th.gmr-col-slogan {
        display: none;
    }
}

/* =========================================
   Responsive — Mobile: CSS Grid cards
   Row 1: [Rank+Logo] [Brand+Badge] [Rating]
   Row 2: [Slogan — full width]
   Row 3: [CTA button — full width]
   ========================================= */
@media (max-width: 640px) {
    .gmr-reviews-table,
    .gmr-reviews-table thead,
    .gmr-reviews-table tbody,
    .gmr-reviews-table th,
    .gmr-reviews-table td,
    .gmr-reviews-table tr {
        display: block;
    }

    .gmr-reviews-table { border-spacing: 0; }

    .gmr-reviews-table thead {
        position: absolute;
        width: 1px; height: 1px; padding: 0; margin: -1px;
        overflow: hidden; clip: rect(0,0,0,0); border: 0;
    }

    .gmr-review-row {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto auto;
        gap: 2px 8px;
        align-items: center;
        padding: 10px 12px;
        margin-bottom: 6px;
        border-radius: var(--gmr-radius-sm);
        background: var(--gmr-bg-card);
        border: 1px solid var(--gmr-border);
    }

    .gmr-review-row td {
        padding: 0;
        border-radius: 0 !important;
    }

    /* Row 1 */
    .gmr-col-logo   { grid-column: 1; grid-row: 1; width: auto; text-align: left; }
    .gmr-col-brand  { grid-column: 2; grid-row: 1; min-width: 0; }
    .gmr-col-rating { grid-column: 3; grid-row: 1; }

    .gmr-brand-logo { width: 32px; height: 32px; }
    .gmr-rank { width: 18px; height: 18px; line-height: 18px; font-size: 0.6rem; margin-right: 2px; }
    .gmr-brand-link { font-size: 0.85rem; }
    .gmr-rating-number { font-size: 0.75rem; }

    /* Row 2: Slogan */
    .gmr-col-slogan {
        display: block !important;
        grid-column: 1 / -1;
        grid-row: 2;
        padding: 4px 0 2px;
    }

    .gmr-col-slogan .gmr-slogan-short {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        font-size: 0.76rem;
    }

    .gmr-col-slogan .gmr-slogan-full {
        font-size: 0.76rem;
    }

    /* Row 3: CTA */
    .gmr-col-cta {
        grid-column: 1 / -1;
        grid-row: 3;
        width: auto;
    }

    .gmr-cta {
        display: block;
        text-align: center;
        width: 100%;
        padding: 8px 14px;
    }
}

/* =========================================
   Widget Area (for [gmr_reviews] in widgets)
   ========================================= */
.gmr-sidebar-widget .gmr-reviews { margin: 0; }
.gmr-sidebar-widget .gmr-reviews-table { font-size: 0.8rem; }
.gmr-sidebar-widget .gmr-col-slogan,
.gmr-sidebar-widget .gmr-reviews-table thead th.gmr-col-slogan { display: none; }
.gmr-sidebar-widget .gmr-brand-logo { width: 28px; height: 28px; }
.gmr-sidebar-widget .gmr-cta { padding: 6px 10px; font-size: 0.68rem; }

/* =========================================
   SIDEBAR SHORTCODE [gmr_sidebar]
   Compact stacked cards for 250-350px widths.
   ========================================= */
.gmr-sidebar {
    font-family: var(--gmr-font-family);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.gmr-sidebar-header {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gmr-text-muted);
    padding: 0 0 6px;
    margin-bottom: 2px;
    border-bottom: 1px solid var(--gmr-border);
}

.gmr-sb-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    background: var(--gmr-bg-card);
    border-radius: var(--gmr-radius-sm);
    padding: 16px 14px 14px;
    transition: background var(--gmr-transition), box-shadow var(--gmr-transition);
}

.gmr-sb-card:hover {
    background: var(--gmr-bg-card-hover);
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.gmr-sb-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    font-weight: 700;
    font-size: 0.7rem;
    border-radius: 50%;
    background: var(--gmr-rank-bg);
    color: var(--gmr-rank-text);
}

.gmr-sb-logo { width: 48px; height: 48px; flex-shrink: 0; }

.gmr-sb-logo-img {
    width: 48px; height: 48px;
    object-fit: contain;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    padding: 3px;
}

.gmr-sb-logo-placeholder {
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px;
    border-radius: 6px;
    background: var(--gmr-bg-header);
    color: var(--gmr-accent);
    font-weight: 700; font-size: 1rem;
    font-family: var(--gmr-font-family);
}

.gmr-sb-brand {
    font-weight: 700; font-size: 0.9rem;
    color: var(--gmr-text-primary);
    text-decoration: none; line-height: 1.2;
    transition: color var(--gmr-transition);
}
.gmr-sb-brand:hover { color: var(--gmr-accent); }

.gmr-sb-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.6rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.04em;
    background: var(--gmr-badge-bg);
    color: var(--gmr-badge-text);
    border-radius: 20px; white-space: nowrap;
}

.gmr-sb-stars { display: flex; align-items: center; gap: 4px; }
.gmr-sb-stars-row { display: inline-flex; gap: 1px; line-height: 1; }
.gmr-sb-rating-num { font-weight: 700; font-size: 0.8rem; color: var(--gmr-star-color); }

.gmr-sb-cta {
    display: block; width: 100%;
    text-align: center;
    padding: 8px 14px;
    font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
    background: var(--gmr-accent); color: #000;
    text-decoration: none; border-radius: 5px;
    transition: background var(--gmr-transition), box-shadow var(--gmr-transition);
    margin-top: 2px;
}
.gmr-sb-cta:hover {
    background: var(--gmr-accent-hover);
    box-shadow: 0 0 10px var(--gmr-accent-glow);
    color: #000; text-decoration: none;
}

.gmr-sidebar.gmr-light .gmr-sb-cta,
.gmr-sidebar.gmr-light .gmr-sb-cta:hover { color: #fff; }

/* =========================================
   SINGLE REVIEW PAGE
   Hero card + Pros/Cons + Bottom CTA
   ========================================= */

/* Hero card */
.gmr-single-hero {
    font-family: var(--gmr-font-family);
    background: var(--gmr-bg-card);
    border-radius: var(--gmr-radius);
    padding: 24px;
    margin-bottom: 28px;
    border: 1px solid var(--gmr-border);
    box-sizing: border-box;
    max-width: 100%;
}

.gmr-single-hero-top {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

/* Logo */
.gmr-single-logo {
    flex-shrink: 0;
}

.gmr-single-logo img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: var(--gmr-radius-sm);
    background: rgba(255,255,255,0.04);
    padding: 4px;
}

/* Info block */
.gmr-single-info {
    flex: 1;
    min-width: 0;
}

.gmr-single-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.gmr-single-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gmr-text-primary);
}

.gmr-single-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.gmr-single-rating .gmr-rating-number {
    font-size: 1rem;
}

.gmr-single-rating-label {
    font-size: 0.78rem;
    color: var(--gmr-text-muted);
}

.gmr-single-slogan {
    font-size: 0.88rem;
    color: var(--gmr-text-secondary);
    line-height: 1.5;
    margin: 4px 0 0;
}

/* CTA in hero — now below pros/cons */
.gmr-single-cta-wrap {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gmr-border);
}

.gmr-single-cta {
    padding: 12px 28px;
    font-size: 0.85rem;
    display: inline-block;
}

/* Pros & Cons — stacked by default, side-by-side on wide screens */
.gmr-single-pros-cons {
    display: block;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--gmr-border);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.gmr-single-pros,
.gmr-single-cons {
    margin-bottom: 16px;
}

.gmr-single-cons:last-child {
    margin-bottom: 0;
}

/* Side-by-side only on wide content areas */
@media (min-width: 600px) {
    .gmr-single-pros-cons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .gmr-single-pros,
    .gmr-single-cons {
        margin-bottom: 0;
    }
}

.gmr-pc-heading {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 8px;
}

.gmr-pc-pros-heading { color: #22c55e; }
.gmr-pc-cons-heading { color: #ef4444; }

.gmr-pc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gmr-pc-list li {
    position: relative;
    padding: 4px 0 4px 18px;
    font-size: 0.82rem;
    color: var(--gmr-text-secondary);
    line-height: 1.5;
}

.gmr-single-pros .gmr-pc-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: 700;
    font-size: 0.78rem;
}

.gmr-single-cons .gmr-pc-list li::before {
    content: '✗';
    position: absolute;
    left: 0;
    color: #ef4444;
    font-weight: 700;
    font-size: 0.78rem;
}

/* Bottom CTA bar */
.gmr-single-bottom-cta {
    font-family: var(--gmr-font-family);
    background: var(--gmr-bg-card);
    border-radius: var(--gmr-radius);
    padding: 18px 24px;
    margin-top: 32px;
    border: 1px solid var(--gmr-border);
}

.gmr-single-bottom-inner {
    display: flex;
    align-items: center;
    gap: 14px;
}

.gmr-single-bottom-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.gmr-single-bottom-text {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gmr-text-primary);
}

.gmr-single-bottom-btn {
    padding: 10px 24px;
    font-size: 0.82rem;
    flex-shrink: 0;
}

/* Mobile single review */
@media (max-width: 768px) {
    .gmr-single-hero {
        padding: 14px;
    }

    .gmr-single-hero-top {
        flex-direction: column !important;
        gap: 12px;
    }

    .gmr-single-logo img {
        width: 48px;
        height: 48px;
    }

    .gmr-single-info {
        flex: none !important;
        width: 100% !important;
    }

    .gmr-single-cta-wrap {
        width: 100%;
    }

    .gmr-single-cta {
        display: block !important;
        width: 100% !important;
        text-align: center;
    }

    .gmr-single-pros-cons {
        display: block !important;
    }

    .gmr-single-bottom-inner {
        flex-wrap: wrap;
        gap: 10px;
    }

    .gmr-single-bottom-text {
        font-size: 0.88rem;
        flex: 1 1 100%;
    }

    .gmr-single-bottom-btn {
        width: 100%;
        text-align: center;
    }

    .gmr-more-reviews-grid {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================
   MORE REVIEWS — Bottom of single reviews
   ========================================= */

.gmr-more-reviews {
    font-family: var(--gmr-font-family);
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--gmr-border);
}

.gmr-more-reviews-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gmr-text-primary);
    margin: 0 0 16px;
}

.gmr-more-reviews-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.gmr-more-card {
    background: var(--gmr-bg-card);
    border: 1px solid var(--gmr-border);
    border-radius: var(--gmr-radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color var(--gmr-transition), box-shadow var(--gmr-transition);
}

.gmr-more-card:hover {
    border-color: var(--gmr-accent);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.gmr-more-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gmr-more-card-logo-link { flex-shrink: 0; text-decoration: none; }

.gmr-more-card-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: var(--gmr-radius-sm);
    background: rgba(255,255,255,0.04);
    padding: 2px;
}

.gmr-more-card-meta { flex: 1; min-width: 0; }

.gmr-more-card-brand {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--gmr-text-primary);
    text-decoration: none;
    margin-right: 6px;
}

.gmr-more-card-brand:hover { color: var(--gmr-accent); }

.gmr-more-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.gmr-more-card-slogan {
    font-size: 0.8rem;
    color: var(--gmr-text-secondary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gmr-more-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--gmr-border);
}

.gmr-more-card-readmore {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gmr-accent);
    text-decoration: none;
}

.gmr-more-card-readmore:hover { text-decoration: underline; }

.gmr-more-card-cta {
    padding: 6px 14px;
    font-size: 0.7rem;
}

@media (max-width: 640px) {
    .gmr-more-reviews-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   ARCHIVE PAGE — Blog-style grid + sidebar
   ========================================= */

/* Main wrapper: content + sidebar */
.gmr-archive-wrap {
    font-family: var(--gmr-font-family);
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.gmr-archive-wrap.gmr-archive-nosidebar {
    grid-template-columns: 1fr;
}

/* Archive header */
.gmr-archive-header {
    grid-column: 1;
    margin-bottom: 4px;
}

/* Toolbar: filters + view toggle */
.gmr-archive-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* View toggle buttons */
.gmr-view-toggle {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.gmr-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 1px solid var(--gmr-border);
    background: var(--gmr-bg-card);
    color: var(--gmr-text-muted);
    cursor: pointer;
    transition: all var(--gmr-transition);
    padding: 0;
    font-family: var(--gmr-font-family);
}

.gmr-view-btn:hover {
    color: var(--gmr-text-primary);
    background: var(--gmr-bg-card-hover);
}

.gmr-view-btn.gmr-view-active {
    background: var(--gmr-accent);
    color: #000;
    border-color: var(--gmr-accent);
}

/* ---- LIST VIEW ---- */
.gmr-archive-list {
    display: flex !important;
    flex-direction: column;
    gap: 0;
}

.gmr-archive-list .gmr-archive-card {
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 14px 18px;
    border-radius: 0;
    border-bottom: 1px solid var(--gmr-border);
    border-left: 1px solid var(--gmr-border);
    border-right: 1px solid var(--gmr-border);
}

.gmr-archive-list .gmr-archive-card:first-child {
    border-top: 1px solid var(--gmr-border);
    border-radius: var(--gmr-radius) var(--gmr-radius) 0 0;
}

.gmr-archive-list .gmr-archive-card:last-child {
    border-radius: 0 0 var(--gmr-radius) var(--gmr-radius);
}

.gmr-archive-list .gmr-archive-card:only-child {
    border-radius: var(--gmr-radius);
}

.gmr-archive-list .gmr-acard-top {
    flex: 0 0 auto;
    min-width: 200px;
    max-width: 280px;
}

.gmr-archive-list .gmr-acard-slogan {
    flex: 1;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    margin: 0;
    min-width: 0;
    font-size: 0.82rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gmr-archive-list .gmr-acard-actions {
    flex: 0 0 auto;
    border-top: none;
    padding-top: 0;
    gap: 14px;
    margin-top: 0;
    flex-direction: row;
    align-items: center;
}

.gmr-archive-list .gmr-acard-actions .gmr-acard-readmore {
    white-space: nowrap;
}

.gmr-archive-list .gmr-acard-actions .gmr-cta {
    white-space: nowrap;
    padding: 7px 16px;
    font-size: 0.72rem;
}

/* Pagination */
.gmr-archive-pagination {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 20px;
    justify-content: center;
}

.gmr-page-btn {
    display: inline-block;
    padding: 7px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 5px;
    border: 1px solid var(--gmr-border);
    background: var(--gmr-bg-card);
    color: var(--gmr-text-secondary);
    cursor: pointer;
    transition: all var(--gmr-transition);
    font-family: var(--gmr-font-family);
}

.gmr-page-btn:hover {
    background: var(--gmr-bg-card-hover);
    color: var(--gmr-text-primary);
}

.gmr-page-btn.gmr-page-active {
    background: var(--gmr-accent);
    color: #000;
    border-color: var(--gmr-accent);
}

.gmr-archive-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gmr-text-primary);
    margin: 0 0 6px;
}

.gmr-archive-desc {
    font-size: 0.88rem;
    color: var(--gmr-text-secondary);
    margin: 0 0 14px;
    line-height: 1.5;
}

/* Category filter tabs */
.gmr-archive-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}

.gmr-filter-tab {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    border-radius: 20px;
    background: var(--gmr-bg-card);
    color: var(--gmr-text-secondary);
    border: 1px solid var(--gmr-border);
    transition: all var(--gmr-transition);
    cursor: pointer;
    font-family: var(--gmr-font-family);
}

.gmr-filter-tab:hover {
    background: var(--gmr-bg-card-hover);
    color: var(--gmr-text-primary);
    text-decoration: none;
}

.gmr-filter-tab.gmr-filter-active {
    background: var(--gmr-accent);
    color: #000;
    border-color: var(--gmr-accent);
}

/* Card grid */
.gmr-archive-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Individual card */
.gmr-archive-card {
    background: var(--gmr-bg-card);
    border-radius: var(--gmr-radius);
    border: 1px solid var(--gmr-border);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: background var(--gmr-transition), box-shadow var(--gmr-transition), border-color var(--gmr-transition);
}

.gmr-archive-card:hover {
    background: var(--gmr-bg-card-hover);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    border-color: var(--gmr-accent);
}

/* Card top: logo + meta */
.gmr-acard-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gmr-acard-logo-link { flex-shrink: 0; text-decoration: none; }

.gmr-acard-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: var(--gmr-radius-sm);
    background: rgba(255,255,255,0.04);
    padding: 3px;
}

.gmr-acard-meta { flex: 1; min-width: 0; }

.gmr-acard-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 3px;
}

.gmr-acard-brand {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gmr-text-primary);
    text-decoration: none;
    transition: color var(--gmr-transition);
}

.gmr-acard-brand:hover { color: var(--gmr-accent); }

.gmr-acard-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.gmr-acard-rating .gmr-rating-number {
    font-size: 0.8rem;
}

/* Slogan */
.gmr-acard-slogan {
    font-size: 0.82rem;
    color: var(--gmr-text-secondary);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Actions row */
.gmr-acard-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--gmr-border);
}

.gmr-acard-readmore {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gmr-accent) !important;
    text-decoration: none;
    transition: opacity var(--gmr-transition);
}

.gmr-acard-readmore:hover { opacity: 0.8; }

.gmr-acard-cta {
    padding: 7px 16px;
    font-size: 0.7rem;
}

/* Sidebar */
.gmr-archive-sidebar {
    align-self: start;
    position: sticky;
    top: 30px;
}

.gmr-archive-widget {
    background: var(--gmr-bg-card);
    border: 1px solid var(--gmr-border);
    border-radius: var(--gmr-radius);
    padding: 18px;
    margin-bottom: 16px;
}

.gmr-archive-widget-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gmr-text-muted);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gmr-border);
}

/* Sidebar category list */
.gmr-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gmr-cat-item {
    border-bottom: 1px solid var(--gmr-border);
}

.gmr-cat-item:last-child {
    border-bottom: none;
}

.gmr-cat-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gmr-text-secondary);
    text-decoration: none;
    transition: color var(--gmr-transition);
}

.gmr-cat-item a:hover {
    color: var(--gmr-accent);
}

.gmr-cat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 11px;
    background: var(--gmr-rank-bg);
    color: var(--gmr-rank-text);
}

/* Pagination */
.gmr-archive-pagination {
    grid-column: 1;
    margin-top: 20px;
}

.gmr-archive-pagination .page-numbers {
    list-style: none;
    display: flex;
    gap: 6px;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.gmr-archive-pagination .page-numbers li a,
.gmr-archive-pagination .page-numbers li span {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 5px;
    text-decoration: none;
    background: var(--gmr-bg-card);
    color: var(--gmr-text-secondary);
    border: 1px solid var(--gmr-border);
    transition: all var(--gmr-transition);
}

.gmr-archive-pagination .page-numbers li a:hover {
    background: var(--gmr-bg-card-hover);
    color: var(--gmr-text-primary);
}

.gmr-archive-pagination .page-numbers li span.current {
    background: var(--gmr-accent);
    color: #000;
    border-color: var(--gmr-accent);
}

/* Archive responsive */
@media (max-width: 900px) {
    .gmr-archive-wrap {
        grid-template-columns: 1fr;
    }

    .gmr-archive-sidebar {
        grid-column: 1;
        grid-row: auto;
        position: static;
    }

    /* List view: hide slogan on tablet to save space */
    .gmr-archive-list .gmr-acard-slogan {
        display: none;
    }
}

@media (max-width: 640px) {
    .gmr-archive-grid {
        grid-template-columns: 1fr;
    }

    .gmr-archive-wrap {
        padding: 16px 12px;
        gap: 20px;
    }

    /* List view collapses to card layout on mobile */
    .gmr-archive-list .gmr-archive-card {
        flex-direction: column;
        align-items: stretch;
        border-radius: var(--gmr-radius) !important;
        border: 1px solid var(--gmr-border) !important;
        margin-bottom: 8px;
    }

    .gmr-archive-list .gmr-acard-top { min-width: 0; max-width: none; }
    .gmr-archive-list .gmr-acard-slogan { -webkit-line-clamp: 2; line-clamp: 2; }
    .gmr-archive-list .gmr-acard-actions { border-top: 1px solid var(--gmr-border); padding-top: 8px; }
}

/* =========================================
   Light Theme Override
   ========================================= */
.gmr-light {
    --gmr-bg-primary: #f5f5fa;
    --gmr-bg-card: #ffffff;
    --gmr-bg-card-hover: #f0f0f8;
    --gmr-bg-header: #eaeaf0;
    --gmr-text-primary: #1a1a2e;
    --gmr-text-secondary: #555570;
    --gmr-text-muted: #888898;
    --gmr-accent: #0066ff;
    --gmr-accent-hover: #0052cc;
    --gmr-accent-glow: rgba(0, 102, 255, 0.15);
    --gmr-border: #dddde8;
    --gmr-badge-bg: rgba(0, 102, 255, 0.08);
    --gmr-badge-text: #0066ff;
    --gmr-rank-bg: rgba(0, 102, 255, 0.08);
    --gmr-rank-text: #0066ff;
    --gmr-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.gmr-light .gmr-cta,
.gmr-light .gmr-cta:hover { color: #fff; }
