.masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

.card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
}

.card img {
  width: 100%;
  height: auto;
  display: block;
}

.caption {
  padding: 12px 14px 16px;
}

.caption .title {
  font-size: 20px;
  font-weight: 650;
  color: #222;
  margin: 0 0 6px;
  line-height: 1.8;
}

.caption .desc {
  font-size: 18px;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

.promo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
}
.promo-period { display: flex; align-items: flex-start; gap: 5px; }
.promo-period-text { margin-left: 2px; }
.promo-period-label{
  font-size: 20px;
  color: #888;
  line-height: 1.5;
}
.promo-period-date {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  line-height: 1.3;
}
.btn-call {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  margin-top: 10px;
  background: #1aa260;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.15s ease;
}
.btn-call:hover { background: #168f54; transform: translateY(-1px); }
.btn-call svg { width: 18px; height: 18px; flex-shrink: 0; }

.tag-new {
  display: inline-block;
  background: #e02020;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
}

.toolbar {
  max-width: 1400px;
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
}

.select-wrap {
  position: relative;
  display: inline-block;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #999;
  border-bottom: 2px solid #999;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
  transition: border-color 0.2s ease;
}

.select-wrap:hover::after {
  border-color: #e02020;
}

.toolbar select {
  appearance: none;
  -webkit-appearance: none;
  background: #1c1c1c;
  color: #eee;
  border: 1px solid #3a3a3a;
  border-radius: 999px;
  padding: 10px 38px 10px 18px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2px;
  cursor: pointer;
  min-width: 190px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.toolbar select:hover {
  border-color: #e02020;
  background: #232323;
}

.toolbar select:focus {
  outline: none;
  border-color: #e02020;
  box-shadow: 0 0 0 3px rgba(224, 32, 32, 0.25);
}

.toolbar select option {
  background: #1c1c1c;
  color: #eee;
}

/* dropdown ตัวเลือกแบบ custom */
.dropdown {
  display: none;
}

.custom-select {
  position: relative;
  min-width: 300px;
}

.cs-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #1c1c1c;
  color: #eee;
  border: 1px solid #3a3a3a;
  border-radius: 999px;
  padding: 10px 16px 10px 18px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.cs-trigger:hover,
.custom-select.open .cs-trigger {
  border-color: #fff;
  background: #232323;
}

.cs-trigger .arrow {
  width: 8px;
  height: 8px;
  border-right: 2px solid #999;
  border-bottom: 2px solid #999;
  transform: rotate(45deg);
  transition: transform 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.custom-select.open .cs-trigger .arrow {
  transform: rotate(-135deg);
  border-color: #fff;
}

.cs-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 100%;
  background: #1c1c1c;
  border: 1px solid #3a3a3a;
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 20;
}

.custom-select.open .cs-list {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cs-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  font-size: 18px;
  color: #ccc;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.cs-option:hover {
  background: #2a2a2a;
  color: #fff;
}

.cs-option.selected {
  background: rgba(224, 32, 32, 0.15);
  color: #fff;
}

.card.is-hidden {
  display: none;
}


/* ─── Responsive ─── */
@media(max-width:1400px){
  .caption .title {
    font-size: 18px;
    line-height: 1.5;
  }
  .caption .desc {
    font-size: 16px;
    line-height: 1.5;
  }
  .promo-period-label{
    font-size: 16px;
  }
  .promo-period-date {
    font-size: 14px;
  }
}

@media(max-width:1024px){
  .masonry { grid-template-columns: repeat(2, 1fr); }
}

@media(max-width:768px){
  .caption .title {
    font-size: 18px;
    line-height: 1.5;
  }
  .caption .desc {
    font-size: 16px;
    line-height: 1.5;
  }
  .promo-period-label{
    font-size: 16px;
  }
  .promo-period-date {
    font-size: 14px;
  }
  .masonry { grid-template-columns: repeat(2, 1fr); }
}

@media(max-width:576px){
  .caption .title {
    font-size: 24px;
  }
  .caption .desc {
    font-size: 18px;
  }

  .promo-period-label{
    font-size: 22px;
  }
  .promo-period-date {
    font-size: 18px;
  }
  .btn-call {
    font-size: 18px;
  }

  .masonry { grid-template-columns: 1fr; }
}