.aempb-open { margin: 0 0 16px; }
html.aempb-lock, html.aempb-lock body { overflow: hidden; }

.aempb-overlay { position: fixed; inset: 0; z-index: 999999; display: none; flex-direction: column; background: #fff; color: #222; font-size: 14px; }
.aempb-overlay.is-open { display: flex; }
.aempb-overlay button { font: inherit; color: inherit; text-transform: none; letter-spacing: normal; box-shadow: none; }

.aempb-head { position: relative; display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 64px; border-bottom: 1px solid #eee; }
.aempb-close { position: absolute; left: 16px; top: 8px; width: 40px; height: 40px; border: 0; background: none; font-size: 30px !important; line-height: 1; cursor: pointer; padding: 0; }
.aempb-title { font-size: 16px; letter-spacing: .06em; text-transform: uppercase; text-align: center; }

.aempb-body { flex: 1; display: flex; min-height: 0; }
.aempb-stage-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.aempb-stage { position: relative; flex: 1; min-height: 240px; background: #fff; }
.aempb-views { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 8px 16px 14px; }
.aempb-overlay .aempb-view { padding: 6px 14px; border: 1px solid #ddd; border-radius: 999px; background: #fff; cursor: pointer; font-size: 12px !important; }
.aempb-overlay .aempb-view.is-selected { border-color: #222; background: #222; color: #fff; }
.aempb-overlay button:focus-visible, .aempb-overlay input:focus-visible { outline: 2px solid #222; outline-offset: 2px; }
.aempb-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 24px; box-sizing: border-box; }
.aempb-panel { width: 400px; max-width: 100%; overflow-y: auto; padding: 16px; box-sizing: border-box; background: #fafafa; }

.aempb-card { background: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.07); margin-bottom: 12px; overflow: hidden; }
.aempb-card-head { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 0; background: #fff; cursor: pointer; text-align: left; }
.aempb-card-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.aempb-card-name { font-size: 13px; font-weight: 600; }
.aempb-card-value { font-size: 12px; color: #777; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aempb-chevron { width: 9px; height: 9px; border-right: 2px solid #555; border-bottom: 2px solid #555; transform: rotate(45deg); margin: -4px 6px 0 0; flex: none; transition: transform .15s; }
.aempb-card.is-open .aempb-chevron { transform: rotate(-135deg); margin-top: 4px; }
.aempb-card-body { padding: 0 16px 14px; }

.aempb-group { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 12px 0; border: 0; border-top: 1px solid #f0f0f0; background: none; cursor: pointer; font-size: 17px !important; font-weight: 600; text-align: left; }
.aempb-plus { color: #999; font-weight: 400; font-size: 20px; }

.aempb-options { display: flex; flex-direction: column; gap: 6px; padding: 6px 0; }
.aempb-options--swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.aempb-option { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid #e3e3e3; border-radius: 6px; background: #fff; cursor: pointer; text-align: left; font-size: 13px; }
.aempb-options--swatches .aempb-option { flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 6px; text-align: center; font-size: 11px; line-height: 1.25; }
.aempb-option img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 3px; }
.aempb-option:hover { border-color: #bbb; }
.aempb-option.is-selected { border-color: #222; box-shadow: inset 0 0 0 1px #222; }
.aempb-option-extra { color: #777; white-space: nowrap; }

.aempb-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-top: 1px solid #eee; }
.aempb-reset { border: 0; background: none; cursor: pointer; font-size: 12px !important; color: #555 !important; padding: 4px 0; }
.aempb-price { margin-left: auto; font-size: 24px; font-weight: 700; }
.aempb-actions { display: flex; align-items: stretch; gap: 10px; flex: none; }
.aempb-overlay .aempb-qty { width: 80px !important; min-width: 0 !important; height: 46px !important; min-height: 0 !important; margin: 0 !important; padding: 0 8px !important; border: 1px solid #ddd !important; border-radius: 4px; text-align: center; flex: none; }
.aempb-overlay .aempb-add { width: auto !important; height: 46px !important; min-height: 0 !important; margin: 0 !important; padding: 0 28px !important; border: 0; border-radius: 4px; background: #222 !important; color: #fff !important; cursor: pointer; white-space: nowrap; flex: none; line-height: 46px; }
.aempb-add:disabled { opacity: .45; cursor: not-allowed; }

.aempb-cart-thumb { width: 100%; height: auto; }

@media (max-width: 780px) {
  .aempb-body { flex-direction: column; overflow-y: auto; }
  .aempb-stage-wrap { flex: none; }
  .aempb-stage { flex: none; height: 42vh; }
  .aempb-panel { width: 100%; overflow: visible; }
  .aempb-bar { flex-wrap: wrap; }
  .aempb-price { margin-left: 0; font-size: 20px; }
  .aempb-actions { width: 100%; }
  .aempb-add { flex: 1; }
}
