/* XERF Section 4 – Products & Benefits
   Uses core blocks only. Image placeholders are core/image with empty src. */

:root{
  --x4-brand: #8B2332;
  --x4-accent: #D4AF37;
  --x4-dark: #1C1C1C;
  --x4-text: #2A2A2A;
  --x4-soft: #FAF7F2;
  --x4-light-bg: #FDFCFA;
  --x4-max: 1200px;
}

/* --------------------- Shared --------------------- */
.x4-inner{
  max-width: var(--x4-max);
  margin-inline: auto;
}

/* --------------------- Products --------------------- */
.x4-products{
  background: linear-gradient(to bottom, #FFFFFF 0%, var(--x4-light-bg) 100%);
  padding: clamp(60px, 8vw, 120px) clamp(20px, 5vw, 80px);
}

.x4-title{
  margin: 0 0 20px;
  text-align: center;
  font-weight: 700;
  line-height: 1.2;
  color: #000;
  font-size: clamp(28px, 4.5vw, 56px);
  letter-spacing: -0.02em;
}
.x4-title::after{
  content: '';
  display: block;
  width: 120px;
  height: 3px;
  background: var(--x4-brand);
  margin: 15px auto 0;
}
.x4-brand-text{ color: var(--x4-brand); }

.x4-title-wrapper{ text-align:center; margin-bottom: 40px; }
.x4-section-intro{
  text-align: center;
  max-width: 820px;
  margin: 12px auto 0;
  font-size: clamp(14px, 1.6vw, 16px);
  color: var(--x4-text);
  line-height: 1.75;
}

.x4-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 60px;
  margin-top: 30px;
}

.x4-item{
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  padding: 20px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.x4-item:hover{
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.x4-item-columns{
  gap: 30px;
  align-items: center;
}

/* Core/image placeholder styled box */
figure.x4-image{
  width: 180px;
  height: 180px;
  margin: 0;
  background: #f5f5f5;
  border-radius: 8px;
  border: 2px dashed #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
}
figure.x4-image img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Text side */
.x4-name{
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--x4-dark);
}
.x4-spec{
  font-size: clamp(14px, 1.5vw, 16px);
  color: var(--x4-text);
  margin: 0 0 4px;
  line-height: 1.6;
}
.x4-desc{
  font-size: clamp(13px, 1.4vw, 14px);
  color: #666;
  margin: 8px 0 0;
}

/* Make first column (image) compact even inside core/columns */
.x4-item-columns > .wp-block-column:first-child{
  flex: 0 0 auto;
}

/* --------------------- Benefits --------------------- */
.x4-benefits{
  padding: clamp(60px, 8vw, 120px) clamp(20px, 5vw, 80px);
  background: linear-gradient(135deg, var(--x4-light-bg) 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}
.x4-benefits::before{
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: rgba(240,240,240,0.35);
  border-radius: 50%;
  z-index: 0;
}

.x4-section-header{ text-align:center; margin-bottom: 60px; position:relative; z-index:1; }
.x4-brand-name{
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 700;
  color: var(--x4-dark);
  margin: 0 0 10px;
  letter-spacing: 2px;
}
.x4-section-title{
  font-size: clamp(24px, 3.5vw, 32px);
  color: var(--x4-brand);
  font-weight: 600;
  margin: 0;
}

.x4-benefits-columns{ position:relative; z-index:1; gap: 40px; }
.x4-column{
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.x4-benefit{
  border-bottom: 2px solid var(--x4-brand);
  padding-bottom: 15px;
}
.x4-benefit-title{
  font-size: clamp(14px, 1.5vw, 16px);
  font-weight: 700;
  color: var(--x4-brand);
  margin: 0 0 8px;
}
.x4-benefit-desc{
  font-size: clamp(13px, 1.4vw, 14px);
  color: var(--x4-text);
  line-height: 1.6;
  margin: 0;
}

/* Center image (core/image) */
figure.x4-center-image{
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1/1;
  margin: 0 auto;
  background: #f5f5f5;
  border-radius: 12px;
  border: 2px dashed #ddd;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 20px;
}
figure.x4-center-image img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display:block;
}

/* --------------------- Responsive --------------------- */
@media (max-width: 992px){
  .x4-grid{
    grid-template-columns: 1fr;
    gap: 30px;
  }
  /* Bring center image column above on mobile/tablet */
  .x4-benefits-columns > .wp-block-column:nth-child(2){ order: -1; }
  figure.x4-center-image{ max-width: 300px; }
  .x4-section-header{ margin-bottom: 40px; }
}

@media (max-width: 768px){
  .x4-item:hover{ transform:none; }
  .x4-item-columns{ gap: 20px; }
  figure.x4-image{ width: 160px; height: 160px; }

  /* Keep image and text side-by-side on mobile - override WordPress column stacking */
  .x4-item-columns {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
  }

  .x4-item-columns > .wp-block-column {
    display: block !important;
  }

  .x4-item-columns > .wp-block-column:first-child {
    flex: 0 0 auto !important;
    width: auto !important;
  }

  .x4-item-columns > .wp-block-column:last-child {
    flex: 1 !important;
    width: auto !important;
  }
}

@media (max-width: 576px){
  .x4-products,
  .x4-benefits{
    padding: clamp(40px, 6vw, 60px) 20px;
  }
  .x4-column{ gap: 25px; }
}
