/* Zajistit jednotný font na hlavní stránce */
body.home,
body.front-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

frontpage-container {
    border-radius: 20px !important;
    background-color: white;
    padding: 20px 50px;
    box-shadow: 0px 0px 5px rgb(0 0 0 / 20%);
    margin: 30px 0px;
}

.box-shadow {
    box-shadow: 0px 0px 5px rgb(0 0 0 / 20%);
}

.n2-ss-slider {
    border-radius: 20px;
    overflow: hidden;
	margin: 0 1rem;
}

/* ==========================================================================
   Produkty na hlavní stránce - stejný styl jako v kategoriích
   ========================================================================== */

/* Obecný reset mezer pro ul, ol */
body.home ul, 
body.home ol,
body.front-page ul,
body.front-page ol {
    margin: 0;
}

/* WooCommerce produkty - 5 sloupců na desktop */
body.home .woocommerce ul.products,
body.front-page .woocommerce ul.products,
body.home .wc-block-grid__products,
body.front-page .wc-block-grid__products {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr);

    list-style: none;
    padding: 0;
    margin: 0 0 2em 0;
    clear: both;
}

body.home .woocommerce ul.products li.product,
body.front-page .woocommerce ul.products li.product,
body.home .wc-block-grid__product,
body.front-page .wc-block-grid__product,
body.home ul.products li.product,
body.front-page ul.products li.product {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    justify-content: space-between !important;
    margin: 0.4rem !important;
    padding: 0px !important;
    background: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    max-width: 200px;
}

body.home .woocommerce ul.products li.product:hover,
body.front-page .woocommerce ul.products li.product:hover,
body.home .wc-block-grid__product:hover,
body.front-page .wc-block-grid__product:hover,
body.home ul.products li.product:hover,
body.front-page ul.products li.product:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
}

/* Obrázek produktu */
body.home .woocommerce ul.products li.product a img,
body.front-page .woocommerce ul.products li.product a img,
body.home .wc-block-grid__products .wc-block-grid__product-image img,
body.front-page .wc-block-grid__products .wc-block-grid__product-image img,
body.home .wc-block-components-product-image img,
body.front-page .wc-block-components-product-image img,
body.home ul.products li.product img,
body.front-page ul.products li.product img {
    border-radius: 8px;
    box-shadow: 0px -2px 5px rgba(0, 0, 0, 0.2);
    width: 100%;
    height: 220px;
    max-width: 100%;
    object-fit: cover;
    transition: none !important;
    transform: none !important;
}

/* Zakázat zvětšení obrázku při hoveru */
body.home .woocommerce ul.products li.product:hover a img,
body.front-page .woocommerce ul.products li.product:hover a img,
body.home .woocommerce ul.products li.product a:hover img,
body.front-page .woocommerce ul.products li.product a:hover img {
    transform: none !important;
    scale: 1 !important;
}

/* Odkaz na produkt */
body.home .woocommerce ul.products li.product a,
body.front-page .woocommerce ul.products li.product a {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    width: 100%;
}

