/* Special style for block cart*/
#cart_block {
    z-index: 9999999;
    display: none;
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    height: 100dvh;
    width: 90%;
    max-width: 440px;
    border: none;
    background: #fff;
    box-shadow: -24px 0 60px -30px rgba(29, 30, 32, .4);
    transform: translateX(100%);
    transition: transform .3s ease;
    display: none;
    flex-direction: column;
}
#cart_block.cart_block_open {
    transform: translateX(0);
}
#cart_block.cart_block_visible {
    display: flex;
}
#cart_block_header {
    flex-shrink: 0;
}
#cart_block .block_content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
#cart-bottom {
    flex-shrink: 0;
    order: 2;
}
#cart_block_list {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    min-height: 0;
    order: 1;
    padding: 0 24px;
}
/* Evita que la pagina de fondo haga scroll mientras el carrito esta abierto
   (ajaxCart.expand()/collapse() en ajax-cart.js añaden/quitan esta clase). */
html.cart_block_body_locked {
    overflow: hidden;
}
#cart_block_list dl.products {
    flex: 0 0 auto;
}
#cart_block_list .cart_block_extra_item {
    display: none;
}
#cart_block_load_more_wrapper {
    text-align: center;
    padding: 14px 0 18px;
}
#cart_block_load_more {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 18px;
    border-radius: 9999px;
    border: 1px solid #e4eaf1;
    background: #fff;
    color: #1d1e20;
    font-weight: 600;
    font-size: 14px;
}
#cart_block_load_more:hover {
    border-color: rgb(30, 157, 224);
    color: rgb(28, 146, 219);
}
#cart_block_overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(29, 30, 32, .42);
    z-index: 9999998;
}

/* Header */
#cart_block_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    background: #f5f9fe;
    border-bottom: none;
    box-shadow: none;
}
#cart_block_header_title,
.cart_block_header_title {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
#cart_block_header .cart_block_title {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: #1d1e20;
}
.cart_block_header_count {
    font-size: 14px;
    color: #6b7280;
}
/* modules/blockuserinfo_tic/blockuserinfo_tic.css:148 styles .ajax_cart_quantity, unscoped, as an
   absolutely-positioned amber badge (for the nav cart icon) — reset all of that here so the same
   class reads as plain inline text next to "Tu carrito" instead of escaping to the corner. */
#cart_block_header .ajax_cart_quantity {
    position: static;
    top: auto;
    right: auto;
    display: inline;
    min-width: 0;
    height: auto;
    padding: 0;
    background: none;
    border-radius: 0;
    font-weight: 400;
    font-size: 14px;
    color: #6b7280;
}
#cart_block_header .ajax_cart_product_txt,
#cart_block_header .ajax_cart_product_txt_s {
    display: inline;
}
#cart_block_header .ajax_cart_product_txt_s,
#cart_block_header .ajax_cart_product_txt {
    margin-left: 4px;
}
#cart_block_close {
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    border: none;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d1e20;
    box-shadow: none;
}
#cart_block_close i {
    line-height: 1;
    font-size: 15px;
}
#cart_block_close:hover {
    background: #e9f2fb;
    color: rgb(28, 146, 219);
}

.ajax_cart_quantity, .ajax_cart_total{display: none}
#cart_block .with_tax{
    font-size: 12px;
    font-weight: normal;
}
.cart_loading{margin-top: 10px;background:url(img/icon/cart_loading.gif) no-repeat 0 0 !important;width:31px;height: 31px;display: block;}

#cart_block #cart_block_summary {display:none}

/* Empty cart state */
#cart_block_no_products {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 60px 0;
    text-align: center;
}
#cart_block_no_products.hidden {
    display: none;
}
.cart_block_no_products_icon {
    width: 56px;
    height: 56px;
    border-radius: 9999px;
    background: #e9f2fb;
    color: rgb(28, 146, 219);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}
.cart_block_no_products_text {
    font-weight: 600;
    font-size: 17px;
    color: #1d1e20;
}

