/* =========================
   SMV Product In Article
   Public Styles (Final)
========================= */

/* Container */
.smv-custom-product-box-container{
  display:flex;
  flex-direction:column;
  gap:20px;
  margin:16px 0 20px;
}

/* Card */
.smv-custom-product-box{
  display:flex;
  gap:12px;
  padding:8px 16px;
  border:1px solid #eee;
  border-radius: var(--smv-box-radius, 16px);
  overflow:hidden;
  background:#fff;
  box-shadow:0 4px 12px rgba(0,0,0,.05);
  align-items:center;
}

/* Image */
.smv-cpb-image{
  flex:0 0 20%;
  max-width:150px;
  overflow:hidden;
}

.smv-cpb-image img{
  width:100%;
  height:auto;
  display:block;
  object-fit:cover;
  border-radius: var(--smv-box-radius, 16px);
}

/* Content */
.smv-cpb-content{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.smv-cpb-content h3{
  margin:0 0 10px;
  font-size:16px;
  line-height:1.8;
  font-weight:500;
}

/* Price */
.smv-cpb-price{
  font-size:14px;
  font-weight:500;
  margin-bottom:10px;
  color:#666;
  display:flex;
  flex-wrap:wrap;
  gap:5px;
}

.smv-cpb-price ins bdi,
.smv-cpb-price .woocommerce-Price-amount.amount{
  font-size:16px;
}

.smv-cpb-price del .woocommerce-Price-currencySymbol{
  font-size:12px;
}

.smv-cpb-price del .woocommerce-Price-amount.amount{
  font-size:14px;
}

/* Button (full width + theme primary color fallbacks) */
.smv-cpb-button{
  display:block;
  width:100%;
  box-sizing:border-box;
  text-align:center;

  background: var(--smv-primary-color, var(--wp--preset--color--primary, var(--e-global-color-primary, #ea2d19))) !important;
  color:#fff !important;

  padding:8px 12px;
  border-radius: var(--smv-button-radius, 10px);
  text-decoration:none;
  font-size:14px;
  transition: all .3s ease-in-out;
}

/* Shadow = 25% of primary color (works on modern browsers) */
.smv-cpb-button:hover{
  box-shadow: 0 4px 18px color-mix(
    in srgb,
    var(--smv-primary-color, var(--wp--preset--color--primary, var(--e-global-color-primary, #ea2d19))) 25%,
    transparent
  );
}

/* Elementor safety: limit responsive overrides ONLY inside our box */
@media (max-width: 768px){
  .smv-custom-product-box-container table{
    display:block;
    max-width:100%;
    overflow-x:auto;
    white-space:nowrap;
  }
  .smv-custom-product-box-container img{
    max-width:100%;
    height:auto;
    display:block;
  }
}

/* Mobile */
@media (max-width: 767px){
  .smv-cpb-image{
    flex:0 0 30%;
    max-width:120px;
  }

  .smv-cpb-price{
    font-size:13px;
  }

  .smv-cpb-price del .woocommerce-Price-amount.amount{
    font-size:13px;
  }
}
  