/* Hide theme default when configurator is active */
body.tswin-active .product-add-to-cart,
body.tswin-active .product-variants,
body.tswin-active form#add-to-cart-or-refresh .qty { display:none!important; }

/* Top controls */
.tswin-topbar { display:flex; gap:16px; align-items:flex-end; margin:12px 0 8px; }
.tswin-topbar .field { display:flex; flex-direction:column; min-width:140px; }
.tswin-qty { width:120px; }
.tswin-pricebar { margin-left:auto; }
.tswin-price { font-size:1.25rem; font-weight:700; }

/* Design button */
.tswin-design-btn { background:#eee; border:1px solid #ddd; padding:12px 16px; border-radius:6px; cursor:pointer; margin:6px 0 16px; text-align:center; }

/* Accordion */
.tswin-accordion { border:1px solid #e6e6e6; border-radius:8px; overflow:hidden; }
.tswin-acc-item + .tswin-acc-item { border-top:1px solid #e6e6e6; }
.tswin-acc-head { background:#f8f8f8; padding:12px 14px; cursor:pointer; display:flex; justify-content:space-between; align-items:center; }
.tswin-acc-head .acc-desc { color:#666; font-size:.9rem; margin-top:4px; }
.tswin-acc-body { padding:12px 14px; display:none; background:#fafafa; }
.tswin-acc-item.open .tswin-acc-body { display:block; }

/* Option block */
.tswin-opt { margin:10px 0 14px; }
.tswin-opt-title { font-weight:600; margin-bottom:8px; }

/* Value tile */
.tswin-val { display:flex; align-items:center; gap:10px; padding:10px; background:#fff; border:1px solid #e9e9e9; border-radius:8px; margin:8px 0; }
.tswin-val input[type="radio"], .tswin-val input[type="checkbox"] { margin-right:6px; }
.tswin-val .thumb-wrap { width:40px; height:40px; flex:0 0 40px; display:flex; align-items:center; justify-content:center; }
.tswin-val .thumb { width:60px; height:100%; object-fit:cover; border-radius:6px; background:#f1f1f1; }
.tswin-val .thumb.placeholder { display:inline-block; background:#f1f1f1; border-radius:6px; }
.tswin-val .label { flex:1; display:flex; flex-direction:column; }
.tswin-val .label-title { font-weight:600; }
.tswin-val .label-desc { color:#666; font-size:.9rem; margin-top:2px; }
.tswin-val .impact { color:#333; white-space:nowrap; font-weight:600; }
.tswin-val .detail { margin-left:8px; border:0; background:transparent; cursor:pointer; font-size:1rem; opacity:.75; }

/* ATC */
.tswin-addtocart { background:#000; color:#fff; text-align:center; padding:14px 16px; cursor:pointer; border-radius:4px; width:100%; border:none; }
.tswin-addtocart[disabled] { opacity:.4; cursor:not-allowed; }

/* Errors */
.tswin-error { color:#c0392b; font-size:.9rem; margin-top:4px; }

/* Modal */
.tswin-modal-backdrop { position:fixed; inset:0; background:rgba(0,0,0,.35); display:none; z-index:9999; }
.tswin-modal { position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); background:#fff; width:min(720px,90vw); max-height:80vh; overflow:auto; border-radius:10px; padding:16px; display:none; z-index:10000; }
.tswin-modal.open, .tswin-modal-backdrop.open { display:block; }
.tswin-modal .close { float:right; cursor:pointer; font-size:20px; }
.tswin-modal img { max-width:100%; height:auto; border-radius:6px; margin-bottom:10px; }
/* Color picker under a value */
.tswin-color-block { padding:8px 10px 6px 46px; }
.tswin-colors-title { font-weight:600; margin:4px 0 6px; }
.tswin-colors-wrap { display:flex; flex-direction:column; gap:6px; }
.tswin-color { display:flex; align-items:center; gap:8px; border:1px dashed #e3e3e3; padding:8px; border-radius:6px; background:#fff; }
.tswin-color input { margin-right:4px; }
.tswin-color .chip { width:22px; height:22px; border-radius:4px; border:1px solid #ddd; display:inline-flex; align-items:center; justify-content:center; overflow:hidden; }
.tswin-color .chip img { width:100%; height:100%; object-fit:cover; }
.tswin-color .name { flex:1; font-size:.95rem; }
.tswin-color .c-impact { color:#555; white-space:nowrap; font-weight:600; }