/* Product lines */
#cart_block #cart_block_list dl {
    margin-bottom: 0;
}
#cart_block #cart_block_list dt {
    position: relative;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 10px;
    padding: 16px 34px 16px 0;
    border-bottom: 1px solid #eef2f7;
    font-weight: normal;
    overflow: visible;
}
#cart_block #cart_block_list dt:last-child {
    border-bottom: none;
}
#cart_block .cart_item_media {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 72px;
    height: 72px;
    border-radius: 12px;
    border: 1px solid #eef2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
#cart_block .cart_item_media .cart_product_photo {
    max-width: 100%;
    max-height: 100%;
    float: none;
    margin: 0;
}
#cart_block .cart_block_product_name{
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    width: auto;
    float: none;
    margin-right: 0;
    color: #1d1e20;
    text-decoration: none;
}
#cart_block .cart_item_brand {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #6b7280;
}
#cart_block .cart_item_title {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.3;
    color: #1d1e20;
}
#cart_block .cart_item_footer {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
/* El aspecto del stepper (pill, botones redondos, iconos) vive ahora en
   themes/dentalcost/css/global.css como .cart_qty_stepper/.btn-round-down/
   .btn-round-up — compartido con la ficha de producto y el resumen de
   carrito (blockcart.tpl ya añade la clase cart_qty_stepper). Aqui solo
   queda la cifra de cantidad, que en el mini-carrito es texto de solo
   lectura (span), no un input editable como en los otros dos. */
#cart_block .cart_item_stepper .quantity-formated {
    position: static;
    background: none;
    display: inline-block;
    flex-shrink: 0;
    min-width: 28px;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    color: #1d1e20;
    padding: 0;
}
#cart_block #cart_block_list dt .price {
    float: none;
    display: inline-block;
    margin-left: auto;
    font-weight: 500;
    font-size: 17px;
    color: #1d1e20;
    white-space: nowrap;
}
#cart_block .hookDisplayProductPriceBlock-price {
    font-size: 12px;
    color: #6b7280;
}

#cart_block .remove_link {
    position: absolute;
    top: 16px;
    right: 0;
    width: 30px;
    height: 30px;
    float: none;
}
#cart_block .remove_link a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9999px;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    margin: 0;
    position: static;
}
#cart_block .remove_link a::before {
    font-family: 'icomoon';
    content: "\e872";
    font-size: 15px;
}
#cart_block .remove_link a:hover{
    background: #fff1ef;
    color: #f06542;
}

#cart_block .cart_block_customizations .quantity-formated {
    display: inline-block;
    margin-right: 4px;
    color: #1d1e20;
    background: #fde8b7;
    border-radius: 4px;
    padding: 0 3px;
    font-size: 12px;
    line-height: 18px;
}
#cart_block .prod_combination{
    grid-column: 2;
    font-style: italic;
    float: none;
    clear: both;
    margin-left: 0;
    padding-top: 4px;
}
#cart_block .prod_combination a{
    color:#3155a6
}
#cart_block dt a{
    text-decoration: none;
}

/* Footer summary + buttons (fixed at the bottom of the panel) */
#cart_block .vouchers_separator{
    border-bottom: 1px dashed #D8D8D8;
    border-top: 1px dashed #D8D8D8;
    text-transform:uppercase;
    padding: 10px 0;
    margin-bottom: 10px;
    font-weight: bold;
}
#cart-bottom {
    padding: 18px 24px 22px;
    background: #f5f9fe;
    border-top: 1px solid #e4eaf1;
}
#cart_block #cart-prices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    line-height: 1.4;
}
#cart_block .cart_dif_price_summary{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    line-height: 1.4;
    padding: 0;
    font-size: 14px;
    color: #565656;
    border-bottom: none;
}
#cart_block #cart_block_total, #cart_block #totalspan, #cart_block_total_label {
    font-weight: bold;
}
#cart_block .total_line{
    color: #1d1e20;
    padding-top: 10px;
    margin-top: 2px;
    border-top: 1px solid #eef2f7;
    align-items: baseline;
}
#cart_block .summary_right{
    color: #1d1e20;
    line-height: 20px;
    text-align: right;
    width: auto;
    float: none;
}
#cart_block_total_label {
    font-size: 17px;
    color: #1d1e20;
}
#cart_block_total {
    font-size: 22px;
    color: #1d1e20;
}
#cart_block .total_line .summary_right{
    color:#1d1e20;
}

