/* ==========================================
   SROVNÁVACÍ TABULKA ROBOROCK (.rwc-*)
   Nahrát na https://img.robotworld.cz/clanky/roborock-srovnani-1.css
   Barvy, stíny a zlomy podle css-styly-web.css. Obsah tabulky generuje
   aktualizovat_srovnani_roborock.py – tento soubor se mění jen při úpravě vzhledu.
   ========================================== */
.rwc-compare {
    margin: 40px 0;
    color: #000;
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
    box-sizing: border-box;
}
.rwc-compare *, .rwc-compare *::before, .rwc-compare *::after { box-sizing: border-box; }

.rwc-title {
    margin: 0 0 10px;
    font-weight: 400;
    color: #000;
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
}
.rwc-perex {
    margin: 0 0 22px;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.714;
}

/* --- Ovládání: řady + přepínače --- */
.rwc-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    margin-bottom: 12px;
}
.rwc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rwc-chip {
    background-color: #eef5f9;
    border: 1px solid #cedee7;
    border-radius: 2px;
    padding: 7px 14px;
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
    color: #000;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.rwc-chip:hover { background-color: #e2eef7; border-color: #4386fc; color: #4386fc; }
.rwc-chip[aria-pressed="true"] {
    background-color: #5fbb2e;
    border-color: #55a829;
    color: #fff;
    box-shadow: 0px -2px 0px rgba(0,0,0,0.15) inset, 0px 3px 0px rgba(255,255,255,0.1) inset, 0px 3px 6px rgba(0,0,0,0.15), 0px 1px 2px rgba(0,0,0,0.1);
}
.rwc-chip:focus-visible { outline: 2px solid #4386fc; outline-offset: 2px; }

.rwc-toggles { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.rwc-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 2px 0 2px 44px;
    min-height: 24px;
    background: none;
    border: none;
    color: #000;
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.rwc-switch::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 36px;
    height: 20px;
    margin-top: -10px;
    border-radius: 10px;
    background: #c7c7c8;
    transition: background 0.25s ease;
}
.rwc-switch::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    transition: transform 0.25s ease;
}
.rwc-switch[aria-checked="true"]::before { background: #5fbb2e; }
.rwc-switch[aria-checked="true"]::after { transform: translateX(16px); }
.rwc-switch:hover { color: #4386fc; }
.rwc-switch:focus-visible { outline: 2px solid #4386fc; outline-offset: 3px; }

.rwc-status { margin: 0 0 10px; font-size: 13px; font-weight: 300; color: #8a8a8c; }
.rwc-status strong { font-weight: 500; color: #000; }
.rwc-hint { display: none; }

/* --- Tabulka ve vlastním posuvném boxu (ukotvené záhlaví i první sloupec) --- */
.rwc-scroll {
    position: relative;
    max-height: 80vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border: 1px dotted #c7c7c8;
    border-radius: 2px;
    box-shadow: inset 0 3px 46px rgba(237,238,243,0.35), 0px 2px 3px 0px rgba(166,193,208,0.42), 0px 2px 11px 0px rgba(166,193,208,0.35);
}
.rwc-scroll:focus-visible { outline: 2px solid #4386fc; outline-offset: 2px; }
.rwc-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
}
.rwc-table th, .rwc-table td {
    width: 170px;
    min-width: 170px;
    max-width: 170px;
    padding: 12px 14px;
    text-align: center;
    vertical-align: top;
    border-bottom: 1px dotted #c7c7c8;
    border-right: 1px dotted #e2e2e3;
    background: #fff;
    color: #000;
    line-height: 1.4;
}

/* záhlaví s produkty */
.rwc-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    border-bottom: 1px solid #cedee7;
    background: linear-gradient(180deg, #eef5f9 0%, #ffffff 75%);
    box-shadow: 0 4px 6px -4px rgba(166,193,208,0.6);
}
.rwc-table thead th.rwc-corner {
    left: 0;
    z-index: 4;
    width: 210px;
    min-width: 210px;
    max-width: 210px;
    background: #eef5f9;
    text-align: left;
    vertical-align: bottom;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #8a8a8c;
    border-right: 1px solid #cedee7;
}
.rwc-prod-in { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rwc-prod-img {
    display: block;
    width: auto;
    height: 96px;
    max-width: 100%;
    margin: 0 auto 6px;
    object-fit: contain;
    filter: drop-shadow(0 8px 8px rgba(166,193,208,0.45));
}
.rwc-prod-series {
    display: block;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #8a8a8c;
}
.rwc-prod-name {
    display: block;
    min-height: 2.6em;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
}
.rwc-prod-name small { display: block; font-size: 12px; font-weight: 300; color: #8a8a8c; }
.rwc-btn {
    display: inline-block;
    margin-top: 4px;
    padding: 7px 20px;
    background-color: #5fbb2e;
    border: 1px solid #55a829;
    border-radius: 2px;
    color: #fff !important;
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0px -2px 0px rgba(0,0,0,0.15) inset, 0px 3px 0px rgba(255,255,255,0.1) inset, 0px 3px 6px rgba(0,0,0,0.15), 0px 1px 2px rgba(0,0,0,0.1);
    transition: opacity 0.2s ease;
}
.rwc-btn:hover { opacity: 0.9; }

/* první sloupec s názvy parametrů */
.rwc-table tbody th[scope="row"] {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 210px;
    min-width: 210px;
    max-width: 210px;
    text-align: left;
    font-weight: 500;
    border-right: 1px solid #cedee7;
    box-shadow: 4px 0 6px -4px rgba(166,193,208,0.6);
}

/* řádek skupiny parametrů */
.rwc-table tr.rwc-group th {
    width: auto;
    max-width: none;
    padding: 10px 14px;
    text-align: left;
    background: #eef5f9;
    border-right: none;
    border-bottom: 1px solid #cedee7;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #4386fc;
}
.rwc-table tr.rwc-group th span {
    position: sticky;
    left: 14px;
    display: inline-block;
    padding-left: 10px;
    border-left: 4px solid #5fbb2e;
}

/* hodnoty */
.rwc-val { display: block; font-weight: 400; }
.rwc-desc { display: block; margin-top: 2px; font-size: 12px; font-weight: 300; line-height: 1.35; color: #8a8a8c; }
.rwc-none { color: #c7c7c8; font-weight: 300; }
.rwc-yes {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #5fbb2e;
    border: 1px solid #55a829;
    box-shadow: 0 2px 8px rgba(95,187,46,0.25);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
}
.rwc-table tbody tr:not(.rwc-group):hover td,
.rwc-table tbody tr:not(.rwc-group):hover th[scope="row"] { background: #f7fafc; }

.rwc-hide { display: none !important; }
.rwc-compare, .rwc-top, .rwc-top-card { scroll-margin-top: 100px; }
.rwc-empty {
    margin: 0;
    padding: 25px;
    text-align: center;
    font-weight: 300;
    line-height: 1.714;
    background: #fff;
    border: 1px dotted #c7c7c8;
    border-radius: 2px;
}
.rwc-note { margin: 14px 0 0; font-size: 12px; font-weight: 300; line-height: 1.6; color: #8a8a8c; }
.rwc-note a { color: #4386fc; text-decoration: none; border-bottom: 1px dotted #4386fc; }
.rwc-note a:hover { color: #000; border-color: #000; }
.rwc-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* --- RESPONSIVE --- */
@media (max-width: 999px) {
    .rwc-hint { display: inline; }
}
@media (max-width: 749px) {
    .rwc-controls { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
    .rwc-chips, .rwc-toggles { min-width: 0; max-width: 100%; }
    .rwc-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }
    .rwc-chips::-webkit-scrollbar { display: none; }
    .rwc-chip { flex-shrink: 0; }
    .rwc-scroll { max-height: 75vh; }
    .rwc-table { font-size: 13px; }
    .rwc-table th, .rwc-table td { width: 142px; min-width: 142px; max-width: 142px; padding: 10px; }
    .rwc-table thead th.rwc-corner,
    .rwc-table tbody th[scope="row"] { width: 128px; min-width: 128px; max-width: 128px; font-size: 12px; }
    .rwc-table thead th.rwc-corner { font-size: 10px; letter-spacing: 1px; }
    .rwc-prod-img { height: 64px; }
    .rwc-prod-name { font-size: 14px; }
    .rwc-btn { padding: 6px 14px; font-size: 12px; }
}
@media (max-width: 479px) {
    .rwc-table th, .rwc-table td { width: 128px; min-width: 128px; max-width: 128px; padding: 9px 8px; }
    .rwc-table thead th.rwc-corner,
    .rwc-table tbody th[scope="row"] { width: 108px; min-width: 108px; max-width: 108px; }
    .rwc-prod-img { height: 52px; }
    .rwc-prod-series { letter-spacing: 1px; font-size: 10px; }
    .rwc-btn { padding: 5px 10px; }
}

/* ==========================================
   TOP MODELY POD TABULKOU (cena a sklad se načítají živě z detailu produktu)
   ========================================== */
.rwc-top { margin-top: 45px; }
.rwc-top-title {
    margin: 0 0 20px;
    font-weight: 400;
    color: #000;
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
}
.rwc-top-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.rwc-top-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px dotted #c7c7c8;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: inset 0 3px 46px rgba(237,238,243,0.35), 0px 2px 3px 0px rgba(166,193,208,0.42), 0px 2px 11px 0px rgba(166,193,208,0.35);
    transition: box-shadow 0.2s ease;
}
.rwc-top-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 4px;
    background: #5fbb2e;
}
.rwc-top-card:hover { box-shadow: 0px 2px 10px 0px rgba(166,193,208,0.75), 0px 2px 3px 0px rgba(166,193,208,0.82); }
.rwc-top-img {
    display: block;
    padding: 20px 15px 10px;
    background: linear-gradient(180deg, #eef5f9 0%, #ffffff 100%);
    border-bottom: 1px dotted #c7c7c8;
    text-align: center;
}
.rwc-top-img img {
    display: block;
    width: auto;
    max-width: 100%;
    height: 150px;
    margin: 0 auto;
    object-fit: contain;
    mix-blend-mode: multiply;
}
.rwc-top-name {
    margin: 14px 16px 6px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
}
.rwc-top-name a { color: #000; text-decoration: none; }
.rwc-top-name a:hover { color: #4386fc; }
.rwc-top-rating { display: flex; align-items: center; gap: 6px; margin: 0 16px 10px; font-size: 12px; font-weight: 300; color: #8a8a8c; }
.rwc-stars {
    position: relative;
    display: inline-block;
    font-size: 14px;
    line-height: 1;
    letter-spacing: 1px;
    color: #dcdcde;
}
.rwc-stars::after {
    content: '★★★★★';
    position: absolute;
    left: 0;
    top: 0;
    width: var(--rwc-rating, 100%);
    overflow: hidden;
    white-space: nowrap;
    color: #f5a623;
}
.rwc-top-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 16px 14px; }
.rwc-top-chip {
    padding: 4px 9px;
    background-color: #eef5f9;
    border: 1px solid #cedee7;
    border-radius: 2px;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    color: #000;
}
.rwc-top-price {
    min-height: 74px;
    margin: auto 16px 0;
    padding: 12px 0 0;
    border-top: 1px dotted #c7c7c8;
}
.rwc-top-loading { display: block; font-size: 13px; font-weight: 300; color: #8a8a8c; }
.rwc-top-loading::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    vertical-align: -1px;
    border: 2px solid #cedee7;
    border-top-color: #5fbb2e;
    border-radius: 50%;
    animation: rwc-spin 0.8s linear infinite;
}
@keyframes rwc-spin { to { transform: rotate(360deg); } }
.rwc-top-price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.rwc-top-price-now { font-size: 24px; font-weight: 500; line-height: 1.2; color: #f02020; }
.rwc-top-price-old { font-size: 14px; font-weight: 300; color: #000; text-decoration: line-through; }
.rwc-top-stock { display: flex; align-items: center; margin-top: 6px; font-size: 12px; font-weight: 500; }
.rwc-top-stock::before {
    content: '';
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin: 0 8px 0 4px;
    border-radius: 50%;
    background-color: currentColor;
}
.rwc-top-stock.is-in::before {
    width: 16px;
    height: 16px;
    margin: 0 7px 0 0;
    background: #5fbb2e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.rwc-top-stock.is-in { color: #5fbb2e; }
.rwc-top-stock.is-out { color: #cf9700; }
.rwc-top-stock.is-end { color: #8a8a8c; }
.rwc-top-extra { margin-top: 2px; font-size: 12px; font-weight: 300; color: #8a8a8c; }
.rwc-top-fallback { font-size: 13px; color: #4386fc; text-decoration: none; border-bottom: 1px dotted #4386fc; }
.rwc-top-btn { display: block; margin: 14px 16px 16px; text-align: center; }

@media (max-width: 999px) {
    .rwc-top-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 749px) {
    .rwc-top-price-now { font-size: 20px; }
}
@media (max-width: 519px) {
    .rwc-top-grid { grid-template-columns: 1fr; gap: 16px; }
    .rwc-top-img img { height: 130px; }
}

/* ==========================================
   ÚVOD A OBSAH ČLÁNKU (komponenta .obsah-clanku převzatá ze stávajících článků blogu)
   ========================================== */
.obsah-clanku {
    background-color: #00000005;
    border: 1px solid #C4CBD8;
    border-radius: 4px;
    padding: 40px;
    margin-top: 40px;
    margin-bottom: 0;
}
.rw-obsah-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.rw-obsah-title { font-size: 24pt; font-weight: bold; margin: 0; color: #333; }
.rw-obsah-toggle { background: none; border: none; cursor: pointer; padding: 4px; }
.rw-obsah-icon { fill: #333; color: #333; width: 20px; height: 20px; transition: transform 0.3s ease; }
.rw-obsah-toggle.rw-active .rw-obsah-icon { transform: rotate(180deg); }
.rw-obsah-list { color: #545454; font-size: 1rem; line-height: 1.6; transition: opacity 0.3s ease, max-height 0.3s ease; }
.rw-obsah-list.rw-hidden { max-height: 0; opacity: 0; overflow: hidden; }
.rw-obsah-list ul { list-style: none; padding: 0; }
.rw-obsah-list li { margin-bottom: 10px; }
.rw-obsah-list p { margin: 0; font-weight: bold; }
.rw-obsah-list ul ul { padding-left: 20px; margin-top: 5px; }
.rw-obsah-list a:focus, .rw-obsah-toggle:focus { outline: 2px solid #2563eb; outline-offset: 2px; }
.rwc-toc-modely { display: block; font-size: 13px; font-weight: 300; line-height: 1.5; color: #8a8a8c; }
@media (max-width: 767px) {
    .obsah-clanku { padding: 12px; margin-top: 12px; }
    .rw-obsah-title { font-size: 1.5rem; }
    .rw-obsah-list { font-size: 0.9rem; }
    .rw-obsah-icon { width: 16px; height: 16px; }
}
