/* ============================================================
   HOSH — FÁZE 2: Header + Navigace + Announcement bar
   ============================================================ */


/* ── 1. STATIC ANNOUNCEMENT BAR ──────────────────────────── */

/* JS injectuje #hosh-bar přímo před .overall-wrapper */
#hosh-bar {
    background: var(--hosh-accent);
    color: var(--hosh-white);
    text-align: center;
    padding: 9px 16px;
    font-family: var(--hosh-sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.3;
    width: 100%;
    box-sizing: border-box;
}

/* Inner wrapper — fade transition between messages */
#hosh-bar-inner {
    transition: opacity 0.3s ease;
}

/* Links inside bar */
#hosh-bar a {
    color: var(--hosh-white) !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
    text-decoration-thickness: 1px !important;
    opacity: 0.9;
    transition: opacity 0.15s;
}

#hosh-bar a:hover {
    opacity: 1 !important;
    color: var(--hosh-white) !important;
}

/* Shoptetův dismissible bar — skryt, nahrazen statickým */
.site-msg.information {
    display: none !important;
}

/* Mobile: Opal JS dělá #header position:fixed height:60px top:0 z-index:9
   Bar musí být fixed nad headerem (z-index > 9), header posuneme dolů o výšku baru. */
@media (max-width: 767px) {
    #hosh-bar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1001 !important;
    }

    /* Posuneme header dolů o výšku baru (32px) */
    #header {
        top: 32px !important;
    }

    /* Content musí začínat pod barem (32px) + headerem (60px) = 92px */
    .overall-wrapper {
        padding-top: 92px !important;
    }
}

/* ── 2. HEADER — základní reset ──────────────────────────── */

#header {
    background: var(--hosh-white) !important;
    border-bottom: 1px solid var(--hosh-border) !important;
    box-shadow: none !important;
}

/* Sticky shadow */
#header.scrolled,
#header.is-sticky {
    box-shadow: 0 2px 12px rgba(0,0,0,0.06) !important;
}

