.woocommerce div.product form.cart .wcqt-quotate-button {
    /*position: fixed;
    background-color: #333333 !important;
    color: black;
    border: none;
    border-radius: 0rem !important;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
    float: right;*/
    background-color: var(--wp--preset--color--contrast);
    border-radius: .33rem;
    border-color: var(--wp--preset--color--contrast);
    border-width: 0;
    color: var(--wp--preset--color--base);
    font-family: inherit;
    font-size: 14px !important;
    font-style: normal;
    font-weight: 500;
    line-height: inherit;
    padding-top: 0.5rem;
    padding-right: 1rem;
    padding-bottom: 0.5rem;
    padding-left: 1rem;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
  float: none;
  margin-top: 0;
  margin-bottom: 0;
  vertical-align: middle;
  margin-bottom: 0px !important;
}
.woocommerce div.product form.cart .wcqt-quotate-button:hover{
    background-color: #3571e0 !important;
    border-color: var(--wp--preset--color--contrast-2);
    color: white !important;
}

.wcqt-quotate-button:hover {
    background-color: #fffffc;
}
/* v2.0.57 Bug #2: position:fixed moved to .wcqt-float-outer (see extra-variables.php).
   .wcqt-float-button is now position:relative inside the outer wrapper.
   v2.0.85: flexbox centers the inner icon (SVG or PNG) regardless of its intrinsic
   aspect ratio. The previous `margin: 13px auto 0` on .wcqt-float-button img was a
   visual hack tuned to the default SVG's viewBox — it left raw PNGs 9.75px below
   center. Flex centering works universally; the admin Icon Offset X/Y still applies
   on top via transform: translate, which shifts the icon FROM its centered position. */
.wcqt-float-button {
    height: 50px;
    position: relative;
    background-color: #fff;
    color: white;
    border: none;
    border-radius: 50%;
    padding: 0px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
    z-index: 2;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
/* Outer wrapper — fixed-positioned isolation layer */
.wcqt-float-outer {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
}
.wcqt-float-outer > #WCQT_QuotationButton,
.wcqt-float-outer > .wcqt-float-button {
    pointer-events: auto;
}
.wcqt-delete-product-btn{
    cursor: pointer;
    color: black;
    line-height: 35px;
    padding-right: 15px;
}
.wcqt-user-details{
    padding: 20px;
    width: calc(100% - 40px);
}
.wcqt-user-details label{
    display: block;
    width: 100%;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 1px;
}
.wcqt-user-details select,
.wcqt-user-details input{
    width: 100%;
    display: block;
    font-size: 14px;
    padding: 4px;
    margin-bottom: 7px;
    border-radius: 5px;
    border: solid 1px #d6d6d6;
}
.wcqt-text-center{
    text-align: center;
}
.wcqt-float-button:hover {
    background-color: #fffffc;
}
/* v2.0.85: margin removed. Centering moved to the parent .wcqt-float-button flex
   container — works equally for SVG and PNG. The width:55% keeps the icon proportional
   to the button size; admin Icon Size + Icon Offset still work on top via transform. */
.wcqt-float-button img {
    width: 55%;
    display: block;
    margin: 0;
}
#wcqt-overlay,
.wcqt-quotate-overlay,
.wcqt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent background */
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    z-index: -1000;
    /*display: none;*/
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wcqt-popup {
    position: fixed;
    right: -320px;
    bottom: 20px;
    z-index: 1000;
    display: none;

    max-width: 320px;
    max-height: 100vh;
    background-color: #fff;

    display: flex;
    flex-direction: column;
    width: 100%;
    transition: right 0.5s ease-out;
}
#wcqt-popup-quotate.show,
.wcqt-popup.show{
    right: 0px;
}
#wcqt-popup-quotate{
    right: -320px;
    bottom: 400px;
}
.wcqt-popup-body{
    font-size: 12px;
    color: #000000;
    background-color: #ffffff;
    flex-grow: 1;
    overflow: auto;
    z-index: 1000;
}
.wcqt-quotate-actions,
.wcqt-quotate-product-details{
    width: 100%;
    border-collapse: collapse;
}
.wcqt-quotate-actions td,
.wcqt-quotate-product-details td{
    width: 50%;
    padding: 5px;
    vertical-align: top;
}
.wcqt-quotate-product-details td img{
    width: 80%;
    display: block;
    margin: 0 auto;
}
.wcqt-quotate-product-title{
    font-size: 12px;
    color: #000000;
    font-weight: 600;
}
.wcqt-popup-header{
    position: relative;
    color: #000000;
    background-color: #d6d6d6;
    border-bottom: 2px solid #eee;
    padding: 15px;
    text-align: center;
    font-size: 20px;
}

