/* Modal base */
.was-modal { position: fixed; inset: 0; display: none; z-index: 9999; }
.was-modal.is-open { display: block; }
.was-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.was-modal-dialog { position: relative; background: #fff; width: min(920px, 92vw); max-height: 90vh; margin: 5vh auto; border-radius: 10px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.2); display: flex; flex-direction: column; }

.was-modal-close { position: absolute; top: 10px; right: 10px; background: transparent; border: 0; font-size: 28px; line-height: 1; cursor: pointer; padding: 6px 10px; border-radius: 6px; }
.was-modal-close:hover { background: rgba(0,0,0,0.06); }

.was-searchbar { padding: 18px; border-bottom: 1px solid #eee; }
.was-input { width: 100%; padding: 12px 14px; border: 1px solid #ddd; border-radius: 6px; font-size: 15px; }
.was-input:focus { outline: none; border-color: #7a77ff; box-shadow: 0 0 0 3px rgba(122,119,255,0.15); }

.was-results { padding: 12px 18px; overflow: auto; flex: 1; position: relative; }
.was-results.is-loading:before { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.6); }
.was-loading, .was-error, .was-empty { padding: 20px; text-align: center; color: #666; }

.was-items { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
@media (max-width: 640px){ .was-items { grid-template-columns: 1fr; } }

.was-item { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 10px; border: 1px solid #eee; border-radius: 8px; text-decoration: none; color: inherit; background: #fff; transition: box-shadow .2s, transform .05s; }
.was-item:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.08); transform: translateY(-1px); }

.was-thumb { width: 90px; height: 90px; border-radius: 6px; overflow: hidden; background: #f8f8f8; display: flex; align-items: center; justify-content: center; }
.was-thumb img { width: 100%; height: 100%; object-fit: cover; }

.was-meta { display: grid; gap: 6px; align-content: start; }
.was-title { font-weight: 600; }
.was-price { color: #0a7f2e; font-weight: 600; }
.was-excerpt { color: #666; font-size: 13px; line-height: 1.5; }

.was-pagination { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid #eee; }
.was-pagination .was-prev, .was-pagination .was-next { padding: 8px 12px; border: 1px solid #ddd; background: #fafafa; border-radius: 6px; cursor: pointer; }
.was-pagination .was-prev[disabled], .was-pagination .was-next[disabled] { opacity: .6; cursor: not-allowed; }
.was-page-info { margin-left: auto; color: #666; }

/* Open button */
.was-open-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 8px; border: 1px solid #ddd; background: #fff; cursor: pointer; transition: box-shadow .2s; }
.was-open-btn:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
.was-btn-icon { display: inline-flex; }

/* Page scroll lock */
.was-no-scroll { overflow: hidden; }
