/* === Detail modulu – eshop_module.css === */

.esh-module-detail-block {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 7px 34px #b7c8ec22;
    padding: 36px 32px 44px 32px;
    margin-top: 42px;
}

.esh-module-detail-top {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 36px;
}

.esh-module-gallery {
    width: 350px;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
}

.esh-gallery-main {
    width: 100%;
    aspect-ratio: 1/1;
    background: #f5f8fc;
    border-radius: 18px;
    box-shadow: 0 2px 14px #d8e7fa44;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.esh-gallery-main img {
    max-width: 96%;
    max-height: 96%;
    object-fit: contain;
    display: block;
}

.esh-gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}
.esh-gallery-thumb {
    width: 52px;
    height: 52px;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
    border: 2px solid #e3eafd;
    box-shadow: 0 1px 6px #dceafd33;
    cursor: pointer;
    transition: border .16s;
}
.esh-gallery-thumb.active,
.esh-gallery-thumb:hover {
    border: 2.6px solid #2467e9;
}

.esh-module-maininfo {
    flex: 1 1 auto;
    min-width: 280px;
    max-width: 590px;
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.esh-detail-title {
    color: #163bca;
    font-size: 2.04em;
    font-weight: 800;
    margin-bottom: 0;
    letter-spacing: -0.01em;
}

.esh-detail-short {
    color: #1b256d;
    font-size: 1.13em;
    margin-bottom: 7px;
    line-height: 1.4em;
}

/* === VÝBĚR LICENCE / CENY === */
.esh-detail-buyform {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 16px 0 18px 0;
    background: #f7faff;
    border-radius: 11px;
    padding: 18px 20px;
    width: 100%;
    max-width: 420px;
}

.esh-variants-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 10px;
}
.esh-variant-radio {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    font-weight: 600;
    color: #1843b5;
    font-size: 1.06em;
    margin-bottom: 7px;
}
.esh-variant-radio input[type="radio"] {
    accent-color: #2a6afe;
    width: 17px;
    height: 17px;
    margin-right: 7px;
}
.esh-variant-label {
    font-weight: 600;
    color: #234;
    min-width: 82px;
    margin-left: 6px;
}
.esh-variant-price {
    color: #e32060;
    font-weight: bold;
    min-width: 72px;
    margin-left: 8px;
    text-align: right;
}

.esh-module-fees {
    width: 100%;
    margin-top: 6px;
    margin-bottom: 8px;
}
.esh-fee-item {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 4px;
}
.esh-fee-item label {
    font-weight: 500;
    margin-bottom: 0;
    margin-left: 5px;
}

/* === CTA řádek: cena + „ušetříte“ + tlačítko vedle === */
.esh-cta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: nowrap;   /* důležité: nezalamovat */
}
.esh-total-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
}

.esh-module-summary {
    width: 100%;
    font-size: 1.20em;
    color: #e32060;
    margin-top: 4px;
    margin-bottom: 0;
    font-weight: bold;
    letter-spacing: -0.01em;
}

/* „Ušetříte“ badge */
.esh-savings {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #eef6ff;
    border: 1px solid #cfe4ff;
    border-radius: 999px;
    padding: 6px 10px;
    line-height: 1;
}
.esh-savings-badge {
    background: #2a6afe;
    color: #fff;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9em;
}
.esh-savings-amount {
    color: #0d3ea7;
    font-weight: 700;
}
.esh-savings-note {
    color: #4b6fb6;
    font-size: 0.92em;
}

