/* ==========================================================================
   Ranking Table Maker — Frontend Styles (Modernized)
   ==========================================================================
   Unified with the Gadget Finder design system (--gf-* tokens).
   CSS-only redesign — no HTML/JS changes required.
   @since 8.0.0
   ========================================================================== */

/* --------------------------------------------------------------------------
   § 1. Design Tokens (inherits from gf-finder-shared.css when available)
   -------------------------------------------------------------------------- */
.ranking-table-maker-root {
    --rtm-max-width: 1000px;
    --rtm-image-size: 70px;
    --rtm-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;

    /* Shared commerce palette is independent of Finder's OS-dependent colors. */
    --rtm-text: var(--mg-commerce-text, #1e1e1e);
    --rtm-text-muted: var(--mg-commerce-text-muted, #6b7280);
    --rtm-bg: var(--mg-commerce-bg, #ffffff);
    --rtm-bg-alt: var(--mg-commerce-chip-bg, #f0f0f1);
    --rtm-border: var(--mg-commerce-border, #e3e6eb);
    --rtm-border-light: var(--mg-commerce-border, #e3e6eb);
    --rtm-primary-50: var(--mg-commerce-accent-bg, #f0f9ff);
    --rtm-error: var(--mg-red-400, #f87171);
    --rtm-warning: var(--mg-yellow-400, #f59e0b);

    /* Rank badge gradients */
    --rtm-gold: var(--gf-gold, linear-gradient(135deg, var(--mg-yellow-400), var(--mg-yellow-400)));
    --rtm-silver: var(--gf-silver, linear-gradient(135deg, var(--mg-gray-300), var(--mg-gray-400)));
    /* ブロンズは白文字。旧 light 端 #f59e0b は白上2.15:1 で読めないため濃ブロンズ(#b45309→#92400e・白上5.0/7.1)。 */
    --rtm-bronze: var(--gf-bronze, linear-gradient(135deg, var(--mg-yellow-500), #92400e));

    /* Shop button colors — Japanese affiliate convention (legacy product/Rinker style) */
    --rtm-amazon: #F99D31;
    --rtm-rakuten: #d0322e; /* 楽天赤。白文字ボタンで #E0423F は 4.18 と AA 僅か未達のため微暗化(白上 ~5.0) */
    --rtm-yahoo: #66A8FF;

    /* Shadows */
    --rtm-shadow-sm: var(--gf-shadow-sm, 0 1px 3px rgba(15, 23, 42, 0.06));
    --rtm-shadow-md: var(--gf-shadow-md, 0 4px 16px rgba(15, 23, 42, 0.08));

    /* Radii */
    --rtm-radius-sm: var(--gf-radius-sm, 6px);
    --rtm-radius-md: var(--gf-radius-md, 10px);
    --rtm-radius-full: var(--gf-radius-full, 50rem);

    /* Transition */
    --rtm-transition: var(--gf-transition, 0.2s cubic-bezier(0.4, 0, 0.2, 1));
}
.ranking-table-maker-root.rtm-image-compact{--rtm-image-size:96px}
.ranking-table-maker-root.rtm-image-standard{--rtm-image-size:130px}
.ranking-table-maker-root.rtm-image-large{--rtm-image-size:180px}
.ranking-table-maker-root.rtm-image-xlarge{--rtm-image-size:240px}
.ranking-table-maker-root.rtm-image-fluid{--rtm-image-size:320px}

/* --------------------------------------------------------------------------
   § 2. Root Container
   -------------------------------------------------------------------------- */
.ranking-table-maker-root {
    position: relative;
    font-family: var(--rtm-font);
    margin: 2em auto;
    width: 100%;
    max-width: var(--rtm-max-width);
    min-width: 0;
}

/* 景表法/ステマ規制対応の可視 PR ラベル(右上・控えめ)。mg-affiliate の .mga-box__pr に倣う。 */
.rtm-pr {
    position: absolute;
    top: 0;
    right: 0;
    z-index: var(--mg-z-dropdown, 5);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
    color: var(--rtm-text-muted);
    background: var(--rtm-bg-alt);
    padding: 3px 6px;
    border-radius: var(--rtm-radius-sm);
}


/* --------------------------------------------------------------------------
   § 3. Loading & Error States
   -------------------------------------------------------------------------- */
.cw-loading,
.cw-error {
    text-align: center;
    padding: 4rem 1rem;
    font-size: 1rem;
    color: var(--rtm-text-muted);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: var(--rtm-bg-alt);
    border-radius: var(--rtm-radius-md);
    border: 1px dashed var(--rtm-border);
    font-weight: 500;
}

.cw-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--rtm-border);
    border-top: 3px solid var(--gf-primary, var(--mg-color-primary-hover));
    border-radius: var(--mg-radius-full);
    animation: rtm-spin 0.8s linear infinite;
    margin-bottom: 1.25rem;
}

@keyframes rtm-spin {
    to {
        transform: rotate(360deg);
    }
}


/* --------------------------------------------------------------------------
   § 4. Table Container (Desktop)
   -------------------------------------------------------------------------- */
#cw-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--rtm-border);
    border-radius: var(--rtm-radius-md);
    overflow: hidden;
    background: var(--rtm-bg);
    box-shadow: var(--rtm-shadow-sm);
}


/* --------------------------------------------------------------------------
   § 5. Table Header & Rows
   -------------------------------------------------------------------------- */
.cw-table-header,
.cw-table-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--rtm-border-light);
}

.cw-table-row:last-child {
    border-bottom: none;
}

.cw-table-row {
    transition: background var(--rtm-transition);
}

.cw-table-row:hover {
    background: var(--rtm-primary-50);
}

.cw-table-header {
    background: var(--rtm-bg-alt);
    color: var(--rtm-text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cw-table-cell {
    padding: 0.85em 0.75em;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--rtm-text);
    line-height: 1.5;
}


/* --------------------------------------------------------------------------
   § 6. Rank Badge
   -------------------------------------------------------------------------- */
.cw-cell-rank {
    flex: 0 0 65px;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.cw-cell-rank span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--mg-radius-full);
    background: var(--mg-commerce-chip-bg, var(--mg-gray-100));
    color: var(--mg-commerce-chip-text, var(--mg-gray-600));
    font-size: 0.85rem;
    font-weight: 700;
}

.cw-rank-1 span {
    background: var(--rtm-gold);
    /* ゴールド地(#f59e0b)に yellow-500(#b45309)は 2.34:1 で読めない。濃茶 #422006(6.79:1)へ。 */
    color: #422006;
    box-shadow: var(--mg-shadow-md);
}

.cw-rank-2 span {
    background: var(--rtm-silver);
    color: var(--mg-gray-700);
}

.cw-rank-3 span {
    background: var(--rtm-bronze);
    color: #fff;
}


/* --------------------------------------------------------------------------
   § 7. Image Cell
   -------------------------------------------------------------------------- */
.cw-cell-image {
    flex: 0 1 calc(var(--rtm-image-size) + 20px);
    justify-content: center;
    min-width:0;
}

.cw-cell-image img {
    width: var(--rtm-image-size);
    height: var(--rtm-image-size);
    max-width:100%;
    object-fit: contain;
    border-radius: var(--rtm-radius-sm);
}


/* --------------------------------------------------------------------------
   § 8. Title, Price, Rating Cells
   -------------------------------------------------------------------------- */
.cw-cell-title {
    flex: 1 1 32%;
    min-width: 200px;
    font-weight: 500;
    color: var(--rtm-text);
}

.cw-title-multiline {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
}

/* An expandable full title must not inherit the short-name two-line clip. */
.cw-title-multiline--expandable {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
}

.cw-cell-price {
    flex: 0 0 140px;
    justify-content: center;
    font-weight: 700;
    color: var(--rtm-error);
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.cw-cell-rating {
    flex: 0 0 95px;
    justify-content: center;
    font-weight: 600;
    /* H46: starColor 設定を尊重。未注入時のフォールバックは AA を満たす濃amberに
       (旧 --rtm-warning=#f59e0b は白上2.15:1 で評価値が読めなかった)。 */
    color: var(--rtm-star, #b45309);
}


/* --------------------------------------------------------------------------
   § 9. Buy Buttons (Amazon / Rakuten / Yahoo)
   -------------------------------------------------------------------------- */
.cw-cell-buy {
    flex: 0 0 125px;
    display: flex;
    flex-direction: column;
    gap: 0.45em;
    align-items: stretch;
    justify-content: center;
}

.cw-buy-btn {
    /* Same resolved color property as the affiliate product box. */
    background-color: var(--mga-shop-color);
    padding: 0.5em 0.5em;
    border-radius: var(--rtm-radius-sm);
    text-decoration: none;
    color: #fff !important;
    font-size: 0.78rem;
    text-align: center;
    display: block;
    font-weight: 600;
    transition: opacity var(--rtm-transition), transform var(--rtm-transition);
}

.cw-buy-btn:visited {
    color: #fff !important;
}

.cw-buy-btn:hover,
.cw-buy-btn:focus-visible {
    color: #fff !important;
    opacity: 0.9;
    transform: translateY(-1px);
}

.cw-buy-btn:focus-visible {
    outline: 2px solid var(--rtm-text);
    outline-offset: 2px;
}

.cw-buy-btn.az {
    background: var(--rtm-amazon);
}

.cw-buy-btn.rk {
    background: var(--rtm-rakuten);
}

.cw-buy-btn.yh {
    background: var(--rtm-yahoo);
}

/* Amazon 橙 / Yahoo 明青 は白文字だと低コントラスト (2.1-2.4) のため濃文字に (全リンク状態を上書き) */
.cw-buy-btn.az, .cw-buy-btn.az:visited, .cw-buy-btn.az:hover, .cw-buy-btn.az:focus-visible,
.cw-buy-btn.yh, .cw-buy-btn.yh:visited, .cw-buy-btn.yh:hover, .cw-buy-btn.yh:focus-visible {
    color: #1a1a1a !important;
}


/* --------------------------------------------------------------------------
   § 10. Timestamp & Disclaimer
   -------------------------------------------------------------------------- */
.cw-timestamp {
    display: inline;
    font-size: 0.8em;
    color: var(--rtm-text-muted);
    font-weight: 400;
    line-height: 1.3;
    white-space: nowrap;
    margin-inline-start: 0.5em;
}

.rtm-disclaimer {
    font-size: 0.85em;
    line-height: 1.6;
    color: var(--rtm-text-muted);
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--rtm-bg-alt);
    border: 1px solid var(--rtm-border-light);
    border-radius: var(--rtm-radius-sm);
    white-space: pre-wrap;
}


.ranking-table-maker-root .rtm-disclaimer__link { color: var(--rtm-text); text-decoration: underline; text-underline-offset: 0.15em; }
.ranking-table-maker-root .rtm-rationale { margin: 0.5em 0 0; font-size: 0.9em; line-height: 1.6; color: var(--rtm-text-muted); }

/* --------------------------------------------------------------------------
   § 11. Mobile Card Layout (< 800px)
   -------------------------------------------------------------------------- */
@media (max-width: 782px) {
    #cw-list {
        min-width: 0;
        border: none;
        background: transparent;
        gap: 0.75rem;
        box-shadow: none;
    }

    .cw-table-header {
        display: none;
    }

    .cw-table-row {
        position: relative;
        display: grid;
        grid-template-columns: min(var(--rtm-image-size), 40vw) minmax(0, 1fr);
        grid-template-rows: auto auto auto auto;
        gap: 0 0.75rem;
        border: 1px solid var(--rtm-border);
        background: var(--rtm-bg);
        border-radius: var(--rtm-radius-md);
        padding: 1rem;
        box-shadow: var(--rtm-shadow-sm);
        transition: transform var(--rtm-transition), box-shadow var(--rtm-transition);
    }

    .cw-table-row:hover {
        transform: translateY(-2px);
        box-shadow: var(--rtm-shadow-md);
        background: var(--rtm-bg);
    }

    .cw-table-cell {
        padding: 0;
        border-bottom: none;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .cw-cell-rank {
        position: absolute;
        top: 0;
        left: 0;
    }

    .cw-cell-rank span {
        width: 32px;
        height: 32px;
        border-top-left-radius: var(--rtm-radius-md);
        border-bottom-right-radius: var(--rtm-radius-md);
        border-top-right-radius: 0;
        border-bottom-left-radius: 0;
        font-size: 0.8rem;
    }

    .cw-cell-image {
        grid-column: 1 / 2;
        grid-row: 1 / -1;
        align-self: center;
    }

    .cw-cell-image img {
        width: var(--rtm-image-size);
        height: var(--rtm-image-size);
    }

    .cw-cell-title {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        font-weight: 600;
        line-height: 1.5;
        align-items: flex-start;
        min-width: 0;
    }

    .cw-cell-price {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
        font-weight: 700;
        color: var(--rtm-error);
        font-size: 1rem;
        align-items: flex-start;
        margin-top: 0.5rem;
    }

    .cw-cell-rating {
        grid-column: 2 / 3;
        grid-row: 3 / 4;
        justify-content: flex-start;
        margin-top: 0.25rem;
    }

    .cw-cell-buy {
        grid-column: 2 / 3;
        grid-row: 4 / 5;
        margin-top: auto;
        padding-top: 0.5rem;
        width: 100%;
        flex-direction: row;
        gap: 0.5rem;
    }

    .cw-buy-btn {
        flex-grow: 1;
        min-width: 0;
        overflow-wrap: anywhere;
    }
}

.cw-cell-image img.mg-commerce-image--fallback {
    object-fit: contain;
    background: var(--rtm-bg-alt);
}

@media (max-width: 420px) {
    .cw-table-row {
        grid-template-columns: min(var(--rtm-image-size), 34vw) minmax(0, 1fr);
        gap: 0 0.6rem;
        padding: 0.8rem;
    }
    .cw-cell-image img { max-width:100%; }
    .cw-cell-buy { flex-direction: column; }
    .cw-buy-btn { width: 100%; }
}


/* --------------------------------------------------------------------------
   § 12. PA-API Data Display (Sale / Savings / Points / Direct)
   -------------------------------------------------------------------------- */

/* Image wrapper for badge positioning */
.cw-image-wrapper {
    position: relative;
}

/* Sale badge */
.cw-deal-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    /* 白文字が両端で AA を満たす濃オレンジ→赤に(旧 #ff6b35 は白上2.6:1)。セール感は維持。 */
    background: linear-gradient(135deg, #c2410c, var(--rtm-error));
    color: #fff;
    padding: 2px 6px;
    border-radius: var(--mg-radius-sm);
    font-size: 0.625rem;
    font-weight: 700;
    z-index: var(--mg-z-base);
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cw-deal-badge.cw-lightning {
    background: linear-gradient(135deg, var(--mg-color-amazon-orange), var(--mg-color-warning));
    animation: rtm-pulse 2s ease-in-out infinite;
}

@keyframes rtm-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.9;
        transform: scale(1.02);
    }
}

/* Savings badge */
.cw-savings-badge {
    display: inline-block;
    background: var(--rtm-error);
    color: #fff;
    padding: 2px 6px;
    border-radius: var(--mg-radius-sm);
    font-size: 0.6875rem;
    font-weight: 700;
    margin-inline-start: 4px;
}

/* Points badge */
.cw-points-badge {
    display: block;
    /* ポイント表記も白上 AA を満たす濃amberへ(旧 --rtm-warning=#f59e0b は約2:1)。 */
    color: #b45309;
    font-size: 0.6875rem;
    font-weight: 500;
}

/* Amazon direct badge */
.cw-amazon-direct {
    display: block;
    color: var(--mg-color-sky);
    font-size: 0.625rem;
    font-weight: 700;
    margin-top: 2px;
}


/* --------------------------------------------------------------------------
   § 13. Mobile PA-API Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 782px) {
    .cw-deal-badge {
        /* Position top-right to avoid overlap with rank badge (top-left) */
        top: 2px;
        left: auto;
        right: 2px;
        font-size: 0.5625rem;
        padding: 1px 4px;
        z-index: var(--mg-z-dropdown);
    }

    .cw-savings-badge {
        font-size: 0.625rem;
        padding: 1px 4px;
    }

    .cw-points-badge,
    .cw-amazon-direct {
        font-size: 0.5625rem;
    }
}


/* --------------------------------------------------------------------------
   § 14. Accessibility: Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {

    .cw-spinner {
        animation: none;
    }

    .cw-deal-badge.cw-lightning {
        animation: none;
    }

    .cw-buy-btn,
    .cw-table-row {
        transition: none;
    }
}


/* --------------------------------------------------------------------------
   § 15. Display Mode Modifiers (v4.0 — ショートコード属性制御)
   --------------------------------------------------------------------------
   PHP 側の DisplayConfig::cssModifiers() が以下のクラスを付与:
   .rtm-no-badge, .rtm-no-price, .rtm-no-rating, .rtm-no-image,
   .rtm-no-title, .rtm-no-buttons
   -------------------------------------------------------------------------- */

/* フォールバック非表示（JSが条件レンダリングするが CSS でも保証） */
.rtm-no-badge .cw-cell-rank { display: none; }
.rtm-no-price .cw-cell-price { display: none; }
.rtm-no-rating .cw-cell-rating { display: none; }
.rtm-no-image .cw-cell-image { display: none; }
.rtm-no-title .cw-cell-title { display: none; }
.rtm-no-buttons .cw-cell-buy { display: none; }

/* H46: tableStyle / highContrastMode / primary・accent カラー設定のフック。
   rtm-style-modern は既定見た目のため意図的に空（ルールなし）。
   実際の list コンテナは #cw-list、行は .cw-table-row（`.cw-table` 要素は存在しない）。 */
.rtm-style-classic #cw-list {
    border-radius: 0;
    box-shadow: none;
    border: 1px solid var(--rtm-primary, var(--rtm-border));
}
.rtm-style-classic .cw-table-row {
    border-bottom: 1px solid var(--rtm-border);
}
.rtm-style-minimal #cw-list {
    border: none;
    box-shadow: none;
    background: transparent;
}
.rtm-high-contrast #cw-list {
    border-color: #000;
}
.rtm-high-contrast .cw-cell-title,
.rtm-high-contrast .cw-cell-price {
    color: #000;
}
.rtm-high-contrast .cw-buy-btn {
    outline: 2px solid #000;
}
/* H46: accentColor を #1 ランクバッジのアクセントに反映（未注入時は従来の medal gradient）。 */
.cw-rank-1 span {
    background: var(--rtm-accent, var(--rtm-gold));
}

/* バッジなし時: タイトル列を広く */
.rtm-no-badge .cw-cell-title {
    flex: 1 1 40%;
}

/* ボタンなし時: 価格列を右寄せ */
.rtm-no-buttons .cw-cell-price {
    flex: 0 0 auto;
    margin-inline-start: auto;
}


/* --------------------------------------------------------------------------
   § 16. Table Title
   -------------------------------------------------------------------------- */
.rtm-table-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--rtm-text);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gf-primary, var(--mg-color-primary));
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.rtm-table-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.2em;
    background: var(--gf-primary, var(--mg-color-primary));
    border-radius: 2px;
    flex-shrink: 0;
}


