/* ==========================================================================
   CUSTOM CSS PRO OBALYGASTRO.CZ
   Barvy: Fialová (#704796), Zelená (#81B337), Oranžová (#f7ac00)
   ========================================================================== */

/* --- 1. GLOBÁLNÍ NASTAVENÍ --- */
body * {
    text-underline-offset: 4px;
}

html {
    scroll-behavior: smooth;
}

/* --- 2. DESKTOP: HORNÍ LIŠTA A NAVIGACE (min-width: 768px) --- */
@media (min-width: 768px) {
    /* Fialové pozadí horní lišty */
    .top-navigation-bar {
        background: #704796;
        border-bottom: 1px solid #5a357a;
    }

    .top-navigation-menu-trigger {
        bottom: 7px;
    }

    /* Bílé texty v liště */
    .top-navigation-bar-menu li a,
    .top-navigation-tools a.login,
    .top-navigation-tools a,
    .top-navigation-menu-trigger::before {
        color: #fff;
    }

    /* Inverze barev pro ikony (login/register) */
    .top-navigation-tools a.login:not(:hover)::before,
    .top-navigation-tools a.top-nav-button-register:not(:hover)::before {
        filter: invert(1);
    }

    /* Hover efekty - změna na brandovou ZELENOU */
    .top-navigation-bar-menu li a:hover,
    .top-navigation-tools a.login:hover,
    .top-navigation-tools a:hover,
    .top-navigation-menu-trigger:hover::before {
        color: #81B337;
        text-decoration: underline;
    }

    /* Helper menu a dropdowny */
    .top-navigation-bar-menu-helper li a {
        color: #222;
    }

    .top-navigation-bar-menu-helper li a::before,
    .dropdown-menu li a::before {
        background-color: #704796 !important;
    }
}

/* --- 3. LOGO (LOGIKA PRO VŠECHNA ZAŘÍZENÍ) --- */
/* Flexbox kontejner pro správné zarovnání */
.site-name {
    display: flex;
    align-items: center;
    z-index: 100;
    position: relative;
}

/* Základní nastavení obrázku loga (pružnost) */
.site-name a[data-testid="linkWebsiteLogo"] img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    min-height: 30px !important;
    min-width: 50px;
    max-width: 100%;
}

/* PC specifika: Pevná velikost loga pro velké displeje */
@media (min-width: 992px) {
    .site-name {
        width: 350px;
    }

    .site-name a[data-testid="linkWebsiteLogo"] img {
        width: 350px !important;
        height: 60px !important;
    }
}

/* --- 4. MOBILNÍ SPECIFIKA (Hlavička, Logo, Menu) --- */
@media (max-width: 991px) {
    /* Hlavička na fialovo */
    #header {
        background-color: #704796 !important;
        border-bottom: none;
        position: relative;
    }

    /* ZVĚTŠENÍ LOGA NA MOBILU */
    #header .site-name {
        display: flex !important;
		margin-top:10px !important;
        width: 250px !important;
        max-width: 100% !important;
        opacity: 1 !important;
        visibility: visible !important;
        float: left;
    }

    #header .site-name a {
        display: block !important;
    }

    #header .site-name img {
        max-height: 55px !important; /* Větší výška pro lepší čitelnost */
        width: auto !important;
        margin-top: 2px;
    }

    /* Přebarvení systémových ikon na bílou (aby byly vidět na fialové) */
    .navigation-buttons a,
    .navigation-buttons span,
    .navigation-buttons .login-icon {
        color: #ffffff !important;
    }

    .navigation-buttons svg,
    .navigation-buttons svg path {
        fill: #ffffff !important;
        stroke: #ffffff !important;
    }

    /* Číslo v košíku - zelené pozadí */
    .cart-count .amount {
        background-color: #81B337 !important;
        color: #ffffff !important;
    }

    /* Vyhledávací pole na mobilu */
    .header-top .search input {
        border: 1px solid #ffffff !important;
        background: #ffffff;
    }

    /* Fix layoutu bannerů na mobilu */
    .in-index .row.banners-row {
        flex-direction: column;
    }

    .banners-row .col-sm-4 .next-to-carousel-banners .banner-wrapper {
        margin: 0;
    }

    .banners-row .col-sm-8,
    .in-index #carousel,
    .banners-row .col-sm-4,
    .banners-row .col-sm-4 .banner-wrapper a {
        max-height: unset;
    }

    .content-wrapper.container .row > div {
        padding: 0 !important;
    }

    /* Fix pozadí patičky na mobilu (aby bylo jako COVER) */
    #footer::before {
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
    }
}

