/* ===================================================================
   ZEBRIONIX · UI MODERNA
   Módulo: formularios (inputs, selects, cantidades) y avisos/notificaciones
   Ubicación: css/modern-ui.css
   =================================================================== */

:root {
    --zx-brand: #26adeb;
    --zx-brand-dark: #1a7eb0;
    --zx-brand-deep: #0b5f86;
    --zx-ink: #0f172a;
    --zx-muted: #64748b;
    --zx-line: #dfe7ef;
    --zx-line-strong: #c3d6e4;
    --zx-ring: rgba(38, 173, 235, 0.18);
    --zx-radius: 14px;
    --zx-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

/* ===================================================================
   1. CAMPOS DE TEXTO · CHECKOUT Y CARRITO (WooCommerce Blocks)
   =================================================================== */

body .wc-block-components-text-input,
body .wc-block-components-combobox,
body .wc-blocks-components-select {
    margin-top: 14px !important;
}

body .wc-block-components-text-input input[type="text"],
body .wc-block-components-text-input input[type="email"],
body .wc-block-components-text-input input[type="tel"],
body .wc-block-components-text-input input[type="password"],
body .wc-block-components-text-input input[type="number"],
body .wc-block-components-text-input input[type="date"],
body .wc-block-components-text-input input[type="search"],
body .wc-block-components-text-input input[type="url"],
body .wc-block-components-textarea {
    height: 54px !important;
    padding: 23px 14px 8px !important;
    border: 1.5px solid var(--zx-line) !important;
    border-radius: var(--zx-radius) !important;
    background-color: #ffffff !important;
    color: var(--zx-ink) !important;
    font-size: 16px !important;
    line-height: 20px !important;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease !important;
    outline: none !important;
    box-sizing: border-box !important;
}

body .wc-block-components-textarea {
    height: auto !important;
    min-height: 96px !important;
    padding: 16px 14px !important;
    resize: vertical;
}

body .wc-block-components-text-input input:hover,
body .wc-block-components-textarea:hover {
    border-color: var(--zx-line-strong) !important;
}

body .wc-block-components-text-input input:focus,
body .wc-block-components-textarea:focus {
    border-color: var(--zx-brand) !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 4px var(--zx-ring) !important;
}

/* Etiqueta flotante */
body .wc-block-components-text-input label {
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 15px !important;
    line-height: 20px !important;
    color: var(--zx-muted) !important;
    transition: all 0.18s ease !important;
    pointer-events: none;
}

body .wc-block-components-text-input:focus-within label,
body .wc-block-components-text-input.is-active label {
    top: 7px !important;
    transform: none !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    color: var(--zx-brand-dark) !important;
}

/* Selects (país / departamento) */
body .wc-blocks-components-select__container {
    border-radius: var(--zx-radius) !important;
    background: #ffffff !important;
}

body .wc-blocks-components-select__select {
    height: 54px !important;
    padding: 23px 40px 8px 14px !important;
    border: 1.5px solid var(--zx-line) !important;
    border-radius: var(--zx-radius) !important;
    background-color: #ffffff !important;
    color: var(--zx-ink) !important;
    font-size: 16px !important;
    line-height: 20px !important;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
    outline: none !important;
    box-sizing: border-box !important;
    cursor: pointer;
}

body .wc-blocks-components-select__select:hover {
    border-color: var(--zx-line-strong) !important;
}

body .wc-blocks-components-select__select:focus {
    border-color: var(--zx-brand) !important;
    box-shadow: 0 0 0 4px var(--zx-ring) !important;
}

body .wc-blocks-components-select__label {
    left: 14px !important;
    top: 7px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    color: var(--zx-brand-dark) !important;
    line-height: 1.2 !important;
}

body .wc-blocks-components-select__expand {
    right: 14px !important;
    fill: var(--zx-brand-dark) !important;
    width: 22px !important;
    height: 22px !important;
}

/* Estado de error */
body .wc-block-components-text-input.has-error input,
body .has-error .wc-blocks-components-select__select {
    border-color: #e11d48 !important;
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.12) !important;
}