/* --------------------------------------------------------------------------
   § 17. Multi-Column Grid Layout
   -------------------------------------------------------------------------- */
.rtm-columns-2 #cw-list,
.rtm-columns-3 #cw-list,
.rtm-columns-4 #cw-list {
    display: grid;
    gap: 0.75rem;
    border: none;
    background: transparent;
    box-shadow: none;
}

.rtm-columns-2 #cw-list { grid-template-columns: repeat(2, 1fr); }
.rtm-columns-3 #cw-list { grid-template-columns: repeat(3, 1fr); }
.rtm-columns-4 #cw-list { grid-template-columns: repeat(4, 1fr); }

.rtm-columns-2 .cw-table-header,
.rtm-columns-3 .cw-table-header,
.rtm-columns-4 .cw-table-header {
    display: none;
}

.rtm-columns-2 .cw-table-row,
.rtm-columns-3 .cw-table-row,
.rtm-columns-4 .cw-table-row {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--rtm-border);
    border-radius: var(--rtm-radius-md);
    padding: 1rem;
    background: var(--rtm-bg);
    box-shadow: var(--rtm-shadow-sm);
    transition: transform var(--rtm-transition), box-shadow var(--rtm-transition);
}

.rtm-columns-2 .cw-table-row:hover,
.rtm-columns-3 .cw-table-row:hover,
.rtm-columns-4 .cw-table-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--rtm-shadow-md);
}

