*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Nunito", "Poppins", sans-serif;
  background-color: #F3E6D4;
  color: #2C2418;
  letter-spacing: 0.01em;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }

.hidden { display: none !important; }

.site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #E8D4BC;
  border-bottom: 1px solid rgba(196, 163, 90, 0.35);
  padding: 1rem 1.5rem;
  z-index: 10;
}
.site-header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.site-header-logo {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: 2px solid #C4A35A;
  object-fit: contain;
  background: #F3E6D4;
}
.site-header-title {
  font-weight: 800;
  font-size: 1.125rem;
  color: #8B6B32;
  letter-spacing: 0.02em;
}
.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.coupon-fade-in { animation: fadeIn 0.3s ease-out forwards; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 2px 2px;
}
.hero-title {
  font-size: clamp(13px, 3.4vw, 18px);
  white-space: nowrap;
}
.hero-date {
  border: 1px solid rgba(196, 163, 90, 0.45);
  border-radius: 9999px;
  padding: 3px 8px;
  background: #FAF3E8;
  color: #8B6B32;
  font-size: clamp(9px, 2.3vw, 12px);
  white-space: nowrap;
}

.social-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-top: 10px;
}
.social-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 6px 5px;
  border-radius: 9999px;
  border: 1px solid;
  background: #FAF3E8;
  color: #2C2418;
  font-size: clamp(8px, 2.15vw, 12px);
  font-weight: 700;
  justify-content: center;
  text-align: center;
  transition: transform 0.15s ease, background 0.15s ease;
}
.social-chip i { flex-shrink: 0; font-size: clamp(16px, 4.4vw, 20px); }
.social-chip span { min-width: 0; white-space: normal; overflow-wrap: break-word; text-align: center; }
.social-chip:hover { transform: translateY(-2px); background: rgba(196, 163, 90, 0.18); }
.social-chip-wa { border-color: #22c55e; }
.social-chip-wa i { color: #22c55e; }
.social-chip-fb { border-color: #3b82f6; }
.social-chip-fb i { color: #3b82f6; }
.social-chip-tg { border-color: #38bdf8; }
.social-chip-tg i { color: #38bdf8; }
.social-chip-tt { border-color: #6b7280; }
.social-chip-tt i { color: #2C2418; }

.coupon-banner {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 8px auto 4px;
  overflow: visible;
}
.banner-viewport { overflow: hidden; cursor: grab; touch-action: pan-y; }
.banner-viewport.is-dragging { cursor: grabbing; }
.banner-track {
  display: flex;
  gap: 12px;
  align-items: stretch;
  flex-wrap: nowrap;
  transition: transform 0.4s ease;
  will-change: transform;
}
.banner-slide {
  position: relative;
  flex: 0 0 100%;
  height: 158px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-width: 0;
}
.banner-slide-img {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 18px;
  pointer-events: none;
  user-select: none;
}
.banner-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(196, 163, 90, 0.45);
  background: rgba(243, 230, 212, 0.9);
  color: #8B6B32;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.banner-prev { left: 6px; }
.banner-next { right: 6px; }
.banner-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.banner-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(196, 163, 90, 0.35);
  padding: 0;
}
.banner-dot.is-active { background: #C4A35A; width: 18px; }
.coupon-banner.banner-one .banner-track { justify-content: center; }
.coupon-banner.banner-one .banner-slide { flex-basis: 100%; }

.coupons-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
  max-width: 720px;
  margin: 0 auto;
}
.coupons-grid + .coupons-grid:not(:empty) { margin-top: 1.25rem; }

.coupon-card {
  position: relative;
  background: #FAF3E8;
  border: 1px solid rgba(196, 163, 90, 0.28);
  border-radius: 20px;
  padding: 1.1rem 1rem 1.15rem;
  box-shadow: 0 6px 16px rgba(44, 36, 24, 0.08);
}
.coupon-card-hot {
  border: 1px solid rgba(196, 163, 90, 0.7);
  box-shadow: 0 0 0 1px rgba(196, 163, 90, 0.2), 0 10px 30px rgba(196, 163, 90, 0.22);
}
.coupon-hot-badge { background: #C4A35A; color: #000; }
.coupon-card-expired { opacity: 0.72; pointer-events: none; }

.coupon-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #ffe600;
  border: 2px solid #2d3277;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  align-self: center;
}
.coupon-logo img { width: 100%; height: 100%; object-fit: contain; }
.coupon-logo-amazon { background: #fff; border: none; color: #111; padding: 8px; }

.coupon-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 1px auto;
  column-gap: 8px;
  align-items: center;
}
.coupon-divider {
  width: 1px;
  height: 70%;
  min-height: 44px;
  background: rgba(196, 163, 90, 0.45);
  border-radius: 1px;
  align-self: center;
}
.coupon-info { min-width: 0; }
.coupon-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14ch;
  line-height: 1.05;
  font-size: clamp(15px, 6.2vw, 34px);
  color: #2C2418;
}
.coupon-meta {
  font-size: clamp(11px, 3.3vw, 15px);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 22ch;
  color: #7A6A50;
}
.coupon-expires {
  color: #C4A35A;
  font-weight: 800;
  white-space: nowrap;
  font-size: clamp(10px, 2.9vw, 14px);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}
.coupon-expires span { white-space: nowrap; }
.coupon-right { display: flex; align-items: center; justify-content: center; padding-left: 4px; }
.coupon-code {
  color: #8B6B32;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  font-size: clamp(16px, 5vw, 26px);
  text-align: center;
}
.coupon-footer {
  display: flex;
  align-items: center;
  width: 100%;
  margin-top: 12px;
}
.coupon-footer-split {
  justify-content: space-between;
  align-items: stretch;
  gap: 8px;
}
.coupon-btn {
  width: 100%;
  background: #22c55e;
  color: #fff;
  font-weight: 800;
  font-size: clamp(8px, 2.4vw, 12px);
  letter-spacing: 0.01em;
  padding: 7px 8px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  line-height: 1.15;
}
.coupon-footer-split .coupon-btn {
  width: auto;
  flex: 1;
  min-width: 0;
  height: 40px;
  font-size: 9px;
  padding: 0 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.coupon-btn-used {
  background: rgba(139, 107, 50, 0.25);
  color: #6B5428;
  cursor: default;
}
.coupon-best-tag {
  display: inline-block;
  background: #C4A35A;
  color: #000;
  font-size: 10px;
  font-weight: 800;
  padding: 0.12rem 0.45rem;
  border-radius: 9999px;
  margin: 0 0 0.35rem;
}
.coupon-save {
  margin: 0.15rem 0 0;
  color: #8B6B32;
  font-size: 12px;
  font-weight: 700;
}
.coupon-bank-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 122px;
  height: 40px;
  background: #fff;
  border-radius: 10px;
  padding: 4px 6px;
  overflow: hidden;
  line-height: 0;
}
.coupon-bank-chip img { width: 100%; height: 100%; object-fit: contain; }
.coupon-bank-chip-wide { width: 136px; }

@media (min-width: 640px) {
  .coupon-card { padding: 1.25rem 1.25rem 1.3rem; }
  .coupon-logo { width: 60px; height: 60px; }
  .coupon-bank-chip { width: 130px; height: 44px; }
  .coupon-footer-split .coupon-btn { height: 44px; }
  .social-chip { padding: 8px 12px; font-size: 12px; gap: 6px; }
  .social-chip i { font-size: 20px; }
}

@media (min-width: 900px) {
  .coupons-grid {
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    gap: 1.25rem;
  }
  .banner-slide { flex-basis: calc((100% - 12px) / 2); height: 210px; }
  .coupon-banner.banner-one .banner-slide { flex-basis: calc((100% - 12px) / 2); }
  .coupon-title { max-width: 16ch; font-size: clamp(18px, 2vw, 28px); }
}

.finder-wrap { max-width: 560px; margin: 0.85rem auto 1.1rem; }
.how-to-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 40px;
  margin-bottom: 0.65rem;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  border: 2px solid #C4A35A;
  background: #FAF3E8;
  color: #8B6B32;
  font-size: 12px;
  font-weight: 800;
}
.how-to-btn:hover { background: #C4A35A; color: #000; }
.finder-form { display: flex; gap: 0.45rem; align-items: stretch; }
.finder-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0 0.85rem;
  border-radius: 9999px;
  border: 2px solid #C4A35A;
  background: #FAF3E8;
  color: #C4A35A;
}
.finder-field input {
  flex: 1;
  width: 100%;
  border: 0;
  background: transparent;
  color: #2C2418;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  outline: none;
}
.finder-field input::placeholder { color: rgba(44, 36, 24, 0.65); }
.finder-btn {
  min-height: 44px;
  padding: 0 1.1rem;
  border-radius: 9999px;
  background: #C4A35A;
  color: #000;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.finder-summary {
  margin: 0.65rem 0 0;
  color: #8B6B32;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.finder-summary a { color: #8B6B32; text-decoration: underline; }
.combine-section { max-width: 1200px; margin: 1rem auto 1.5rem; }
.combine-title {
  margin: 0 0 0.55rem;
  color: #8B6B32;
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
}

.how-to-modal, .admin-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(44, 36, 24, 0.55);
}
.admin-modal { align-items: flex-start; overflow: auto; padding: 1.2rem 1rem; }
.combine-section[hidden],
.how-to-modal[hidden],
.finder-summary[hidden],
.admin-modal[hidden] { display: none !important; }
.how-to-card, .admin-modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #FAF3E8;
  border: 1px solid rgba(196, 163, 90, 0.45);
  border-radius: 18px;
  padding: 1.35rem 1.15rem 1.2rem;
  box-shadow: 0 12px 32px rgba(196, 163, 90, 0.22);
}
.admin-modal-card { max-width: 720px; margin: auto; padding: 1.1rem; }
.how-to-card h2, .admin-modal-top h2 {
  margin: 0 1.5rem 0.9rem 0;
  color: #8B6B32;
  font-size: 1.2rem;
  font-weight: 800;
}
.how-to-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  color: #8B6B32;
  font-size: 16px;
}
.how-to-steps { margin: 0; padding: 0; list-style: none; counter-reset: how; }
.how-to-steps li {
  position: relative;
  margin: 0 0 0.8rem;
  padding-left: 2.1rem;
  color: #2C2418;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}
.how-to-steps li::before {
  counter-increment: how;
  content: counter(how);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 9999px;
  background: #C4A35A;
  color: #000;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.how-to-steps strong { color: #8B6B32; }
.how-to-try {
  width: 100%;
  min-height: 44px;
  margin-top: 0.35rem;
  border-radius: 9999px;
  background: #C4A35A;
  color: #000;
  font-size: 14px;
  font-weight: 800;
}

.header-user {
  color: #8B6B32;
  font-size: 12px;
  font-weight: 700;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  border: 2px solid #C4A35A;
  color: #8B6B32;
  font-size: 11px;
  font-weight: 700;
  background: #FAF3E8;
  white-space: nowrap;
}
.header-auth-btn:hover { background: #C4A35A; color: #000; }
.auth-wrap { max-width: 420px; margin: 2rem auto 2.5rem; padding: 0 1rem; }
.auth-card {
  position: relative;
  background: #FAF3E8;
  border: 1px solid rgba(196, 163, 90, 0.4);
  border-radius: 18px;
  padding: 1.5rem 1.25rem 1.35rem;
  box-shadow: 0 10px 28px rgba(196, 163, 90, 0.22);
  text-align: center;
}
.auth-logo {
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  border: 2px solid #C4A35A;
  object-fit: contain;
  background: #F3E6D4;
  margin: 0 auto 0.7rem;
}
.auth-title { margin: 0; color: #8B6B32; font-size: 1.45rem; font-weight: 800; }
.auth-sub { margin: 0.35rem 0 1.1rem; color: rgba(44, 36, 24, 0.8); font-size: 13px; font-weight: 600; }
.auth-form { display: flex; flex-direction: column; gap: 0.75rem; text-align: left; }
.auth-label[hidden] { display: none !important; }
.auth-input[type="date"] { color-scheme: light; }
.auth-input {
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 2px solid rgba(196, 163, 90, 0.45);
  background: #F7EFE3;
  color: #2C2418;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  outline: none;
}
.auth-input:focus { border-color: #C4A35A; }
.auth-submit {
  width: 100%;
  min-height: 44px;
  margin-top: 0.35rem;
  border-radius: 9999px;
  background: #C4A35A;
  color: #000;
  font-size: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.auth-submit:disabled { opacity: 0.6; }
.auth-msg { margin: 0; font-size: 13px; font-weight: 700; color: #8B6B32; }
.auth-msg.is-error { color: #ff6b6b; }
.auth-switch { margin: 0.85rem 0 0; color: rgba(44, 36, 24, 0.75); font-size: 13px; font-weight: 600; }
.auth-switch a { color: #8B6B32; font-weight: 800; text-decoration: underline; }

.admin-wrap { max-width: 1100px; margin: 1.5rem auto 2.5rem; padding: 0 1rem; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.admin-head h1 { margin: 0 0 0.35rem; color: #8B6B32; font-size: 1.4rem; font-weight: 800; }
.admin-head p { margin: 0; color: rgba(44, 36, 24, 0.8); font-size: 13px; font-weight: 600; }
.admin-nav { display: flex; gap: 0.45rem; margin-bottom: 1.15rem; flex-wrap: wrap; }
.admin-nav-btn {
  min-height: 36px;
  padding: 0 0.95rem;
  border-radius: 9999px;
  background: #EDE0CC;
  color: rgba(139, 107, 50, 0.8);
  border: 1px solid rgba(196, 163, 90, 0.18);
  font-size: 13px;
  font-weight: 700;
}
.admin-nav-btn i { margin-right: 0.3rem; }
.admin-nav-btn.is-on { background: #C4A35A; color: #000; border-color: #C4A35A; }
.admin-page-title { margin: 0 0 1rem; color: #8B6B32; font-size: 1.7rem; font-weight: 800; }
.admin-new-btn { width: auto; min-width: 160px; margin: 0; }
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.85rem; margin-bottom: 1.35rem; }
.admin-stat {
  background: #FAF3E8;
  border: 1px solid rgba(196, 163, 90, 0.28);
  border-radius: 16px;
  padding: 1.05rem 1.15rem 1.15rem;
  min-height: 104px;
}
.admin-stat span { display: block; color: #8B6B32; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.55rem; }
.admin-stat b { display: block; color: #8B6B32; font-size: 2rem; font-weight: 800; line-height: 1; }
.admin-latest, .admin-table-wrap {
  background: #FAF3E8;
  border: 1px solid rgba(196, 163, 90, 0.28);
  border-radius: 16px;
  overflow: hidden;
}
.admin-latest-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.15rem 0.65rem; }
.admin-latest-head h2 { margin: 0; color: #8B6B32; font-size: 1rem; font-weight: 800; }
.admin-link-btn { color: #8B6B32; font-size: 13px; font-weight: 700; background: transparent; }
.admin-latest-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.15rem;
  border-top: 1px solid rgba(196, 163, 90, 0.12);
}
.admin-latest-item strong { display: block; color: #8B6B32; font-size: 0.95rem; font-weight: 800; }
.admin-latest-item p { margin: 0.2rem 0 0; color: rgba(44, 36, 24, 0.75); font-size: 12px; font-weight: 600; }
.admin-latest-canjes { color: #8B6B32; font-size: 13px; font-weight: 700; white-space: nowrap; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.admin-table th, .admin-table td {
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid rgba(196, 163, 90, 0.12);
  font-size: 12px;
  font-weight: 600;
  color: #2C2418;
}
.admin-table th { color: #8B6B32; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.admin-table tr.is-off { opacity: 0.55; }
.admin-table strong, .admin-table code { color: #8B6B32; }
.admin-off { color: #8B6B32; font-size: 11px; }
.admin-row-actions { display: flex; gap: 0.35rem; white-space: nowrap; }
.admin-status {
  min-height: 32px;
  padding: 0 0.65rem;
  border-radius: 9999px;
  border: 2px solid #ff6b6b;
  color: #ff6b6b;
  font-size: 11px;
  font-weight: 800;
}
.admin-status.is-on { border-color: #C4A35A; color: #000; background: #C4A35A; }
.admin-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.admin-form .admin-span, .admin-form .admin-check, .admin-form .auth-msg, .admin-form .admin-form-actions { grid-column: 1 / -1; }
.admin-check { display: flex; align-items: center; gap: 0.45rem; color: #8B6B32; font-size: 13px; font-weight: 700; }
.admin-form-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.admin-btn-ghost, .admin-btn-danger {
  min-height: 36px;
  padding: 0 0.85rem;
  border-radius: 9999px;
  border: 2px solid #C4A35A;
  color: #8B6B32;
  font-size: 12px;
  font-weight: 800;
  background: transparent;
}
.admin-btn-danger { border-color: #ff6b6b; color: #ff6b6b; }
.admin-empty { text-align: center; color: rgba(44, 36, 24, 0.75); font-weight: 600; padding: 1.2rem; }
.admin-modal-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem; }
.admin-banners { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.85rem; }
.admin-banner-card {
  background: #FAF3E8;
  border: 1px solid rgba(196, 163, 90, 0.28);
  border-radius: 16px;
  overflow: hidden;
}
.admin-banner-card img { width: 100%; height: 120px; object-fit: contain; background: #F3E6D4; }
.admin-banner-card .admin-banner-meta { padding: 0.75rem; display: flex; justify-content: space-between; gap: 0.5rem; align-items: center; }

@media (max-width: 640px) {
  .admin-form { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: 1fr; }
  .admin-head { flex-direction: column; }
  .admin-new-btn { width: 100%; }
  .header-auth-btn { min-height: 44px; }
}

@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 0.8s linear infinite; }
@keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } }
.animate-ping { animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; }
.group:hover .group-hover\:animate-none { animation: none; }