.wcqt-popup-content {
    position: relative;
    width: 100%;
}
.wcqt-popup-footer{
    background-color: #dbdbdb;
    color: #4f564c;
    padding: 10px;
    box-shadow: 0 -5px 10px #0000001a;
    font-size: 14px;
    width: calc(100% - 20px);
}
.wcqt-product-cnt,
.wcqt-popup-footer input[type=number]{
    width: 100%;
    max-width: 130px;
    display: block;
    margin: 0 auto;
    font-size: 14px;
    padding: 4px;
    margin-top: 5px;
    margin-bottom: 7px;
    border-radius: 5px;
    border: solid 1px #d6d6d6;
}
.wcqt-quotate-actions button{
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 10px 20px;
    width: 100%;
    text-transform: uppercase;
}
.wcqt-quotate-actions button:hover {
  background-color: #ffffff;
  color: #000000;
  border: 2px solid #000000;
}
.wcqt-close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    color: #aaa;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.wcqt-close-btn:hover {
    color: #000;
}

.wcqt-popup p {
    margin: 0;
}
.wcqt-ext-link{
    font-size: 22px;
    font-weight: 600;
    display: block;
}
.wcqt-popup-body-scroll{
    z-index: 9999;
    
}
.wcqt-popup-body-scrol::-webkit-scrollbar {
    width: 22px; 
}


.woocommerce div.product form.cart .wcqt-quotate-button {
    background-color: #333333 !important;
    border-radius: 0rem !important;
    border-color: var(--wp--preset--color--contrast);
    border-width: 0;
    color: var(--wp--preset--color--base);
    font-family: inherit;
    font-size: 14px !important;
    font-style: normal;
    font-weight: 500;
    line-height: inherit;
    padding-top: 0.5rem !important;
    padding-right: 1rem;
    padding-bottom: 0.5rem !important;
    padding-left: 1rem;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
    float: none;
    margin-top: 0;
    margin-bottom: 0;
    vertical-align: middle;
    margin-bottom: 0px !important;
}

.woocommerce div.product form.cart .wcqt-quotate-button:hover {
    background-color: #3571e0 !important;
    color: white;
}

.wcqt-quotate-button {
    margin-left: 10px !important; /* Adjust the value as needed */
}

.single_add_to_cart_button {
    margin-left: 6.5px !important; /* Adjust the value as needed */
}

.wcqt-popup-header {
    position: relative;
    color: #000000;
    background-color: #d6d6d6;
    border-bottom: 0px solid #eee;
    padding: 0px !important;
    text-align: center;
    font-size: 20px;
}

.wcqt-popup-footer {
    background-color: #dbdbdb;
    color: #4f564c;
    padding: 8px !important;
    box-shadow: 0 -5px 10px #0000001a;
    font-size: 14px;
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 0 0 16px 16px !important;
}

.wcqt-product-cnt, .wcqt-popup-footer input[type=number] {
    width: 100%;
    max-width: 55px !important;
	max-height: 30px !important;
    display: block;
    margin: 0 auto;
    font-size: 14px;
    padding: 4px;
    margin-top: 0px !important;
    margin-bottom: 3px !important;
    border-radius: 0px !important;
    border: solid 1px #d6d6d6;
	
}

.wcqt-quotate-actions button {
    color: #ffffff;
    border: 2px solid #dbdbdb !important;
    padding: 10px 20px;
    width: 100%;
	background : #333 !important;
	padding-top: 0.8rem !important;
}

.wcqt-quotate-actions button:hover {
    background: #3571e0 !important;
    color: white !important;
}

.wcqt-popup-body {
    font-size: 12px;
    color: #000000;
    background-color: #ffffff;
    z-index: 1000;
}

/* Popup internal layout — header/user-details/footer are fixed; only the products
   list scrolls internally so the popup never overflows the viewport.
   NOTE: max-height is injected dynamically in extra-variables.php using
   calc(100vh - bottom_offset - top_offset) so the admin can tune breathing room
   from Settings → Popup Appearance → Bottom Offset / Top Offset (min). */
#wcqt-popup {
    display: flex !important;
    flex-direction: column !important;
}
#wcqt-popup .wcqt-popup-header,
#wcqt-popup .wcqt-popup-footer,
#wcqt-popup .wcqt-user-details,
#wcqt-popup #WCQT_SuccessScreen {
    flex: 0 0 auto !important;
}
#wcqt-popup #QuotationProductList {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    min-height: 60px !important;
    -webkit-overflow-scrolling: touch !important;
}

.wcqt-close-btn {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: 16px !important;
    font-size: 24px !important;
    line-height: 1 !important;
    font-weight: normal !important;
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: rgba(255, 255, 255, 0.85) !important;
    cursor: pointer !important;
    border-radius: 50% !important;
    transition: background 0.2s ease, color 0.2s ease !important;
}

.wcqt-close-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
}

