/**
 * ComprarOnline - Global Tweaks CSS
 * Theme: Astra & WooCommerce overrides
 */

/* Hide all page title headers on pages */
body.page .entry-header,
body.page header.entry-header,
body.page .entry-title,
body.page h1.entry-title,
body.page .ast-archive-description,
body.page .ast-single-post-order .entry-header,
body.page .ast-archive-entry-banner,
body.woocommerce-shop .woocommerce-products-header__title.page-title,
body.woocommerce-page.page .entry-header {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    visibility: hidden !important;
}

/* Hide text site title next to logo */
.site-title,
.site-description,
.ast-site-title-wrap .site-title,
.ast-site-title-wrap .site-description,
.site-branding .site-title {
    display: none !important;
}

/* Logo sizing */
.custom-logo-link img {
    max-height: 52px !important;
    width: auto !important;
    display: block;
}

.site-branding {
    display: flex;
    align-items: center;
}

/* Botón Ver producto para productos sin stock en vitrinas */
.woocommerce ul.products li.product .button.co-out-of-stock-btn,
.woocommerce-page ul.products li.product .button:not(.add_to_cart_button) {
    background-color: #f1f5f9 !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    font-weight: 600 !important;
}

.woocommerce ul.products li.product .button.co-out-of-stock-btn:hover,
.woocommerce-page ul.products li.product .button:not(.add_to_cart_button):hover {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

/* Insignia de stock en ficha de producto */
.woocommerce div.product .stock.out-of-stock {
    background: #fef2f2;
    color: #b91c1c;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 700;
    display: inline-block;
    border: 1px solid #fecaca;
}

.woocommerce div.product .stock.in-stock {
    background: #ecfdf5;
    color: #047857;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 700;
    display: inline-block;
    border: 1px solid #a7f3d0;
}

/* Insignia de Oferta moderna */
.woocommerce span.onsale,
.woocommerce-page span.onsale {
    background-color: #ef4444 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    padding: 4px 10px !important;
    min-height: auto !important;
    line-height: 1.4 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* ==========================================================================
   Corrección de proporción y aspecto en vitrinas de productos (Tienda y Categorías)
   ========================================================================== */
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap,
.woocommerce-page ul.products li.product .astra-shop-thumbnail-wrap {
    aspect-ratio: 1 / 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    overflow: hidden !important;
    position: relative !important;
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap a.woocommerce-LoopProduct-link,
.woocommerce-page ul.products li.product .astra-shop-thumbnail-wrap a.woocommerce-LoopProduct-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1 / 1 !important;
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap img,
.woocommerce-page ul.products li.product .astra-shop-thumbnail-wrap img,
.woocommerce ul.products li.product a img,
.woocommerce-page ul.products li.product a img {
    aspect-ratio: 1 / 1 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    margin: 0 auto !important;
    display: block !important;
}

/* ==========================================================================
   Barra Superior de Confianza MercadoLibre / MercadoLíder Platinum Oficial
   ========================================================================== */
.co-ml-top-bar {
    background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 40%, #fef08a 100%) !important;
    border: 1px solid #fde047 !important;
    border-radius: 16px !important;
    padding: 10px 20px !important;
    margin-bottom: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.12) !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.co-ml-top-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}

.co-ml-top-logo-wrap {
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

.co-ml-top-logo {
    height: 28px !important;
    width: auto !important;
    max-height: 28px !important;
    object-fit: contain !important;
    display: block !important;
}

.co-ml-top-badge {
    background: #0f172a !important;
    color: #fef08a !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.6px !important;
    padding: 5px 12px !important;
    border-radius: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    text-transform: uppercase !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25) !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    line-height: 1.2 !important;
}

.co-ml-top-badge svg {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    fill: #facc15 !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}

.co-ml-top-text {
    font-size: 14px !important;
    color: #78350f !important;
    line-height: 1.4 !important;
    margin: 0 !important;
}

.co-ml-top-text strong {
    color: #0f172a !important;
    font-weight: 700 !important;
}

.co-ml-top-pill {
    background: #ffffff !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 5px 12px !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04) !important;
    flex-shrink: 0 !important;
}

@media (max-width: 680px) {
    .co-ml-top-bar {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 14px 16px !important;
        gap: 10px !important;
    }
    .co-ml-top-text {
        font-size: 13px !important;
    }
}

/* ==========================================================================
   Tarjeta Estilizada del H1 SEO en la Portada (Home)
   ========================================================================== */
.co-home-seo-hero {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 22px 26px 20px 26px;
    margin: 10px 0 22px 0;
    text-align: center;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: hidden;
}

.co-home-seo-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981 0%, #0284c7 50%, #f59e0b 100%);
}

.co-seo-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.co-pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    animation: coPulse 2s infinite;
}

@keyframes coPulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.co-seo-hero-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px 0;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.co-seo-hero-highlight {
    color: #1e293b;
    font-weight: 700;
}

.co-seo-hero-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0 0 16px 0;
    line-height: 1.5;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

.co-seo-hero-subtitle strong {
    color: #334155;
    font-weight: 600;
}

.co-seo-quick-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.co-quick-pill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #1e293b !important;
    text-decoration: none !important;
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.co-quick-pill:hover {
    border-color: #0284c7;
    color: #0284c7 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.12);
}

.co-quick-pill-all {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a !important;
}

.co-quick-pill-all:hover {
    background: #0f172a;
    color: #ffffff !important;
    border-color: #0f172a;
}

@media (max-width: 768px) {
    .co-home-seo-hero {
        padding: 16px 14px;
        margin-bottom: 16px;
    }
    .co-seo-hero-title {
        font-size: 1.25rem;
    }
    .co-seo-hero-subtitle {
        font-size: 0.88rem;
        margin-bottom: 12px;
    }
    .co-quick-pill {
        font-size: 11.5px;
        padding: 5px 10px;
    }
}

