/* Clube de Benefícios — módulo integrado ao app DeliLife */

.clube-module {
  padding: 0 0 24px;
  animation: clube-fade-in 0.35s ease;
}

@keyframes clube-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.clube-view[hidden] {
  display: none !important;
}

/* Hero + carrossel de banners (API RedeParcerias) */
.clube-hero {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 16px;
  min-height: clamp(160px, 32vw, 200px);
}

.clube-hero__skeleton {
  height: clamp(160px, 32vw, 200px);
  border-radius: 24px;
  background: linear-gradient(90deg, #ececf1 0%, #f5f5f7 50%, #ececf1 100%);
  background-size: 200% 100%;
  animation: clube-shimmer 1.2s ease-in-out infinite;
}

.clube-hero__fallback {
  position: relative;
  min-height: 160px;
}

.clube-hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #c41e3a 0%, #8b1538 45%, #2d1b4e 100%);
}

.clube-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15), transparent 50%);
}

.clube-hero__content {
  position: relative;
  z-index: 1;
  padding: 24px 20px;
  color: #fff;
}

.clube-hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.18);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.clube-hero__title {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.clube-hero__sub {
  margin: 0;
  font-size: 14px;
  opacity: 0.92;
  line-height: 1.5;
  max-width: 32ch;
}

/* Carrossel hero */
.clube-hero-carousel {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #f8fafc;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06), 0 12px 36px rgba(0, 0, 0, 0.05);
}

.clube-hero-carousel__viewport {
  overflow: hidden;
}

.clube-hero-carousel__track {
  display: flex;
  width: 100%;
  transform: translateX(0%);
  transition: transform 0.35s ease;
}

.clube-hero-carousel__slide {
  flex: 0 0 100%;
  position: relative;
  min-height: clamp(160px, 32vw, 200px);
  padding: 0;
  border: none;
  background: #e5e7eb;
  cursor: pointer;
  width: 100%;
  font: inherit;
  text-align: left;
}

.clube-hero-carousel__slide--desktop {
  display: block;
  min-height: 200px;
  overflow: hidden;
}

.clube-hero-carousel__slide--desktop img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.clube-hero-carousel__slide--mobile {
  display: none;
  padding: 12px 16px;
}

.clube-hero-carousel__slide--mobile img {
  width: 100%;
  height: auto;
  border-radius: 28px;
  object-fit: cover;
  display: block;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

@media (max-width: 640px) {
  .clube-hero-carousel__slide--desktop {
    display: none;
  }

  .clube-hero-carousel__slide--mobile {
    display: block;
  }

  .clube-hero-carousel__slide {
    min-height: auto;
  }

  .clube-hero {
    min-height: auto;
  }
}

.clube-hero-carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}

.clube-hero-carousel__nav:hover {
  background: rgba(255, 255, 255, 0.55);
}

.clube-hero-carousel__nav--prev { left: 12px; }
.clube-hero-carousel__nav--next { right: 12px; }

.clube-hero-carousel__dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 2;
  pointer-events: none;
}

.clube-hero-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.2s, background 0.2s;
}

.clube-hero-carousel__dot.is-active {
  background: #fff;
  transform: scale(1.2);
}

/* Busca */
.clube-search-wrap {
  margin-bottom: 20px;
}

.clube-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--dl-surf, #fff);
  border: 1px solid var(--dl-border, #e8e8ed);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.clube-search i {
  color: var(--dl-txt3, #9ca3af);
  font-size: 14px;
}

.clube-search input {
  flex: 1;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--dl-txt1, #111);
  outline: none;
  min-width: 0;
}

.clube-search--compact {
  margin-bottom: 12px;
}

/* Seções */
.clube-section {
  margin-bottom: 24px;
}

.clube-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.clube-section__head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--dl-txt1, #111);
}

.clube-link-btn {
  border: none;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--dl-red, #c41e3a);
  cursor: pointer;
  padding: 4px 0;
}