.wcqt-user-details {
    padding: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: none;
}
#WCQT_GoBackWrapper,
#WCQT_SendNowWrapper{
    display: none;
}
.iti {
    width: 100%;
}
.wcqt-products-counter{
    background-color: #3571e0;
    color: #ffffff;
    top: -12px;
    left: -12px;
    border-radius: 50%;
    position: absolute;
    font-size: 13px;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    overflow: hidden;
    display: none;
}
#WCQT_Spinner{
    display: none;
}


/* ===== MEJORAS DE DISEÑO - Cotizador Automático ===== */

/* Overlay de fondo más elegante */
#wcqt-overlay {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
}

/* Popup principal mejorado
   v2.0.62: extended to #wcqt-popup-quotate (mini-popup, step 0) — it was missing
   border-radius + overflow:hidden, so the white container poked out past the
   rounded header corners. */
#wcqt-popup,
#wcqt-popup-quotate {
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
    overflow: hidden !important;
    border: none !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    max-width: 400px !important;
    width: 95% !important;
}

/* Header del popup (border-radius superior explícito) */
.wcqt-popup-header {
    background: linear-gradient(135deg, #1a5276, #2980b9) !important;
    padding: 18px 24px !important;
    border-radius: 16px 16px 0 0 !important;
    overflow: hidden;
}

/* Footer del popup (border-radius inferior explícito) */
.wcqt-popup-footer {
    border-radius: 0 0 16px 16px !important;
}

.wcqt-popup-header h3,
.wcqt-popup-title {
    color: #fff !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    letter-spacing: 0.3px;
}

/* Botón X de cerrar */
.wcqt-popup .wcqt-close,
#wcqt-popup .wcqt-close {
    color: rgba(255,255,255,0.8) !important;
    font-size: 22px !important;
    top: 14px !important;
    right: 18px !important;
}

.wcqt-popup .wcqt-close:hover {
    color: #fff !important;
}

/* Cuerpo del popup */
.wcqt-popup-body {
    padding: 20px 20px 10px !important;
    background: #fff;
}

/* Inputs de nombre y email */
#sWCQT_Name,
#sWCQT_Email {
    width: 100% !important;
    border: 1.5px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    margin-bottom: 10px !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease !important;
    background: #fafafa !important;
    color: #333 !important;
    display: block !important;
}

#sWCQT_Name:focus,
#sWCQT_Email:focus {
    border-color: #2980b9 !important;
    outline: none !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(41,128,185,0.12) !important;
}

/* Fila de producto en la lista */
.wcqt-quotate-product-details,
#WCQT_ProductsList table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-bottom: 10px !important;
}

.wcqt-quotate-product-details tr,
#WCQT_ProductsList tr {
    border-bottom: 1px solid #f0f0f0 !important;
}

/* Imagen del producto */
.wcqt-quotate-product-img img,
#WCQT_ProductsList img {
    border-radius: 8px !important;
    width: 56px !important;
    height: 56px !important;
    object-fit: cover !important;
}

/* Nombre del producto */
.wcqt-quotate-product-title,
#WCQT_ProductsList .wcqt-quotate-product-title {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #222 !important;
    line-height: 1.4 !important;
}

/* Input de cantidad */
#WCQT_ProductsList input[type="number"] {
    width: 56px !important;
    border: 1.5px solid #e0e0e0 !important;
    border-radius: 6px !important;
    padding: 5px 8px !important;
    text-align: center !important;
    font-size: 14px !important;
}

/* Sección de acciones (botones) */
.wcqt-quotate-actions,
#WCQT_SaveQuotationWrapper,
#WCQT_AddMoreWrapper {
    padding: 8px 0 !important;
}

/* Botón ENVIAR COTIZACIÓN */
#WCQT_SaveQuotationBtn,
button[onclick*="SaveQuotationStep2"],
#WCQT_SendNowBtn {
    width: 100% !important;
    background: linear-gradient(135deg, #1a5276, #2980b9) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 13px 20px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    letter-spacing: 0.5px !important;
    transition: all 0.2s ease !important;
    margin-top: 4px !important;
    display: block !important;
}

#WCQT_SaveQuotationBtn:hover {
    background: linear-gradient(135deg, #154360, #1a6fa8) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(41,128,185,0.35) !important;
}

/* Tabla de acciones principal */
.wcqt-quotate-actions table,
#WCQT_SaveQuotationWrapper table,
#WCQT_SendNowWrapper table {
    width: 100% !important;
}