.rtm-columns-2 .cw-table-cell,
.rtm-columns-3 .cw-table-cell,
.rtm-columns-4 .cw-table-cell {
    padding: 0.35em 0;
    flex: none;
    width: 100%;
    min-width: 0;
}

.rtm-columns-2 .cw-cell-image,
.rtm-columns-3 .cw-cell-image,
.rtm-columns-4 .cw-cell-image {
    justify-content: center;
    margin-bottom: 0.5rem;
}

.rtm-columns-2 .cw-cell-image img,
.rtm-columns-3 .cw-cell-image img,
.rtm-columns-4 .cw-cell-image img {
    width: 100%;
    height: auto;
    max-height: 160px;
    object-fit: contain;
}

.rtm-columns-2 .cw-cell-buy,
.rtm-columns-3 .cw-cell-buy,
.rtm-columns-4 .cw-cell-buy {
    flex-direction: row;
    gap: 0.4em;
    margin-top: 0.5rem;
}

.rtm-columns-2 .cw-buy-btn,
.rtm-columns-3 .cw-buy-btn,
.rtm-columns-4 .cw-buy-btn {
    flex: 1;
    font-size: 0.72rem;
}

/* グリッド: モバイルフォールバック */
@media (max-width: 600px) {
    .rtm-columns-3 #cw-list,
    .rtm-columns-4 #cw-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 400px) {
    .rtm-columns-2 #cw-list,
    .rtm-columns-3 #cw-list,
    .rtm-columns-4 #cw-list {
        grid-template-columns: 1fr;
    }
}


