.commerce-panel {
  position: fixed;
  z-index: 2520;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #F8FAFC;
  color: #0F172A;
  opacity: 0;
  transform: translateX(100%);
  transition: transform 280ms cubic-bezier(.22,.8,.26,1), opacity 180ms ease;
  pointer-events: none;
}

.commerce-panel[hidden] { display:none!important; }

.commerce-panel.is-open {
  opacity:1;
  transform:translateX(0);
  pointer-events:auto;
}

.commerce-header {
  flex:0 0 auto;
  min-height:calc(64px + env(safe-area-inset-top));
  padding:calc(10px + env(safe-area-inset-top)) 14px 10px 58px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid rgba(100,116,139,.16);
  background:#fff;
}

.commerce-header-title {
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.commerce-header-title span:first-child { font-size:24px; }

.commerce-header h2 {
  margin:0;
  font-size:20px;
  font-weight:900;
}

.commerce-close {
  width:42px;
  height:42px;
  border:0;
  border-radius:50%;
  background:#F1F5F9;
  color:#475569;
  font-size:25px;
  cursor:pointer;
}

.commerce-scroll {
  flex:1 1 auto;
  overflow-y:auto;
  padding:18px 14px calc(30px + env(safe-area-inset-bottom));
}

.commerce-shell {
  width:min(100%,720px);
  margin:0 auto;
  display:grid;
  gap:14px;
}

.commerce-card {
  padding:16px;
  border:1px solid rgba(100,116,139,.16);
  border-radius:20px;
  background:#fff;
  box-shadow:0 8px 26px rgba(15,23,42,.05);
}

.commerce-card h3 {
  margin:0 0 5px;
  font-size:17px;
}

.commerce-card p {
  margin:0;
  color:#64748B;
  font-size:13px;
  line-height:1.45;
}

.commerce-form {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:14px;
}

.commerce-field {
  display:grid;
  gap:6px;
}

.commerce-field.is-wide { grid-column:1/-1; }

.commerce-field span {
  color:#475569;
  font-size:12px;
  font-weight:800;
}

.commerce-field input,
.commerce-field select {
  width:100%;
  min-height:46px;
  border:1px solid #CBD5E1;
  border-radius:12px;
  background:#fff;
  color:#0F172A;
  padding:0 11px;
  font-size:15px;
}

.commerce-submit {
  grid-column:1/-1;
  min-height:48px;
  border:0;
  border-radius:14px;
  background:#0F766E;
  color:#fff;
  font-size:15px;
  font-weight:900;
  cursor:pointer;
}

.commerce-submit:disabled { opacity:.5; }

.commerce-result {
  padding:14px;
  border:1px dashed #CBD5E1;
  border-radius:14px;
  background:#F8FAFC;
  color:#475569;
  font-size:13px;
  line-height:1.45;
}

.commerce-provider-status {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:10px;
}

.commerce-provider-chip {
  padding:6px 8px;
  border-radius:999px;
  background:#F1F5F9;
  color:#64748B;
  font-size:10px;
  font-weight:850;
}

.commerce-disclosure {
  position:fixed;
  z-index:14000;
  inset:0;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(15,23,42,.42);
}

.commerce-disclosure[hidden] { display:none!important; }

.commerce-disclosure-card {
  width:min(100%,500px);
  max-height:min(80dvh,640px);
  overflow:auto;
  padding:18px;
  border-radius:20px;
  background:#fff;
  box-shadow:0 22px 70px rgba(15,23,42,.28);
}

.commerce-disclosure-card h3 {
  margin:0 0 10px;
  font-size:18px;
}

.commerce-disclosure-card p {
  margin:0;
  color:#475569;
  font-size:13px;
  line-height:1.55;
}

.commerce-disclosure-actions {
  display:flex;
  gap:8px;
  margin-top:16px;
}

.commerce-disclosure-actions button {
  flex:1;
  min-height:44px;
  border-radius:12px;
  font-weight:850;
}

.commerce-disclosure-cancel {
  border:1px solid #CBD5E1;
  background:#fff;
  color:#475569;
}

.commerce-disclosure-accept {
  border:0;
  background:#0F766E;
  color:#fff;
}

@media (max-width:560px) {
  .commerce-form { grid-template-columns:1fr; }
  .commerce-field.is-wide,
  .commerce-submit { grid-column:auto; }
}

@media (prefers-reduced-motion:reduce) {
  .commerce-panel { transition:none; }
}