/* El botón ENVIAR COTIZACIÓN dentro de la tabla */
.wcqt-quotate-actions td button,
#WCQT_SaveQuotationWrapper td button {
    width: 100% !important;
    background: linear-gradient(135deg, #1a5276, #2980b9) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 13px 20px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.wcqt-quotate-actions td button:hover,
#WCQT_SaveQuotationWrapper td button:hover {
    background: linear-gradient(135deg, #154360, #1a6fa8) !important;
    box-shadow: 0 4px 12px rgba(41,128,185,0.35) !important;
}

/* Botón AGREGAR MÁS PRODUCTOS */
#WCQT_AddMoreWrapper td button,
button[onclick*="ClosePopup"] {
    width: 100% !important;
    background: #f8f9fa !important;
    color: #555 !important;
    border: 1.5px solid #ddd !important;
    border-radius: 8px !important;
    padding: 11px 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin-top: 8px !important;
}

#WCQT_AddMoreWrapper td button:hover {
    background: #e9ecef !important;
    border-color: #ccc !important;
}

/* Pantalla de éxito */
#WCQT_SuccessScreen {
    text-align: center !important;
    padding: 30px 20px !important;
}

#WCQT_SuccessScreen .wcqt-success-check,
#WCQT_SuccessScreen svg,
#WCQT_SuccessScreen .dashicons-yes {
    color: #27ae60 !important;
    font-size: 48px !important;
}

#WCQT_SuccessScreen h3 {
    color: #27ae60 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    margin: 12px 0 8px !important;
}

#WCQT_SuccessScreen p {
    color: #555 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}

#WCQT_SuccessEmail {
    color: #2980b9 !important;
    font-weight: 600 !important;
}

/* Botón flotante PDF mejorado */
.wcqt-float-button {
    border-radius: 50% !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.wcqt-float-button:hover {
    transform: scale(1.08) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35) !important;
}

/* Contador en el botón flotante (igualado al side cart exactamente) */
.wcqt-products-counter {
    background: #3571e0 !important;
    color: #fff !important;
    border-radius: 50% !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    width: 28px !important;
    height: 28px !important;
    line-height: 28px !important;
    text-align: center !important;
    align-items: normal !important;
    justify-content: normal !important;
    padding: 0 !important;
    top: -9px !important;
    left: -8px !important;
}

/* Spinner de carga */
#WCQT_Spinner {
    text-align: center !important;
    padding: 10px !important;
}

/* ===== Phone picker with country flag (ported from contentmachine.net) ===== */
.wcqt-phone-row {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    margin-bottom: 10px !important;
}
.wcqt-phone-picker {
    position: relative !important;
    flex: 0 0 auto !important;
}
/* Both the trigger and the input share an explicit 42px height + border-box +
   zero vertical padding (content vertically centered via flex/line-height).
   This guarantees identical height regardless of the flag image's natural size. */
.wcqt-phone-trigger {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    height: 42px !important;
    padding: 0 10px 0 12px !important;
    border: 1.5px solid #e0e0e0 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    background: #fafafa !important;
    box-sizing: border-box !important;
    transition: border-color .2s !important;
    white-space: nowrap !important;
    min-width: 88px !important;
    line-height: 1 !important;
}
.wcqt-phone-trigger:hover { border-color: #2980b9 !important; }
.wcqt-phone-trigger img {
    width: 22px !important; height: 15px !important;
    border-radius: 2px !important; object-fit: cover !important;
    border: 1px solid #e0e0e0 !important; flex-shrink: 0 !important;
    display: block !important;
}
#wcqtPhoneCode {
    font-size: 13px !important; font-weight: 600 !important; color: #333 !important;
    line-height: 1 !important;
}
.wcqt-phone-chevron {
    font-size: 10px !important; color: #94a3b8 !important;
    line-height: 1 !important;
}
.wcqt-phone-input {
    flex: 1 !important; min-width: 0 !important;
    height: 42px !important;
    border: 1.5px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 0 14px !important;
    font-size: 14px !important;
    line-height: 1 !important;
    background: #fafafa !important;
    color: #333 !important;
    transition: border-color .2s !important;
    box-sizing: border-box !important;
    margin-bottom: 0 !important;
}
.wcqt-phone-input:focus {
    outline: none !important; border-color: #2980b9 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(41,128,185,.12) !important;
}
.wcqt-phone-dropdown {
    display: none !important;
    position: fixed !important;
    z-index: 99999999 !important;
    background: #fff !important;
    border: 1.5px solid #e0e0e0 !important;
    border-radius: 10px !important;
    box-shadow: 0 12px 40px rgba(0,0,0,.18) !important;
    overflow: hidden !important;
    width: 280px !important;
}
.wcqt-phone-dropdown.open {
    display: flex !important;
    flex-direction: column !important;
}
.wcqt-phone-dropdown input {
    border: none !important;
    border-bottom: 1.5px solid #e0e0e0 !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    outline: none !important;
    color: #333 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.wcqt-phone-options {
    max-height: 220px !important;
    overflow-y: auto !important;
}
.wcqt-phone-option {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 9px 14px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    color: #333 !important;
    transition: background .15s !important;
}
.wcqt-phone-option:hover { background: #f5f5f5 !important; }
.wcqt-phone-option img {
    width: 22px !important; height: 15px !important;
    border-radius: 2px !important; object-fit: cover !important;
    border: 1px solid #e0e0e0 !important; flex-shrink: 0 !important;
}
.wcqt-phone-option .wcqt-dial {
    margin-left: auto !important;
    color: #94a3b8 !important;
    font-size: 12px !important;
}

/* Inline CSS-only loader shown inside the products list while loading via AJAX.
   Avoids 404 requests to /tienda/undefined that happened with a broken <img src>. */
.wcqt-inline-loader {
    margin: 30px auto !important;
    width: 32px !important;
    height: 32px !important;
    border: 3px solid #e0e0e0 !important;
    border-top-color: #2980b9 !important;
    border-radius: 50% !important;
    animation: wcqt-inline-spin 0.8s linear infinite !important;
}
@keyframes wcqt-inline-spin {
    to { transform: rotate(360deg); }
}

/* ===== FIN MEJORAS DE DISEÑO ===== */

/* ===== wcqt-quote-row: contenedor flex para input cantidad + botón cotizar ===== */
.wcqt-quote-row {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    /* v2.0.66: gap 8px → 0. Spacing between qty-wrap and Cotizar comes from the
       button's margin-left (admin-configurable via wcqt_cotizar_btn_gap). */
    gap: 0 !important;
    margin-top: 8px !important;
}

/* v2.0.67: removed margin-left:0 — gap between qty wrap and Cotizar is now driven
   by wcqt_cotizar_btn_gap via extra-variables.php with WC-scoped specificity. Keeping
   width:auto so the button doesn't stretch to fill the row. */
.wcqt-quote-row #WCQT_QuotateButton {
    width: auto !important;
}

