/* ==============================================================
   GLOBÁLNÍ STYLY A PROMĚNNÉ PRO JSP KONFIGURÁTOR
   ============================================================== */
:root {
    --jsp-blue: #004a9e;
    --jsp-hover: #003d82;
    --jsp-radius: 8px;
    --bg-color: #f8f9fa;
    --text-color: #333;
}

* { box-sizing: border-box; }
body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    max-width: 1250px; 
    margin: 0 auto 20px auto; 
    padding: 0 20px; 
    color: var(--text-color); 
    line-height: 1.5; 
    background-color: var(--bg-color); 
}

h1, h2 { color: #222; }
h1 { margin-top: 20px; margin-bottom: 35px; font-size: 1.8em; }
h2 { margin-top: 0; font-size: 1.5em; margin-bottom: 20px; }

/* ==============================================================
   SPOLEČNÉ PRVKY (Záhlaví, Patička, Tlačítka, Layout)
   ============================================================== */
.top-nav { position: sticky; top: 0; background-color: #ffffff; z-index: 999; display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 2px solid var(--jsp-blue); margin-bottom: 25px; }
/* Logo a animace odlesku (Shine effect) */
.logo { 
    position: relative; 
    display: inline-block; 
    overflow: hidden; /* Ořízne světlo, aby neteklo mimo logo */
}
.logo img { 
    height: 40px; 
    display: block; 
}

/* Vytvoření světelného pruhu */
.logo::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%; /* Šířka odlesku */
    height: 100%;
    /* Přechod z průhledné do poloprůhledné bílé a zpět */
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg); /* Naklonění pruhu světla */
    animation: logoShine 10s infinite; /* Bude se opakovat každých 5 vteřin */
}

/* Samotná animace - průjezd zleva doprava */
@keyframes logoShine {
    0% { left: -150%; }
    50% { left: 200%; } /* Světlo rychle přejede */
    100% { left: 200%; } /* Zbytek času do 6s se čeká (pauza mezi odlesky) */
}

.nav-right { display: flex; align-items: center; gap: 25px; }
.back-link { 
    color: #495057; 
    background-color: #f1f3f5; 
    border: 1px solid #ced4da; 
    text-decoration: none; 
    font-weight: bold; 
    display: flex; 
    align-items: center; 
    padding: 8px 16px; 
    border-radius: var(--jsp-radius); 
    font-size: 0.9em; 
    transition: all 0.2s ease-in-out; 
}
.back-link:hover { 
    background-color: #e9ecef; 
    border-color: #adb5bd; 
    text-decoration: none; 
    transform: translateY(-1px); 
}
.cart-link { 
    background-color: var(--jsp-blue); 
    color: #ffffff; 
    text-decoration: none; 
    font-weight: bold; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    padding: 10px 20px; 
    border-radius: var(--jsp-radius); 
    transition: all 0.2s ease-in-out; 
    box-shadow: 0 2px 6px rgba(0, 74, 158, 0.2); 
}
.cart-link:hover { 
    background-color: var(--jsp-hover); 
    transform: translateY(-1px); 
    box-shadow: 0 4px 12px rgba(0, 74, 158, 0.3);
    text-decoration: none; 
}

