/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #fdfdfd;
  color: #333;
  line-height: 1.6;
  padding: 10px;
}

/* Header */
header {
  text-align: center;
  padding: 40px 10px 20px;
  background: linear-gradient(135deg, #ffdf9e, #ffeabf);
  color: #4b2e00;
  border-radius: 0 0 30px 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

header h1 {
  font-size: 30px;
  margin-bottom: 10px;
}

header p {
  font-size: 18px;
  color: #855d00;
}

/* Hướng dẫn lấy mã */
.guideline {
  background: #fffaf0;
  border: 2px solid #ffd591;
  border-radius: 16px;
  padding: 24px;
  margin: 30px auto;
  margin-bottom: 60px;
  max-width: 900px;
  box-shadow: 0 4px 10px rgba(255, 215, 145, 0.2);
  font-size: 16px;
  color: #5c3d00;
}

.guideline h2 {
  color: #d48806;
  margin-bottom: 16px;
  font-size: 24px;
  text-align: center;
}

.guideline p {
  white-space: pre-line;
  line-height: 1.7;
}

.guideline a {
  color: #c41d7f;
  text-decoration: none;
  font-weight: bolder;
}

.guideline span {
  font-weight: bold;
  color: #c41d7f;
}

/* Tên thương hiệu */
.coupon-container h2 {
  text-align: center;
  font-size: 24px;
  margin-top: 0px;
  color: #c05000;
  position: relative;
}

.coupon-container h2::after {
  content: '';
  width: 60px;
  height: 3px;
  background: #ffa94d;
  display: block;
  margin: 10px auto 0;
  border-radius: 2px;
}

.coupon-container p {
  font-size: 16px;
}

/* Coupon item wrapper */
.coupon-item {
  position: relative;
  display: block;
  max-width: 860px;
  margin: 20px auto 60px;
  background: #fff;
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}

.coupon-item:hover {
  transform: scale(1.01);
}

/* Carousel */
.carousel {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 20px auto;
  height: 350px;
  perspective: 1000px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.carousel-item {
  position: absolute;
  transition: transform 0.6s ease, opacity 0.6s ease;
  opacity: 0;
  pointer-events: none;
}

.carousel-item img {
  width: 220px;
  height: 100%;
  max-height: 350px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.carousel-item.active {
  transform: scale(1) translateX(0);
  z-index: 3;
  opacity: 1;
  pointer-events: auto;
}

.carousel-item.prev,
.carousel-item.next {
  transform: scale(0.8) translateX(calc(var(--direction) * 150px));
  z-index: 2;
  opacity: 0.6;
}

.carousel-item.prev-prev,
.carousel-item.next-next {
  transform: scale(0.6) translateX(calc(var(--direction) * 300px));
  z-index: 1;
  opacity: 0.3;
}

/* Nút Lấy mã */
.button-wrapper {
  text-align: center;
  margin-top: 20px;
}

.collect {
  padding: 14px 30px;
  font-size: 16px;
  font-weight: bold;
  background: linear-gradient(135deg, #ff5f6d, #ffc371);
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s, box-shadow 0.3s;
  animation: pulse 1.5s infinite;
}

.collect:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(255, 95, 109, 0.6);
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 95, 109, 0.4);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 0 12px rgba(255, 95, 109, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 95, 109, 0.4);
  }
}

/* Footer */
footer {
  text-align: center;
  margin-top: 60px;
  padding: 20px 0;
  background: #f5f5f5;
  color: #999;
  font-size: 14px;
  border-top: 1px solid #ddd;
}