/* Neutraliza margin-top dinámico del input (settings) cuando está en el row */
.wcqt-quote-row #WCQT_iQuotateCnt {
    margin-top: 0 !important;
    flex-shrink: 0 !important;
}

/* Alta especificidad para compatibilidad con cualquier tema WooCommerce */
.woocommerce div.product form.cart .wcqt-quote-row {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    /* v2.0.66: gap 8px → 0. Spacing between qty-wrap and Cotizar comes from the
       button's margin-left (admin-configurable via wcqt_cotizar_btn_gap). */
    gap: 0 !important;
    margin-top: 8px !important;
}

.woocommerce div.product form.cart .wcqt-quote-row #WCQT_QuotateButton {
    /* v2.0.67: margin-left removed — controlled by dynamic CSS gap rule */
    width: auto !important;
}

.woocommerce div.product form.cart .wcqt-quote-row #WCQT_iQuotateCnt {
    margin-top: 0 !important;
    flex-shrink: 0 !important;
}

/* ===== v2.0.72: Border on the WRAP (one source of truth) + tb-icon glyphs =====
   Problem with v2.0.71's per-element borders: where button.border-top met input.border-top,
   adjacent 1px borders rendered as visible 2px lines. This iteration moves the entire frame
   onto the wrap (single 1px outer border, overflow:hidden). Buttons are borderless. Input
   only carries the two interior vertical separators (border-left + border-right). The
   ::before pseudo-element uses VillaTheme's tb-icon font with the exact glyphs (\e05f for
   minus, \e065 for plus) so the symbols match WC native exactly — font-size:0 on the button
   hides the underlying Unicode "−"/"+" without changing the markup. */
.wcqt-qty-wrap.wcqt-product-qty-wrap {
    display: inline-flex !important;
    align-items: stretch !important;
    vertical-align: middle !important;
    height: var(--wcqt-qty-height, 42px) !important;
    border: 1px solid #ccc !important;
    border-radius: 0 !important;
    background: transparent !important;
    overflow: hidden !important;          /* clip interior corners; required when wrap has the only border */
    flex-shrink: 0 !important;
    gap: 0 !important;
    box-sizing: border-box !important;
}
.wcqt-product-qty-wrap .wcqt-qty-btn {
    /* v2.0.74: font-size:0 dropped — the button no longer has Unicode text to hide;
       the glyph comes from a child <i class="tb-icon ..."> element instead, matching
       VillaTheme's WC-native markup pattern. */
    height: 100% !important;
    width: var(--wcqt-qty-btn-width, 33px) !important;
    min-width: var(--wcqt-qty-btn-width, 33px) !important;
    background-color: transparent !important;
    color: #000 !important;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    padding: 0 11px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    position: relative !important;
    transition: color 0.4s !important;
}
/* v2.0.74: style the tb-icon child element. font-family explicitly set in case the
   site has a strict reset; size + line-height match VillaTheme's native rendering.
   color:inherit lets the button's hover state propagate to the icon. */