body .wc-block-components-text-input.has-error label,
body .has-error .wc-blocks-components-select__label {
    color: #e11d48 !important;
}

/* Autocompletado del navegador */
body .wc-block-components-text-input input:-webkit-autofill,
body .wc-block-components-text-input input:-webkit-autofill:hover,
body .wc-block-components-text-input input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--zx-ink) !important;
    box-shadow: inset 0 0 0 60px #ffffff, 0 0 0 4px var(--zx-ring) !important;
    transition: background-color 9999s ease-out 0s !important;
}

/* ===================================================================
   2. OPCIONES DE ENVÍO Y PAGO (tarjetas seleccionables)
   =================================================================== */

body .wc-block-components-radio-control__option {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-height: 52px;
    margin: 0 0 10px !important;
    padding: 15px 16px !important;
    border: 1.5px solid var(--zx-line) !important;
    border-radius: var(--zx-radius) !important;
    background: #ffffff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    cursor: pointer;
}

body .wc-block-components-radio-control__option:hover {
    border-color: #b9e2f6 !important;
    background: #fbfdff !important;
}

body .wc-block-components-radio-control__option-checked {
    border-color: var(--zx-brand) !important;
    background: linear-gradient(180deg, #f6fcff 0%, #ffffff 100%) !important;
    box-shadow: 0 0 0 3px var(--zx-ring) !important;
}

body .wc-block-components-radio-control__input {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    margin: 1px 0 0 !important;
    accent-color: var(--zx-brand-dark) !important;
    cursor: pointer;
}

body .wc-block-components-radio-control__option-layout {
    flex: 1 1 auto;
    min-width: 0;
}

body .wc-block-components-radio-control__description,
body .wc-block-components-radio-control__secondary-description {
    color: var(--zx-muted) !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    margin-top: 4px !important;
}

/* Opciones de pago con contenido desplegable: una sola tarjeta */
body .wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option {
    margin: 0 0 10px !important;
    padding: 4px !important;
    border: 1.5px solid var(--zx-line) !important;
    border-radius: var(--zx-radius) !important;
    background: #ffffff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    overflow: hidden;
}

body .wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option:hover {
    border-color: #b9e2f6 !important;
}

body .wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option--checked-option-highlighted {
    border-color: var(--zx-brand) !important;
    background: linear-gradient(180deg, #f6fcff 0%, #ffffff 100%) !important;
    box-shadow: 0 0 0 3px var(--zx-ring) !important;
}

body .wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option {
    margin: 0 !important;
    padding: 12px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
    min-height: 46px;
}

body .wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-content {
    padding: 0 14px 14px 44px !important;
}

body .wc-block-payment-method__description {
    color: var(--zx-muted) !important;
    font-size: 14px !important;
}

/* Casillas de verificación */
body .wc-block-components-checkbox__input,
body .wc-block-components-checkbox input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    border-radius: 6px !important;
    accent-color: var(--zx-brand-dark) !important;
}

/* ===================================================================
   3. BOTONES PRINCIPALES DEL CHECKOUT / CARRITO
   =================================================================== */

body .wc-block-components-button.contained,
body .wc-block-checkout__actions .wc-block-components-checkout-place-order-button,
body .wc-block-cart__submit-button {
    min-height: 54px !important;
    border: 0 !important;
    border-radius: var(--zx-radius) !important;
    background: linear-gradient(135deg, var(--zx-brand) 0%, var(--zx-brand-dark) 100%) !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 24px rgba(38, 173, 235, 0.32) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease !important;
}

body .wc-block-components-button.contained:hover,
body .wc-block-checkout__actions .wc-block-components-checkout-place-order-button:hover,
body .wc-block-cart__submit-button:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(38, 173, 235, 0.38) !important;
}

body .wc-block-components-button.contained:active,
body .wc-block-checkout__actions .wc-block-components-checkout-place-order-button:active,
body .wc-block-cart__submit-button:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(38, 173, 235, 0.28) !important;
}