/* ── DESKTOP ONLY (min-width: 769px) ─────────────────────── */
@media (min-width: 769px) {

    /* Wrapper — overflow:visible jen pro dropdown, ne pro fitted nav */
    .navigation-wrapper {
        height: 64px !important;
        min-height: 64px !important;
        max-height: 64px !important;
    }

    /* Header-top */
    .header-top {
        height: 64px !important;
        min-height: 64px !important;
        display: flex !important;
        align-items: center !important;
        padding: 0 !important;
    }

    /* Nav — výška + centrování.
       POZOR: overflow nechán na auto/hidden, aby Shoptetův fitted JS
       mohl správně měřit a skrývat položky co se nevejdou. */
    #header nav.visible,
    #header nav.visible.fitted {
        height: 64px !important;
        min-height: 64px !important;
        max-height: 64px !important;
        line-height: 1 !important;
        display: flex !important;
        align-items: center !important;
        /* overflow záměrně NENÍ přepsán — nechává Shoptet JS fungovat */
    }

    /* ul.menu-level-1 — POUZE v hlavním nav, NE v .menu-helper!
       Selektor cílí jen na nav > .navigation-in > ul */
    #header .navigation-in > ul.menu-level-1 {
        height: 64px !important;
        line-height: 1 !important;
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        margin-top: 0 !important;
    }

    /* Nav linky — VŠECHNY přímé položky (i bez .ext = bez podkategorií) */
    #header .navigation-in > ul.menu-level-1 > li > a {
        height: 64px !important;
        line-height: 1 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        white-space: nowrap !important;
    }

    /* ── MENU-HELPER (≡ overflow dropdown) ──────────────────
       .menu-helper je Shoptetův element pro přetečené položky.
       Shoptet JS sám nastavuje display:none/block na li položkách —
       MY to NEPŘEPISUJEME, jen stylujeme. */

    #header .menu-helper {
        /* top/left/position nepřepisujeme — Shoptet JS řídí */
        height: 64px !important;
        display: flex !important;
        align-items: center !important;
        cursor: pointer !important;
        z-index: 200 !important;
    }

    /* Trigger — schovat "Více" text, zobrazit jen ≡ ikonu */
    #header .menu-helper > span:first-child {
        font-size: 0 !important;
        display: flex !important;
        align-items: center !important;
        height: 64px !important;
        padding: 0 4px !important;
        cursor: pointer !important;
    }

    /* Dropdown UL — schován, ukáže se na hover.
       display na LI NEPŘEPISUJEME — Shoptet JS to řídí. */
    #header .menu-helper > ul.menu-level-1 {
        display: none !important;
        position: absolute !important;
        top: 64px !important;
        left: 0 !important;
        min-width: 200px !important;
        height: auto !important;
        background: var(--hosh-white) !important;
        border-top: 1px solid var(--hosh-border) !important;
        box-shadow: 0 12px 40px rgba(0,0,0,0.06) !important;
        padding: 12px 0 !important;
        z-index: 300 !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    #header .menu-helper:hover > ul.menu-level-1,
    #header .menu-helper:focus-within > ul.menu-level-1 {
        display: flex !important;
    }

    /* Styly odkazů — display/visibility NEMĚNÍME */
    #header .menu-helper li > a {
        font-family: var(--hosh-sans) !important;
        font-size: 12px !important;
        font-weight: 500 !important;
        letter-spacing: 0.1em !important;
        text-transform: uppercase !important;
        color: var(--hosh-text) !important;
        padding: 8px 20px !important;
        height: auto !important;
        line-height: 1.4 !important;
        transition: color var(--hosh-t-fast) !important;
        white-space: nowrap !important;
        text-decoration: none !important;
    }

    #header .menu-helper li > a:hover {
        color: var(--hosh-accent) !important;
    }

    /* Dropdown — reset výšky + pozice (desktop only) */
    #header li.ext > ul a,
    #header .menu-level-2 a,
    #header .menu-level-3 a {
        height: auto !important;
        min-height: 0 !important;
        display: block !important;
    }

    #header li.ext > ul,
    #header .menu-level-2 {
        top: 64px !important;
        margin-top: 0 !important;
        /* Dropdown potřebuje overflow:visible — výjimka přes position:absolute */
        overflow: visible !important;
    }

    /* Navigation-buttons */
    #header .navigation-buttons {
        height: 64px !important;
        min-height: 64px !important;
        display: flex !important;
        align-items: center !important;
        flex-shrink: 0 !important;
    }

} /* end @media (min-width: 769px) */


/* ── 3. LOGO ──────────────────────────────────────────────── */

.site-name {
    margin: 0 !important;
    font-family: var(--hosh-serif) !important;
    font-size: inherit !important;
    font-weight: 400 !important;
    line-height: 1 !important;
}

.site-name a {
    color: var(--hosh-text) !important;
    text-decoration: none !important;
}

.site-name img {
    max-height: 48px;
    width: auto;
}


/* ── 4. HLAVNÍ NAVIGACE — nav linky ──────────────────────── */

/* Top-level položky — ŽENY, MUŽI, DĚTI... */
.menu-level-1 > li > a,
#nav > ul > li > a,
.navigation ul.menu-level-1 > li > a {
    font-family: var(--hosh-sans) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: 0.13em !important;
    text-transform: uppercase !important;
    color: var(--hosh-text) !important;
    text-decoration: none !important;
    padding: 6px 10px !important;
    transition: color var(--hosh-t-mid) !important;
    position: relative !important;
}

/* Hover — zelená podtrhnutí linka */
.menu-level-1 > li > a:hover,
#nav > ul > li > a:hover,
.navigation ul.menu-level-1 > li > a:hover {
    color: var(--hosh-accent) !important;
}

/* Aktivní/current položka */
.menu-level-1 > li.current > a,
.menu-level-1 > li.active > a,
#nav > ul > li.current > a {
    color: var(--hosh-accent) !important;
}