.wcqt-qty-btn i.tb-icon {
    font-family: "tb-icon" !important;
    font-size: 11px !important;
    display: inline-block !important;
    line-height: 1 !important;
    color: inherit !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}
.wcqt-product-qty-wrap .wcqt-qty-btn:hover {
    background-color: transparent !important;
    color: #fa4f26 !important;
}
.wcqt-product-qty-wrap .wcqt-qty-input {
    flex: 0 0 auto !important;
    width: 58px !important;
    min-width: 58px !important;
    height: 100% !important;
    margin: 0 !important;
    align-self: stretch !important;
    background: transparent !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: 1px solid #ccc !important;
    border-right: 1px solid #ccc !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-align: center !important;
    color: #000 !important;
    padding: 0 !important;
    /* v2.0.73: line-height = content height (wrap 42 - 2 borders = 40) centers the
       single line of text vertically. <input> doesn't accept flex centering, so
       line-height is the standard approach. */
    line-height: 40px !important;
    display: block !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
}
.wcqt-product-qty-wrap .wcqt-qty-input:focus {
    outline: none !important;
    box-shadow: none !important;
}
.wcqt-product-qty-wrap .wcqt-qty-input::-webkit-inner-spin-button,
.wcqt-product-qty-wrap .wcqt-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}
.wcqt-product-qty-wrap .wcqt-qty-input[type=number] {
    -moz-appearance: textfield !important;
}
/* Row alignment — flex, centered, no fixed height (let content decide) */
.wcqt-quote-row {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    height: auto !important;
}

/* ===== Bug #1: igualar altura input cantidad y botón cotizar ===== */
/* v2.0.66: input now fills its parent wrap height via align-self:stretch. The
   margin:0 override defeats VillaTheme's .summary input { margin-bottom: 20px } which
   was causing 11px vertical misalignment. ID-level specificity is needed to beat both
   the theme rule AND the legacy v2.0.49 rules that used to be here. */
.wcqt-quote-row #WCQT_iQuotateCnt {
    height: 100% !important;
    margin: 0 !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
.wcqt-quote-row #WCQT_QuotateButton {
    height: var(--wcqt-qty-height, 42px) !important;
    display: inline-flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
}
.woocommerce div.product form.cart .wcqt-quote-row #WCQT_iQuotateCnt {
    height: 100% !important;
    margin: 0 !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
.woocommerce div.product form.cart .wcqt-quote-row #WCQT_QuotateButton {
    height: var(--wcqt-qty-height, 42px) !important;
    display: inline-flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
}

/* ===== Bug #2: ícono eliminar ítem — cursor y color =====
   v2.0.74: 31x31 container matches the input/button height in the cart list. SVG sized
   to 16x16 via CSS (overrides the width="18" height="18" attrs in the markup) so the
   icon visually balances with the surrounding qty controls. */
.wcqt-delete-product-btn {
    cursor: pointer !important;
    color: #c0392b !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    width: 31px !important;
    height: 31px !important;
    flex-shrink: 0 !important;
}
.wcqt-delete-product-btn svg {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
}
.wcqt-delete-product-btn:hover {
    color: #922b21 !important;
}

/* ===== Feature #6: popup scroll — header/footer fijos, body desplazable ===== */
.wcqt-popup {
    max-height: 90vh !important;
}
.wcqt-popup .wcqt-popup-header {
    flex-shrink: 0 !important;
}
.wcqt-popup .wcqt-popup-body {
    flex-grow: 1 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}
.wcqt-popup .wcqt-popup-footer {
    flex-shrink: 0 !important;
}

/* ===== Feature #9: mobile — bottom sheet < 480px ===== */
@media (max-width: 480px) {
    .wcqt-popup,
    #wcqt-popup-quotate {
        right: auto !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 85vh !important;
        border-radius: 16px 16px 0 0 !important;
        transition: transform 0.35s ease !important;
        transform: translateY(100%) !important;
    }
    .wcqt-popup.show,
    #wcqt-popup-quotate.show {
        right: auto !important;
        transform: translateY(0) !important;
    }
    #wcqt-overlay,
    .wcqt-quotate-overlay,
    .wcqt-overlay {
        align-items: flex-end !important;
        justify-content: center !important;
    }
}

/* ===== Bug #2: inline form validation ===== */
.wcqt-field-error {
    border: 2px solid #e74c3c !important;
    background-color: #fff5f5 !important;
    outline: none !important;
}
/* v2.0.53: Name/Email inputs have ID-level border rules (specificity 100).
   These ID+class selectors (specificity 110) override them correctly. */
