/* ── Boutique da Tereza — Tabela de Medidas ─────────────────────────────── */

/* Botão — igual ao favoritesButton do Alysum */
.bt-medidas-btn {
  display:        inline-flex;
  align-items:    center;
  gap:            6px;
  padding:        0;
  font-size:      inherit;
  font-family:    inherit;
  color:          inherit;
  background:     transparent;
  border:         none;
  cursor:         pointer;
  text-transform: inherit;
  letter-spacing: inherit;
  line-height:    inherit;
  margin:         0;
}

/* Overlay — só desktop */
.bt-overlay {
  display:    none;
  position:   fixed;
  inset:      0;
  background: rgba(0,0,0,.55);
  z-index:    99998;
}
@media (min-width: 768px) {
  .bt-overlay.active { display: block; }
}

/* Modal — mobile: ecrã completo */
.bt-modal {
  display:     none;
  position:    fixed;
  inset:       0;
  width:       100%;
  height:      100%;
  overflow-y:  auto;
  background:  #fff;
  padding:     20px 20px 40px;
  z-index:     99999;
  font-family: inherit;
  box-sizing:  border-box;
  -webkit-overflow-scrolling: touch;
}

/* Desktop — popup centrado */
@media (min-width: 768px) {
  .bt-modal {
    inset:         auto;
    top:           50%;
    left:          50%;
    transform:     translate(-50%, -50%);
    width:         min(620px, 95vw);
    height:        auto;
    max-height:    90vh;
    border-radius: 4px;
    padding:       28px 32px;
    box-shadow:    0 8px 40px rgba(0,0,0,.18);
  }
}

.bt-modal.active { display: block; }

/* Header */
.bt-modal__header {
  display:         flex;
  justify-content: space-between;
  align-items:     flex-start;
  margin-bottom:   20px;
}
.bt-modal__label {
  font-size:      10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          #aaa;
  margin:         0 0 3px;
}
.bt-modal__ref {
  font-size:   14px;
  font-weight: 500;
  color:       #111;
  margin:      0;
}
.bt-modal__close {
  background:  none;
  border:      none;
  cursor:      pointer;
  color:       #999;
  padding:     4px;
  line-height: 1;
  transition:  color .15s;
  flex-shrink: 0;
}
.bt-modal__close:hover { color: #111; }

/* Seletor de tamanhos */
.bt-sizes {
  display:       flex;
  flex-wrap:     wrap;
  gap:           6px;
  margin-bottom: 16px;
}
.bt-size-btn {
  padding:       7px 14px;
  font-size:     12px;
  border:        1px solid #e0e0e0;
  border-radius: 2px;
  background:    transparent;
  color:         #666;
  cursor:        pointer;
  transition:    all .15s;
  font-family:   inherit;
}
.bt-size-btn:hover  { border-color:#222; color:#222; }
.bt-size-btn.active { background:#222; border-color:#222; color:#fff; }

/* Cards */
.bt-cards {
  display:       grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap:           8px;
  margin-bottom: 20px;
}
.bt-cards__group { display: contents; }
.bt-card {
  background:    #f7f7f7;
  border-radius: 3px;
  padding:       14px 10px;
  text-align:    center;
}
.bt-card__label {
  display:        block;
  font-size:      9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color:          #999;
  margin-bottom:  6px;
}
.bt-card__value       { font-size:20px; font-weight:500; color:#111; }
.bt-card__value small { font-size:10px; font-weight:400; color:#aaa; margin-left:1px; }

/* Tabela */
.bt-table-wrap { overflow-x:auto; margin-bottom:16px; -webkit-overflow-scrolling:touch; }
.bt-table      { width:100%; border-collapse:collapse; font-size:13px; }
.bt-table thead tr    { border-bottom:1px solid #efefef; }
.bt-table th {
  padding:        8px 10px;
  text-align:     center;
  font-size:      10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color:          #aaa;
  font-weight:    500;
}
.bt-table th:first-child  { text-align:left; }
.bt-table td {
  padding:    9px 10px;
  text-align: center;
  color:      #555;
  border-top: 1px solid #f5f5f5;
  transition: background .15s, color .15s;
}
.bt-table td:first-child      { text-align:left; }
.bt-table tr.active td        { background:#f7f7f7; color:#111; font-weight:500; }
.bt-table__tam                { font-weight:500; color:#222 !important; }

/* Nota */
.bt-modal__nota { font-size:11px; color:#bbb; margin:0; line-height:1.6; }

/* Bloquear scroll */
body.bt-modal-open { overflow:hidden; }