/* --------------------------------------------------------------------------
   § 18. Image-Only Gallery Mode
   -------------------------------------------------------------------------- */
.rtm-mode-image_only .cw-table-row {
    align-items: center;
    text-align: center;
}

.rtm-mode-image_only .cw-cell-title {
    font-size: 0.8rem;
    text-align: center;
    justify-content: center;
}

.rtm-mode-image_only .cw-cell-image img {
    border-radius: var(--rtm-radius-md);
    box-shadow: var(--rtm-shadow-sm);
    transition: transform var(--rtm-transition);
}

.rtm-mode-image_only .cw-cell-image img:hover {
    transform: scale(1.05);
}


/* --------------------------------------------------------------------------
   § 19. Compare Mode
   -------------------------------------------------------------------------- */
.rtm-mode-compare .cw-table-row:nth-child(even) {
    background: var(--rtm-bg-alt);
}

.rtm-mode-compare .cw-cell-price {
    font-size: 1rem;
}


/* --------------------------------------------------------------------------
   § 20. Minimal Mode
   -------------------------------------------------------------------------- */
.rtm-mode-minimal .cw-table-row {
    border-bottom: 1px solid var(--rtm-border-light);
    padding: 0.5rem 0;
}

.rtm-mode-minimal .cw-table-row:last-child {
    border-bottom: none;
}
