/* iTech Search v4.1 isolated styles - leave Journal header and footer untouched */
#itech-livesearch-layer {z-index:1000000;overflow-y:auto;overflow-x:hidden;background:var(--itech-background,#fff);color:#2d2d2d;box-shadow:0 12px 28px rgba(0,0,0,.19);border:1px solid #e4e6e9;border-radius:8px;font-family:inherit;box-sizing:border-box;overscroll-behavior:contain;}
#itech-livesearch-layer *{box-sizing:border-box}
#itech-livesearch-layer .itech-inner{padding:12px;}
#itech-livesearch-layer a{text-decoration:none;color:#303030}
#itech-livesearch-layer .itech-section-title,#itech-livesearch-layer .itech-products-title{font-size:13px;font-weight:700;margin:5px 0 8px;color:#3c3c3c}
#itech-livesearch-layer .itech-suggest{font-size:13px;background:#f7f8fa;border-bottom:1px solid #ececec;padding:10px 12px;margin:-12px -12px 12px;}
#itech-livesearch-layer .itech-correct{color:#087ec1;font-weight:700;text-decoration:underline}
#itech-livesearch-layer .itech-category-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:10px}
#itech-livesearch-layer .itech-category{display:flex;justify-content:center;align-items:center;text-align:center;padding:9px 6px;background:var(--itech-category-bg,#f5f6f7);border:1px solid #e1e3e5;border-radius:6px;font-size:12px;font-weight:600;min-height:40px;min-width:0;overflow:hidden;}
#itech-livesearch-layer .itech-category:hover{border-color:var(--itech-accent,#78a90f);background:#f0f6e5}
#itech-livesearch-layer .itech-brand-row{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}
#itech-livesearch-layer .itech-brand{display:block;background:#fff;border:1px solid #ececec;border-radius:4px;padding:5px 10px;font-size:12px}
#itech-livesearch-layer .itech-brand:hover{color:var(--itech-accent,#669900);border-color:var(--itech-accent,#88ab36)}
#itech-livesearch-layer .itech-products{display:flex;flex-wrap:wrap;gap:8px;align-items:stretch}
#itech-livesearch-layer .itech-product{flex:0 1 var(--itech-card-width,200px);max-width:var(--itech-card-width,200px);min-width:min(100%,160px);display:flex;flex-direction:column;gap:5px;border:1px solid #e9e9e9;padding:var(--itech-card-padding,9px);border-radius:var(--itech-card-radius,6px);position:relative;background:#fff}
#itech-livesearch-layer .itech-product:hover{border-color:var(--itech-accent,#a3bf6c);box-shadow:0 2px 8px rgba(0,0,0,.08)}
#itech-livesearch-layer .itech-pic{display:flex;align-items:center;justify-content:center;height:var(--itech-image-height,108px);min-width:0}
#itech-livesearch-layer .itech-pic img{max-height:100%;max-width:100%;object-fit:contain}
#itech-livesearch-layer .itech-product-body{display:flex;flex-direction:column;flex:1;gap:5px;min-width:0}
#itech-livesearch-layer .itech-product-title{font-size:12px;line-height:1.4;min-height:32px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
#itech-livesearch-layer .itech-badges{display:flex;gap:3px;flex-wrap:wrap}
#itech-livesearch-layer .itech-badge{font-size:10px;border-radius:3px;padding:2px 5px;color:#fff}
#itech-livesearch-layer .itech-badge.sale{background:#e33b39}
#itech-livesearch-layer .itech-badge.new{background:#68a407}
#itech-livesearch-layer .itech-badge.best{background:#f07813}
#itech-livesearch-layer .itech-price{margin-top:auto;display:flex;gap:6px;flex-wrap:wrap;align-items:center;font-size:12px}
#itech-livesearch-layer .itech-current-price{font-weight:700;color:#333}
#itech-livesearch-layer .itech-price del{color:#999;font-size:11px}
#itech-livesearch-layer .itech-all-results{display:block;color:#1f7db5;text-align:right;margin-top:10px;font-weight:600;font-size:13px}
#itech-livesearch-layer .itech-empty{padding:12px;color:#777}
/* A: Amazon - compact vertical results */
#itech-livesearch-layer.layout-a .itech-products{display:block}
#itech-livesearch-layer.layout-a .itech-product{display:flex;flex-direction:row;max-width:none;width:100%;min-width:0;border:0;border-top:1px solid #eee;border-radius:0;gap:12px}
#itech-livesearch-layer.layout-a .itech-pic{width:62px;height:62px;flex:0 0 62px}
#itech-livesearch-layer.layout-a .itech-product-title{min-height:auto;font-size:13px}
/* B: iHerb - category grid and product cards (default) */
/* C: Shopping split view */
#itech-livesearch-layer.layout-c .itech-split{display:grid;grid-template-columns:220px minmax(0,1fr);gap:12px}
#itech-livesearch-layer.layout-c aside{border-right:1px solid #eee;padding-right:12px}
#itech-livesearch-layer.layout-c .itech-category-row{display:flex;flex-direction:column}
#itech-livesearch-layer.layout-c .itech-category{justify-content:flex-start;padding-left:10px}
#itech-livesearch-layer.layout-c .itech-product{max-width:calc(50% - 4px)}
/* D: compact product cards */
#itech-livesearch-layer.layout-d .itech-product{padding:var(--itech-card-padding,6px);gap:3px}
#itech-livesearch-layer.layout-d .itech-pic{height:72px}
#itech-livesearch-layer.layout-d .itech-brand-section{display:none}
#itech-livesearch-layer.layout-d .itech-product-title{min-height:30px;font-size:11px}
@media (max-width:767px){
 #itech-livesearch-layer .itech-inner{padding:8px}
 #itech-livesearch-layer .itech-category-row{grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}
 #itech-livesearch-layer .itech-category{font-size:10px;padding:6px 3px;min-height:40px;line-height:1.2}
 #itech-livesearch-layer .itech-products{gap:5px}
 #itech-livesearch-layer .itech-product{flex-basis:calc(50% - 4px);max-width:calc(50% - 4px);min-width:0}
 #itech-livesearch-layer.layout-c .itech-split{display:block}
 #itech-livesearch-layer.layout-c aside{border:0;padding:0}
 #itech-livesearch-layer.layout-c .itech-category-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
 #itech-livesearch-layer.layout-d .itech-pic{height:65px}
}

/* v4.1 mobile columns without a layout-wide override of Amazon list mode. */
@media(max-width:767px){
 #itech-livesearch-layer:not(.layout-a).mobile-cols-1 .itech-product{flex:0 0 100%;max-width:100%}
 #itech-livesearch-layer:not(.layout-a).mobile-cols-2 .itech-product{flex:0 0 calc(50% - 3px);max-width:calc(50% - 3px)}
 #itech-livesearch-layer:not(.layout-a).mobile-cols-3 .itech-product{flex:0 0 calc(33.333% - 4px);max-width:calc(33.333% - 4px)}
}