/* --- 5. "GREEN SWEEP" - HROMADNÉ PŘEBARVENÍ PRVKŮ NA ZELENOU --- */
/* Nahrazuje původní tyrkysovou/defaultní barvu šablony */

/* Seznam prvků k přebarvení: aktivní menu, paginace, tlačítka slideru, success buttony... */
.navigation-in > ul > li:hover,
.navigation-in > ul > li.active,
.navigation-in > ul > li.act,
.navigation-in ul li div > a:hover,
.pagination > li > a:hover,
.pagination > .active > a,
.pagination > .active > span,
.owl-theme .owl-controls .owl-buttons div,
.slick-prev,
.slick-next,
.btn-success,
.box-heading,
.next-to-carousel-banners .banner-wrapper .btn {
    background-color: #81B337 !important;
    border-color: #81B337 !important;
    color: #fff !important;
}

/* Zelené šipky (expandery) v mobilním menu */
.navigation-in .exp,
.navigation-in .submenu-visible,
.navigation-in ul li div.exp,
.navigation-in span.exp {
    background-color: #81B337 !important;
    color: #fff !important;
    border-radius: 3px;
    border: none !important;
}

.navigation-in .exp::after,
.navigation-in .exp::before {
    color: #fff !important;
}

/* --- 6. NAVIGACE A MENU (Styling) --- */
.navigation-in > ul > li {
    background: #704796; /* Fialová */
    border-left: 0;
    flex-grow: 1;
    text-align: center;
}

/* Odkazy v podmenu */
.navigation-in > ul > li.ext > ul > li > div > a,
.navigation-in > ul > li.ext > ul > li > div > a:hover {
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: #81B337;
}

.navigation-in > ul > li.ext > ul > li > div > a:hover {
    color: #81B337;
}

.navigation-in > ul > li.ext > ul > li > div > ul > li {
    font-size: 14px;
    color: #81B337;
}

.navigation-in > ul > li.ext > ul > li {
    align-items: flex-start;
}

/* Zrušení podtržení u hoveru v hlavním menu */
.navigation-in > ul > li.exp > a b,
.navigation-in > ul > li.exp > a:hover b,
.navigation-in > ul > li > a:hover,
.navigation-in > ul > li.exp > a:hover,
.navigation-in > ul > li > a:hover b {
    text-decoration: none;
}

/* --- 7. TYPOGRAFIE A KOMPONENTY --- */
.heading, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .blog-block h2 {
    color: #704796;
}

h2.heading b {
    color: #81B337;
    display: block;
}

/* Vyhledávání desktop */
.header-top .search input {
    border-radius: 3px;
    border: 1px solid #81B337;
    padding: 12px;
    padding-left: 35px;
    height: 45px;
    font-size: 15px;
}

/* --- 8. TLAČÍTKA --- */
.btn.btn-default, a.btn.btn-default {
    background-color: #704796;
}

/* Tlačítko košíku */
.btn.btn-cart {
    background-color: #f7ac00; /* Oranžová */
}

.btn.btn-cart:hover {
    background-color: #81B337; /* Zelená */
}

/* Sekundární tlačítka */
.btn.btn-secondary, a.btn.btn-secondary {
    color: #704796;
    background: #fff;
    border: 1px solid #704796;
}

.btn.btn-secondary:hover, a.btn.btn-secondary:hover {
    background: #704796;
    color: #fff;
}

/* Add to cart a další akční prvky */
.p-detail .p-info-wrapper .add-to-cart-button,
.btn, a.btn,
.navigation-buttons > a[data-target="cart"] i {
    background: #f7ac00;
}

.p-detail .p-info-wrapper .add-to-cart-button:hover,
.btn:hover, a.btn:hover {
    background: #81B337;
}

/* Newsletter blok */
.newsletter-block {
    background: #81B337;
}