/* Dropdown šipka */
.menu-level-1 > li > a .nav-arrow,
.menu-level-1 > li > a::after {
    font-size: 8px !important;
    margin-left: 4px !important;
    opacity: 0.6 !important;
}


/* ── 5. DROPDOWN MENU (desktop only) ─────────────────────── */

@media (min-width: 769px) {

    /* Dropdown container */
    #header .menu-level-2,
    #header li.ext > ul {
        border-top: 1px solid var(--hosh-border) !important;
        border-radius: 0 !important;
        box-shadow: 0 12px 40px rgba(0,0,0,0.06) !important;
        background: var(--hosh-white) !important;
        padding: 10px 0 14px !important;
        flex-wrap: wrap !important;
        align-content: flex-start !important;
    }

    /* Obrázky — skryté */
    #header .menu-level-2 .menu-image {
        display: none !important;
    }

    /* li — čistý textový layout */
    #header .menu-level-2 > li {
        display: block !important;
        padding: 0 40px 4px 0 !important;
        margin-bottom: 0 !important;
        flex-shrink: 0 !important;
    }

    /* li bez subkategorií — align fix */
    #header .menu-level-2 > li:not(.has-third-level) {
        align-self: flex-start !important;
    }

    /* div uvnitř li */
    #header .menu-level-2 > li > div {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        display: block !important;
    }

    /* Název kategorie */
    #header .menu-level-2 > li > div > a {
        font-family: var(--hosh-sans) !important;
        font-weight: 600 !important;
        font-size: 11px !important;
        letter-spacing: 0.12em !important;
        text-transform: uppercase !important;
        color: var(--hosh-text) !important;
        margin-bottom: 4px !important;
        display: block !important;
        height: auto !important;
        line-height: 1.3 !important;
        text-decoration: none !important;
        padding: 0 !important;
    }

    #header .menu-level-2 > li > div > a:hover {
        color: var(--hosh-accent) !important;
    }

    /* Subkategorie — 3. úroveň */
    #header .menu-level-3 {
        margin-top: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }

    #header .menu-level-3 > li {
        list-style: none !important;
        margin-bottom: 0 !important;
    }

    #header .menu-level-3 > li > a {
        font-family: var(--hosh-sans) !important;
        font-size: 12px !important;
        font-weight: 400 !important;
        letter-spacing: 0.02em !important;
        text-transform: none !important;
        color: var(--hosh-text-muted) !important;
        padding: 0 !important;
        line-height: 1.4 !important;
        display: block !important;
        transition: color var(--hosh-t-fast) !important;
        text-decoration: none !important;
    }

    #header .menu-level-3 > li > a:hover {
        color: var(--hosh-text) !important;
    }

} /* end dropdown desktop */


/* ── 6. NAVIGATION BUTTONS (search, cart, user) ──────────── */

/* KRITICKÝ RESET — přebíjí i addon CSS které dávají bg na .btn */
#header .btn-icon,
#header a.btn-icon,
#header .navigation-buttons a,
#header .navigation-buttons .btn-icon,
#header .toggle-window.btn-icon,
#header .cart-count.btn-icon {
    background: transparent !important;
    border: none !important;
    color: var(--hosh-text) !important;
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 10px !important;
    font-weight: 400 !important;
    font-size: 18px !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    box-shadow: none !important;
    transition: color var(--hosh-t-mid) !important;
    display: inline-flex !important;
    align-items: center !important;
    align-self: center !important;
}

#header .btn-icon:hover,
#header a.btn-icon:hover,
#header .navigation-buttons a:hover,
#header .navigation-buttons .btn-icon:hover {
    background: transparent !important;
    color: var(--hosh-accent) !important;
    border: none !important;
}

/* Počet položek v košíku — badge */
.navigation-buttons .cart-count-value,
.navigation-buttons [class*="cart-count"] {
    background: var(--hosh-accent) !important;
    border-radius: 0 !important;
    font-family: var(--hosh-sans) !important;
    font-size: 9px !important;
    font-weight: 700 !important;
}


/* ── 7. MOBILNÍ HEADER ───────────────────────────────────── */

