/* Livros.cl - Identidad visual sobria 1.3.3.
   Actualización desde 1.3.2: contornos en listados, tono coral único,
   CTA sólido solo en ficha/etapas de compra. No altera HTML ni lógica.
   Checkout queda expresamente fuera del alcance.
*/
body.lvpt-brand {
  --lvbrand-primary: #c74739;
  --lvbrand-hover: #a83b30;
  --lvbrand-soft: #fff4f1;
  --lvbrand-ink: #24272d;
  --lvbrand-muted: #92969e;
  --lvbrand-radius: 999px;
  --lvpt-red: var(--lvbrand-primary);
  --lvpt-red-hover: var(--lvbrand-hover);
  --lvpd-coral: var(--lvbrand-primary);
  --lvgu-coral: var(--lvbrand-primary);
}
/* 1. Acciones principales del encabezado y tienda (no toda etiqueta button). */
body.lvpt-brand .lvbk-search button[type="submit"],
body.lvpt-brand .lvbk-main-nav .lvbk-allcats > summary,
body.lvpt-brand .woocommerce a.button.checkout,
body.lvpt-brand .woocommerce a.checkout-button,
body.lvpt-brand .woocommerce button.button:not(.single_add_to_cart_button),
body.lvpt-brand .wc-block-cart__submit-container a.wc-block-cart__submit-button,
body.lvpt-brand .wc-block-cart__submit-container .wc-block-cart__submit-button,
body.lvpt-brand .wp-block-button:not(.is-style-outline) > .wp-block-button__link {
  background-color: var(--lvbrand-primary) !important;
  border-color: var(--lvbrand-primary) !important;
  color: #fff !important;
}
body.lvpt-brand .lvbk-search button[type="submit"]:hover,
body.lvpt-brand .lvbk-main-nav .lvbk-allcats > summary:hover,
body.lvpt-brand .woocommerce a.button.checkout:hover,
body.lvpt-brand .woocommerce a.checkout-button:hover,
body.lvpt-brand .woocommerce button.button:not(.single_add_to_cart_button):hover,
body.lvpt-brand .wc-block-cart__submit-container a.wc-block-cart__submit-button:hover,
body.lvpt-brand .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover {
  background-color: var(--lvbrand-hover) !important;
  border-color: var(--lvbrand-hover) !important;
  color: #fff !important;
}

/* 2. Precio y ofertas: catálogos, búsqueda, relacionados y ficha. */
body.lvpt-brand.lvpt-compact ul.products > li.product > .price,
body.lvpt-brand.lvpt-compact ul.products > li.product > .price ins,
body.lvpt-brand.lvpt-compact ul.products > li.product > .price ins .amount,
body.lvpt-brand.lvpt-compact.single-product section:is(.related,.up-sells).products ul.products > li.product > .price,
body.lvpt-brand.lvpt-compact.single-product section:is(.related,.up-sells).products ul.products > li.product > .price ins,
body.lvpt-brand.lvpt-compact.single-product section:is(.related,.up-sells).products ul.products > li.product > .price ins .amount {
  color: var(--lvbrand-primary) !important;
}
body.lvpt-brand.lvpt-compact ul.products > li.product > .price del,
body.lvpt-brand.lvpt-compact ul.products > li.product > .price del .amount,
body.lvpt-brand.lvpt-compact.single-product section:is(.related,.up-sells).products ul.products > li.product > .price del,
body.lvpt-brand.lvpt-compact.single-product section:is(.related,.up-sells).products ul.products > li.product > .price del .amount {
  color: var(--lvbrand-muted) !important;
  opacity: 1 !important;
}
body.lvpt-brand.single-product div.product .summary .price,
body.lvpt-brand.single-product div.product .summary .price ins,
body.lvpt-brand.single-product div.product .summary .price ins .amount {
  color: var(--lvbrand-primary) !important;
}
body.lvpt-brand.single-product div.product .summary .price del,
body.lvpt-brand.single-product div.product .summary .price del .amount {
  color: var(--lvbrand-muted) !important;
  opacity: 1 !important;
}
body.lvpt-brand .woocommerce ul.products li.product .onsale,
body.lvpt-brand.single-product div.product .onsale,
body.lvpt-brand.single-product section:is(.related,.up-sells) ul.products > li.product .onsale {
  background: var(--lvbrand-primary) !important;
  color: white !important;
  border-color: var(--lvbrand-primary) !important;
}

