.promo-header,
.promo-header-premium {
  /*background: #c5221f url("../images/stamp2/bg-book2.png") no-repeat center top / contain;*/
  background:
    url("../images/stamp2/bg-book2.png") no-repeat center top / contain,
    url("../images/stamp2/bg-book-bt2.png") repeat;
  padding-top: 40px;
  padding-bottom: 16px;
  position: relative;
  text-align: center;
  width: 100%;
  max-width: 420px;  
  margin: 10px auto 0 auto;    
}

.promo-header-premium {
  /*background: #000 url("../images/stamp2/bg-book-premium.png") no-repeat center top / contain;*/
  background: #000 url("../images/stamp2/bg-book-premium2.png") no-repeat center top / contain;  
}

/* หนังสือ */
.card-wrap, .card-wrap-premium {
  position: relative;
  width: 95%;
  max-width: 420px;  
  margin: 10px auto 0 auto;
}

.card-img, .card-img-premium {
  width: 100%;
  max-width: 420px;  
  height: auto;
  display: block;
}


.stamp-overlay {
  position: absolute;
  left: 7%;
  /*left: 4%;*/
  right: 7%;
  top: 18.5%;
  height: 65%;
  display: grid;
  gap: 6px;
  z-index: 1;
  pointer-events: auto !important;
}

.stamp-overlay-premium {
  position: absolute;
  left: 5%;
  right: 5%;
  display: grid;
  gap: 4px;
  z-index: 1;
  pointer-events: auto !important;
}

.stamp-overlay-premium[data-rows="2"] {
  gap: 2px;
}

.stamp-overlay-premium[data-rows="3"] {
  gap: 4px;
  left: 0% !important;
  right: 2.65% !important;
}
.stamp-overlay-premium[data-rows="4"] {
  gap: 4px;
  /*left: 0% !important;*/
  right: 2.9% !important;
}

.stamp-overlay-premium img.star {
  width: 80% !important;  
  height: 80% !important;
  object-fit: contain;
  display: block;
}

.stamp-overlay .cell {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.stamp-overlay-premium .cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ป้าย reward (มุมบนขวา) */
.reward-pin{
  position:absolute;
  inset: 0; 
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:10px;
  font-weight:700;
  z-index:5;
}


/* standard */
.promo-header .reward-pin img{
  width:105%;
  height:auto;
  object-fit:contain;
  margin-top: 5px;
}

/* premium */
.promo-header-premium .reward-pin img{
  width:100%;        /* หรือ 95% */
  height:100%;
  object-fit:contain;
  margin-top: 0; 
}

.reward-pin.clickable { cursor: pointer; }
.reward-pin.locked { opacity: .45; filter: grayscale(1); }
.reward-pin.clickable:hover { transform: scale(1.03); transition: .15s; }

.stamp-overlay img.star {
  width: 50% !important;  
  height: 50% !important;
  object-fit: contain;
  display: block;
}



.btn-scan {
     padding-top: 10px;
     padding-bottom: 10px;
}

body.center-only-scan {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.center-only-scan .btn-scan {
  padding-top: 0;
  padding-bottom: 0;
}

.stamp-footer,
.stamp-footer-premium {
  position: absolute;
  z-index: 2;     
  right: 5%;    
  bottom: 1%;   
  width: 38%;    
  text-align: right;
  line-height: 1.15;
  font-weight: 400;
  pointer-events: none; 
  font-size: clamp(10px, 3.2vw, 10px);
  white-space: nowrap;
  color: #000; 
}
.stamp-footer-premium {
  color: #fff;
  
}
.hide-force { display: none !important; }

.condition-link {
  color: #fff;  
  text-decoration: underline; 
  cursor: pointer;
  font-size: 12px;
}

.text-end {
  text-align: right; 
}
.modal-title {
  white-space: nowrap;
}

.rewards-wrap{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:center;
  margin:10px 0 6px;
}

.reward-item{
  width:64px;
  text-align:center;
  font-size:12px;
  line-height:1.1;
}

.reward-item img{
  width:64px;
  height:64px;
  object-fit:cover;
  border-radius:10px;
}

.reward-item.locked img{
  filter: grayscale(100%) brightness(0.85);
  opacity: 0.6;
}

.reward-item .ms{
  margin-top:4px;
  color:#666;
}


.stamp-overlay .cell:nth-child(5) {
  left: -3.2px !important;
  top: -2px !important;
  width: 106% !important;
}

.stamp-overlay .cell:nth-child(10) {
  left: -3.2px !important;
  top: -2px !important;
  width: 106% !important;
}

.stamp-overlay .cell:nth-child(15) {
  left: -3.2px !important;
  top: -2px !important;
  width: 106% !important;
}

.stamp-overlay .cell:nth-child(20) {
  left: -3.2px !important;
  top: -2px !important;
  width: 106% !important;
}