/* Botón "Proceder al pago" del carrito (gana al CSS del personalizador) */
body.woocommerce-cart .wp-block-woocommerce-cart .wc-block-cart__submit-container .wc-block-components-button.wc-block-cart__submit-button.wp-element-button.contained {
    min-height: 54px !important;
    border: 0 !important;
    border-radius: var(--zx-radius) !important;
    background: linear-gradient(135deg, var(--zx-brand) 0%, var(--zx-brand-dark) 100%) !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 24px rgba(38, 173, 235, 0.32) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease !important;
}

body.woocommerce-cart .wp-block-woocommerce-cart .wc-block-cart__submit-container .wc-block-components-button.wc-block-cart__submit-button.wp-element-button.contained:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(38, 173, 235, 0.38) !important;
}

/* Botón "Realizar el pedido" del checkout */
body.woocommerce-checkout .wp-block-woocommerce-checkout .wc-block-components-button.contained.wp-element-button {
    min-height: 50px !important;
    border: 0 !important;
    border-radius: var(--zx-radius) !important;
    background: linear-gradient(135deg, var(--zx-brand) 0%, var(--zx-brand-dark) 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 8px 20px rgba(38, 173, 235, 0.3) !important;
}

body.woocommerce-checkout .wp-block-woocommerce-checkout .wc-block-checkout__actions .wc-block-components-button.wc-block-components-checkout-place-order-button.contained {
    min-height: 54px !important;
    border: 0 !important;
    border-radius: var(--zx-radius) !important;
    background: linear-gradient(135deg, var(--zx-brand) 0%, var(--zx-brand-dark) 100%) !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    box-shadow: 0 10px 24px rgba(38, 173, 235, 0.32) !important;
}

body.woocommerce-checkout .wp-block-woocommerce-checkout .wc-block-checkout__actions .wc-block-components-button.wc-block-components-checkout-place-order-button.contained:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(38, 173, 235, 0.38) !important;
}

body .wc-block-components-button.contained:disabled,
body .wc-block-components-button.contained[aria-disabled="true"] {
    background: #cbd5e1 !important;
    box-shadow: none !important;
    transform: none;
    opacity: 0.75;
}

/* Enlaces tipo botón dentro de avisos */
body .wc-block-components-notice-banner .wc-forward {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px;
    min-height: 40px;
    padding: 8px 18px !important;
    border-radius: 999px !important;
    background: var(--zx-brand-dark) !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    opacity: 1 !important;
    box-shadow: 0 6px 14px rgba(26, 126, 176, 0.28);
    transition: background 0.18s ease, transform 0.18s ease;
}

body .wc-block-components-notice-banner .wc-forward:hover {
    background: var(--zx-brand-deep) !important;
    transform: translateY(-1px);
}

/* ===================================================================
   4. CANTIDADES
   =================================================================== */

body .wc-block-components-quantity-selector {
    display: inline-flex !important;
    align-items: center !important;
    height: 46px !important;
    border: 1.5px solid var(--zx-line) !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body .wc-block-components-quantity-selector__input {
    width: 48px !important;
    min-width: 48px !important;
    height: 44px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--zx-ink) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-align: center !important;
    box-shadow: none !important;
}

body .wc-block-components-quantity-selector__button {
    width: 42px !important;
    height: 44px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--zx-brand-dark) !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

body .wc-block-components-quantity-selector__button:hover {
    background: #eef8fe !important;
    color: var(--zx-brand-deep) !important;
}

body .wc-block-components-quantity-selector__button:disabled {
    color: #cbd5e1 !important;
    background: transparent !important;
    cursor: not-allowed;
}