/* seQura financing banner (injected by global.js updateSequraCart) */
#cart_block #from_cart_sequra {
    border-radius: 12px !important;
    background: #d5f1f2 !important;
    color: #1d1e20 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    padding: 10px 12px !important;
    margin: 14px 0 0 !important;
    text-align: left !important;
}

/* "¿Tienes un cupón?" — collapsed by default, reveals a code input + submit
   (ajaxCart.addVoucher() in ajax-cart.js, backed by CartController's
   processAddDiscount()). */
#cart_block #cart_block_voucher {
    margin-top: 14px;
}
#cart_block #cart_block_voucher_toggle {
    font-size: 13px;
    font-weight: 500;
    color: rgb(28, 146, 219);
}
#cart_block #cart_block_voucher_form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
#cart_block #cart_block_voucher_form.hidden {
    display: none;
}
#cart_block #cart_block_voucher_input {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    padding: 0 14px;
    border: 1px solid #e4eaf1;
    border-radius: 9999px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #1d1e20;
    background: #fff;
}
#cart_block #cart_block_voucher_submit {
    flex-shrink: 0;
    height: 40px;
    padding: 0 18px;
    border: 1px solid #d6d6d6;
    border-radius: 9999px;
    background: #fff;
    color: #1d1e20;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 500;
    font-size: 14px;
}
#cart_block #cart_block_voucher_submit:hover {
    border-color: rgb(30, 157, 224);
    color: rgb(28, 146, 219);
}
#cart_block #cart_block_voucher_submit[disabled] {
    opacity: .6;
    cursor: default;
}
#cart_block #cart_block_voucher_error {
    margin: 8px 0 0;
    font-size: 13px;
    color: #c0392b;
}
#cart_block #cart_block_voucher_error.hidden {
    display: none;
}

#cart_block #cart-buttons {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 10px;
    text-align: left;
    padding: 14px 0 0;
}
#cart_block #cart-buttons .button_small {display:none;}
#cart_block #cart-buttons a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 15px;
    padding: 0;
}
#cart_block #cart-buttons a.btn-default {
    border: 1px solid #d6d6d6;
    background: #fff;
    color: #1d1e20;
}
#cart_block #cart-buttons a.btn-default:hover {
    border-color: rgb(30, 157, 224);
    color: rgb(28, 146, 219);
}
#cart_block #cart-buttons #button_order_cart {
    border: none;
    background: #ffb400;
    color: #1d1e20;
}
#cart_block #cart-buttons #button_order_cart:hover {
    background: #ffc94d;
    color: #1d1e20;
}

#cart_block .delete_voucher{background: none;}
#cart_block #vouchers {
    width: 100%;
    background: #3c9ee0;
    border-radius: 8px;
    margin-top: 10px;
}
#cart_block #vouchers td{padding: 5px;color:#fff}
#cart_block #vouchers .price{float: right;}
#cart_block #vouchers td.delete a {
    margin-left: 5px;
}
@media (max-width: 1000px) {
    #cart_block #cart_block_list dt {
        grid-template-columns: 64px minmax(0, 1fr);
    }
    #cart_block .cart_item_media {
        width: 64px;
        height: 64px;
    }
}

/* "Producto añadido al carrito" toast — pinned to the very top of the viewport, right side,
   auto-hides after 3s (ajaxCart.showAddedToast() in ajax-cart.js). Independent of #cart_block so
   it still shows even when the mini-cart dropdown isn't open. */
#cart_added_toast {
    position: fixed;
    top: 12px;
    right: 50px;
    z-index: 10000000;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 320px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #eef2f7;
    box-shadow: 0 4px 14px rgba(29, 30, 32, .12);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.35;
    color: #1d1e20;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}
#cart_added_toast.cart_added_toast_visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
#cart_added_toast .cart_added_toast_icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 9999px;
    background: #e3f7ea;
    color: #1d9649;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
#cart_added_toast .cart_added_toast_text strong {
    font-weight: 600;
}
@media (max-width: 479px) {
    #cart_added_toast {
        right: 12px;
        left: 12px;
        max-width: none;
    }
}
