/* SarvTheme blog-content-blocks.css — built from modules. Edit modules + run npm run build */

/* --- content-blocks.css --- */
/* Blog content blocks inside articles */

.st-bcb {
  margin-block: var(--sarv-space-xl, 1.5rem);
}

.st-bcb__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sarv-space-lg, 1rem);
  margin-block-end: var(--sarv-space-lg, 1rem);
}

.st-bcb__header-text {
  flex: 1;
  min-width: 0;
}

.st-bcb__header-title {
  margin: 0;
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--sarv-color-heading, inherit);
}

.st-bcb__header-subtitle {
  margin: var(--sarv-space-xs, 0.25rem) 0 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--sarv-color-muted, #6b7280);
}

.st-bcb__header-action {
  flex-shrink: 0;
}

.st-bcb__header-btn.sarv-btn {
  white-space: nowrap;
}

@media (max-width: 767px) {
  .st-bcb__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .st-bcb__header-action {
    width: 100%;
  }

  .st-bcb__header-btn.sarv-btn {
    width: 100%;
    justify-content: center;
  }
}

.st-bcb__grid {
  display: grid;
  grid-template-columns: repeat(var(--st-bcb-cols-mobile, 1), minmax(0, 1fr));
  gap: var(--sarv-space-lg, 1rem);
}