/* 3. Listados: una acción discreta y perfectamente legible.
   Se conserva la geometría aprobada (ancho, alto, bordes redondeados),
   incluidos relacionados/venta cruzada y búsqueda de productos.
   Reemplazamos el estilo anterior, sin agregar clases ni cambiar enlaces.
*/
body.lvpt-brand.lvpt-compact ul.products > li.product .ct-woo-card-actions > a.add_to_cart_button,
body.lvpt-brand.lvpt-compact ul.products > li.product .ct-woo-card-actions > a.button,
body.lvpt-brand.lvpt-compact.single-product section:is(.related,.up-sells).products ul.products > li.product .ct-woo-card-actions > a.button {
  background: #fff !important;
  background-color: #fff !important;
  color: var(--lvbrand-primary) !important;
  border: 1.5px solid var(--lvbrand-primary) !important;
  border-radius: var(--lvbrand-radius) !important;
  box-shadow: none !important;
}
body.lvpt-brand.lvpt-compact ul.products > li.product .ct-woo-card-actions > a.button:hover,
body.lvpt-brand.lvpt-compact ul.products > li.product .ct-woo-card-actions > a.button:focus-visible,
body.lvpt-brand.lvpt-compact.single-product section:is(.related,.up-sells).products ul.products > li.product .ct-woo-card-actions > a.button:hover,
body.lvpt-brand.lvpt-compact.single-product section:is(.related,.up-sells).products ul.products > li.product .ct-woo-card-actions > a.button:focus-visible {
  background: var(--lvbrand-soft) !important;
  color: var(--lvbrand-hover) !important;
  border-color: var(--lvbrand-hover) !important;
}
/* El SVG del plugin de tarjetas era blanco: recolorear al coral.
   No tocamos el ícono de otros botones ni el comportamiento AJAX. */
body.lvpt-brand.lvpt-compact ul.products > li.product .ct-woo-card-actions > a.add_to_cart_button::before,
body.lvpt-brand.lvpt-compact.single-product section:is(.related,.up-sells).products ul.products > li.product .ct-woo-card-actions > a.add_to_cart_button::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23c74739' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 7h12l1 14H5L6 7Z'/%3E%3Cpath d='M9 9V5a3 3 0 0 1 6 0v4'/%3E%3C/svg%3E") !important;
}
/* La portada tiene tarjetas propias. Mantener su tipografía, espaciado
   y flecha; hacer coherente únicamente el tono y el botón claro. */
body.lvpt-brand.home .lvbk-products-grid .lvbk-product-button {
  background: #fff !important;
  color: var(--lvbrand-primary) !important;
  border: 1.5px solid var(--lvbrand-primary) !important;
  box-shadow: none !important;
}
body.lvpt-brand.home .lvbk-products-grid .lvbk-product-button:hover,
body.lvpt-brand.home .lvbk-products-grid .lvbk-product-button:focus-visible {
  background: var(--lvbrand-soft) !important;
  border-color: var(--lvbrand-hover) !important;
  color: var(--lvbrand-hover) !important;
}
body.lvpt-brand.home .lvbk-product-visual .lvbk-sale {
  background-color: var(--lvbrand-primary) !important;
  color: #fff !important;
}

/* 4. Ficha individual: cambiar el coral antiguo y formas cuadradas.
   Respetamos el DOM, el formulario y el comportamiento del plugin Comprar ahora. */
body.lvpt-brand.single-product div.product .summary form.cart .ct-cart-actions button.single_add_to_cart_button,
body.lvpt-brand.single-product div.product .summary form.cart button.single_add_to_cart_button {
  background: var(--lvbrand-primary) !important;
  color: white !important;
  border: 1px solid var(--lvbrand-primary) !important;
  border-radius: var(--lvbrand-radius) !important;
  min-height: 52px !important;
  font-size: 15px !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}
body.lvpt-brand.single-product div.product .summary form.cart .ct-cart-actions button.single_add_to_cart_button:hover,
body.lvpt-brand.single-product div.product .summary form.cart button.single_add_to_cart_button:hover {
  background: var(--lvbrand-hover) !important;
  border-color: var(--lvbrand-hover) !important;
}
body.lvpt-brand.single-product div.product .summary button.lvcd-buy-now {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #fff !important;
  color: var(--lvbrand-primary) !important;
  border: 1.5px solid var(--lvbrand-primary) !important;
  border-radius: var(--lvbrand-radius) !important;
  min-height: 52px !important;
  font-size: 15px !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}