.site-footer { margin-top: 50px; padding: 20px 0; text-align: center; border-top: 1px solid #ced4da; color: #6c757d; font-size: 0.9em; }
.site-footer a { color: var(--jsp-blue); text-decoration: none; font-weight: bold; }
.site-footer a:hover { text-decoration: underline; }

.main-container { display: flex; gap: 35px; }
@media (max-width: 900px) {
    .main-container { flex-direction: column; gap: 25px; }
}

/* Tlačítka */
.btn { padding: 12px 20px; border: none; border-radius: var(--jsp-radius); font-weight: bold; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.04); }
.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary { background: var(--jsp-blue); color: #fff; }
.btn-success, .btn-cart { background: #28a745; color: #fff; }
.btn-danger { background: #dc3545; color: white; }
.btn-secondary { background: #6c757d; color: white; }
.btn-copy { background: #fff; border: 2px solid var(--jsp-blue); color: var(--jsp-blue); }
.btn-email { background: var(--jsp-blue); color: #fff; }
.btn-delete-all { background: transparent; border: 1px dashed #dc3545; color: #dc3545; }
.btn-delete-all:hover { background: #fdf3f2; }

/* --- SJEDNOCENÉ BOČNÍ BOXY (Oblíbené, Kontakt) --- */
.sidebar-box {
    border: 1px solid #ced4da; /* Sjednotí barvu a tloušťku linky do elegantní šedé */
    border-radius: 8px;        /* Stejně zakulacené rohy pro oba boxy */
    margin-bottom: 24px;       /* TOTO OPRAVUJE TO NALEPENÍ: přidá pevnou mezeru pod boxem */
    padding: 16px;             /* Jednotný vnitřní prostor od krajů */
    background-color: #ffffff; /* Jednotné čisté pozadí */
    box-shadow: 0 2px 8px rgba(0,0,0,0.03); /* Velmi jemný a moderní stín */
}

/* ==============================================================
   INDEX.HTML (Katalog)
   ============================================================== */
.search-container input { outline: none; transition: border-color 0.2s; }
.search-container input:focus { border-color: var(--jsp-blue) !important; }
.category-block { margin-bottom: 25px; border: 1px solid #b6c6d6; border-radius: var(--jsp-radius); background: #ffffff; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06); overflow: hidden; transition: margin-bottom 0.2s ease; }
.category-title { margin: 0; padding: 16px 20px; font-size: 1.35em; color: #ffffff; background: var(--jsp-blue); font-weight: bold; letter-spacing: 0.3px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; user-select: none; transition: background-color 0.2s; }
.category-title:hover { background-color: var(--jsp-hover); }
.accordion-arrow { font-size: 0.8em; transition: transform 0.2s ease-in-out; display: inline-block; }
.category-content { display: block; padding: 1px 0; background: #ffffff; }

.category-block.collapsed { margin-bottom: 15px; }
.category-block.collapsed .category-content { display: none; }
.category-block.collapsed .accordion-arrow { transform: rotate(-90deg); }

.subcategory-block { margin: 20px; background: #fafbfc; border: 1px solid #e1e8ed; border-radius: 6px; padding: 20px; }
.subcategory-title { font-size: 1.05em; color: #495057; margin-top: 0; margin-bottom: 15px; border-bottom: 2px solid #ced4da; padding-bottom: 8px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; }

/* Layout pro Katalog */
.catalog-column { flex: 70; min-width: 0; }
.favorites-column { flex: 30; min-width: 0; position: relative; }

/* Box Oblíbené */
.favorites-summary { padding: 25px; background: #fffcf0; border: 2px solid #ffc107; border-radius: var(--jsp-radius); box-shadow: 0 4px 15px rgba(255, 193, 7, 0.08); }
.favorites-summary .summary-title { color: #856404; margin-bottom: 15px; font-size: 1.1em; font-weight: bold; }

.product-list { list-style-type: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }

/* Přepracovaný řádek produktu na Flexbox */
.product-list li { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #ffffff; border: 1px solid #dee2e6; border-left: 4px solid #28a745; border-radius: 4px; transition: all 0.2s ease-in-out; box-shadow: 0 1px 3px rgba(0,0,0,0.02); gap: 15px; }
.product-list li:hover { background: #e8f4fd; border-color: var(--jsp-blue); transform: translateX(3px); }

.product-info-wrapper { display: flex; align-items: center; flex: 1; text-decoration: none; color: var(--text-color); font-weight: bold; }
.product-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }

.product-type-badge { display: inline-block; background-color: #343a40; color: #ffffff; padding: 3px 8px; border-radius: 4px; font-size: 0.85em; font-family: monospace; font-weight: bold; margin-right: 14px; letter-spacing: 0.5px; flex-shrink: 0; transition: background-color 0.2s; }
.product-list li:hover .product-type-badge { background-color: #212529; }

/* Položka v Oblíbených */
.favorite-item { display: flex; flex-direction: column; padding: 12px 0; border-bottom: 1px dashed #ffeeba; }
.favorite-item:last-child { border-bottom: none; padding-bottom: 0; }


/* --- ZKRACUJÍCÍ SE POPIS PRODUKTU (1 ŘÁDEK + HARMONIKA) --- */
.product-desc-wrapper {
    position: relative;
    cursor: pointer;
    margin-top: 4px;
    padding-right: 25px; /* Bezpečné místo pro šipku, aby nepřekryla text */
    width: 100%;
    user-select: none;
}

.product-desc-text {
    font-weight: normal; 
    font-size: 0.9em; 
    color: #6c757d;
    
    /* Zázračné vlastnosti pro uříznutí na 1 řádek */
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    
    transition: color 0.2s;
}

.desc-arrow {
    position: absolute;
    right: 0;
    top: 2px;
    font-size: 0.75em;
    color: #adb5bd;
    transition: transform 0.2s ease, color 0.2s;
}

/* Interakce myší (Hover efekt) */
.product-desc-wrapper:hover .product-desc-text {
    color: #495057;
}
.product-desc-wrapper:hover .desc-arrow {
    color: var(--jsp-blue);
}

/* Stav ROZBALENO */
.product-desc-wrapper:not(.collapsed) .product-desc-text {
    -webkit-line-clamp: unset; /* Zruší limit 1 řádku */
    color: #333;
}
.product-desc-wrapper:not(.collapsed) .desc-arrow {
    transform: rotate(-180deg); /* Otočí šipku nahoru */
}

/* --- TLAČÍTKO HARMONIKY V HLAVIČCE PRODUKTU --- */
.btn-desc-toggle {
    background: transparent;
    border: none;
    color: #adb5bd;
    font-size: 1.1em;
    cursor: pointer;
    padding: 4px 8px;
    margin-right: 5px; /* Drobná mezera mezi šipkou a hvězdičkou */
    transition: transform 0.3s ease, color 0.2s ease;
    outline: none;
    display: inline-flex;
    align-items: center;
}

.btn-desc-toggle:hover {
    color: #004a9e; /* Po najetí zmodrá */
}

/* --- MINIATURA PRODUKTU V KATALOGU --- */
.catalog-thumb {
    width: 45px;          /* Pevná šířka */
    height: 45px;         /* Pevná výška */
    object-fit: contain;  /* Obrázek se ořízne/zmenší tak, aby se nedeformoval */
    border-radius: 4px;   /* Decentně zakulacené rohy */
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    padding: 2px;
    flex-shrink: 0;       /* ZABRÁNÍ ZMÁČKNUTÍ: i když bude vedle dlouhý text, obrázek zůstane čtvercový */
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* ==============================================================
   CONFIGURATOR.HTML (Detaily produktu)
   ============================================================== */
.config-column { flex: 70; min-width: 0; }
.preview-column { flex: 30; min-width: 0; position: relative; }
.sticky-gallery-group { position: sticky; top: 90px; z-index: 1; }
@media (max-width: 900px) { 
    .preview-column { position: static; width: 100%; } 
    .sticky-gallery-group { position: static; top: auto; }
}

/* OPRAVA 1: Povolit přetékání ze sekce (jinak se tooltip uřízne) */
.config-section { margin-bottom: 30px; border: 1px solid #b6c6d6; border-radius: var(--jsp-radius); background: #ffffff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04); overflow: visible; }
/* OPRAVA 2: Zajištění zakulacených rohů hlavičky, když je overflow: visible */
.config-section h3 { margin: 0; padding: 14px 20px; font-size: 1.1em; color: #ffffff; background: var(--jsp-blue); font-weight: bold; letter-spacing: 0.3px; border-radius: calc(var(--jsp-radius) - 1px) calc(var(--jsp-radius) - 1px) 0 0; }
.options-group { 
    display: flex; 
    flex-wrap: wrap; /* TOTO je důležité: dovolí tlačítkům skočit na další řádek */
    gap: 6px 10px; /* 6px svislá mezera, 10px vodorovná mezera */
    padding: 12px 20px; 
    background: #fafbfc; 
    border-radius: 0 0 var(--jsp-radius) var(--jsp-radius); 
}

.option-label { 
    /* TADY JE KOUZLO DVOU SLOUPCŮ: 50 % šířky minus polovina vodorovné mezery */
    flex: 0 0 calc(50% - 5px); 
    max-width: calc(50% - 5px); /* Absolutní pojistka, aby to nikdy nevyteklo ven */
    
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    padding: 5px 10px; 
    border: 1px solid #ced4da; 
    border-radius: 4px; 
    background: #ffffff; 
    transition: all 0.2s ease-in-out; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.01); 
    
    /* Zalomení dlouhého textu uvnitř tlačítka */
    word-break: break-word;
}

/* Pojistka pro mobilní telefony: vrátíme šířku tlačítek na 100 % */
@media (max-width: 600px) {
    .option-label {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
.option-label:hover { background: #f1f3f5; border-color: #adb5bd; }
.option-label input { margin-right: 6px; flex-shrink: 0; }
.option-label:has(input:checked) { border-color: var(--jsp-blue); background-color: #e8f4fd; box-shadow: 0 2px 6px rgba(0, 86, 179, 0.12); }

.code-part { display: inline-block; font-family: monospace; font-weight: bold; color: #ffffff; background-color: #343a40; padding: 3px 8px; border-radius: 4px; white-space: nowrap; font-size: 0.85em; letter-spacing: 0.5px; margin-right: 8px; flex-shrink: 0; transition: background-color 0.2s; }
.option-label:has(input:checked) .code-part { background-color: #212529; }
.option-desc { white-space: pre-line; line-height: 1.3; color: #333; font-size: 0.95em; }


/* --- OPRAVENÉ TOOLTIPY --- */
/* Info ikona (v textu) - centrujeme, ale z-index vystřelíme na maximum */
.info-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; background: var(--jsp-blue); color: white; border-radius: 50%; font-size: 11px; font-weight: bold; font-style: italic; font-family: serif; margin-left: 8px; position: relative; cursor: help; flex-shrink: 0; }
.info-icon .tooltip-text { visibility: hidden; width: 220px; background-color: #333; color: #fff; text-align: center; border-radius: 6px; padding: 10px; position: absolute; z-index: 9999; bottom: 130%; left: 50%; transform: translateX(-50%); opacity: 0; transition: opacity 0.2s, bottom 0.2s; font-size: 13px; font-weight: normal; font-style: normal; font-family: sans-serif; box-shadow: 0 4px 12px rgba(0,0,0,0.3); pointer-events: none; }
.info-icon .tooltip-text::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border-width: 6px; border-style: solid; border-color: #333 transparent transparent transparent; }
.info-icon:hover .tooltip-text { visibility: visible; opacity: 1; bottom: 150%; }

.option-label.disabled-option { background: #fdfdfe; border-color: #e9ecef; cursor: not-allowed; }
.option-label.disabled-option .code-part { background-color: #adb5bd; }
.option-label.disabled-option .option-desc { color: #868e96; }
.option-label.disabled-option .info-icon { opacity: 0.4; }

/* Varovná ikona (vpravo) - OPRAVA: Ukotvíme tooltip přímo k pravému okraji, aby netekl z displeje! */
.warning-icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; background: #fff3cd; color: #856404; border: 1px solid #ffeeba; border-radius: 50%; font-size: 13px; margin-left: auto; position: relative; cursor: not-allowed; flex-shrink: 0; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.warning-icon .tooltip-text { visibility: hidden; width: 240px; background-color: #dc3545; color: #fff; text-align: center; border-radius: 6px; padding: 10px; position: absolute; z-index: 9999; bottom: 130%; right: -10px; opacity: 0; transition: opacity 0.2s, bottom 0.2s; font-size: 13px; font-weight: normal; font-family: sans-serif; font-style: normal; line-height: 1.4; box-shadow: 0 4px 12px rgba(220,53,69,0.3); pointer-events: none; }
.warning-icon .tooltip-text::after { content: ""; position: absolute; top: 100%; right: 15px; border-width: 6px; border-style: solid; border-color: #dc3545 transparent transparent transparent; }
.warning-icon:hover .tooltip-text, .option-label.disabled-option:hover .warning-icon .tooltip-text { visibility: visible; opacity: 1; bottom: 150%; }

/* Galerie */
.gallery-container { width: 100%; margin-bottom: 20px; }
.main-image-box { width: 100%; height: 320px; background: #ffffff; border: 1px solid #b6c6d6; border-radius: var(--jsp-radius); display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
.main-image-box img { width: 100%; height: 100%; object-fit: contain; padding: 12px; cursor: zoom-in; }
@media (max-width: 900px) { .main-image-box { height: 280px; } }

.thumbnails-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbnail-item { width: 60px; height: 60px; border: 1px solid #ced4da; border-radius: 6px; cursor: pointer; overflow: hidden; background: #fff; transition: all 0.2s; }
.thumbnail-item:hover { opacity: 0.85; border-color: var(--jsp-blue); }
.thumbnail-item.active { border: 2px solid var(--jsp-blue); box-shadow: 0 2px 4px rgba(0,86,179,0.15); }
.thumbnail-item img { width: 100%; height: 100%; object-fit: cover; }

.modal-overlay { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.85); align-items: center; justify-content: center; }
.modal-content { max-width: 90%; max-height: 90%; background: #fff; padding: 8px; border-radius: 6px; box-shadow: 0 5px 25px rgba(0,0,0,0.5); position: relative; }
.modal-content img { max-width: 100%; max-height: 85vh; object-fit: contain; display: block; }
.modal-close { position: absolute; top: -45px; right: 0; color: #fff; font-size: 35px; font-weight: bold; cursor: pointer; background: none; border: none; }
.modal-close:hover { color: #ddd; }

/* Výsledný Box Konfigurátoru */
#result-box { padding: 16px 20px; background: #e8f4fd; border: 2px solid var(--jsp-blue); border-radius: var(--jsp-radius); box-shadow: 0 -25px 30px var(--bg-color), 0 4px 15px rgba(0,86,179,0.05); position: sticky; top: 90px; z-index: 10; margin-top: 20px; }
#result-box::after { content: ""; position: absolute; top: calc(100% + 2px); left: -10px; right: -10px; height: 2000px; background: var(--bg-color); z-index: -1; pointer-events: none; }
@media (max-width: 900px) { 
    #result-box { position: static; top: auto; box-shadow: 0 4px 15px rgba(0,86,179,0.05); } 
    #result-box::after { display: none; } 
}
.result-title { text-align: center; color: #495057; margin-bottom: 4px; font-weight: bold; font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.5px; }
#order-code { font-size: 1.5em; font-family: monospace; font-weight: bold; color: #d93025; display: block; text-align: center; margin-bottom: 12px; letter-spacing: 0.5px; }

#code-breakdown { border-top: 1px dashed var(--jsp-blue); padding-top: 12px; font-size: 0.88em; margin-bottom: 15px; display: flex; flex-direction: column; }
.breakdown-row { display: flex; gap: 12px; line-height: 1.5; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(0, 86, 179, 0.08); }
.breakdown-row:last-child { border-bottom: none; }
.breakdown-code { width: 50px; flex-shrink: 0; font-family: monospace; font-weight: bold; color: #d93025; font-size: 1.05em; background: rgba(217, 48, 37, 0.06); padding: 2px 6px; border-radius: 4px; text-align: center; }
.breakdown-dots { display: none; }
.breakdown-section { color: var(--jsp-blue); font-size: 0.82em; text-transform: uppercase; font-weight: bold; letter-spacing: 0.5px; white-space: nowrap; }
.breakdown-desc { color: #333; }
.actions-bar-buttons { display: flex; gap: 10px; }
.actions-bar-buttons .btn { flex: 1; }

/* --- NOVÁ SPODNÍ FIXNÍ LIŠTA KONFIGURÁTORU --- */
/* Odsazení spodku stránky, aby patička nelezla pod lištu */
body { margin-bottom: 90px; } 

#bottom-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.08);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-top: 3px solid var(--jsp-blue);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.bottom-bar-content {
    width: 100%;
    max-width: 1250px;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #e8f4fd;
}

.bar-left { display: flex; align-items: center; }
#order-code { font-size: 1.8em; font-family: monospace; font-weight: bold; color: #d93025; letter-spacing: 0.5px; margin: 0; }

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

#breakdown-panel {
    width: 100%;
    max-width: 1250px;
    padding: 25px 20px;
    background: #ffffff;
    display: none; /* Skryto ve výchozím stavu */
    border-bottom: 1px solid #ced4da;
}
#breakdown-panel.show {
    display: block;
    animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(15px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 900px) {
    .bottom-bar-content { flex-direction: column; gap: 15px; }
    .bar-right { width: 100%; justify-content: space-between; }
    #breakdown-panel > div { flex-direction: column; gap: 20px; }
    #breakdown-panel > div > div:nth-child(2) { border-left: none; padding-left: 0; border-top: 1px dashed #ced4da; padding-top: 20px; }
}

/* ==============================================================
   CART.HTML (Poptávkový košík)
   ============================================================== */
.cart-column { flex: 70; min-width: 0; }
.summary-column { flex: 30; min-width: 0; position: relative; }
@media (max-width: 900px) { 
    .summary-column { position: static; width: 100%; } 
    .cart-summary { position: static; top: auto; } 
}

.empty-cart-msg { text-align: center; padding: 40px; background: #f9f9f9; border: 1px dashed #ccc; border-radius: 6px; color: #666; }
.cart-item { border: 1px solid #ddd; border-radius: var(--jsp-radius); margin-bottom: 20px; background: #fff; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.cart-item-header { background: #f5f5f5; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #ddd; }
.product-title { font-weight: bold; font-size: 1.1em; color: #222; }
.order-code-badge { font-family: monospace; font-weight: bold; color: #d93025; background: #fdf3f2; padding: 4px 8px; border-radius: 4px; border: 1px solid #f3d8d6; margin-top: 5px; display: inline-block; }

.item-actions { display: flex; align-items: center; gap: 15px; }
.quantity-wrapper { display: flex; align-items: center; gap: 6px; font-size: 0.9em; font-weight: bold; color: #555; }
.quantity-input { width: 65px; padding: 6px; border: 1px solid #ccc; border-radius: 4px; text-align: center; font-weight: bold; font-size: 1em; }

.btn-delete { background: #dc3545; color: white; border: none; padding: 7px 12px; border-radius: 4px; cursor: pointer; font-weight: bold; font-size: 0.9em; }
.btn-delete:hover { background: #bd2130; }

.cart-item-body { padding: 15px 20px; background: #fafafa; }
.cart-item-breakdown { font-size: 0.9em; color: #555; white-space: pre-line; }
.breakdown-line { margin-bottom: 4px; font-family: monospace; }
.breakdown-line span { color: #d93025; font-weight: bold; }

.cart-summary { padding: 25px; background: #e8f4fd; border: 2px solid var(--jsp-blue); border-radius: var(--jsp-radius); position: sticky; top: 90px; box-shadow: 0 4px 15px rgba(0,86,179,0.05); }
.summary-title { font-size: 1.2em; font-weight: bold; color: var(--jsp-blue); margin-bottom: 15px; }
.action-buttons { display: flex; flex-direction: column; gap: 12px; }

/* ==============================================================
   MANAGER.HTML (Editor produktů)
   ============================================================== */
.tabs-header { display: flex; gap: 8px; margin-bottom: 30px; border-bottom: 3px solid var(--jsp-blue); }
.tab-btn { padding: 12px 24px; background: #e9ecef; border: 1px solid #ced4da; border-bottom: none; border-radius: 6px 6px 0 0; font-weight: bold; cursor: pointer; color: #495057; font-size: 1.05em; transition: all 0.2s; }
.tab-btn:hover { background: #dee2e6; }
.tab-btn.active { background: var(--jsp-blue); color: white; border-color: var(--jsp-blue); }

.tab-content { display: none; }
.tab-content.active { display: block; }

.panel { background: #fff; border: 1px solid #ced4da; border-radius: var(--jsp-radius); padding: 25px; margin-bottom: 25px; box-shadow: 0 3px 10px rgba(0,0,0,0.03); }
.row { display: flex; gap: 15px; margin-bottom: 15px; }
.field { flex: 1; display: flex; flex-direction: column; gap: 5px; }
label { font-weight: bold; font-size: 0.9em; color: #495057; }

input[type="text"], textarea, select { width: 100%; padding: 8px 12px; border: 1px solid #ced4da; border-radius: 4px; font-size: 1em; background: #fff; }
textarea { resize: vertical; min-height: 60px; }

.section-card { border: 2px solid var(--jsp-blue); border-radius: 6px; margin-bottom: 25px; background: #fff; box-shadow: 0 4px 8px rgba(0,0,0,0.05); overflow: hidden; }
.section-header { background: var(--jsp-blue); color: white; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; }
.section-header h3 { margin: 0; font-size: 1.1em; }
.section-body { padding: 20px; background: #fdfdfd; }
.options-title { font-weight: bold; color: #495057; margin: 15px 0 10px 0; font-size: 0.95em; border-bottom: 1px dashed #ced4da; padding-bottom: 5px; }

.option-row { display: flex; gap: 10px; background: #f1f3f5; padding: 10px; border-radius: 4px; margin-bottom: 8px; align-items: center; border: 1px solid #e9ecef; transition: opacity 0.2s; }
.opt-desc {
    font-size: 1.15em; /* Zvětší písmo o 15 %. Pokud by to bylo málo, klidně dej 1.2em */
    line-height: 1.4;  /* Mírně zvětší i řádkování, aby se to lépe četlo */
}

/* Zmenšení políček a textarey uvnitř řádku */
.option-row input[type="text"], 
.option-row textarea {
    padding: 4px 8px !important;   /* Nižší vstupní pole */
}
/* Kompaktnější řádky parametrů (úspora svislého místa) */
.option-row {
    padding: 4px 8px !important;   /* Zmenšení bubliny celého řádku */
    margin-bottom: 4px !important; /* Zmenšení mezery mezi řádky */
}

/* Zmenšení políček a textarey uvnitř řádku */
.option-row input[type="text"], 
.option-row textarea {
    padding: 4px 8px !important;   /* Nižší vstupní pole */
}

/* Zabrání zbytečnému roztahování textarey do výšky */
.option-row textarea.opt-desc {
    min-height: 36px !important;
}
/* Zabrání zbytečnému roztahování textarey do výšky */
.option-row textarea.opt-desc {
    min-height: 36px !important;
}
.opt-col-drag { width: 20px; text-align: center; cursor: grab; font-size: 1.1em; color: #bbb; user-select: none; }
.opt-col-drag:active { cursor: grabbing; }

.chbox-field { display: flex; align-items: center; gap: 6px; font-weight: bold; font-size: 0.9em; cursor: pointer; user-select: none; }
.chbox-field input { width: 16px; height: 16px; cursor: pointer; }

.import-box { background: #e8f4fd; border: 2px dashed var(--jsp-blue); padding: 20px; text-align: center; border-radius: 6px; margin-bottom: 30px; }
.import-box input { display: none; }

.rule-row { display: flex; gap: 12px; background: #fff3cd; padding: 15px; border-radius: 6px; margin-bottom: 12px; border: 1px solid #ffeeba; align-items: center; flex-wrap: wrap; }
.rule-badge { font-weight: bold; color: #856404; font-size: 0.9em; text-transform: uppercase; white-space: nowrap; }
.rule-then-vals-container, .rule-if-vals-container { display: flex; flex-wrap: wrap; gap: 6px; background: #fff; padding: 6px 12px; border: 1px solid #ced4da; border-radius: 4px; min-height: 38px; align-items: center; min-width: 180px; flex: 1; }

.cat-manager-category { border: 1px solid #b6c6d6; border-radius: var(--jsp-radius); background: #ffffff; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); margin-bottom: 35px; overflow: hidden; }
.cat-manager-category-header { background: var(--jsp-blue); color: white; padding: 14px 20px; display: flex; align-items: center; gap: 15px; }
.cat-manager-subcategory { margin: 20px; background: #fafbfc; border: 1px solid #e1e8ed; border-radius: 6px; padding: 20px; }
.cat-manager-subcategory-header { display: flex; align-items: center; gap: 15px; border-bottom: 2px solid #ced4da; padding-bottom: 10px; margin-bottom: 15px; }

.catalog-products-dropzone { min-height: 50px; background: #fff; border: 1px dashed #ced4da; border-radius: 4px; padding: 10px; margin-bottom: 15px; display: flex; flex-direction: column; gap: 8px; }
.catalog-table-header-sub { display: flex; gap: 10px; padding: 6px 12px; background: #495057; color: #fff; font-weight: bold; border-radius: 4px; font-size: 0.85em; margin-bottom: 2px; }

.catalog-item-row { display: flex; gap: 10px; padding: 8px 12px; background: #fff; border: 1px solid #dee2e6; border-radius: 4px; align-items: center; transition: opacity 0.2s, background-color 0.15s; }
.catalog-item-row:hover { background-color: #f1f3f5; }

.cat-col-drag { width: 25px; text-align: center; cursor: grab; font-size: 1.1em; color: #aaa; user-select: none; }
.cat-col-drag:active { cursor: grabbing; }
.cat-col-order { width: 45px; text-align: center; font-weight: bold; color: var(--jsp-blue); font-family: monospace; font-size: 1em; }
.cat-col-id { flex: 20; }
.cat-col-type { flex: 20; }
.cat-col-name { flex: 60; }
.cat-col-action { width: 40px; text-align: center; }

.actions-bar { position: sticky; bottom: 20px; background: rgba(255,255,255,0.95); padding: 15px 25px; border: 2px solid #28a745; border-radius: var(--jsp-radius); display: flex; justify-content: space-between; align-items: center; box-shadow: 0 4px 20px rgba(0,0,0,0.15); backdrop-filter: blur(5px); z-index: 1000; }

/* ==============================================================
   TISKOVÉ NASTAVENÍ (PDF a Papír)
   ============================================================== */
#print-area { display: none; }
@media print {
    @page { margin: 2cm; }
    body { background: #fff !important; margin: 0; padding: 0; color: #000; }
    .top-nav, h1, h2, .main-container, .site-footer, .no-print, .tabs-header, .actions-bar { display: none !important; }
    #print-area { display: block !important; }
    .print-item { page-break-inside: avoid; break-inside: avoid; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid #ccc; }
}