/* ===== Gift Modal — premium black/white ===== */
.gm-overlay{
  position: fixed; inset: 0; z-index: 99998;
  background: rgba(0,0,0,0);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease, background .35s ease;
}
.gm-overlay.is-open{
  background: rgba(0,0,0,.55);
  opacity: 1; pointer-events: auto;
}
.gm-sheet{
  position: relative;
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -30px 80px rgba(0,0,0,.25);
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
  display: flex; flex-direction: column;
  max-height: 86vh;
  overflow: hidden;
  font-family: 'Manrope', -apple-system, 'Segoe UI', Arial, sans-serif;
}
.gm-overlay.is-open .gm-sheet{ transform: translateY(0); }

.gm-handle{
  width: 44px; height: 4px;
  background: rgba(17,24,39,.18);
  border-radius: 999px;
  margin: 10px auto 0;
  flex: 0 0 auto;
}

.gm-head{
  padding: 14px 20px 10px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(17,24,39,.06);
  flex: 0 0 auto;
}
.gm-head-text{ flex: 1; min-width: 0; }
.gm-title{
  font-size: 17px;
  font-weight: 800;
  color: #0c0c0c;
  letter-spacing: -.01em;
  margin: 0 0 4px;
  line-height: 1.2;
}
.gm-sub{
  font-size: 12.5px;
  color: #6b7280;
  margin: 0;
}
.gm-sub b{ color: #0c0c0c; font-weight: 700; }

.gm-close{
  width: 36px; height: 36px;
  border-radius: 999px;
  background: #f4f4f3;
  color: #0c0c0c;
  border: 0;
  display: grid; place-items: center;
  font-size: 14px; cursor: pointer;
  transition: background .15s ease;
  flex: 0 0 auto;
}
.gm-close:hover{ background: #e5e7eb; }

.gm-tabs{
  display: flex; gap: 8px;
  padding: 14px 20px 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex: 0 0 auto;
}
.gm-tabs::-webkit-scrollbar{ display: none; }
.gm-tab{
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(17,24,39,.12);
  color: #0c0c0c;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .12s ease;
  white-space: nowrap;
}
.gm-tab:hover{ background: #f4f4f3; }
.gm-tab.is-active{
  background: #0c0c0c;
  border-color: #0c0c0c;
  color: #fff;
}
.gm-tab i{ font-size: 13px; }

.gm-body{
  padding: 12px 20px 16px;
  overflow-y: auto;
  flex: 1 1 auto;
  -webkit-overflow-scrolling: touch;
}

.gm-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 480px){ .gm-grid{ grid-template-columns: repeat(3, 1fr); gap: 14px; } }

.gm-card{
  background: #fff;
  border: 1px solid rgba(17,24,39,.10);
  border-radius: 16px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  position: relative;
  cursor: pointer;
  user-select: none;
}
.gm-card.is-selected{ cursor: default; }
.gm-card.is-selected .gm-qty,
.gm-card.is-selected .gm-qty-btn{ cursor: pointer; }
.gm-card:hover{ border-color: #0c0c0c; box-shadow: 0 12px 26px rgba(12,12,12,.08); }
.gm-card.is-selected{
  border-color: #0c0c0c;
  box-shadow: 0 0 0 1px #0c0c0c;
}
.gm-card-img{
  position: relative;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  overflow: hidden;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gm-card-img img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.gm-card-info{
  padding: 10px 12px 12px;
  display: flex; flex-direction: column;
  gap: 6px;
}
.gm-card-name{
  font-size: 12.5px;
  font-weight: 600;
  color: #111;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 32px;
}
.gm-card-row{
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.gm-card-price{
  font-size: 14px;
  font-weight: 800;
  color: #0c0c0c;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.gm-qty{
  display: inline-flex; align-items: center;
  border: 1px solid rgba(17,24,39,.14);
  border-radius: 999px;
  padding: 2px;
  background: #fff;
}
.gm-qty-btn{
  width: 26px; height: 26px;
  border: 0; background: transparent;
  border-radius: 999px;
  color: #111; font-size: 14px; font-weight: 700;
  cursor: pointer;
  display: grid; place-items: center;
  line-height: 1;
}
.gm-qty-btn:hover{ background: #f4f4f3; }
.gm-qty-num{
  min-width: 18px; text-align: center;
  font-size: 12.5px; font-weight: 700;
}
.gm-add{
  border: 0; background: #0c0c0c; color: #fff;
  width: 32px; height: 32px; border-radius: 999px;
  display: grid; place-items: center;
  font-size: 14px; cursor: pointer;
  transition: background .15s ease;
}
.gm-add:hover{ background: #1f1f1f; }

.gm-empty{
  padding: 36px 20px;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
  background: #fafaf7;
  border: 1px dashed rgba(17,24,39,.12);
  border-radius: 14px;
}
.gm-empty i{ font-size: 28px; color: #d1d5db; display: block; margin-bottom: 10px; }

.gm-footer{
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(17,24,39,.06);
  display: flex; gap: 10px;
  background: #fff;
  flex: 0 0 auto;
}
.gm-btn-skip{
  flex: 0 0 auto;
  min-width: 96px;
  border: 1px solid rgba(17,24,39,.14);
  background: #fff;
  color: #0c0c0c;
  border-radius: 16px;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: .3px;
  text-transform: uppercase;
  height: 54px;
  cursor: pointer;
}
.gm-btn-skip:hover{ background: #f4f4f3; }
.gm-btn-confirm{
  flex: 1 1 auto;
  border: 0;
  background: #0c0c0c;
  color: #fff;
  border-radius: 16px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .4px;
  text-transform: uppercase;
  height: 54px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  transition: background .15s ease, transform .12s ease;
}
.gm-btn-confirm:hover{ background: #1f1f1f; }
.gm-btn-confirm:active{ transform: scale(.98); }
.gm-btn-confirm .gm-btn-total{
  background: rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12.5px;
  font-weight: 700;
}