/* Desktop: mismo ancho para los dos botones de la ficha. */
@media (min-width: 768px) {
  body.lvpt-brand.single-product div.product .summary form.cart {
    width: min(100%, 400px) !important;
  }
  body.lvpt-brand.single-product div.product .summary form.cart .ct-cart-actions {
    width: 100% !important;
  }
  body.lvpt-brand.single-product div.product .summary form.cart .ct-cart-actions button.single_add_to_cart_button {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: none !important;
  }
}
/* Pequeños acentos del encabezado y las categorías con el mismo tono. */
body.lvpt-brand a.lvbk-wordmark > span {
  color: var(--lvbrand-primary) !important;
}
body.lvpt-brand.lvcl-catalogo .lvcl-cats-shortcuts > a:is(.active, [aria-current="page"]),
body.lvpt-brand.lvcl-catalogo .lvcl-cats-shortcuts > a:hover {
  border-color: var(--lvbrand-primary) !important;
  color: var(--lvbrand-primary) !important;
}
body.lvpt-brand.single-product div.product .summary button.lvcd-buy-now:hover {
  background: var(--lvbrand-soft) !important;
  color: var(--lvbrand-hover) !important;
  border-color: var(--lvbrand-hover) !important;
}
body.lvpt-brand.single-product .lvpd-service-item svg,
body.lvpt-brand.single-product .lvpd-service-item a,
body.lvpt-brand.single-product .woocommerce-tabs .tabs li.active a {
  color: var(--lvbrand-primary) !important;
}
body.lvpt-brand.single-product .woocommerce-tabs .tabs li.active a {
  border-bottom-color: var(--lvbrand-primary) !important;
}
body.lvpt-brand.single-product .woocommerce-product-gallery .flexy-pills[data-type="thumbs"] li.active {
  outline-color: var(--lvbrand-primary) !important;
}

/* 5. Mini-carrito: acciones principales y secundarias con el mismo lenguaje. */
body.lvpt-brand .lvcd-panel .lvcd-checkout {
  background: var(--lvbrand-primary) !important;
  color: #fff !important;
  border-color: var(--lvbrand-primary) !important;
  border-radius: var(--lvbrand-radius) !important;
}
body.lvpt-brand .lvcd-panel .lvcd-checkout:hover {
  background: var(--lvbrand-hover) !important;
  border-color: var(--lvbrand-hover) !important;
}
body.lvpt-brand .lvcd-panel .lvcd-continue {
  background: #fff !important;
  color: var(--lvbrand-primary) !important;
  border-color: var(--lvbrand-primary) !important;
  border-radius: var(--lvbrand-radius) !important;
}
body.lvpt-brand .lvcd-panel .lvcd-continue:hover {
  background: var(--lvbrand-soft) !important;
}
/* Mantener verde WhatsApp, mensajes de stock, errores, pasarelas y focos nativos:
   esos colores son semánticos y no forman parte del color promocional. */

@media (max-width: 767px) {
  body.lvpt-brand.single-product div.product .summary form.cart .ct-cart-actions button.single_add_to_cart_button,
  body.lvpt-brand.single-product div.product .summary button.lvcd-buy-now {
    width: 100% !important;
    max-width: none !important;
    min-height: 52px !important;
    height: 52px !important;
    font-size: 15px !important;
    border-radius: var(--lvbrand-radius) !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.lvpt-brand.single-product div.product .summary button.lvcd-buy-now,
  body.lvpt-brand.single-product div.product .summary form.cart button.single_add_to_cart_button {
    transition: none !important;
  }
}

/* 1.3.1: WooCommerce/Blocksy oculta cantidad cuando su maximo es 1.
 * El controlador de compra movil (lvcd-css) usaba display:flex !important
 * en cualquier .quantity y mostraba flechas sin valor editable.
 * Restaurar el estado hidden sin modificar el input type=hidden (quantity=1).
 */
body.lvpt-brand.single-product div.product .summary form.cart .ct-cart-actions .quantity.hidden {
  display: none !important;
}