/* Nadpis produktu */
body.home .woocommerce ul.products li.product .woocommerce-loop-product__title,
body.front-page .woocommerce ul.products li.product .woocommerce-loop-product__title,
body.home .wc-block-grid__product-title,
body.front-page .wc-block-grid__product-title,
body.home .wc-block-components-product-title,
body.front-page .wc-block-components-product-title,
body.home .woocommerce-loop-product__title,
body.front-page .woocommerce-loop-product__title,
body.home .wp-block-post-title a,
body.front-page .wp-block-post-title a,
.wp-block-post-title :where(a) {
    padding: 0 0.5em !important;
    font-size: 1.2rem !important;
    color: #e95D2c !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

/* Cena produktu */
body.home .woocommerce ul.products li.product .price,
body.front-page .woocommerce ul.products li.product .price,
body.home .wc-block-components-product-price,
body.front-page .wc-block-components-product-price {
    font-size: 1rem !important;
    font-weight: bold !important;
    color: #333 !important;
    margin: 0 !important;
    padding: 0 0.5em !important;
}

/* Wrapper pro tlačítko a rating - zarovnání na frontpage */
body.home .woocommerce ul.products li.product > :last-child,
body.front-page .woocommerce ul.products li.product > :last-child {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    padding: 0 0.5em 0.5em 0.5em !important;
    overflow: visible !important;
    gap: 0.5em !important;
    position: relative !important;
}

/* Rating v levém dolním rohu na frontpage - jedna hvězdička s číslem */
body.home .woocommerce ul.products li.product .woocommerce-product-rating.mark3d-single-star-rating,
body.front-page .woocommerce ul.products li.product .woocommerce-product-rating.mark3d-single-star-rating {
    position: absolute !important;
    left: 0.5em !important;
    bottom: 0.5em !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: flex-start;
    margin: 0 !important;
    padding: 0 !important;
    gap: 4px !important;
}

body.home .woocommerce ul.products li.product .mark3d-star-icon,
body.front-page .woocommerce ul.products li.product .mark3d-star-icon,
body.home li[data-wp-interactive="woocommerce/product-collection"] .mark3d-star-icon,
body.front-page li[data-wp-interactive="woocommerce/product-collection"] .mark3d-star-icon,
body.home .mark3d-rating-button-wrapper .mark3d-star-icon,
body.front-page .mark3d-rating-button-wrapper .mark3d-star-icon {
    display: inline-block;
    font-size: 1.5rem;
    color: #e95D2c;
    line-height: 1;
    margin: 0;
}

body.home .woocommerce ul.products li.product .mark3d-rating-number,
body.front-page .woocommerce ul.products li.product .mark3d-rating-number,
body.home li[data-wp-interactive="woocommerce/product-collection"] .mark3d-rating-number,
body.front-page li[data-wp-interactive="woocommerce/product-collection"] .mark3d-rating-number,
body.home .mark3d-rating-button-wrapper .mark3d-rating-number,
body.front-page .mark3d-rating-button-wrapper .mark3d-rating-number {
    display: inline-block;
    font-size: 0.9rem;
    color: #333;
    font-weight: 600;
    line-height: 1;
    margin: 0;
}

body.home .woocommerce ul.products li.product .star-rating,
body.front-page .woocommerce ul.products li.product .star-rating {
    display: none !important;
}

/* Skrýt text a odkazy v ratingu na frontpage - pouze hvězdy */
body.home .woocommerce ul.products li.product .woocommerce-product-rating .woocommerce-review-link,
body.front-page .woocommerce ul.products li.product .woocommerce-product-rating .woocommerce-review-link,
body.home .woocommerce ul.products li.product .woocommerce-product-rating a,
body.front-page .woocommerce ul.products li.product .woocommerce-product-rating a {
    display: none !important;
}

/* Tlačítko v pravém dolním rohu na frontpage */
body.home .woocommerce ul.products li.product .button,
body.front-page .woocommerce ul.products li.product .button {
    order: 2 !important;
    flex: 0 0 auto !important;
}

/* Tlačítko produktu */
body.home .woocommerce ul.products li.product .button,
body.front-page .woocommerce ul.products li.product .button,
body.home .wp-block-button__link,
body.front-page .wp-block-button__link,
body.home .wc-block-components-product-button a,
body.front-page .wc-block-components-product-button a,
body.home .add_to_cart_button,
body.front-page .add_to_cart_button,
body.home .wp-element-button,
body.front-page .wp-element-button,
body.home li.product .wp-element-button,
body.front-page li.product .wp-element-button {
    background-color: #e95D2c !important;
    border-radius: 10px 0px 8px 0px !important;
    color: #fff !important;
    font-weight: bold !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
    padding: 8px 8px !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border: none !important;
    transition: all 0.3s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 90px !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
    align-self: flex-end !important;
    box-sizing: border-box !important;
}

body.home .woocommerce ul.products li.product .button:hover,
body.front-page .woocommerce ul.products li.product .button:hover,
body.home .wp-block-button__link:hover,
body.front-page .wp-block-button__link:hover,
body.home .wc-block-components-product-button a:hover,
body.front-page .wc-block-components-product-button a:hover,
body.home .add_to_cart_button:hover,
body.front-page .add_to_cart_button:hover,
body.home .wp-element-button:hover,
body.front-page .wp-element-button:hover,
body.home li.product .wp-element-button:hover,
body.front-page li.product .wp-element-button:hover {
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5) !important;
    background-color: #d04a1f !important;
    transform: translateY(-2px) !important;
}

/* WooCommerce Blocks tlačítko "KOŠÍK" na frontpage */
body.home [data-block-name="woocommerce/product-button"].view-cart-button,
body.front-page [data-block-name="woocommerce/product-button"].view-cart-button,
body.home a[data-block-name="woocommerce/product-button"].view-cart-button,
body.front-page a[data-block-name="woocommerce/product-button"].view-cart-button {
    background-color: #e95D2c !important;
    border-radius: 10px 0px 8px 0px !important;
    color: #fff !important;
    padding: 8px 8px !important;
    font-weight: bold !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    width: 200px;
    text-align: center !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
    align-self: flex-end !important;
    box-sizing: border-box !important;
    margin: 5px 0px 0px 0px !important;
}