.newsletter-block form button.btn-default {
    background-color: #704796;
}

/* --- 9. PRODUKTY A DETAIL --- */
.products-block.products .p .name {
    color: #000000;
}

.dkLabFavProductSpan.dkLabFavouriteProductLinkAdd {
    color: #f7ac00;
}

.products-block .p .price {
    color: #000000;
    font-size: 21px !important;
    font-weight: 900 !important;
}

/* Úprava layoutu detailu produktu */
.p-info-wrapper {
    display: flex;
    flex-direction: column;
}

.p-detail-inner-header { order: -99; }
.shortdescritption { order: -98; }
p[data-testid="productCardDescr"] { order: -97; }

.p-info-wrapper .chevron-down-after {
    visibility: visible;
    color: #81B337;
    float: left;
    margin-top: 0;
    font-size: 12px;
}

.shortdescritption p { margin-bottom: 8px; font-size: 14px; }
.shortdescritption > *:last-child:after { content: '...'; }

.p-detail .availability-value {
    padding: 10px 20px 0;
    margin-bottom: 0;
    background: #F3F3F3;
    width: 100%;
    max-width: unset;
}

.p-info-wrapper .add-to-cart {
    padding-top: 10px;
}

/* Info box "Přidáno do košíku" */
#add-to-cart-info {
    width: calc(100% + 40px);
    background: #81B337;
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px -20px -30px;
}

#add-to-cart-info h3 { margin: 0; font-weight: 600; color: #fff; }
#add-to-cart-info a { color: #704796; font-weight: 600; text-decoration: underline; }
#add-to-cart-info a:hover { text-decoration: none; }

/* --- 10. PATIČKA (FOOTER) --- */
#footer::before {
    background-color: #6c4385;
    background-image: url(https://www.obalygastro.cz/user/documents/upload/footer-bg-fiala-gem-p.jpg);
    /* Poznámka: Mobile cover fix je nahoře v sekci MEDIA QUERY */
}

/* Skrytí loga v patičce (čistší design) */
#footer .site-name,
#footer .footer-top .logo,
#footer img[src*="logo"] {
    display: none !important;
}

/* --- 11. OSTATNÍ ÚPRAVY A SKRYTÉ PRVKY --- */
.xxxfav-categories,
.custom-footer__banner9,
.welcome,
.menu-item-4050,
.menu-item-4044 {
    display: none !important;
}

.extended-description table tr th { min-width: 100px; }
.extended-description .detail-parameters {
    background: #fff;
    position: relative;
    z-index: 1;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.067);
}

.extended-description .detail-parameters tr:nth-child(even) {
    background: #F3F3F3;
}

.in-index .row.banners-row {
    display: flex;
}

.banners-row .col-sm-8,
.banners-row .col-sm-4 {
    float: none;
}

@media (min-width: 992px) and (max-width: 1024px) {
    .banners-row .col-sm-4 .next-to-carousel-banners .banner-wrapper a { max-height: unset; }
    .banners-row .col-sm-4 .next-to-carousel-banners .banner-wrapper { margin: 0; }
    .banners-row .col-sm-4 { width: 59%; }
    .banners-row .col-sm-8 { margin-top: 0; width: 41%; }
}

/* Oblíbené kategorie - boxy */
.fav-categories a {
    display: flex;
    min-height: 120px;
    padding: 17px 10px 17px 120px;
    background: unset;
    background-size: 80px;
    background-repeat: no-repeat;
    background-position: 10px;
    border: 1px solid #fff;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.05);
    flex-direction: revert;
    align-items: center;
}

.fav-categories a h3 {
    color: #000;
    width: 100%;
    max-width: unset;
}

@media (max-width: 600px) {
    .fav-categories a {
        width: 100%;
        padding: 17px 30px 17px 80px;
        min-height: 80px;
        background-size: 60px !important;
    }
}

pre { white-space: unset; }

@media (min-width: 768px) {
    .narrow .banners-row .col-sm-8 { padding-left: 0px; }
}

@media (min-width: 1200px) {
    .narrow .banners-row .col-sm-8 { width: 72.5%; }
}

body.template-11 .dkLabFavHeaderIconBtn {
    top: 50%;
    transform: translateY(-50%);
}