/* InsulMarket · Compra rápida - todas las reglas se limitan a clases imqb. */
.woocommerce ul.products li.product .imqb-quick-view,
.woocommerce-page ul.products li.product .imqb-quick-view,
.imqb-quick-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    width: 44px;
    min-width: 44px;
    height: 44px;
    margin: 0 0 0 5px;
    padding: 0;
    border: 1px solid #272727;
    border-radius: 0;
    background: #2f2f2f;
    color: #fff;
    font: 600 22px/1 Arial, Helvetica, sans-serif;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.imqb-quick-view:hover,
.imqb-quick-view:focus-visible {
    color: #fff;
    background: #171717;
    border-color: #171717;
}
.imqb-quick-view:focus-visible,
.imqb-close:focus-visible,
.imqb-buy-now:focus-visible {
    outline: 3px solid #4b84d5;
    outline-offset: 3px;
}

body.imqb-modal-open { overflow: hidden !important; }
.imqb-overlay[hidden] { display: none !important; }
.imqb-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .52);
    box-sizing: border-box;
}
.imqb-overlay *, .imqb-overlay *::before, .imqb-overlay *::after { box-sizing: border-box; }
.imqb-dialog {
    position: relative;
    width: min(900px, 100%);
    max-height: min(90vh, 920px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 34px;
    border-radius: 6px;
    background: #fff;
    color: #333;
    box-shadow: 0 14px 56px rgba(0, 0, 0, .24);
    outline: none;
}
.imqb-close {
    position: absolute;
    right: 18px;
    top: 12px;
    z-index: 2;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #878787;
    font: 700 29px/34px Arial, Helvetica, sans-serif;
    text-align: center;
    cursor: pointer;
}
.imqb-close:hover { color: #222; background: transparent; }
.imqb-product { display: grid; grid-template-columns: minmax(0, .87fr) minmax(0, 1.13fr); gap: 44px; align-items: start; }
.imqb-media { width: 100%; min-width: 0; }
.imqb-media a { display: block; }
.imqb-media img { display: block; width: 100%; height: auto; max-width: 100%; margin: 0; object-fit: contain; }
.imqb-details { min-width: 0; padding: 28px 5px 0 0; }
.imqb-dialog .imqb-title {
    margin: 0 0 22px;
    padding: 0;
    color: #343434;
    font-size: clamp(22px, 2.4vw, 34px);
    font-weight: 400;
    line-height: 1.24;
    letter-spacing: -.025em;
}
.imqb-dialog .imqb-price { margin: 0 0 22px; font-size: 20px; font-weight: 400; line-height: 1.4; color: #636363; }
.imqb-dialog .imqb-price del { opacity: .7; }
.imqb-dialog .imqb-description { margin-bottom: 19px; font-size: 14px; line-height: 1.6; }
.imqb-dialog .imqb-description p:last-child { margin-bottom: 0; }
.imqb-dialog form.cart { margin: 0 0 18px !important; }
.imqb-dialog form.cart .quantity { display: inline-flex; float: none; margin: 0 8px 0 0; vertical-align: middle; }
.imqb-dialog form.cart .qty {
    width: 70px;
    min-height: 43px;
    margin: 0;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 0;
    font-size: 14px;
    text-align: center;
}
.imqb-dialog button.single_add_to_cart_button,
.imqb-dialog button.imqb-buy-now,
.single-product form.cart button.imqb-buy-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    padding: 10px 16px;
    margin: 0 6px 8px 0;
    border-radius: 0;
    border: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    font-family: inherit;
    cursor: pointer;
    text-transform: none;
    vertical-align: middle;
    white-space: normal;
}
.imqb-dialog button.single_add_to_cart_button { background: #454545; color: #fff; }
.imqb-dialog button.imqb-buy-now,
.single-product form.cart button.imqb-buy-now { background: #1f1f1f; color: #fff; }
.imqb-dialog button.imqb-buy-now:hover,
.single-product form.cart button.imqb-buy-now:hover,
.imqb-dialog button.single_add_to_cart_button:hover { background: #000; color: #fff; }
.imqb-dialog button:disabled { opacity: .46; cursor: not-allowed; }
.imqb-dialog .variations { width: 100%; margin: 0 0 16px; border: 0; }
.imqb-dialog .variations td,
.imqb-dialog .variations th { padding: 5px 8px 5px 0; border: 0; text-align: left; vertical-align: middle; }
.imqb-dialog .variations label { color: #555; font-size: 14px; }
.imqb-dialog .variations select { max-width: 100%; min-height: 38px; padding: 5px 9px; }
.imqb-dialog .variations .reset_variations { display: inline-block; padding: 4px 0; font-size: 13px; }
.imqb-dialog .single_variation_wrap .woocommerce-variation-price { margin: 7px 0 15px; }
.imqb-dialog .woocommerce-variation-description { font-size: 13px; }
.imqb-dialog .group_table { width: 100%; margin-bottom: 14px; }
.imqb-dialog .group_table td { padding: 8px 4px 8px 0; }
.imqb-dialog .group_table .quantity { margin-right: 6px; }
.imqb-dialog .imqb-notices .woocommerce-message,
.imqb-dialog .imqb-notices .woocommerce-error { margin: 0 0 15px; padding: 12px 15px; font-size: 13px; line-height: 1.5; }
.imqb-dialog .imqb-notices .woocommerce-message::before,
.imqb-dialog .imqb-notices .woocommerce-error::before { display: none; }
.imqb-dialog .imqb-notices .woocommerce-message { border-top: 3px solid #38874b; background: #f2f9f3; color: #246233; }
.imqb-dialog .imqb-notices .woocommerce-error { border-top: 3px solid #be3232; background: #fff4f4; color: #8c2828; }
.imqb-cart-link { color: inherit; font-weight: 700; text-decoration: underline; }
.imqb-meta { border-top: 1px solid #eee; margin-top: 18px; padding-top: 14px; color: #777; font-size: 13px; line-height: 1.8; }
.imqb-meta .product_meta > span { display: block; }
.imqb-meta a, .imqb-view-details { color: #555; text-decoration: underline; }
.imqb-view-details { display: inline-block; margin-top: 14px; font-size: 13px; }
.imqb-loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 260px; color: #555; }
.imqb-spinner {
    display: inline-block;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border: 2px solid #ddd;
    border-top-color: #222;
    border-radius: 50%;
    animation: imqb-spin .7s linear infinite;
}
.imqb-working { opacity: .6; }
@keyframes imqb-spin { to { transform: rotate(360deg); } }
@media (max-width: 690px) {
    .imqb-overlay { padding: 12px; align-items: center; }
    .imqb-dialog { max-height: 94dvh; padding: 42px 18px 22px; }
    .imqb-product { display: block; }
    .imqb-media { max-width: min(280px, 76%); margin: 0 auto 16px; }
    .imqb-details { padding: 0; }
    .imqb-dialog .imqb-title { margin-bottom: 12px; font-size: 23px; }
    .imqb-dialog .imqb-price { margin-bottom: 13px; font-size: 18px; }
    .imqb-dialog button.single_add_to_cart_button,
    .imqb-dialog button.imqb-buy-now { margin-top: 5px; }
}
@media (prefers-reduced-motion: reduce) {
    .imqb-spinner { animation-duration: 1.8s; }
    .imqb-quick-view { transition: none; }
}

/* v1.0.2: barra compacta de compra para las tarjetas del catálogo.
 * Mantiene el botón original del tema y pone '+' a su derecha. */
body .imqb-catalog-actions,
.woocommerce ul.products li.product .imqb-catalog-actions,
.woocommerce-page ul.products li.product .imqb-catalog-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    justify-content: stretch;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin: 12px 0 0;
    padding: 0;
    box-sizing: border-box;
    clear: both;
}
body .imqb-catalog-actions > a.button,
body .imqb-catalog-actions > button.button,
body .imqb-catalog-actions > .add_to_cart_button,
.woocommerce ul.products li.product .imqb-catalog-actions > a.button,
.woocommerce-page ul.products li.product .imqb-catalog-actions > a.button {
    box-sizing: border-box !important;
    display: inline-flex !important;
    flex: 1 1 0% !important;
    align-items: center !important;
    justify-content: center !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 52px;
    margin: 0 !important;
    float: none !important;
    position: relative;
    white-space: normal;
    text-align: center;
}
body .imqb-catalog-actions > .imqb-quick-view,
.woocommerce ul.products li.product .imqb-catalog-actions > .imqb-quick-view,
.woocommerce-page ul.products li.product .imqb-catalog-actions > .imqb-quick-view {
    box-sizing: border-box !important;
    display: inline-flex !important;
    position: relative !important;
    float: none !important;
    flex: 0 0 56px !important;
    width: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    height: auto !important;
    min-height: 52px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    border-radius: 3px;
    font-size: 28px;
    font-weight: 600;
    line-height: 1;
    background: #303030;
    color: #fff;
    box-shadow: none;
    text-shadow: none;
    cursor: pointer;
}
body .imqb-catalog-actions > .imqb-quick-view:hover,
body .imqb-catalog-actions > .imqb-quick-view:focus-visible {
    background: #181818;
    color: #fff;
}
body .imqb-catalog-actions--alone { justify-content: flex-end; }
@media (max-width: 420px) {
    body .imqb-catalog-actions { gap: 6px; }
    body .imqb-catalog-actions > .imqb-quick-view { flex-basis: 49px !important; width: 49px !important; min-width: 49px !important; max-width: 49px !important; }
}