/* Categorias */
.clube-cats {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.clube-cats::-webkit-scrollbar { display: none; }

.clube-cat {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 72px;
  padding: 10px 8px;
  border: 1px solid var(--dl-border, #e8e8ed);
  border-radius: 16px;
  background: var(--dl-surf, #fff);
  cursor: pointer;
  font: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clube-cat:hover,
.clube-cat.is-active {
  border-color: var(--dl-red, #c41e3a);
  box-shadow: 0 4px 14px rgba(196, 30, 58, 0.12);
  transform: translateY(-2px);
}

.clube-cat__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: linear-gradient(135deg, #fef2f4, #fce7eb);
}

.clube-cat__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--dl-txt2, #4b5563);
  text-align: center;
  line-height: 1.2;
}

/* Banners legado (removido do layout — mantido vazio) */
.clube-banners { display: none; }

/* Carousel destaque */
.clube-carousel {
  overflow: hidden;
}

.clube-carousel__track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.clube-carousel__track::-webkit-scrollbar { display: none; }

/* Cards */
.clube-card {
  flex: 0 0 min(280px, 78vw);
  scroll-snap-align: start;
  border: 1px solid var(--dl-border, #e8e8ed);
  border-radius: 20px;
  background: var(--dl-surf, #fff);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  font: inherit;
  padding: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.clube-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.clube-card__img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  display: block;
}

.clube-card__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dl-txt3, #9ca3af);
  font-size: 28px;
}

.clube-card__body {
  padding: 14px;
}

.clube-card__partner {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--dl-red, #c41e3a);
  margin-bottom: 4px;
}

.clube-card__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--dl-txt1, #111);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clube-card__benefit {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: #059669;
}

/* Grid benefícios */
.clube-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .clube-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.clube-grid .clube-card {
  flex: none;
  width: 100%;
}

/* Parceiros */
.clube-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.clube-partner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--dl-border, #e8e8ed);
  background: var(--dl-surf, #fff);
  font-size: 13px;
  font-weight: 600;
  color: var(--dl-txt1, #111);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s;
}

.clube-partner:hover {
  border-color: var(--dl-red, #c41e3a);
}

.clube-partner__thumb {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  background: #f3f4f6;
}

/* Como funciona */
.clube-how {
  background: var(--dl-surf, #fff);
  border: 1px solid var(--dl-border, #e8e8ed);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
}

.clube-how h2 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 800;
}

.clube-how__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.clube-how__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 14px;
  color: var(--dl-txt2, #4b5563);
  border-bottom: 1px solid var(--dl-border, #f0f0f5);
}

.clube-how__list li:last-child { border-bottom: none; }

.clube-how__list span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--dl-red, #c41e3a);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* CTAs */
.clube-cta-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.clube-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.2s, transform 0.2s;
}

.clube-cta-btn--outline {
  background: transparent;
  border: 2px solid var(--dl-border, #e8e8ed);
  color: var(--dl-txt1, #111);
}

/* Subnav */
.clube-subnav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.clube-back-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--dl-border, #e8e8ed);
  background: var(--dl-surf, #fff);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dl-txt1, #111);
  font-size: 16px;
}

.clube-subnav__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

/* Filtros */
.clube-filters {
  margin-bottom: 16px;
}

.clube-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.clube-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--dl-border, #e8e8ed);
  background: var(--dl-surf, #fff);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.clube-chip.is-active {
  background: var(--dl-red, #c41e3a);
  border-color: var(--dl-red, #c41e3a);
  color: #fff;
}

/* Paginação */
.clube-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
}

.clube-page-btn {
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid var(--dl-border, #e8e8ed);
  background: var(--dl-surf, #fff);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.clube-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.clube-page-info {
  font-size: 13px;
  color: var(--dl-txt2, #4b5563);
  font-weight: 600;
}

/* Detalhe */
.clube-detail__cover {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 16px;
  background: #f3f4f6;
}

.clube-detail__cover--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--dl-txt3, #9ca3af);
}

.clube-detail__badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #059669;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
}

.clube-detail__title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
}

.clube-detail__partner {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--dl-txt2, #4b5563);
}

.clube-detail__desc {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--dl-txt2, #4b5563);
}

.clube-detail__rules {
  background: #f9fafb;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}

.clube-detail__rules h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800;
}

.clube-detail__rules p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--dl-txt2, #4b5563);
  white-space: pre-wrap;
}

.clube-resgate-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 16px;
  background: var(--dl-red, #c41e3a);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.2s;
}

.clube-resgate-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.clube-resgate-btn.is-loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: clube-spin 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes clube-spin {
  to { transform: rotate(360deg); }
}

/* Dashboard */
.clube-dash-greeting {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--dl-surf, #fff);
  border: 1px solid var(--dl-border, #e8e8ed);
  border-radius: 20px;
  margin-bottom: 20px;
}

.clube-dash-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #c41e3a, #8b1538);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clube-dash-name {
  font-size: 17px;
  font-weight: 800;
}

.clube-dash-sub {
  font-size: 13px;
  color: var(--dl-txt2, #4b5563);
}

.clube-dash-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.clube-dash-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--dl-border, #e8e8ed);
  background: var(--dl-surf, #fff);
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
}

.clube-dash-item__thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: #f3f4f6;
  flex-shrink: 0;
}

.clube-dash-item__info {
  flex: 1;
  min-width: 0;
}

.clube-dash-item__title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clube-dash-item__sub {
  font-size: 12px;
  color: var(--dl-txt3, #9ca3af);
  margin: 0;
}

.clube-empty {
  text-align: center;
  padding: 24px;
  color: var(--dl-txt3, #9ca3af);
  font-size: 14px;
}

/* Skeleton */
.clube-skeleton-row,
.clube-skeleton-grid,
.clube-detail__skeleton {
  background: linear-gradient(90deg, #ececf1 0%, #f5f5f7 50%, #ececf1 100%);
  background-size: 200% 100%;
  animation: clube-shimmer 1.2s ease-in-out infinite;
  border-radius: 16px;
}

.clube-skeleton-row--cats { height: 88px; }
.clube-skeleton-row--partners { height: 52px; }

.clube-skeleton-grid {
  grid-column: 1 / -1;
  height: 280px;
}

.clube-detail__skeleton {
  height: 360px;
}

@keyframes clube-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Toast */
.clube-toast {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: #111827;
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  max-width: min(90vw, 360px);
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  animation: clube-toast-in 0.3s ease;
}

@keyframes clube-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
