/* ============================================================
   noze-listing.css — moderní karty produktů
   ============================================================
   Aplikuje se na listing pages (kategorie, skupiny, subskupiny,
   vyhledávání, akce, novinky, oblíbené)
   Scope: #content .top_left (chrání sidebar widgets)
   ============================================================ */

/* ============================================================
   FLEX GRID WRAPPER — JS přidá kartám wrapper s touto class
   Karty se rozdělí na 2 sloupce desktop, 1 sloupec mobile
   ============================================================ */
#content .noze-cards-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    margin: 0 0 20px 0 !important;
    align-items: stretch !important;
    clear: both;
}

/* ============================================================
   KARTA jako celek — wrapper .top_left
   ============================================================ */
#content .top_left {
    box-sizing: border-box !important;
    background: white !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease !important;
    overflow: hidden !important;
    position: relative !important;
    padding: 0 !important;
    /* Flex item - 2 sloupce s 16px gap */
    width: calc(50% - 8px) !important;
    margin: 0 !important;
    float: none !important;
    text-align: left !important;
    display: flex !important;
    flex-direction: column !important;
}

#content .top_left:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.10) !important;
    transform: translateY(-2px);
}

#content .top_left form {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ============================================================
   HORNÍ ČÁST KARTY — .top_content
   ============================================================ */
#content .top_left .top_content {
    width: auto !important;
    height: auto !important;
    min-height: auto !important;
    padding: 14px 16px !important;
    background: none !important;
    border: none !important;
    float: none !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    overflow: visible !important;
}

/* Název produktu */
#content .top_left .top_content_title {
    height: auto !important;
    min-height: 38px !important;
    padding: 0 0 8px 0 !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    text-align: center !important;
}

#content .top_left .top_content_title a {
    color: #1e3a5f !important;
    text-decoration: none !important;
}

#content .top_left .top_content_title a:hover {
    color: #0069b4 !important;
}

/* Fotka */
#content .top_left .img_thumb {
    height: 180px !important;
    margin: 8px 0 12px 0 !important;
    text-align: center;
    overflow: hidden;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border-radius: 4px;
    position: relative !important;
}

#content .top_left .img_thumb img {
    max-width: 100% !important;
    max-height: 100% !important;
    height: auto !important;
    width: auto !important;
    object-fit: contain;
}

/* Description - centrované */
#content .top_left .description2 {
    height: auto !important;
    min-height: 50px !important;
    line-height: 1.4 !important;
    font-size: 12px !important;
    color: #555 !important;
    text-align: center !important;
    margin: 0 0 10px 0 !important;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Skladem badge */
#content .top_left .tc_store {
    height: auto !important;
    line-height: 1.4 !important;
    margin: 0 0 6px 0;
    text-align: center;
}

#content .top_left .skladem2 {
    display: inline-block;
    padding: 4px 10px !important;
    font-size: 12px !important;
    font-weight: 600;
    border-radius: 12px !important;
}

/* Delivery info — lepší kontrast a font */
#content .top_left .tc_delivery {
    height: auto !important;
    line-height: 1.4 !important;
    color: #333 !important;
    font-size: 13px !important;
    text-align: center;
    margin: 0 0 8px 0;
}

#content .top_left .tc_delivery a {
    color: #0069b4 !important;
    text-decoration: underline;
}

/* "(více info)" link spouští HighSlide modal - schovat */
#content .top_left .tc_delivery a[onclick*="hs.htmlExpand"],
#content .top_left .tc_delivery a[href*="delivery.php"] {
    display: none !important;
}

/* Hidden form data */
#content .top_left .description {
    display: none !important;
}

/* ============================================================
   SPODNÍ ČÁST KARTY — .top_bottom
   ============================================================ */
#content .top_left .top_bottom {
    width: auto !important;
    height: auto !important;
    line-height: 1.4 !important;
    padding: 12px 16px !important;
    background: #f5f7fa !important;
    border: none !important;
    border-top: 1px solid #e0e0e0 !important;
    float: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
    font-weight: normal !important;
    margin-top: auto;
}

#content .top_left .top_bottom > div {
    display: contents !important;
}

#content .top_left .top_bottom .clear {
    display: none !important;
}

/* CENA */
#content .top_left .top_bottom span.right {
    float: none !important;
    font-size: 0 !important;
    display: inline-block;
    order: 1 !important;
    line-height: 1.2 !important;
}

#content .top_left .top_bottom span.brown {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #1e3a5f !important;
    line-height: 1.2 !important;
    white-space: nowrap;
}

/* TLAČÍTKO "Do košíku" */
#content .top_left .dokosiku {
    appearance: none !important;
    -webkit-appearance: none !important;
    background: #2e9637 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E") no-repeat 10px center !important;
    border: none !important;
    border-radius: 6px !important;
    color: white !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    padding: 8px 14px 8px 32px !important;
    height: auto !important;
    width: auto !important;
    float: none !important;
    display: inline-block !important;
    text-align: center !important;
    line-height: 1.2 !important;
    transition: background-color 0.15s ease !important;
    order: 2 !important;
}

#content .top_left .dokosiku:hover {
    background-color: #267a2c !important;
}

#content .top_left .dokosiku:active {
    background-color: #1f6224 !important;
}

/* ============================================================
   AKCE BADGES — přesunuto JS-em do .img_thumb
   ============================================================ */
#content .top_left .img_thumb .akce,
#content .top_left .img_thumb .akce_darek,
#content .top_left .img_thumb .akce_doprava,
#content .top_left .akce,
#content .top_left .akce_darek,
#content .top_left .akce_doprava {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    z-index: 5;
}

/* ============================================================
   MOBILE — 1 sloupec
   ============================================================ */
@media only screen and (max-width: 768px) {
    #content .noze-cards-grid {
        gap: 12px !important;
    }

    #content .top_left {
        width: 100% !important;
    }

    #content .top_left:hover {
        transform: none;
    }

    #content .top_left .img_thumb {
        height: 200px !important;
    }

    #content .top_left .top_content_title {
        font-size: 16px !important;
        min-height: auto !important;
    }

    #content .top_left .top_bottom span.brown {
        font-size: 22px !important;
    }
}

/* ============================================================
   PAGING FOOTER — clearfix
   ============================================================ */
#paging_footer {
    clear: both !important;
    padding: 20px 0 !important;
}
