/*
 * Remig WooCommerce Overrides
 *
 * Este archivo NO redefine tipografías ni tamaños que ya están en main.css.
 * Solo corrige lo que WooCommerce o WordPress rompen:
 *   - Imágenes ocultas por el sistema .bg
 *   - Elementos Woo nativos (toolbar, notices, paginación, botones .button)
 *   - Visibilidad de galería
 */

/* =============================================
   Deshabilitar CSS nativo de Woo (se hace en PHP)
   Solo agregar resets mínimos para que funcione
   ============================================= */

/* Botones nativos Woo → igualar a .btn del tema */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #1b2a4a;
    border: 2px solid #1b2a4a;
    color: #fff;
    font-family: "Manrope", sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s ease;
    text-decoration: none;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background-color: #142038;
    border-color: #142038;
    color: #fff;
}

/* =============================================
   CATALOG: imágenes y toolbar Woo
   ============================================= */

/* Forzar visibilidad de imagen dentro de .bg */
article.article--catalog .article__bg .bg {
    opacity: 1 !important;
}

article.article--catalog .article__bg .bg img {
    display: block !important;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

article.article--catalog .article__bg .bg > a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Toolbar de tienda: resultado + ordenar */
.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.catalog-toolbar .woocommerce-result-count {
    margin: 0;
    font-family: "Work Sans", sans-serif;
    font-size: 14px;
    color: #6b7280;
    float: none;
}

.catalog-toolbar .woocommerce-ordering {
    margin: 0;
    float: none;
}

.catalog-toolbar .woocommerce-ordering select {
    font-family: "Work Sans", sans-serif;
    font-size: 14px;
    color: #1a1a2e;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    background: #fff;
    height: 40px;
    padding: 0 12px;
}

@media (max-width: 720px) {
    .catalog-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =============================================
   SINGLE PRODUCT: galería visible + form.cart
   ============================================= */

/* Galería: imágenes siempre visibles */
.section--product .product__gallery .product__gallery__main .bg,
.section--product .product__gallery .product__gallery__thumb .bg {
    opacity: 1 !important;
}

.section--product .product__gallery .product__gallery__main .bg img,
.section--product .product__gallery .product__gallery__thumb .bg img {
    display: block !important;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Thumb activa */
.product__gallery .product__gallery__thumb.product__gallery__thumb--active {
    border-color: #c8a96e;
}

/* form.cart layout: bloque (no flex en fila) */
.section--product .product__actions form.cart {
    display: block;
}

/* Botones de producto: display block completo */
.section--product .product__buttons .btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.section--product .product__buttons .btn--link {
    display: inline-flex;
    width: auto;
    align-items: center;
    gap: 6px;
}

/* =============================================
   CARRITO / CHECKOUT / GRACIAS: wrappers Woo
   ============================================= */

.section--cart .woocommerce,
.section--checkout .woocommerce,
.section--thanks .woocommerce {
    width: 100%;
}

/* =============================================
   Notices Woo
   ============================================= */

.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    font-family: "Work Sans", sans-serif;
    font-size: 14px;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    list-style: none;
}

.woocommerce-message {
    background: rgba(40, 167, 69, 0.08);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #155724;
}

.woocommerce-error {
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #721c24;
}

.woocommerce-info {
    background: rgba(27, 42, 74, 0.06);
    border: 1px solid rgba(27, 42, 74, 0.2);
    color: #1b2a4a;
}

/* =============================================
   Paginación
   ============================================= */

.woocommerce-pagination {
    margin-top: 30px;
    text-align: center;
}

.woocommerce-pagination ul {
    display: inline-flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    font-family: "Manrope", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1b2a4a;
    text-decoration: none;
    transition: 0.2s ease;
}

.woocommerce-pagination ul li a:hover,
.woocommerce-pagination ul li span.current {
    background-color: #1b2a4a;
    border-color: #1b2a4a;
    color: #fff;
}

/* =============================================
   CARRITO: imágenes y quantity input Woo
   ============================================= */

/* Imagen del producto en carrito siempre visible */
.cart__product__image .bg {
    opacity: 1 !important;
}

.cart__product__image .bg img {
    display: block !important;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Woo quantity input → integrar con controles del front */
.section--cart .quantity {
    display: inline-flex;
    align-items: center;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.section--cart .quantity .qty {
    width: 50px;
    height: 40px;
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: 600;
    padding: 0;
    -moz-appearance: textfield;
    font-family: "Manrope", sans-serif;
}

.section--cart .quantity .qty::-webkit-inner-spin-button,
.section--cart .quantity .qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

/* Enlace eliminar del carrito */
.cart__product__remove {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: "Work Sans", sans-serif;
}

.cart__product__remove:hover {
    color: #c62232;
}

/* Acciones del carrito: separar izquierda/derecha */
.cart__actions__right {
    display: flex;
    gap: 10px;
}

@media (max-width: 720px) {
    .cart__actions {
        flex-direction: column;
    }

    .cart__actions__right {
        flex-direction: column;
        width: 100%;
    }

    .cart__actions__right .btn {
        width: 100%;
    }
}

/* Breadcrumb del hero del carrito */
.section--cart-hero .catalog-breadcrumb__list {
    display: flex;
    gap: 0;
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.section--cart-hero .catalog-breadcrumb__list li,
.section--cart-hero .catalog-breadcrumb__list li a {
    font-family: "Work Sans", sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.82);
}

.section--cart-hero .catalog-breadcrumb__list li a {
    text-decoration: none;
}
