/* Vandanya Affiliate Product Card */
.jap-card{
  display:inline-flex;
  flex-direction:column;
  vertical-align:top;
  width:calc(33.333333% - 16px);
  max-width:320px;
  margin:12px 8px 24px;
  padding:0;
  border:1px solid #e7e4df;
  border-radius:14px;
  background:#fff;
  box-shadow:0 4px 16px rgba(20,20,20,.045);
  overflow:hidden;
  box-sizing:border-box;
}
.jap-card__media{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  aspect-ratio:1 / 1;
  min-height:0;
  background:#fff;
  padding:5px;
  box-sizing:border-box;
  overflow:hidden;
  flex:0 0 auto;
}
.jap-card__media img{
  display:block;
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}
.jap-card__badge{position:absolute;top:12px;left:12px;z-index:1;display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;background:#fff;color:#5d554b;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;box-shadow:0 2px 8px rgba(20,20,20,.08)}
.jap-card__content{display:flex;flex-direction:column;flex:1;min-width:0;padding:12px 14px 13px;box-sizing:border-box}
.jap-card__title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:2.56em;margin:0 0 7px;font-size:1rem !important;line-height:1.28 !important;font-weight:700 !important;color:#702301 !important}
.jap-card__rating{display:flex;align-items:center;gap:7px;margin:0 0 10px;font-size:12px;line-height:1}
.jap-card__stars{display:inline-flex;align-items:center;font-size:16px;line-height:1;gap:0;flex:0 0 auto}
.jap-card__star{display:inline-block;width:15px;height:17px;line-height:17px;font-size:16px}
.jap-card__star--full{color:#b56b2f}
.jap-card__star--empty{color:#d9d2ca}
.jap-card__star--partial{background:linear-gradient(to right,#b56b2f var(--vandanya-fill),#d9d2ca var(--vandanya-fill));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}
.jap-card__rating-value{font-weight:600;letter-spacing:0}
.jap-card__bottom{display:flex;flex-direction:column;align-items:stretch;gap:8px;margin-top:auto}
.jap-card__price{font-size:18px;line-height:1.15;font-weight:800}
.jap-card__button{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;box-sizing:border-box;padding:10px 14px;border-radius:8px;background:#171717;color:#fff;text-decoration:none;font-weight:700;font-size:13px;transition:transform .15s ease,opacity .15s ease}
.jap-card__button:hover{color:#fff;opacity:.9;transform:translateY(-1px)}
.jap-card__disclosure{margin-top:9px;font-size:9px;line-height:1.35;color:#777}
.jap-editor-wrap{padding:16px;border:1px dashed #b9b3aa;background:#faf9f7;cursor:pointer;box-sizing:border-box}
.jap-editor-selected{padding:16px;background:#fff;border:1px solid #e7e4df;border-radius:10px}
@media(max-width:900px){
  .jap-card{width:calc(50% - 16px);max-width:none}
}
@media(max-width:600px){
  .jap-card{display:flex;width:100%;max-width:320px;margin:12px auto 24px}
}


/* Vandanya affiliate collection grid */
.vandanya-product-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:16px;
    width:100%;
    max-width:760px;
    margin:28px auto;
    box-sizing:border-box;
    align-items:stretch;
}
.vandanya-product-grid .jap-card{
    width:100%;
    max-width:none;
    margin:0;
    min-width:0;
}
@media(max-width:900px){
    .vandanya-product-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
        max-width:680px;
        gap:20px;
    }
}
@media(max-width:600px){
    .vandanya-product-grid{
        grid-template-columns:1fr;
        max-width:320px;
        gap:20px;
    }
    .vandanya-product-grid .jap-card{
        max-width:320px;
        width:100%;
        margin:0 auto;
    }
}

.vandanya-editor-wrap{padding:16px;border:1px dashed #b9b3aa;background:#faf9f7;cursor:pointer;box-sizing:border-box}

/* Visual product picker inside Gutenberg */
.vandanya-picker-label{
    display:block;
    margin:0 0 8px;
    font-size:12px;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:.04em;
}
.vandanya-selected-product{
    border:1px solid #d7d2cb;
    border-radius:6px;
    background:#fff;
    margin-bottom:12px;
}
.vandanya-selected-product-inner{
    display:flex;
    align-items:center;
    gap:12px;
    padding:10px;
}
.vandanya-selected-product-image,
.vandanya-selected-product-placeholder{
    width:58px;
    height:58px;
    flex:0 0 58px;
    object-fit:cover;
    border-radius:4px;
    background:#f6f4f1;
}
.vandanya-selected-product-placeholder{
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:10px;
    color:#777;
}
.vandanya-selected-product-info{
    min-width:0;
    flex:1;
    display:flex;
    flex-direction:column;
    gap:3px;
}
.vandanya-selected-product-info strong{
    font-size:13px;
    line-height:1.35;
}
.vandanya-selected-product-info span{
    font-size:11px;
    color:#777;
}
.vandanya-no-product{
    display:flex;
    flex-direction:column;
    gap:4px;
    padding:12px;
}
.vandanya-no-product span{
    font-size:12px;
    color:#666;
}
.vandanya-product-search{
    margin-bottom:10px;
}
.vandanya-product-picker-list{
    max-height:330px;
    overflow-y:auto;
    border:1px solid #d7d2cb;
    border-radius:6px;
    background:#fff;
}
.vandanya-product-picker-item{
    width:100%;
    display:flex;
    align-items:center;
    gap:10px;
    padding:8px 10px;
    border:0;
    border-bottom:1px solid #eee;
    background:#fff;
    text-align:left;
    cursor:pointer;
    color:inherit;
}
.vandanya-product-picker-item:last-child{
    border-bottom:0;
}
.vandanya-product-picker-item:hover{
    background:#f7f5f2;
}
.vandanya-product-picker-item.is-selected{
    background:#f1eee9;
}
.vandanya-picker-thumb{
    width:48px;
    height:48px;
    flex:0 0 48px;
    object-fit:cover;
    border-radius:4px;
    background:#f5f3ef;
}
.vandanya-picker-thumb-empty{
    display:flex;
    align-items:center;
    justify-content:center;
    color:#999;
}
.vandanya-picker-name{
    flex:1;
    min-width:0;
    font-size:13px;
    line-height:1.3;
}
.vandanya-picker-check{
    font-weight:700;
    font-size:16px;
}
.vandanya-picker-empty{
    padding:15px;
    font-size:12px;
    color:#777;
}