body.home [data-block-name="woocommerce/product-button"].view-cart-button:hover,
body.front-page [data-block-name="woocommerce/product-button"].view-cart-button:hover,
body.home a[data-block-name="woocommerce/product-button"].view-cart-button:hover,
body.front-page a[data-block-name="woocommerce/product-button"].view-cart-button:hover {
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5) !important;
    background-color: #d04a1f !important;
    transform: translateY(-2px) !important;
}

/* Responzivní šířky tlačítek - frontpage */
@media screen and (min-width: 400px) {
    body.home .woocommerce ul.products li.product .button,
    body.front-page .woocommerce ul.products li.product .button,
    body.home .wp-block-button__link,
    body.front-page .wp-block-button__link,
    body.home .wc-block-components-product-button a,
    body.front-page .wc-block-components-product-button a,
    body.home .add_to_cart_button,
    body.front-page .add_to_cart_button,
    body.home .wp-element-button,
    body.front-page .wp-element-button,
    body.home li.product .wp-element-button,
    body.front-page li.product .wp-element-button {
        width: 100px !important;
        margin: 5px 0px 0px 0px !important;
    }
}

@media screen and (min-width: 1024px) {
    body.home .woocommerce ul.products li.product .button,
    body.front-page .woocommerce ul.products li.product .button,
    body.home .wp-block-button__link,
    body.front-page .wp-block-button__link,
    body.home .wc-block-components-product-button a,
    body.front-page .wc-block-components-product-button a,
    body.home .add_to_cart_button,
    body.front-page .add_to_cart_button,
    body.home .wp-element-button,
    body.front-page .wp-element-button,
    body.home li.product .wp-element-button,
    body.front-page li.product .wp-element-button {
        width: 140px !important;
        margin: 5px 0px 0px 0px !important;
    }
}

/* Responzivní layout */
@media screen and (max-width: 1400px) {
    body.home .woocommerce ul.products,
    body.front-page .woocommerce ul.products,
    body.home .wc-block-grid__products,
    body.front-page .wc-block-grid__products {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (max-width: 1024px) {
    body.home .woocommerce ul.products,
    body.front-page .woocommerce ul.products,
    body.home .wc-block-grid__products,
    body.front-page .wc-block-grid__products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    body.home .woocommerce ul.products,
    body.front-page .woocommerce ul.products,
    body.home .wc-block-grid__products,
    body.front-page .wc-block-grid__products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 480px) {
    body.home .woocommerce ul.products,
    body.front-page .woocommerce ul.products,
    body.home .wc-block-grid__products,
    body.front-page .wc-block-grid__products {
        grid-template-columns: 1fr;
    }

    body.home .woocommerce ul.products li.product,
    body.front-page .woocommerce ul.products li.product,
    body.home .wc-block-grid__product,
    body.front-page .wc-block-grid__product {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Silný override pro stín - poslední šance */
body.home li.product,
body.front-page li.product,
.home .product,
.front-page .product {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

body.home li.product:hover,
body.front-page li.product:hover,
.home .product:hover,
.front-page .product:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* WooCommerce Blocks Product Template - specifický selektor */
.wc-block-product-template__responsive {
    grid-gap: 1.25em;
    gap: 1.25em;
    display: grid;
    justify-items: center;
}

/* Přepsat flex-container gap z WooCommerce inline CSS */
.wc-block-product-template.is-flex-container {
    gap: 0 !important;
}

/* Přepsat margin-bottom z WooCommerce inline CSS */
:where(.wc-block-product-template .wc-block-product)>:not(:last-child) {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

.wc-block-product-template__responsive > li,
body.home .wc-block-product-template__responsive > li,
body.front-page .wc-block-product-template__responsive > li {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: #fff;
    padding: 0px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0.4rem !important;
    width: 100%;
    max-width: 200px;
    justify-content: space-between;
}

.wc-block-product-template__responsive > li:hover,
body.home .wc-block-product-template__responsive > li:hover,
body.front-page .wc-block-product-template__responsive > li:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Obrázek produktu v WooCommerce Blocks Product Template - stejné jako v kategoriích */
.wc-block-product-template__responsive .wc-block-components-product-image img {
    border-radius: 8px;
    box-shadow: 0px -2px 5px rgba(0, 0, 0, 0.2);
    height: 220px;
    width: 100%;
    max-width: 100%;
    object-fit: cover;
    transition: none !important;
    transform: none !important;
}