/* Cantidad clásica (ficha de producto / carrito corto) */
body .quantity input.qty,
body .woocommerce form .quantity input.input-text {
    height: 52px !important;
    min-width: 64px;
    padding: 0 12px !important;
    border: 1.5px solid var(--zx-line) !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    color: var(--zx-ink) !important;
    font-size: 16px !important;
    font-weight: 600;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

body .quantity input.qty:focus {
    border-color: var(--zx-brand) !important;
    box-shadow: 0 0 0 4px var(--zx-ring) !important;
    outline: none !important;
}

/* ===================================================================
   5. FORMULARIOS CLÁSICOS (Mi cuenta, login, registro, cupones)
   =================================================================== */

body.woocommerce-account .woocommerce form input.input-text,
body.woocommerce-account .woocommerce form select,
body.woocommerce-account .woocommerce form textarea,
body .woocommerce form.login input.input-text,
body .woocommerce form.register input.input-text,
body .woocommerce form.lost_reset_password input.input-text,
body .woocommerce .woocommerce-form-coupon input.input-text {
    height: 52px !important;
    padding: 0 16px !important;
    border: 1.5px solid var(--zx-line) !important;
    border-radius: var(--zx-radius) !important;
    background: #ffffff !important;
    color: var(--zx-ink) !important;
    font-size: 15px !important;
    line-height: 50px !important;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
    outline: none !important;
    box-sizing: border-box !important;
}

body.woocommerce-account .woocommerce form textarea {
    height: auto !important;
    min-height: 110px !important;
    padding: 14px 16px !important;
    line-height: 1.6 !important;
}

body.woocommerce-account .woocommerce form input.input-text:hover,
body.woocommerce-account .woocommerce form select:hover,
body .woocommerce form.login input.input-text:hover {
    border-color: var(--zx-line-strong) !important;
}

body.woocommerce-account .woocommerce form input.input-text:focus,
body.woocommerce-account .woocommerce form select:focus,
body.woocommerce-account .woocommerce form textarea:focus,
body .woocommerce form.login input.input-text:focus,
body .woocommerce form.register input.input-text:focus {
    border-color: var(--zx-brand) !important;
    box-shadow: 0 0 0 4px var(--zx-ring) !important;
    background: #ffffff !important;
}

body.woocommerce-account .woocommerce form .form-row label,
body .woocommerce form.login label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    margin-bottom: 6px !important;
}

/* Input de búsqueda de cabecera */
body .custom-search-form {
    height: 48px !important;
    padding: 4px 5px 4px 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    box-shadow: 0 6px 18px rgba(11, 95, 134, 0.18) !important;
    transition: box-shadow 0.2s ease, border-color 0.2s ease !important;
}

body .custom-search-form:focus-within {
    border-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.28), 0 10px 24px rgba(11, 95, 134, 0.22) !important;
}

body .custom-search-form input.search-field {
    font-size: 14px !important;
    height: 38px !important;
    padding: 0 !important;
    color: #0f172a !important;
}

body .custom-search-form input.search-field::placeholder {
    color: #94a3b8 !important;
    opacity: 1;
}

body .custom-search-form .search-btn {
    width: 38px !important;
    height: 38px !important;
    background: linear-gradient(135deg, var(--zx-brand) 0%, var(--zx-brand-dark) 100%) !important;
    box-shadow: 0 4px 10px rgba(26, 126, 176, 0.28) !important;
    transition: transform 0.18s ease, filter 0.18s ease !important;
}

body .custom-search-form .search-btn:hover {
    transform: scale(1.05);
    filter: brightness(1.05);
}

/* ===================================================================
   6. AVISOS CLÁSICOS DE WOOCOMMERCE
      ("se ha añadido a tu carrito · Ver carrito", errores, info)
   =================================================================== */

body .woocommerce-notices-wrapper {
    margin-bottom: 18px;
}

body .woocommerce-message,
body .woocommerce-info,
body .woocommerce-error {
    position: relative !important;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    width: 100%;
    margin: 0 0 14px !important;
    padding: 18px 56px 18px 62px !important;
    border: 1.5px solid #bbf7d0 !important;
    border-radius: 16px !important;
    background: linear-gradient(120deg, #f0fdf4 0%, #ffffff 70%) !important;
    color: #14532d !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
    box-shadow: var(--zx-shadow) !important;
    list-style: none !important;
    box-sizing: border-box !important;
    animation: zx-notice-in 0.4s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}

body .woocommerce-message::before,
body .woocommerce-info::before,
body .woocommerce-error::before {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    font-family: inherit;
}

body .woocommerce-message::before {
    content: "✓";
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.35);
}