@media (max-width: 768px) {
    .site-name img {
        max-height: 36px;
    }

    .navigation-wrapper {
        min-height: 56px;
    }

    /* Hamburger ikona */
    .navigation-toggle,
    [class*="hamburger"],
    .mobile-nav-toggle {
        color: var(--hosh-text) !important;
    }
}


/* ============================================================
   PRODUCT CARDS — HOSH PREMIUM
   Fáze 3: product listing cards
   ============================================================ */

.products-page .product { margin-bottom: 40px !important; }

/* Image zoom */
.product .p .image img { transition: transform 0.5s ease !important; display: block !important; }
.product .p:hover .image img { transform: scale(1.03) !important; }

/* Reorder: image → p-in (name+price+btn) */
/* widget-parameter-wrapper je přesouván JS dovnitř [data-micro="offer"] před .p-tools */
.product .p { display: flex !important; flex-direction: column !important; }
.product .p .image { order: 0 !important; }
.product .p .p-in  { order: 1 !important; }
/* Wrapper jako fallback když JS nestihne — schovat z .p flex flow */
.product .p > .widget-parameter-wrapper { display: none !important; }

/* p-in: name → price row (price + swatches side by side) */
.product .p-in {
    display: flex !important;
    flex-direction: column !important;
    padding: 12px 0 0 0 !important;
}
.product .p-in-in { order: 0 !important; }
.product .p-bottom { order: 1 !important; }

/* Name */
.product a.name {
    font-family: var(--hosh-sans) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    color: #1a1a1a !important;
    text-decoration: none !important;
    display: block !important;
    margin-bottom: 6px !important;
    line-height: 1.4 !important;
}

/* Hide availability text (Skladem) */
.product .ratings-wrapper { display: none !important; }

/* p-bottom: block layout — price then swatches stacked */
.product .p-bottom > [data-micro="offer"] {
    display: block !important;
}

/* Price block */
.product .prices { margin-bottom: 6px !important; }

/* Regular price */
.product .price-final strong {
    font-family: var(--hosh-sans) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
    color: #1a1a1a !important;
}

/* Sale price layout */
.product .old-price-line {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-bottom: 1px !important;
}
.product .old-price {
    font-family: var(--hosh-sans) !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    color: #999 !important;
    text-decoration: line-through !important;
}
.product .price-save {
    font-family: var(--hosh-sans) !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em !important;
    color: #1C3A2F !important;
    background: transparent !important;
    padding: 0 !important;
}
/* Sale final price — accent color */
.product .prices:has(.old-price-line) .price-final strong {
    color: #1C3A2F !important;
}

/* Swatches — stacked below price, above button */
/* JS přesouvá wrapper dovnitř [data-micro="offer"] před .p-tools */
/* Wrapper v offer divu = viditelný */
[data-micro="offer"] > .widget-parameter-wrapper {
    display: block !important;
    padding: 8px 0 10px 0 !important;
}
/* Schovat "+ další" link (příliš mnoho variant) */
.widget-parameter-more {
    display: none !important;
}
.widget-parameter-list {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.widget-parameter-value a {
    display: inline-block !important;
    width: 16px !important;
    min-width: 0 !important;
    height: 16px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    border: 1.5px solid rgba(0,0,0,0.15) !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
    background: #ccc !important;
    box-sizing: content-box !important;
    vertical-align: middle !important;
    transition: transform 0.15s, border-color 0.15s !important;
}
.widget-parameter-value a:hover {
    transform: scale(1.2) !important;
    border-color: #1a1a1a !important;
}

/* CTA button — green filled, always visible */
.product .p-tools {
    margin-top: 10px !important;
    display: block !important;
}
.product .p-tools .btn-primary,
.products-block.products .product .p-tools .btn,
.products-block.products .product .p-tools .btn-primary,
.products-block.products .product .p-tools button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 42px !important;
    padding: 0 !important;
    background: var(--hosh-accent) !important;
    border: none !important;
    border-radius: 0 !important;
    font-family: var(--hosh-sans) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
    color: #fff !important;
    text-align: center !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: background 0.2s !important;
}
.product .p-tools .btn-primary:hover,
.products-block.products .product .p-tools .btn:hover,
.products-block.products .product .p-tools .btn-primary:hover {
    background: #142b22 !important;
    color: #fff !important;
}
/* Shoptet injectuje SVG chevron > jako background-image na ::before — skryjeme */
.product .p-tools .btn-primary::before,
.products-block.products .product .p-tools .btn::before {
    display: none !important;
}