@media (min-width: 768px) {
  .st-bcb__grid {
    grid-template-columns: repeat(var(--st-bcb-cols-tablet, 2), minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .st-bcb__grid {
    grid-template-columns: repeat(var(--st-bcb-cols, 3), minmax(0, 1fr));
  }
}

.st-bcb__carousel {
  position: relative;
}

.st-bcb__carousel .sarv-swiper-button-prev,
.st-bcb__carousel .sarv-swiper-button-next {
  color: var(--sarv-color-primary, currentColor);
}

/* Product card display toggles */
.st-bcb--hide-image .sarv-product-card__media,
.st-bcb--hide-image .sarv-product-card__thumbnail {
  display: none;
}

.st-bcb--hide-title .sarv-product-card__title {
  display: none;
}

.st-bcb--hide-price .sarv-product-card__price,
.st-bcb--hide-price .sarv-product-card__current-price,
.st-bcb--hide-price .sarv-product-card__old-price {
  display: none;
}

.st-bcb--hide-discount .sarv-product-card__discount,
.st-bcb--hide-discount .sarv-product-card__badge--sale {
  display: none;
}

.st-bcb--hide-discount .sarv-product-card__discount {
  display: none;
}

.st-bcb--hide-sale-price .sarv-product-card__old-price {
  display: none;
}

.st-bcb--hide-rating .sarv-product-card__rating {
  display: none;
}

.st-bcb--hide-cart .sarv-product-card__add-to-cart,
.st-bcb--hide-cart
  .sarv-product-card__footer
  > a.sarv-product-card__add-to-cart {
  display: none;
}

.st-bcb--hide-stock .sarv-product-card__stock,
.st-bcb--hide-stock .sarv-product-card__oos {
  display: none;
}

.st-bcb--show-view .st-bcb__view-wrap {
  display: block;
  margin-top: var(--sarv-space-md, 0.75rem);
}

.st-bcb__view-wrap {
  display: none;
}

/* Content box */
.st-bcb--content-box {
  display: flex;
  align-items: stretch;
  gap: var(--sarv-space-md, 0.75rem);
  padding: var(--sarv-space-md, 0.75rem);
  border-radius: var(--sarv-radius-lg, 12px);
  background: color-mix(
    in srgb,
    var(--sarv-color-primary, #f8f9fa) 6%,
    transparent
  );
  text-decoration: none;
  color: inherit;
  min-height: var(--st-bcb-box-height, auto);
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.st-bcb--content-box:hover {
  text-decoration: none;
  color: inherit;
}

.st-bcb--hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--sarv-shadow-md, 0 4px 12px rgba(0, 0, 0, 0.08));
}

.st-bcb--hover-zoom .st-bcb__content-box-image {
  transition: transform 0.35s ease;
}

.st-bcb--hover-zoom:hover .st-bcb__content-box-image {
  transform: scale(1.04);
}

.st-bcb--content-box-top {
  flex-direction: column;
}

.st-bcb--content-box-right {
  flex-direction: row-reverse;
}

.st-bcb--content-box-background {
  position: relative;
}

.st-bcb--content-box-background .st-bcb__content-box-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.st-bcb--content-box-background .st-bcb__content-box-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.st-bcb--content-box-background .st-bcb__content-box-body {
  position: relative;
  z-index: 1;
  color: #fff;
}

.st-bcb__content-box-media {
  flex: 0 0 120px;
  border-radius: var(--sarv-radius-md, 8px);
  overflow: hidden;
}

.st-bcb__content-box-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.st-bcb__content-box-body {
  display: flex;
  align-items: center;
  gap: var(--sarv-space-sm, 0.5rem);
  flex: 1;
}

.st-bcb__content-box-body .st-bcb__content-box-icon {
  font-size: 12px;
  background-color: var(--sarv-color-primary, #2563eb);
  color: #fff;
  padding: 4px 8px;
  border-radius: 60px;
}

.st-bcb__content-box-title {
  font-weight: 600;
  font-size: 1.05rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.st-bcb__content-box-arrow {
  flex-shrink: 0;
  opacity: 0.7;
}

/* CTA */
.st-bcb--cta {
  position: relative;
  display: flex;
  gap: var(--sarv-space-lg, 1rem);
  padding: var(--sarv-space-xl, 1.5rem);
  border-radius: var(--sarv-radius-lg, 12px);
  background: var(--sarv-color-primary, #2563eb);
  color: #fff;
  overflow: hidden;
}

.st-bcb--cta-vertical {
  flex-direction: column;
}

.st-bcb--cta-overlay {
  min-height: 220px;
  align-items: center;
}

.st-bcb--align-start {
  text-align: start;
}
.st-bcb--align-center {
  text-align: center;
}
.st-bcb--align-end {
  text-align: end;
}

.st-bcb__cta-media img {
  border-radius: var(--sarv-radius-md, 8px);
  max-width: 180px;
  height: auto;
}

.st-bcb__cta-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.st-bcb__cta-text {
  margin: 0 0 1rem;
  opacity: 0.92;
}

.st-bcb__cta-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.st-bcb__cta-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.st-bcb__cta-content {
  position: relative;
  z-index: 1;
  flex: 1;
}

.st-bcb__cta-btn.sarv-btn-primary {
  background: #fff;
  color: var(--sarv-color-primary, #2563eb);
  border-color: #fff;
}

/* Banner */
.st-bcb--banner {
  display: block;
  position: relative;
  min-height: var(--st-bcb-banner-height, 280px);
  border-radius: var(--sarv-radius-lg, 12px);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.st-bcb--banner:hover {
  text-decoration: none;
  color: inherit;
}

.st-bcb__banner-picture,
.st-bcb__banner-image {
  width: 100%;
  height: 100%;
  min-height: var(--st-bcb-banner-height, 280px);
  object-fit: cover;
  display: block;
}

.st-bcb--banner-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.55));
  z-index: 1;
}

.st-bcb__banner-content {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: var(--sarv-space-xl, 1.5rem);
  color: #fff;
}

.st-bcb__banner-title {
  margin: 0 0 0.35rem;
  font-size: 1.4rem;
}

.st-bcb__banner-text {
  margin: 0 0 0.75rem;
  opacity: 0.92;
}

/* Posts inside blocks */
.st-bcb__posts-grid {
  --st-blog-cols: var(--st-bcb-cols-mobile, 1);
}

@media (min-width: 768px) {
  .st-bcb__posts-grid {
    --st-blog-cols: var(--st-bcb-cols-tablet, 2);
  }
}

@media (min-width: 1024px) {
  .st-bcb__posts-grid {
    --st-blog-cols: var(--st-bcb-cols, 3);
  }
}

/* Admin meta box */
.st-bcb-post-meta__list {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.st-bcb-post-meta__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.st-bcb-post-meta__name {
  font-size: 13px;
}
