/**
 * Blog (listado + entrada individual) - Lore & Science
 * Sin referencia visual en React/Lovable: construido desde cero
 * reutilizando los mismos tokens y patron de card que el catalogo
 * de productos (.bcc-product-card), para coherencia con el resto
 * del sitio.
 */

/* ===== Layout general del blog ===== */
.bcc-blog {
    background: var(--bcc-background, #F9F8F5);
    min-height: 60vh;
}
.bcc-blog__inner {
    max-width: var(--bcc-container-max, 1400px);
    margin: 0 auto;
    padding: 2.5rem clamp(1.25rem, 4vw, 4rem) 5rem;
}
.bcc-blog__head {
    text-align: center;
    max-width: 42rem;
    margin: 0 auto 2.5rem;
}
.bcc-blog__title {
    font-family: var(--bcc-font-serif, 'Playfair Display', serif);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--bcc-foreground, #1E2D26);
    margin: 0 0 .5rem;
}
.bcc-blog__breadcrumb {
    display: flex;
    justify-content: center;
    gap: .5rem;
    font-size: .8125rem;
    color: var(--bcc-muted-foreground, #677E73);
    margin-bottom: .75rem;
}
.bcc-blog__breadcrumb a { color: inherit; text-decoration: none; }
.bcc-blog__breadcrumb a:hover { color: var(--bcc-conseil, #DA053A); }
.bcc-blog__breadcrumb span:last-child { color: var(--bcc-foreground, #1E2D26); }

/* ===== Grid de cards (listado) ===== */
.bcc-blog__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
@media (max-width: 1100px) { .bcc-blog__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .bcc-blog__grid { grid-template-columns: 1fr; } }

.bcc-blog-card {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.bcc-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}
.bcc-blog-card__img-zone {
    position: relative;
    aspect-ratio: 4 / 2.4;
    background: var(--bcc-card, #F3F1EC);
    overflow: hidden;
}
.bcc-blog-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bcc-blog-card__img--placeholder {
    background: linear-gradient(135deg, var(--bcc-brand-teal-light,#8DC8C7), var(--bcc-brand-teal,#0C4859));
}
.bcc-blog-card__cat-badge {
    position: absolute;
    top: .75rem;
    left: .75rem;
    background: var(--bcc-cta, #188A81);
    color: #fff;
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: .25rem .625rem;
    border-radius: var(--bcc-radius-pill, 999px);
}
.bcc-blog-card__body {
    padding: 1.25rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    flex: 1;
}
.bcc-blog-card__date {
    font-size: .75rem;
    color: var(--bcc-muted-foreground, #677E73);
}
.bcc-blog-card__title {
    font-family: var(--bcc-font-serif, 'Playfair Display', serif);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--bcc-foreground, #1E2D26);
    margin: 0;
    line-height: 1.35;
}
.bcc-blog-card__excerpt {
    font-size: .8125rem;
    color: var(--bcc-muted-foreground, #677E73);
    line-height: 1.6;
    margin: 0;
    flex: 1;
}
.bcc-blog-card__cta {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--bcc-conseil, #DA053A);
    margin-top: .25rem;
}

.bcc-blog__pagination {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: 3rem;
}
.bcc-blog__pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 .5rem;
    border-radius: var(--bcc-radius-pill, 999px);
    background: #fff;
    border: 1px solid var(--bcc-border, #E6E2DA);
    color: var(--bcc-foreground, #1E2D26);
    text-decoration: none;
    font-size: .875rem;
}
.bcc-blog__pagination .page-numbers.current {
    background: var(--bcc-conseil, #DA053A);
    border-color: var(--bcc-conseil, #DA053A);
    color: #fff;
}
.bcc-blog__empty {
    text-align: center;
    color: var(--bcc-muted-foreground, #677E73);
    padding: 3rem 0;
}

/* ===== Single post ===== */
.bcc-blog__inner--single { padding-top: 2rem; }

.bcc-blog-single__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 3rem;
    align-items: start;
}
@media (max-width: 900px) {
    .bcc-blog-single__layout { grid-template-columns: 1fr; }
}

.bcc-blog-single__back {
    margin: 0 0 1.25rem;
}
.bcc-blog-single__back a {
    color: var(--bcc-conseil, #DA053A);
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
}
.bcc-blog-single__back a:hover { text-decoration: underline; }

.bcc-blog-single__cat-badge {
    display: inline-block;
    background: var(--bcc-cta, #188A81);
    color: #fff;
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: .25rem .625rem;
    border-radius: var(--bcc-radius-pill, 999px);
    margin-bottom: .75rem;
}
.bcc-blog-single__title {
    font-family: var(--bcc-font-serif, 'Playfair Display', serif);
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 700;
    color: var(--bcc-foreground, #1E2D26);
    margin: 0 0 .5rem;
    line-height: 1.25;
}
.bcc-blog-single__date {
    display: block;
    font-size: .8125rem;
    color: var(--bcc-muted-foreground, #677E73);
    margin-bottom: 1.5rem;
}
.bcc-blog-single__hero-img {
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 2rem;
}
.bcc-blog-single__hero-img img { width: 100%; height: auto; display: block; }

.bcc-blog-single__body {
    font-size: .9375rem;
    line-height: 1.8;
    color: rgba(30,45,38,.85);
}
.bcc-blog-single__body p { margin: 0 0 1.25rem; }
.bcc-blog-single__body h2 {
    font-family: var(--bcc-font-serif, 'Playfair Display', serif);
    font-size: 1.375rem;
    color: var(--bcc-foreground, #1E2D26);
    margin: 2rem 0 1rem;
}
.bcc-blog-single__body h3 {
    font-size: 1.125rem;
    color: var(--bcc-foreground, #1E2D26);
    margin: 1.5rem 0 .75rem;
}
.bcc-blog-single__body img { max-width: 100%; height: auto; border-radius: .75rem; }
.bcc-blog-single__body a { color: var(--bcc-conseil, #DA053A); }
.bcc-blog-single__body ul, .bcc-blog-single__body ol { padding-left: 1.5rem; margin: 0 0 1.25rem; }

/* Sidebar productos relacionados */
.bcc-blog-single__sidebar {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid var(--bcc-border, #E6E2DA);
    padding: 1.5rem;
    position: sticky;
    top: 6rem;
}
.bcc-blog-single__sidebar-title {
    font-family: var(--bcc-font-serif, 'Playfair Display', serif);
    font-size: 1.0625rem;
    color: var(--bcc-foreground, #1E2D26);
    margin: 0 0 1rem;
}
.bcc-blog-single__sidebar-list {
    display: flex;
    flex-direction: column;
    gap: .875rem;
}
.bcc-blog-mini-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    color: inherit;
    padding: .5rem;
    border-radius: .75rem;
    transition: background .15s ease;
}
.bcc-blog-mini-card:hover { background: var(--bcc-card, #F3F1EC); }
.bcc-blog-mini-card__img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: .5rem;
    background: var(--bcc-card, #F3F1EC);
    flex-shrink: 0;
}
.bcc-blog-mini-card__body {
    display: flex;
    flex-direction: column;
    gap: .125rem;
    min-width: 0;
}
.bcc-blog-mini-card__title {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--bcc-foreground, #1E2D26);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.bcc-blog-mini-card__price {
    font-size: .8125rem;
    font-weight: 700;
    color: var(--bcc-cta, #188A81);
}


/* ===== Shortcode WooCommerce [product id="..."] dentro del contenido del post =====
   El tema desactiva el CSS nativo de WooCommerce (woocommerce_enqueue_styles),
   asi que este shortcode sale sin estilo. Se le da aqui el mismo look de
   card que el resto del sitio, acotado al contenido del blog para no
   afectar catalogo/carrito (que ya tienen su propio estilo dedicado). */
.bcc-blog-single__body .products {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    padding: 0;
}
.bcc-blog-single__body .products li.product {
    background: #fff;
    border: 1px solid var(--bcc-border, #E6E2DA);
    border-radius: 1rem;
    padding: 1.25rem;
    text-align: center;
    list-style: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.bcc-blog-single__body .products li.product:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}
.bcc-blog-single__body .products li.product a {
    text-decoration: none;
    color: inherit;
    display: block;
}
.bcc-blog-single__body .products li.product img {
    width: 100%;
    max-width: 160px;
    height: auto;
    margin: 0 auto 1rem;
    display: block;
    border-radius: .5rem;
}
.bcc-blog-single__body .products li.product .woocommerce-loop-product__title {
    font-family: var(--bcc-font-serif, 'Playfair Display', serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--bcc-foreground, #1E2D26);
    margin: 0 0 .5rem;
    line-height: 1.35;
}
.bcc-blog-single__body .products li.product .price {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--bcc-cta, #188A81);
    margin-bottom: .875rem;
}
.bcc-blog-single__body .products li.product .price del { color: var(--bcc-muted-foreground, #677E73); opacity: .6; margin-right: .375rem; }
.bcc-blog-single__body .products li.product .price ins { text-decoration: none; }
.bcc-blog-single__body .products li.product .button,
.bcc-blog-single__body .products li.product .add_to_cart_button {
    display: inline-block;
    background: var(--bcc-conseil, #DA053A);
    color: #fff !important;
    font-size: .8125rem;
    font-weight: 600;
    padding: .5rem 1.25rem;
    border-radius: var(--bcc-radius-pill, 999px);
    text-decoration: none;
    transition: background .15s ease;
}
.bcc-blog-single__body .products li.product .button:hover,
.bcc-blog-single__body .products li.product .add_to_cart_button:hover {
    background: var(--bcc-brand-teal, #0C4859);
}


/* ===== Bloque nativo "Coleccion de productos" (WooCommerce Blocks / Gutenberg)
   dentro del contenido del post. Estructura real confirmada via inspeccion
   del navegador: usa las clases modernas .wc-block-*, distintas de las del
   shortcode clasico [product] (que ya se estilo mas arriba en este archivo).
   Ambos bloques pueden coexistir en distintos articulos, por eso se dejan
   las dos reglas por separado sin quitar la anterior. */
.bcc-blog-single__body .wc-block-product,
.bcc-blog-single__body li.wc-block-product {
    background: #fff;
    border: 1px solid var(--bcc-border, #E6E2DA);
    border-radius: 1rem;
    padding: 1.25rem;
    text-align: center;
    list-style: none;
    max-width: 280px;
    margin: 2rem auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.bcc-blog-single__body .wc-block-product:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}
.bcc-blog-single__body .wc-block-components-product-image {
    margin-bottom: 1rem;
}
.bcc-blog-single__body .wc-block-components-product-image img {
    width: 100%;
    max-width: 160px;
    height: auto;
    margin: 0 auto;
    display: block;
    border-radius: .5rem;
}
.bcc-blog-single__body .wc-block-product .wp-block-post-title {
    font-family: var(--bcc-font-serif, 'Playfair Display', serif);
    font-size: 1rem !important;
    font-weight: 600;
    color: var(--bcc-foreground, #1E2D26);
    margin: 0 0 .5rem;
    line-height: 1.35;
}
.bcc-blog-single__body .wc-block-product .wp-block-post-title a {
    color: inherit;
    text-decoration: none;
}
.bcc-blog-single__body .wc-block-components-product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bcc-cta, #188A81);
    margin-bottom: .875rem;
}
.bcc-blog-single__body .wc-block-components-product-price .woocommerce-Price-amount {
    color: inherit;
}
/* El botón real puede o no traer la clase .add_to_cart_button: WooCommerce
   solo la añade cuando el producto es añadible al carrito vía AJAX (simple,
   en stock). Para productos variables/no-AJAX renderiza el mismo wrapper
   pero solo con .wc-block-components-product-button__button (texto "Ver el
   producto"), que hasta ahora no tenía estilo y caía al negro por defecto.
   Se cubren ambos casos con la clase genérica del wrapper. */
.bcc-blog-single__body .wc-block-components-product-button .wc-block-components-product-button__button {
    display: inline-block;
    background: var(--bcc-conseil, #DA053A) !important;
    color: #fff !important;
    font-size: .8125rem !important;
    font-weight: 600 !important;
    padding: .5rem 1.25rem !important;
    border-radius: var(--bcc-radius-pill, 999px) !important;
    text-decoration: none;
    border: none;
}
.bcc-blog-single__body .wc-block-components-product-button .wc-block-components-product-button__button:hover {
    background: var(--bcc-brand-teal, #0C4859) !important;
}


/* ===== Bloque legacy "Produits" de WooCommerce (.wc-block-grid__product*).
   Tercera variante de bloque de producto encontrada en el contenido del
   blog, distinta tanto del shortcode clasico [product] como del bloque
   moderno "Coleccion de productos" (.wc-block-product) ya estilizados
   mas arriba. Usa <div> en vez de <h2> para el titulo y puede mostrar
   un rango de precio (producto variable) en vez de un precio fijo. */
.bcc-blog-single__body .wc-block-grid__product {
    background: #fff;
    border: 1px solid var(--bcc-border, #E6E2DA);
    border-radius: 1rem;
    padding: 1.25rem;
    text-align: center;
    list-style: none;
    max-width: 280px;
    margin: 2rem auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.bcc-blog-single__body .wc-block-grid__product:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}
.bcc-blog-single__body .wc-block-grid__product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.bcc-blog-single__body .wc-block-grid__product-image {
    margin-bottom: 1rem;
}
.bcc-blog-single__body .wc-block-grid__product-image img {
    width: 100%;
    max-width: 160px;
    height: auto;
    margin: 0 auto;
    display: block;
    border-radius: .5rem;
}
.bcc-blog-single__body .wc-block-grid__product-title {
    font-family: var(--bcc-font-serif, 'Playfair Display', serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--bcc-foreground, #1E2D26);
    margin: 0 0 .5rem;
    line-height: 1.35;
}
.bcc-blog-single__body .wc-block-grid__product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bcc-cta, #188A81);
    margin-bottom: .875rem;
}
.bcc-blog-single__body .wc-block-grid__product-price .woocommerce-Price-amount {
    color: inherit;
}
/* Mismo caso que el bloque moderno de arriba: .add_to_cart_button solo
   aparece si el producto es añadible via AJAX. El fallback "Ver el
   producto" (producto variable/no-AJAX) solo trae .wp-block-button__link. */
.bcc-blog-single__body .wc-block-grid__product-add-to-cart .wp-block-button__link {
    display: inline-block;
    background: var(--bcc-conseil, #DA053A) !important;
    color: #fff !important;
    font-size: .8125rem !important;
    font-weight: 600 !important;
    padding: .5rem 1.25rem !important;
    border-radius: var(--bcc-radius-pill, 999px) !important;
    text-decoration: none;
    border: none;
}
.bcc-blog-single__body .wc-block-grid__product-add-to-cart .wp-block-button__link:hover {
    background: var(--bcc-brand-teal, #0C4859) !important;
}


/* ===== Comentarios de blog (comments.php) ===== */
.bcc-blog-single__comments-wrap {
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--bcc-border, #E6E2DA);
}
.bcc-comments__title {
    font-family: var(--bcc-font-serif, 'Playfair Display', serif);
    font-size: 1.25rem;
    color: var(--bcc-foreground, #1E2D26);
    margin: 0 0 1.5rem;
}
.bcc-comments__list {
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.bcc-comments__list ol.bcc-comments__list,
.bcc-comment .children {
    list-style: none;
    margin: 1.25rem 0 0;
    padding: 0 0 0 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.bcc-comment {
    display: flex;
    gap: 1rem;
    list-style: none;
}
.bcc-comment__avatar img {
    border-radius: 50%;
    display: block;
}
.bcc-comment__body { flex: 1; min-width: 0; }
.bcc-comment__meta {
    display: flex;
    align-items: baseline;
    gap: .625rem;
    margin-bottom: .375rem;
}
.bcc-comment__author {
    font-weight: 600;
    font-size: .875rem;
    color: var(--bcc-foreground, #1E2D26);
}
.bcc-comment__date {
    font-size: .75rem;
    color: var(--bcc-muted-foreground, #677E73);
}
.bcc-comment__pending {
    font-size: .8125rem;
    font-style: italic;
    color: var(--bcc-conseil, #DA053A);
    margin: 0 0 .5rem;
}
.bcc-comment__content {
    font-size: .875rem;
    line-height: 1.7;
    color: rgba(30,45,38,.85);
}
.bcc-comment__content p { margin: 0 0 .75rem; }
.bcc-comment__reply {
    margin-top: .5rem;
}
.bcc-comment__reply a {
    font-size: .75rem;
    font-weight: 600;
    color: var(--bcc-cta, #188A81);
    text-decoration: none;
}
.bcc-comment__reply a:hover { text-decoration: underline; }
.bcc-comments__closed {
    font-size: .875rem;
    color: var(--bcc-muted-foreground, #677E73);
    font-style: italic;
}

/* Formulario nativo de WordPress (#commentform), estilizado */
#commentform {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 36rem;
}
#commentform .comment-reply-title {
    font-family: var(--bcc-font-serif, 'Playfair Display', serif);
    font-size: 1.125rem;
    color: var(--bcc-foreground, #1E2D26);
    margin: 0 0 .5rem;
}
.bcc-comments__field label {
    display: block;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--bcc-foreground, #1E2D26);
    margin-bottom: .375rem;
}
.bcc-comments__field textarea,
#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"] {
    width: 100%;
    box-sizing: border-box;
    padding: .75rem 1rem;
    border: 1px solid var(--bcc-border, #E6E2DA);
    border-radius: .75rem;
    font-family: var(--bcc-font-sans, 'DM Sans', sans-serif);
    font-size: .875rem;
    background: #fff;
}
.bcc-comments__field textarea { resize: vertical; }
#commentform .comment-form-author,
#commentform .comment-form-email,
#commentform .comment-form-url {
    display: flex;
    flex-direction: column;
    gap: .375rem;
}
#commentform .comment-form-author label,
#commentform .comment-form-email label,
#commentform .comment-form-url label {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--bcc-foreground, #1E2D26);
}
.bcc-comments__submit {
    align-self: flex-start;
    background: var(--bcc-conseil, #DA053A);
    color: #fff;
    font-size: .875rem;
    font-weight: 600;
    padding: .75rem 1.75rem;
    border: none;
    border-radius: var(--bcc-radius-pill, 999px);
    cursor: pointer;
    transition: background .15s ease;
}
.bcc-comments__submit:hover { background: var(--bcc-brand-teal, #0C4859); }