#sWCQT_Name.wcqt-field-error,
#sWCQT_Email.wcqt-field-error,
#sWCQT_Phone.wcqt-field-error {
    border: 2px solid #e74c3c !important;
    background-color: #fff5f5 !important;
    outline: none !important;
}
.wcqt-field-error::placeholder {
    color: #e74c3c !important;
    opacity: 0.7 !important;
}
.wcqt-error-msg {
    color: #c0392b;
    font-size: 12px;
    margin: 6px 0 4px;
    padding: 6px 10px;
    background: #fff5f5;
    border-left: 3px solid #e74c3c;
    border-radius: 3px;
    line-height: 1.4;
}
@keyframes wcqt-shake {
    0%,  100% { transform: translateX(0); }
    20%, 60%  { transform: translateX(-5px); }
    40%, 80%  { transform: translateX(5px); }
}
.wcqt-shake {
    animation: wcqt-shake 0.4s ease !important;
}

/* ===== Bug #3: variation selection required ===== */
.wcqt-variation-required select,
.wcqt-variation-required .value select {
    outline: 2px solid #e74c3c !important;
    border-color: #e74c3c !important;
    border-radius: 4px !important;
}
.wcqt-variation-warning {
    color: #e74c3c !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    margin: 4px 0 8px !important;
}

/* ===== Bug #4: min-height so step 2 doesn't collapse ===== */
#wcqt-popup {
    min-height: 420px !important;
}

/* ===== Bug #5: default float button icon ===== */
.wcqt-float-icon-default {
    display: block;
    margin: 0 auto;
    opacity: 0.9;
}

/* ===== Bug #6 & Improvement #11: quantity +/− buttons (cart list + mini-popup) =====
   v2.0.74: widened buttons to 31x31 so they match the input height in those contexts.
   font-size:0 hides any stray Unicode text in the HTML; the <i.tb-icon> child provides
   the visible glyph (sized via .wcqt-qty-btn i.tb-icon rule above). */
.wcqt-qty-wrap {
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
}
.wcqt-qty-btn {
    width: 31px !important;
    height: 31px !important;
    min-width: 31px !important;
    padding: 0 !important;
    border: 1px solid #ccc !important;
    background: #f5f5f5 !important;
    color: #333 !important;
    font-size: 0 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}
.wcqt-qty-btn:hover {
    background: #e0e0e0 !important;
    border-color: #aaa !important;
    color: #fa4f26 !important;
}
/* v2.0.75: mini-popup (step 0) confirm-qty wrap — buttons + input all 31px tall so
   they line up. The popup input has id="iQuotateCnt" (no class), so the parent-level
   rule for the product-page input doesn't reach it; this scoped block handles centering
   the "1" by setting line-height = height and zeroing the theme-injected padding. */
.wcqt-confirm-qty {
    justify-content: center !important;
    margin-bottom: 8px !important;
    height: 31px !important;
    align-items: stretch !important;
    display: inline-flex !important;
}
.wcqt-confirm-qty #iQuotateCnt,
.wcqt-confirm-qty input[type="number"] {
    width: 55px !important;
    height: 31px !important;
    line-height: 31px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
    text-align: center !important;
    font-size: 14px !important;
    border: 1px solid #ccc !important;
    background: transparent !important;
    display: block !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
}

/* ===== Improvement #8: variation labels in cart ===== */
.wcqt-item-variations {
    margin-top: 3px;
    font-size: 11px;
    color: #666;
    line-height: 1.4;
}
.wcqt-item-attr {
    display: inline-block;
    margin-right: 6px;
}
.wcqt-item-attr strong {
    color: #333;
}

