.variant-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.48);
  font-family: Inter, system-ui, sans-serif;
}

.variant-modal {
  width: min(100%, 480px);
  height: min(72vh, 650px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px 22px 0 0;
  background: #fff;
  color: #222;
  box-shadow: 0 -10px 35px rgba(0, 0, 0, 0.16);
}

.variant-head {
  position: relative;
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 12px;
  min-height: 126px;
  padding: 18px 42px 13px 14px;
  border-bottom: 1px solid #eee;
}

.variant-preview { width: 94px; height: 82px; object-fit: contain; }
.variant-price-row { display: flex; align-items: center; gap: 8px; color: #ff3b68; }
.variant-currency { font-size: 14px; font-weight: 600; }
.variant-price { font-size: 34px; line-height: 1; font-weight: 800; }
.variant-shipping { display: inline-block; margin-top: 8px; padding: 4px 9px; border-radius: 7px; background: #eafbf2; color: #008c4e; font-size: 12px; font-weight: 800; }
.variant-selected-label { margin-top: 8px; color: #777; font-size: 14px; }
.variant-selected-label strong { color: #303030; }

.variant-close {
  position: absolute;
  top: 14px;
  right: 15px;
  border: 0;
  background: transparent;
  color: #999;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.variant-scroll { flex: 1; overflow-y: auto; padding: 16px 13px 20px; }
.variant-title { margin: 0 0 12px; font-size: 19px; font-weight: 750; }
.variant-title span { color: #aaa; font-weight: 500; }
.variant-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.variant-card {
  position: relative;
  min-width: 0;
  padding: 9px 6px 11px;
  border: 1px solid #dedede;
  border-radius: 17px;
  background: #fff;
  color: #333;
  cursor: pointer;
}
.variant-card.selected { border: 2px solid #ff3b68; background: #fff7f9; padding: 8px 5px 10px; }
.variant-card img { width: 100%; aspect-ratio: 1/1.1; object-fit: contain; display: block; }
.variant-name { display: block; margin-top: 5px; font-size: 14px; font-weight: 650; text-align: center; }
.variant-card-price { display: block; margin-top: 2px; color: #666; font-size: 13px; font-weight: 700; text-align: center; }
.variant-check { display: none; position: absolute; top: 7px; right: 7px; width: 22px; height: 22px; border-radius: 50%; background: #ff3b68; color: white; font-size: 15px; line-height: 22px; text-align: center; }
.variant-card.selected .variant-check { display: block; }

.variant-footer { padding: 10px 13px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid #eee; background: #fff; }
.variant-buy { width: 100%; min-height: 60px; border: 0; border-radius: 15px; background: #ff3b68; color: #fff; font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; }
.variant-buy small { display: block; margin-top: 3px; font-size: 12px; font-weight: 600; }
body.variant-open { overflow: hidden; }

@media (min-width: 600px) {
  .variant-overlay { align-items: center; }
  .variant-modal { height: min(68vh, 640px); border-radius: 18px; }
}

@media (max-width: 380px) {
  .variant-grid { gap: 7px; }
  .variant-card { padding-left: 4px; padding-right: 4px; }
  .variant-name { font-size: 12px; }
}

.chat-overlay { position: fixed; inset: 0; z-index: 110; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.44); font-family: Inter,system-ui,sans-serif; }
.chat-panel { width: min(100%,480px); height: min(78vh,700px); display:flex; flex-direction:column; overflow:hidden; background:#f2f5fa; color:#222; border-radius:20px 20px 0 0; box-shadow:0 -12px 35px rgba(0,0,0,.18); }
.chat-head { min-height:64px; display:flex; align-items:center; gap:10px; padding:10px 14px; color:#fff; background:linear-gradient(100deg,#ff3767,#ff542e 60%,#ff8618); }
.chat-avatar { position:relative; width:42px; height:42px; display:grid; place-items:center; border:2px solid #fff; border-radius:50%; background:#fff3f6; color:#ff3767; font-weight:800; font-size:18px; overflow:visible; }
.chat-avatar img { width:100%; height:100%; border-radius:50%; object-fit:cover; }
.chat-online-dot { position:absolute; right:-1px; bottom:1px; width:10px; height:10px; border:2px solid #fff; border-radius:50%; background:#16c784; }
.chat-agent { flex:1; min-width:0; }
.chat-agent strong { display:block; font-size:15px; }
.chat-agent span { display:block; margin-top:2px; font-size:11px; opacity:.95; }
.chat-close { border:0; background:transparent; color:#fff; font-size:28px; cursor:pointer; }
.chat-notice { padding:9px 15px; border-bottom:1px solid #f0df9d; background:#fffbea; color:#5e5134; text-align:center; font-size:11px; font-weight:650; }
.chat-scroll { flex:1; overflow-y:auto; padding:16px 13px; }
.chat-message-row { display:flex; align-items:flex-end; gap:8px; margin-bottom:14px; }
.chat-mini-avatar { width:24px; height:24px; display:grid; place-items:center; flex:0 0 auto; border-radius:50%; background:#ffedf2; overflow:hidden; }
.chat-mini-avatar img { width:100%; height:100%; object-fit:cover; }
.chat-bubble { max-width:88%; padding:13px 14px; border-radius:8px 17px 17px 17px; background:#fff; box-shadow:0 1px 3px rgba(20,30,50,.08); font-size:13px; line-height:1.55; white-space:pre-line; }
.chat-message-row.user { justify-content:flex-end; }
.chat-message-row.user .chat-bubble { border-radius:17px 8px 17px 17px; background:#ffedf3; color:#8c2642; }
.chat-faq-title { margin:8px 2px 9px; color:#7a8597; font-size:11px; font-weight:800; }
.chat-faqs { display:flex; flex-wrap:wrap; gap:8px; }
.chat-faq { border:0; padding:9px 12px; border-radius:18px; background:#fff; color:#f43d69; font-size:12px; box-shadow:0 1px 2px rgba(20,30,50,.06); cursor:pointer; }
.chat-faq.buy { color:#fff; font-weight:750; background:linear-gradient(100deg,#ff3767,#ff8618); }
.chat-compose { display:flex; gap:9px; padding:11px 13px; border-top:1px solid #dde2ea; background:#fff; }
.chat-input { flex:1; min-width:0; height:44px; padding:0 14px; border:1px solid #dce2eb; border-radius:24px; outline:none; background:#f2f5fa; font:inherit; font-size:14px; }
.chat-send { width:44px; height:44px; border:0; border-radius:50%; background:#ff8bab; color:#fff; font-size:20px; cursor:pointer; }
.chat-trust { padding:0 12px 10px; background:#fff; color:#7b8593; text-align:center; font-size:10px; }
@media (min-width:600px) { .chat-overlay{align-items:center}.chat-panel{height:min(78vh,700px);border-radius:18px} }