body .woocommerce-info {
    border-color: #bae6fd !important;
    background: linear-gradient(120deg, #f0f9ff 0%, #ffffff 70%) !important;
    color: #075985 !important;
}

body .woocommerce-info::before {
    content: "i";
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    background: linear-gradient(135deg, #38bdf8 0%, #0369a1 100%);
    box-shadow: 0 4px 10px rgba(3, 105, 161, 0.3);
}

body .woocommerce-error {
    border-color: #fecdd3 !important;
    background: linear-gradient(120deg, #fff1f2 0%, #ffffff 70%) !important;
    color: #9f1239 !important;
    align-items: flex-start;
}

body .woocommerce-error::before {
    content: "!";
    background: linear-gradient(135deg, #fb7185 0%, #be123c 100%);
    box-shadow: 0 4px 10px rgba(190, 18, 60, 0.3);
}

body .woocommerce-error li {
    width: 100%;
    margin: 0 !important;
    padding: 2px 0;
    list-style: none;
}

body .woocommerce-error li + li {
    border-top: 1px solid rgba(190, 18, 60, 0.12);
    padding-top: 8px;
    margin-top: 8px;
}

/* Botón "Ver carrito" / "Continuar" dentro del aviso */
body .woocommerce-message .wc-forward,
body .woocommerce-info .wc-forward,
body .woocommerce-error .wc-forward {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    margin-left: auto;
    padding: 10px 20px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, var(--zx-brand) 0%, var(--zx-brand-dark) 100%) !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(38, 173, 235, 0.32);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

body .woocommerce-message .wc-forward::after,
body .woocommerce-info .wc-forward::after {
    content: "→";
    font-size: 15px;
    line-height: 1;
}

body .woocommerce-message .wc-forward:hover,
body .woocommerce-info .wc-forward:hover,
body .woocommerce-error .wc-forward:hover {
    background: linear-gradient(135deg, var(--zx-brand-dark) 0%, var(--zx-brand-deep) 100%) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(38, 173, 235, 0.4);
}

/* Botón para cerrar avisos (lo añade modern-ui.js) */
body .zx-notice-close,
body .zx-notice-close-item button {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: currentColor;
    font-size: 20px;
    line-height: 1;
    opacity: 0.55;
    cursor: pointer;
    transition: opacity 0.15s ease, background 0.15s ease;
}

body .zx-notice-close:hover,
body .zx-notice-close-item button:hover {
    opacity: 1;
    background: rgba(15, 23, 42, 0.06);
}

body .woocommerce-error .zx-notice-close-item {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body .woocommerce-message.zx-hiding,
body .woocommerce-info.zx-hiding,
body .woocommerce-error.zx-hiding {
    animation: zx-notice-out 0.22s ease forwards;
}

/* ===================================================================
   7. AVISOS DE WOOCOMMERCE BLOCKS (carrito / checkout)
   =================================================================== */

body .wc-block-components-notice-banner {
    display: flex !important;
    align-items: center !important;
    gap: 12px;
    padding: 15px 18px !important;
    border: 1.5px solid #bbf7d0 !important;
    border-radius: 16px !important;
    background: linear-gradient(120deg, #f0fdf4 0%, #ffffff 75%) !important;
    color: #14532d !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
    box-shadow: var(--zx-shadow) !important;
    box-sizing: border-box;
    animation: zx-notice-in 0.4s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}

body .wc-block-components-notice-banner > svg {
    flex: 0 0 auto;
    width: 26px !important;
    height: 26px !important;
    padding: 4px !important;
    border-radius: 50%;
    background-color: #16a34a !important;
    fill: #ffffff !important;
}

body .wc-block-components-notice-banner.is-info {
    border-color: #bae6fd !important;
    background: linear-gradient(120deg, #f0f9ff 0%, #ffffff 75%) !important;
    color: #075985 !important;
}

body .wc-block-components-notice-banner.is-info > svg {
    background-color: #0284c7 !important;
}

body .wc-block-components-notice-banner.is-warning {
    border-color: #fde68a !important;
    background: linear-gradient(120deg, #fffbeb 0%, #ffffff 75%) !important;
    color: #92400e !important;
}

body .wc-block-components-notice-banner.is-warning > svg {
    background-color: #f59e0b !important;
}

body .wc-block-components-notice-banner.is-error {
    border-color: #fecdd3 !important;
    background: linear-gradient(120deg, #fff1f2 0%, #ffffff 75%) !important;
    color: #9f1239 !important;
}

body .wc-block-components-notice-banner.is-error > svg {
    background-color: #e11d48 !important;
}

body .wc-block-components-notice-banner > .wc-block-components-notice-banner__content {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 0 !important;
}

body .wc-block-components-notice-banner > .wc-block-components-notice-banner__content .wc-block-components-notice-banner__summary {
    font-weight: 700 !important;
    margin-bottom: 6px !important;
}

body .wc-block-components-notice-banner > .wc-block-components-notice-banner__content .wc-forward {
    margin-left: 0 !important;
    margin-top: 10px;
}

body .wc-block-components-notice-banner > .wc-block-components-button {
    flex: 0 0 auto;
    align-self: flex-start;
    width: 30px !important;
    height: 30px !important;
    margin: 0 0 0 auto !important;
    border-radius: 50% !important;
    opacity: 0.55 !important;
    background: transparent !important;
    color: currentColor !important;
}

body .wc-block-components-notice-banner > .wc-block-components-button:hover {
    opacity: 1 !important;
    background: rgba(15, 23, 42, 0.06) !important;
}

/* ===================================================================
   8. SNACKBARS (avisos flotantes de Blocks)
   =================================================================== */

body .wc-block-components-notice-snackbar-list {
    left: 50% !important;
    right: auto !important;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    width: min(560px, calc(100vw - 24px)) !important;
    transform: translateX(-50%);
}

body .components-snackbar,
body .wc-block-components-notice-snackbar-list .components-snackbar {
    border-radius: 16px !important;
    background: #0f172a !important;
    color: #ffffff !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.32) !important;
    overflow: hidden;
    animation: zx-snackbar-in 0.35s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}

body .components-snackbar__content {
    padding: 15px 18px !important;
    font-size: 14.5px !important;
    line-height: 1.5 !important;
}

body .components-snackbar__content a {
    color: #7dd3fc !important;
    font-weight: 700;
    text-decoration: none;
}

body .components-snackbar__content a:hover {
    text-decoration: underline;
}

body .components-snackbar__action {
    padding: 15px 18px !important;
    font-weight: 700 !important;
    color: #7dd3fc !important;
}

/* ===================================================================
   9. AJUSTES DEL CHECKOUT (tarjetas y jerarquía visual)
   =================================================================== */

body.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-block {
    border-top: 4px solid var(--zx-brand) !important;
}

body .wc-block-components-checkout-step {
    margin-bottom: 10px;
}

body .wc-block-components-checkout-step__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19px !important;
    font-weight: 800 !important;
    color: var(--zx-ink) !important;
    letter-spacing: -0.01em;
}

body .wc-block-components-checkout-step__title::before {
    content: "";
    flex: 0 0 auto;
    width: 6px;
    height: 22px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--zx-brand) 0%, var(--zx-brand-dark) 100%);
}

body .wc-block-components-checkout-step__container {
    margin-top: 12px;
}

body .wc-block-components-checkout-step__description {
    color: var(--zx-muted) !important;
    font-size: 13.5px !important;
    line-height: 1.55;
}

body .wc-block-checkout__sidebar .wc-block-components-totals-item__label,
body .wc-block-checkout__sidebar .wc-block-components-totals-item__value {
    font-size: 15px;
}

body .wc-block-checkout__sidebar .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: var(--zx-ink) !important;
}

/* Aviso de "no hay opciones de envío" más legible */
body .wc-block-components-shipping-rates-control__no-results-notice {
    border-radius: 14px !important;
    font-size: 14.5px !important;
}

/* Código de cupón abierto en carrito/checkout */
body .wc-block-components-totals-coupon__form {
    gap: 10px;
}

body .wc-block-components-totals-coupon__button {
    min-height: 54px !important;
    border-radius: var(--zx-radius) !important;
    font-weight: 700 !important;
}

/* ===================================================================
   10. RESPONSIVE
   =================================================================== */

@media (max-width: 921px) {
    body .custom-search-form {
        height: 44px !important;
        padding-left: 16px !important;
    }

    body .custom-search-form .search-btn {
        width: 34px !important;
        height: 34px !important;
    }
}

@media (max-width: 768px) {
    body .wc-block-components-text-input input[type="text"],
    body .wc-block-components-text-input input[type="email"],
    body .wc-block-components-text-input input[type="tel"],
    body .wc-block-components-text-input input[type="password"],
    body .wc-block-components-text-input input[type="number"],
    body .wc-block-components-text-input input[type="date"],
    body .wc-block-components-text-input input[type="search"] {
        height: 52px !important;
        padding: 22px 14px 7px !important;
        font-size: 16px !important;
    }

    body .wc-blocks-components-select__select {
        height: 52px !important;
        padding: 22px 38px 7px 14px !important;
    }

    body .wc-block-components-text-input:focus-within label,
    body .wc-block-components-text-input.is-active label {
        top: 6px !important;
        font-size: 11.5px !important;
    }

    body .wc-blocks-components-select__label {
        top: 6px !important;
        font-size: 11.5px !important;
    }

    /* Avisos apilados y cómodos al tacto */
    body .woocommerce-message,
    body .woocommerce-info,
    body .woocommerce-error {
        padding: 16px 48px 16px 58px !important;
        font-size: 14.5px !important;
        border-radius: 14px !important;
    }

    body .woocommerce-message::before,
    body .woocommerce-info::before,
    body .woocommerce-error::before {
        left: 14px;
        width: 28px;
        height: 28px;
        font-size: 15px;
    }

    body .woocommerce-message .wc-forward,
    body .woocommerce-info .wc-forward,
    body .woocommerce-error .wc-forward {
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
        padding: 12px 18px !important;
    }

    body .wc-block-components-notice-banner {
        padding: 14px !important;
        gap: 10px;
        font-size: 14.5px !important;
        align-items: flex-start !important;
    }

    body .wc-block-components-notice-banner > .wc-block-components-notice-banner__content .wc-forward {
        width: 100%;
        margin-top: 8px;
    }

    body .wc-block-components-radio-control__option {
        padding: 14px !important;
    }

    body .wc-block-components-checkout-step__title {
        font-size: 17px !important;
    }

    body .wc-block-components-checkout-step__title::before {
        height: 20px;
        width: 5px;
    }

    body .wc-block-components-button.contained,
    body .wc-block-checkout__actions .wc-block-components-checkout-place-order-button,
    body .wc-block-cart__submit-button,
    body.woocommerce-cart .wp-block-woocommerce-cart .wc-block-cart__submit-container .wc-block-components-button.wc-block-cart__submit-button.wp-element-button.contained {
        min-height: 52px !important;
        font-size: 15.5px !important;
    }
}

/* ===================================================================
   11. PREFERENCIAS DE MOVIMIENTO
   =================================================================== */

@media (prefers-reduced-motion: reduce) {
    body .woocommerce-message,
    body .woocommerce-info,
    body .woocommerce-error,
    body .wc-block-components-notice-banner,
    body .components-snackbar {
        animation: none !important;
    }

    body .wc-block-components-button.contained,
    body .custom-search-form .search-btn {
        transition: none !important;
    }
}

/* ===================================================================
   12. ANIMACIONES
   =================================================================== */

@keyframes zx-notice-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zx-notice-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

@keyframes zx-snackbar-in {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
