.kfcda-cart-toggle {
    position: fixed;
    right: 44px;
    bottom: 120px;
    z-index: 9998;
    border: 0;
    border-radius: 999px;
    background: #d60000;
    color: #fff;
    padding: 14px 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    cursor: pointer;
    min-width: 140px;
}

.kfcda-cart-button-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.kfcda-cart-icon {
    font-size: 18px;
    line-height: 1;
}

.kfcda-cart-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.kfcda-cart-count {
    font-size: 14px;
}

.kfcda-cart-total {
    font-size: 13px;
    opacity: .95;
}

.kfcda-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9996;
    opacity: 0;
    visibility: hidden;
    transition: all .25s ease;
}

.kfcda-floating-cart {
	left: 0;
right: auto;
transform: translateX(-100%);
box-shadow: 10px 0 30px rgba(0,0,0,.25);
    position: fixed;
    top: 0;
       width: 380px;
    max-width: 95%;
    height: 100vh;
    background: #111;
    color: #fff;
    z-index: 9997;
     transition: transform .25s ease;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

body.kfcda-cart-open .kfcda-floating-cart {
    transform: translateX(0);
}

body.kfcda-cart-open .kfcda-cart-overlay {
    opacity: 1;
    visibility: visible;
}

.kfcda-floating-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.kfcda-floating-cart-header h3 {
    margin: 0;
    font-size: 20px;
    color: #fff;
}

.kfcda-cart-close {
    position: absolute;
    top: 50%;
    right: -22px;
	left: auto;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #d60000;
    font-size: 28px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    box-shadow: 0 6px 20px rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.kfcda-floating-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 20px 10px;
}

.kfcda-floating-cart-footer {
    padding: 16px 20px 40px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.kfcda-floating-cart-footer .checkout {
    width: 100%;
    text-align: center;
    background: #d60000;
    color: #fff;
    border-radius: 8px;
    padding: 14px 16px;
    font-weight: 700;
}

.kfcda-floating-cart .woocommerce-mini-cart__empty-message,
.kfcda-floating-cart .woocommerce-mini-cart-item,
.kfcda-floating-cart .woocommerce-mini-cart__total,
.kfcda-floating-cart .woocommerce-mini-cart__buttons,
.kfcda-floating-cart .woocommerce-mini-cart-item a,
.kfcda-floating-cart .woocommerce-mini-cart__total strong,
.kfcda-floating-cart .woocommerce-mini-cart__total span,
.kfcda-floating-cart .quantity {
    color: #fff;
}

.kfcda-floating-cart .woocommerce-mini-cart li.woocommerce-mini-cart-item {
    padding: 0 0 16px !important;
    margin: 0 0 16px !important;
    border-bottom: 1px solid rgba(255,255,255,.10);
}

.kfcda-floating-cart .woocommerce-mini-cart li.woocommerce-mini-cart-item:last-child {
    margin-bottom: 0 !important;
}

.kfcda-floating-cart .remove_from_cart_button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-right: 10px;
    border-radius: 50%;
    background: #d60000;
    color: #fff !important;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    opacity: 1 !important;
}

@media (max-width: 767px) {
    .kfcda-cart-toggle {
        right: 15px;
        bottom: 120px;
    }

    .kfcda-floating-cart {
        width: 80vw;
        max-width: 80vw;
    }

    .kfcda-cart-close {
        right: -18px;
		left: auto;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .kfcda-floating-cart-footer {
        padding-bottom: 40px;
    }
}
/* Botones internos del mini carrito */
.kfcda-floating-cart .woocommerce-mini-cart__buttons {
    display: flex !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    margin-top: 18px !important;
}

.kfcda-floating-cart .woocommerce-mini-cart__buttons a,
.kfcda-floating-cart .woocommerce-mini-cart__buttons .button,
.kfcda-floating-cart .woocommerce-mini-cart__buttons a.button,
.kfcda-floating-cart .woocommerce-mini-cart__buttons .wc-forward {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 18px !important;
    min-height: 46px !important;
    border-radius: 10px !important;
    background: #d60000 !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border: 0 !important;
    box-shadow: none !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    width: auto !important;
}

.kfcda-floating-cart .woocommerce-mini-cart__buttons a:hover,
.kfcda-floating-cart .woocommerce-mini-cart__buttons .button:hover,
.kfcda-floating-cart .woocommerce-mini-cart__buttons a.button:hover,
.kfcda-floating-cart .woocommerce-mini-cart__buttons .wc-forward:hover {
    background: #b80000 !important;
    color: #ffffff !important;
}

@media (max-width: 767px) {
    .kfcda-floating-cart .woocommerce-mini-cart__buttons {
        flex-direction: column !important;
    }

    .kfcda-floating-cart .woocommerce-mini-cart__buttons a,
    .kfcda-floating-cart .woocommerce-mini-cart__buttons .button,
    .kfcda-floating-cart .woocommerce-mini-cart__buttons a.button,
    .kfcda-floating-cart .woocommerce-mini-cart__buttons .wc-forward {
        width: 100% !important;
    }
}

.kfcda-floating-cart-body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.kfcda-floating-cart-body::-webkit-scrollbar {
    display: none;
}

/* Forzar que imagen, título y cantidad se apilen en vertical */
.kfcda-floating-cart .woocommerce-mini-cart li.woocommerce-mini-cart-item a:not(.remove_from_cart_button) {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
    text-decoration: none !important;
    line-height: 1.3 !important;
}

.kfcda-floating-cart .woocommerce-mini-cart li.woocommerce-mini-cart-item a:not(.remove_from_cart_button) img {
    float: none !important;
    display: block !important;
    margin: 0 0 8px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
}

.kfcda-floating-cart .woocommerce-mini-cart li.woocommerce-mini-cart-item .quantity {
    display: block !important;
    margin-top: 8px !important;
    clear: both !important;
}
/* Item del mini carrito con mejor distribución */
.kfcda-floating-cart .woocommerce-mini-cart li.woocommerce-mini-cart-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
}

/* Enlace del producto: imagen arriba, título debajo */
.kfcda-floating-cart .woocommerce-mini-cart li.woocommerce-mini-cart-item a:not(.remove_from_cart_button) {
    display: block !important;
    width: 100% !important;
    text-decoration: none !important;
    line-height: 1.35 !important;
}

/* Imagen del producto */
.kfcda-floating-cart .woocommerce-mini-cart li.woocommerce-mini-cart-item a:not(.remove_from_cart_button) img {
    float: none !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 0 12px 0 !important;
}

/* Título más ancho y más visible */
.kfcda-floating-cart .woocommerce-mini-cart li.woocommerce-mini-cart-item a:not(.remove_from_cart_button) {
    font-size: 18px !important;
    font-weight: 700 !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow: visible !important;
}

/* Cantidad/precio debajo del título */
.kfcda-floating-cart .woocommerce-mini-cart li.woocommerce-mini-cart-item .quantity {
    display: block !important;
    width: 100% !important;
    margin-top: 10px !important;
    font-size: 15px !important;
}

/* Controles de cantidad en carrito flotante */
.kfcda-floating-cart .kfcda-qty-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
}

.kfcda-floating-cart .kfcda-qty-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.kfcda-floating-cart .kfcda-qty-btn {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: #d60000;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.kfcda-floating-cart .kfcda-qty-input {
    width: 64px;
    height: 34px;
    text-align: center;
    border: 1px solid rgba(255,255,255,.2);
    background: #1b1b1b;
    color: #fff;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    padding: 0 6px;
}

.kfcda-floating-cart .kfcda-qty-prices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.kfcda-floating-cart .kfcda-price-unit,
.kfcda-floating-cart .kfcda-price-subtotal {
    display: inline-block;
    background: #d60000;
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
}

.kfcda-floating-cart .woocommerce-mini-cart li.woocommerce-mini-cart-item .quantity {
    display: block !important;
    width: 100% !important;
    margin-top: 10px !important;
}