/* TLAČÍTKO KOŠÍK (inline varianta) */
.esh-btn-cart-big {
    background: linear-gradient(90deg, #2a6afe 0%, #45cbff 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1.08em;
    border: none;
    border-radius: 9px;
    padding: 13px 34px;
    cursor: pointer;
    box-shadow: 0 2px 13px #bedcff44;
    transition: background 0.17s, box-shadow 0.16s, transform 0.10s;
    text-align: center;
    white-space: nowrap;
    flex: 0 0 auto;
}
.esh-btn-cart-big:hover {
    background: linear-gradient(90deg, #1b4ac7 0%, #39bfe6 100%);
    box-shadow: 0 4px 15px #bedcff77;
    transform: scale(1.03);
}
.esh-btn-inline { white-space: nowrap; }

/* Parametrický box (všechna metadata) */
.esh-module-sidebox {
    min-width: 210px;
    max-width: 240px;
    margin-left: 22px;
    background: #f7f8fb;
    border-radius: 16px;
    box-shadow: 0 2px 15px #e2eafd15;
    padding: 19px;
    color: #38417a;
    font-size: 1.04em;
    line-height: 1.5em;
}
.esh-module-sidebox ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.esh-module-sidebox li {
    margin-bottom: 7px;
    border-bottom: 1px solid #e6eafb;
    padding-bottom: 6px;
}

/* Tabs */
.esh-detail-tabs {
    display: flex;
    gap: 7px;
    margin: 44px 0 0 0;
    border-bottom: 2.2px solid #e7eefd;
}
.esh-detail-tab {
    border: none;
    background: none;
    font-size: 1.09em;
    color: #1a3daa;
    font-weight: 600;
    padding: 13px 21px;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: background 0.13s, color 0.13s;
}
.esh-detail-tab.active,
.esh-detail-tab:hover {
    background: #f0f7ff;
    color: #2267d8;
}
.esh-detail-tabpanels {
    margin-bottom: 32px;
    margin-top: 0;
}
.esh-detail-panel {
    display: none;
    padding: 23px 2px 0 2px;
    background: none;
}
.esh-detail-panel.active { display: block; }

/* Responsive */
@media (max-width: 1100px) {
    .esh-module-detail-block { padding: 18px 6vw 30px 6vw; }
    .esh-module-detail-top { flex-direction: column; gap: 27px; }
    .esh-module-gallery { width: 97vw; max-width: 410px; }
    .esh-module-sidebox { margin-left: 0; max-width: 100vw; }
    .esh-detail-buyform { max-width: 99vw; }
    .esh-cta-row { gap: 12px; flex-wrap: wrap; }
}
@media (max-width: 750px) {
    .esh-module-detail-block { padding: 12px 2vw 20px 2vw; }
    .esh-detail-title { font-size: 1.18em; }
    .esh-module-detail-top { gap: 13px; }
    .esh-gallery-main { border-radius: 11px; }
    .esh-module-sidebox { padding: 14px 5px; border-radius: 9px; }
    .esh-detail-buyform { padding: 13px 4vw; }
    .esh-cta-row { flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
    .esh-btn-inline { width: 100%; }
}

/* --- Gallery upgrades --- */
.esh-module-gallery{width:350px;min-width:200px;display:flex;flex-direction:column;gap:14px}
.esh-gallery-main{position:relative;width:100%;aspect-ratio:1/1;background:#f5f8fc;border-radius:18px;box-shadow:0 2px 14px #d8e7fa44;overflow:hidden;display:flex;align-items:center;justify-content:center}
.esh-gallery-main img{max-width:96%;max-height:96%;object-fit:contain;display:block;cursor:zoom-in}
.esh-img-label{position:absolute;top:10px;left:10px;background:#17a2ff;color:#fff;font-weight:700;font-size:.88em;padding:6px 10px;border-radius:999px;margin-right:6px;box-shadow:0 6px 18px #1b5ed026}
.esh-img-label+.esh-img-label{margin-left:8px}
.esh-gal-nav{position:absolute;top:50%;transform:translateY(-50%);background:#ffffffd6;border:none;width:36px;height:36px;border-radius:50%;cursor:pointer;font-size:22px;line-height:36px;text-align:center;box-shadow:0 4px 18px #b9c7f44a}
.esh-gal-nav.prev{left:10px}.esh-gal-nav.next{right:10px}
.esh-gal-nav:hover{background:#fff}
.esh-thumbs-wrap{position:relative;display:flex;align-items:center;gap:8px}
.esh-gallery-thumbs{display:flex;gap:10px;overflow:hidden;scroll-behavior:smooth}
.esh-gallery-thumb{width:60px;height:60px;object-fit:contain;background:#fff;border-radius:10px;border:2px solid #e3eafd;box-shadow:0 1px 6px #dceafd33;cursor:pointer;flex:0 0 auto}
.esh-gallery-thumb.active,.esh-gallery-thumb:hover{border-color:#2467e9}
.thumb-nav{background:#fff;border:1px solid #e2e8f0;width:28px;height:28px;border-radius:50%;cursor:pointer;font-size:16px;line-height:26px;text-align:center;box-shadow:0 2px 10px #b9c7f42a}
.thumb-nav[disabled]{opacity:.4;cursor:default}
/* --- Lightbox --- */
.esh-lightbox{position:fixed;inset:0;background:#0b1020f2;display:flex;align-items:center;justify-content:center;z-index:9999}
.esh-lightbox[hidden]{display:none}
.esh-lightbox img{max-width:92vw;max-height:86vh;object-fit:contain;border-radius:12px}
.lb-btn{position:absolute;background:#ffffffde;border:none;width:42px;height:42px;border-radius:50%;cursor:pointer;font-size:22px;line-height:42px;text-align:center;box-shadow:0 8px 24px #0003}
.lb-close{top:20px;right:22px}
.lb-prev{left:20px;top:50%;transform:translateY(-50%)}
.lb-next{right:20px;top:50%;transform:translateY(-50%)}
.lb-counter{position:absolute;bottom:18px;color:#fff;font-weight:700;background:#0008;padding:6px 10px;border-radius:8px}
.lb-labels{position:absolute;top:22px;left:22px;display:flex;gap:8px}
/* Responsive */
@media (max-width:750px){
  .esh-module-gallery{width:100%;max-width:500px;margin:0 auto}
  .esh-gallery-thumb{width:56px;height:56px}
}

/* DŮLEŽITÉ: rodič musí být relativní, aby absolutní pozice níže fungovala */
.esh-gallery-main {
  position: relative;
}

/* zvýraznění povinných poplatků v pravém boxu */
.esh-module-sidebox .esh-fee-required{
  background:#fee2e2;
  color:#b91c1c;
  font-weight:700;
  padding:6px 8px;
  border-radius:8px;
  margin-top:6px;
}
.esh-module-sidebox .esh-fee-required small{
  font-weight:600;
  opacity:.9;
}

/* volitelné poplatky jemně */
.esh-module-sidebox .esh-fee-optional{
  background:#f8fafc;
  color:#0f172a;
  padding:6px 8px;
  border-radius:8px;
  margin-top:6px;
}

.esh-stars{ color:#f59e0b; letter-spacing:1px; }

/* zvýraznění povinných/volitelných poplatků */
.esh-module-sidebox .esh-fee-required{
  background:#fee2e2; color:#b91c1c; font-weight:700;
  padding:6px 8px; border-radius:8px; margin-top:6px;
}
.esh-module-sidebox .esh-fee-required small{ font-weight:600; opacity:.9; }
.esh-module-sidebox .esh-fee-optional{
  background:#f8fafc; color:#0f172a;
  padding:6px 8px; border-radius:8px; margin-top:6px;
}


/* kompaktnější varianty */
.esh-variants-wrap .esh-variant-radio{
  gap:8px;
  padding:4px 8px;
  line-height:1.1;
}
.esh-variants-wrap .esh-variant-price{
  margin-left:auto;
}


/* Sloupec štítků v levém horním rohu, vždy pod sebou */
.esh-img-labels {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 3;              /* nad obrázkem i šipkami */
  pointer-events: none;    /* ať nepřekáží klikům na obrázek/zoom */
}

/* Vzhled jednoho štítku; ZRUŠÍME případné staré absolute */
.esh-img-label {
  position: static !important;    /* přebije staré position:absolute, pokud bylo */
  display: inline-flex;
  align-items: center;
  background: #0d6efd;
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1;
  white-space: nowrap;
}

/* Volitelné odlišení 1./2./3. štítku barvou */
.esh-img-labels .esh-img-label:nth-child(1)  { background: #2a6afe; } /* modrá */
.esh-img-labels .esh-img-label:nth-child(2)  { background: #22c55e; } /* zelená */
.esh-img-labels .esh-img-label:nth-child(3)  { background: #f59e0b; } /* oranžová */
.esh-img-labels .esh-img-label:nth-child(4)  { background: #ef4444; } /* červená */
.esh-img-labels .esh-img-label:nth-child(5)  { background: #a855f7; } /* fialová */
.esh-img-labels .esh-img-label:nth-child(6)  { background: #06b6d4; } /* tyrkysová */
.esh-img-labels .esh-img-label:nth-child(7)  { background: #84cc16; } /* limetková */
.esh-img-labels .esh-img-label:nth-child(8)  { background: #ec4899; } /* růžová */
.esh-img-labels .esh-img-label:nth-child(9)  { background: #f97316; } /* tmavší oranžová */
.esh-img-labels .esh-img-label:nth-child(10) { background: #0ea5e9; } /* světle modrá */


.esh-variant-discount { font-weight: 600; }
.esh-discount-pos  { color: #129a00; }   /* zelená u slevy */
.esh-discount-zero { color: #8a8f98; }   /* šedá když 0 % */