/* Skryjeme popis produktu pod buttonem na kartě */
.product .p-desc {
    display: none !important;
}

/* Badges */
.product .flag {
    font-family: var(--hosh-sans) !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    padding: 4px 8px !important;
    border-radius: 0 !important;
}
.product .flag-new { background: #1a1a1a !important; color: #fff !important; }
.product .flag-sale,
.product .flag-discount { background: var(--hosh-accent) !important; color: #fff !important; }

/* ---- MOBILE ≤768px ---- */
@media (max-width: 768px) {
    /* Kompaktnější padding na kartě */
    .product .p-in {
        padding: 8px 0 0 0 !important;
    }
    .product a.name {
        font-size: 11px !important;
        letter-spacing: 0.08em !important;
        margin-bottom: 4px !important;
        line-height: 1.35 !important;
    }
    .product .price-final strong {
        font-size: 13px !important;
    }
    /* Menší swatche na mobilu — více se vejde */
    .widget-parameter-value a {
        width: 13px !important;
        height: 13px !important;
    }
    .widget-parameter-list {
        gap: 4px !important;
    }
    .widget-parameter-wrapper {
        padding: 6px 0 8px 0 !important;
    }
    /* Button — trochu nižší */
    .product .p-tools .btn-primary,
    .products-block.products .product .p-tools .btn-primary,
    .products-block.products .product .p-tools .btn {
        min-height: 36px !important;
        font-size: 10px !important;
        letter-spacing: 0.12em !important;
    }
    /* Sale price — kompaktnější */
    .product .old-price-line {
        gap: 4px !important;
    }
    .product .old-price {
        font-size: 10px !important;
    }
}

/* ---- SMALL MOBILE ≤480px ---- */
@media (max-width: 480px) {
    .product a.name {
        font-size: 10px !important;
    }
    .product .price-final strong {
        font-size: 12px !important;
    }
}

/* ── SIZE BADGES (produkty bez barev) ── */
/* Wrapper přepne layout na inline flex s mezerami */
.widget-parameter-wrapper.hosh-size-only {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    padding: 6px 0 8px 0 !important;
}

/* Přepíše kulatý swatch styl na textový badge */
.widget-parameter-wrapper.hosh-size-only .widget-parameter-value a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: 20px !important;
    min-width: 28px !important;
    padding: 0 5px !important;
    border-radius: 0 !important;
    border: 1px solid rgba(0,0,0,0.2) !important;
    background: transparent !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    text-indent: 0 !important;
    color: #333 !important;
    line-height: 1 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

.widget-parameter-wrapper.hosh-size-only .widget-parameter-value a:hover {
    border-color: var(--hosh-accent) !important;
    color: var(--hosh-accent) !important;
    transform: none !important;
    background: transparent !important;
}

/* Mobil */
@media (max-width: 768px) {
    .widget-parameter-wrapper.hosh-size-only .widget-parameter-value a {
        height: 18px !important;
        font-size: 8px !important;
    }
}

/* ── PDP GALLERY: skrýt originální layout od prvního framu ── */
/* CSS je v <head> = aplikuje se před renderem                 */
/* visibility:hidden = prostor zachován, obsah neviditelný     */
/* Žádný placeholder, žádná barva — jen prázdno               */
.type-detail .p-image-wrapper {
    visibility: hidden;
}
/* Jakmile JS vloží #hosh-gal — odkryj vše */
.type-detail .p-image-wrapper:has(#hosh-gal) {
    visibility: visible;
}