/* ===== Bug #1: mini-popup action buttons — column layout (v2.0.53: ID-scoped for higher specificity) ===== */
#wcqt-popup-quotate .wcqt-confirm-actions,
.wcqt-confirm-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    margin-top: 8px !important;
}
#wcqt-popup-quotate .wcqt-confirm-actions button,
.wcqt-confirm-actions button {
    width: 100% !important;
    white-space: nowrap !important;
    text-align: center !important;
    padding: 10px 16px !important;
    text-transform: uppercase !important;
    font-size: 13px !important;
    cursor: pointer !important;
    display: block !important;
    box-sizing: border-box !important;
}
/* v2.0.54 Bug #4: add-to-quote uses popup-header blue gradient (visual consistency) */
#wcqt-popup-quotate .wcqt-btn-add-to-quote,
.wcqt-btn-add-to-quote {
    background: linear-gradient(135deg, #1a5276, #2980b9) !important;
    color: #fff !important;
    border: none !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}
#wcqt-popup-quotate .wcqt-btn-add-to-quote:hover,
.wcqt-btn-add-to-quote:hover {
    background: linear-gradient(135deg, #154360, #1a6fa8) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(41,128,185,0.35) !important;
}
/* v2.0.55 Bug #2: cancel — borderless white, matches AGREGAR MAS PRODUCTOS visually
   (user explicitly requested "sin borde, fondo blanco, texto oscuro") */
#wcqt-popup-quotate .wcqt-btn-cancel,
.wcqt-btn-cancel {
    background: #ffffff !important;
    color: #333 !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    transition: background 0.2s ease, color 0.2s ease !important;
}
#wcqt-popup-quotate .wcqt-btn-cancel:hover,
.wcqt-btn-cancel:hover {
    background: #f5f5f5 !important;
    color: #111 !important;
    border: none !important;
    box-shadow: none !important;
}
/* v2.0.55 Bug #3: VOLVER button (step 2) — secondary style, not blue like ENVIAR.
   Beats the catch-all .wcqt-quotate-actions td button blue gradient (specificity 0,1,2)
   via #WCQT_GoBackWrapper (specificity 1,0,1) + #wcqt-popup ancestor. */
#wcqt-popup #WCQT_GoBackWrapper button,
#WCQT_GoBackWrapper td button,
#WCQT_GoBackWrapper button {
    background: #ffffff !important;
    background-image: none !important;
    color: #333 !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    transform: none !important;
    letter-spacing: normal !important;
}
#wcqt-popup #WCQT_GoBackWrapper button:hover,
#WCQT_GoBackWrapper td button:hover,
#WCQT_GoBackWrapper button:hover {
    background: #f5f5f5 !important;
    background-image: none !important;
    color: #111 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* ===== Bug #2 v2.0.54: variation text under product title in mini-popup ===== */
.wcqt-mini-variation {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    line-height: 1.4;
}

/* ===== Improvement #8: qty label in mini-popup ===== */
.wcqt-confirm-qty-section {
    text-align: center;
    margin-bottom: 4px;
}
.wcqt-qty-label {
    display: block;
    font-size: 12px;
    color: #555;
    margin-bottom: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ===== Bug #2 v2.0.57: defense-in-depth against theme icon injection =====
   Layer 1: outer wrapper (.wcqt-float-outer) absorbs theme detection
   Layer 2: strip background-image from BOTH outer + inner + all descendants
   Layer 3: suppress pseudo-elements at every nesting level
   Layer 4: hide any descendant of outer that isn't our inner button
   Layer 5: hide any descendant of inner that isn't our SVG/img/counter
   Layer 6: JS MutationObserver in frontend-1.20.js cleans late injections */
.wcqt-float-outer,
.wcqt-float-button,
#WCQT_QuotationButton {
    background-image: none !important;
}
.wcqt-float-outer::before,
.wcqt-float-outer::after,
.wcqt-float-button::before,
.wcqt-float-button::after,
#WCQT_QuotationButton::before,
#WCQT_QuotationButton::after,
.wcqt-float-outer > *::before,
.wcqt-float-outer > *::after,
.wcqt-float-button > *::before,
.wcqt-float-button > *::after,
#WCQT_QuotationButton > *::before,
#WCQT_QuotationButton > *::after {
    display: none !important;
    content: none !important;
    background-image: none !important;
    width: 0 !important;
    height: 0 !important;
}
/* Strip background-image from every descendant of either wrapper */
.wcqt-float-outer *,
.wcqt-float-button *,
#WCQT_QuotationButton * {
    background-image: none !important;
}
/* Hide any descendant of the OUTER that isn't our inner button (theme injections
   often land here because outer is the fixed-positioned element) */
.wcqt-float-outer > *:not(#WCQT_QuotationButton):not(.wcqt-float-button) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}
/* Hide any descendant of the INNER that isn't our SVG/img/counter */
.wcqt-float-button > *:not(.wcqt-float-icon-default):not(.wcqt-products-counter):not(img):not(svg),
#WCQT_QuotationButton > *:not(.wcqt-float-icon-default):not(.wcqt-products-counter):not(img):not(svg) {
    display: none !important;
}
/* Ensure our SVG icon is always visible and on top */
.wcqt-float-button > svg.wcqt-float-icon-default,
#WCQT_QuotationButton > svg.wcqt-float-icon-default,
.wcqt-float-button > img,
#WCQT_QuotationButton > img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 2 !important;
}

/* v2.0.58 → v2.0.81: this block was moved to extra-variables.php so it can be emitted
   conditionally based on the wcqt_hide_xoo_basket option. Sites that intentionally want
   the XootiX shopping cart AND the WCQT quotation cart visible simultaneously can now
   opt out via Settings → General → "Ocultar carrito Xoo WooSidecart". */

/* ===== Bug #4 v2.0.53: content-sized popup — top:auto so height matches content;
   min-height prevents collapse on step 2; max-height prevents viewport overflow. ===== */
#wcqt-popup {
    top: auto !important;
    bottom: 20px !important;
    min-height: 280px !important;
    max-height: calc(100vh - 40px) !important;
}