/* Globální nastavení fontu pro celý plugin ts-commerce-sk */
.cart-icon-container,
#cart-modal,
#cart-modal *,
.cart-icon *,
.woocommerce-mini-cart *,
.ts-commerce-cart * {
    font-family: "Inter", Sans-serif !important;
}

/* Schovat cart-modal-info (doprava zdarma) */
.cart-modal-info {
    display: none !important;
}

.cart-icon-container {
    position: relative;
    display: inline-block;
}

.cart-icon {
    background-color: #fff;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex!important;
    justify-content: center;
    align-items: center;
    position: relative;
    display: inline-block;
    z-index: 999999;
    cursor: pointer;
    margin-bottom: 6px;
}

.cart-icon img {
    width: 28px;
    height: 28px;
    margin-top: 2px;
}

.cart-icon .cart-count {
    position: absolute;
    top: 80%;
    right: -5px;
    background-color: #F35FD3;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 9px;
    justify-content: center;
    display: flex;
    align-items: center;
    font-weight: bold;
    z-index: 2;
    transform: translateY(-50%);
}

@keyframes cartIconBounce {
    0% {
        transform: scale(1);
    }
    20% {
        transform: scale(1.2);
    }
    40% {
        transform: scale(0.9);
    }
    60% {
        transform: scale(1.1);
    }
    80% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

.cart-icon-animate {
    animation: cartIconBounce 1s ease;
    transform-origin: center center;
}

.hidden {
    display: none;
}

/* Styl pro modal košíku */
#cart-modal {
    position: absolute;
    top: 100%;
    right: 0;
    width: 400px;
    background-color: white;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.5);
    text-align: center;
    z-index: 999999;
    margin-top: 10px;
    border-radius: 10px;
    overflow: hidden;
    transform: scale(0);
    transform-origin: top right;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
}

#cart-modal.active {
    transform: scale(1);
    opacity: 1;
}

.cart-modal-info p {
    font-size: 14px;
    font-weight: 600;
}

/* Styl overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999998;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    backdrop-filter: blur(3px);
}

.cart-overlay.active {
    opacity: 1;
}

.cart-free-shipping {
    display: flex;
    justify-content: center;
    align-items: center;
}

.cart-free-shipping img {
    width: 25px;
    margin-right: 6px;
}

.cart-modal-info {
    display: block!important;
    z-index: 10;
    position: relative;
    width: 100%;
    padding: 16px;
    border-radius: 0;
    box-shadow: 0px 5px 5px rgba(33, 33, 36, 0.1); 
}

/* Kontejner produktů */
.cart-modal-products {
    max-height: 400px;
    overflow-y: auto;
    position: relative;
}

/* Animace pro nově přidané produkty */
.cart-modal-product {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cart-modal-product.new-item {
    animation: slideInProduct 0.3s ease-out;
}

@keyframes slideInProduct {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cart-modal-products::-webkit-scrollbar {
    width: 6px;
}

.cart-modal-products::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.cart-modal-products::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.cart-modal-products::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.cart-modal-product {
    display: flex;
    justify-content: center;
    padding: 16px 36px;
    gap: 24px;
    align-items: center;
    border-bottom: 1px solid rgba(33, 33, 36, 0.05);
}

.cart-product-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 16px;
}


.cart-product-img {
    width: 100px;
    height: 100px;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
}

.cart-product-price {
    font-size: 12px!important;
    font-weight: 400!important;
    margin: 0;
}

.cart-product-name {
    font-size: 12px!important;
    margin: 0;
}

.cart-modal-price {
    background-color: #F0F0F0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 24px;
    justify-content: center;
    align-items: center;
}

.cart-price-noTax,
.cart-price-tax {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-price-noTaxTxt,
.cart-price-noTaxPrice {
    color: #AAAAAA;
    font-size: 12px!important;
    font-weight: 300!important;
}

.cart-price-TaxTxt,
.cart-price-TaxPrice {
    color: #030301;
    font-size: 16px;
}

.cart-modal-button {
    background-color: #F0F0F0;
    padding: 8px 16px 16px 16px;
}

.cart-modal-btn {
    margin: 0;
    background-color: #F35FD3;
    font-size: 16px;
    font-weight: 700;
    width: 100%;
    padding: 0;
    box-shadow: 0 2px 4px -2px rgba(243, 95, 211, 0.8);
    color: #FFF;
    border-radius: 3px;
    height: 40px;
    text-transform: capitalize;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.cart-modal-btn:hover {
    background-color: #E056C5;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -2px rgba(243, 95, 211, 0.8);
}

@media (max-width: 768px) {
    #cart-modal {
        position: fixed;
        top: 50px;
        width: 100%;
        margin-top: 0;
        border-radius: 10px;
        transform-origin: top right;
    }

    .cart-modal-info,
    .cart-modal-product {
        padding: 8px;
        text-align: center;
    }

    .cart-modal-price,
    .cart-modal-button {
        padding: 16px;
        text-align: center;
    }

    .cart-product-img {
        width: 100px;
        height: 100px;
    }

    .cart-modal-products {
        max-height: 50vh;
        overflow-y: auto;
    }
}
