/* =========================================================
   RIFA — Página de números e compra
   ========================================================= */

/* ===== HERO / BANNER ===== */
.rifa-hero{
  margin-top:16px;
  display:grid;
  grid-template-columns:1fr;
  gap:20px;
}
.rifa-head{
  text-align:center;
  max-width:900px;
  margin:0 auto;
  padding:0 10px;
}
.rifa-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 18px;
  border-radius:999px;
  background:linear-gradient(135deg,rgba(255,26,26,0.18),rgba(138,0,0,0.12));
  border:1px solid rgba(255,26,26,0.4);
  color:#ff6b6b;
  font-size:11px;
  font-weight:800;
  letter-spacing:1.5px;
  text-transform:uppercase;
  margin-bottom:14px;
}
.rifa-badge i{color:var(--yellow,#ffd23a)}
.rifa-title{
  font-size:clamp(26px,4.2vw,46px);
  font-weight:900;
  letter-spacing:-0.5px;
  line-height:1.1;
  margin-bottom:10px;
  color:#fff;
}
.rifa-title .accent{color:#ffd23a;text-shadow:0 0 30px rgba(255,210,58,0.4)}
.rifa-sub{
  color:var(--text-dim,#b8b8c0);
  font-size:15px;
}

/* Banner 1250x220 desktop, 560x110 mobile */
.rifa-banner{
  width:100%;
  max-width:1250px;
  margin:0 auto;
  aspect-ratio:1250/220;
  border-radius:24px;
  overflow:hidden;
  position:relative;
  background:linear-gradient(135deg,#1a0505 0%,#2a0808 50%,#400a0a 100%);
  border:1px solid rgba(255,26,26,0.2);
  box-shadow:0 20px 50px rgba(0,0,0,0.6), 0 0 60px rgba(255,26,26,0.2);
}
.rifa-banner-img{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
}
.rb-car{
  width:50%;
  height:75%;
  filter:drop-shadow(0 20px 40px rgba(0,0,0,0.8));
}
.rb-glow{
  position:absolute;
  inset:0;
  background:
    radial-gradient(ellipse at 50% 60%,rgba(255,26,26,0.35) 0%,transparent 55%),
    radial-gradient(ellipse at 20% 50%,rgba(255,122,0,0.15) 0%,transparent 45%);
  filter:blur(30px);
  pointer-events:none;
}
@media (max-width:720px){
  .rifa-banner{aspect-ratio:560/110;border-radius:16px}
}

/* ===== MAIN LAYOUT ===== */
.rifa-main{margin-top:30px}
.rifa-layout{
  display:grid;
  grid-template-columns:1fr 380px;
  gap:20px;
}

/* ===== GRID DE NÚMEROS ===== */
.rifa-numbers-panel{
  border-radius:20px;
  padding:24px;
}
.rifa-numbers-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:18px;
  flex-wrap:wrap;
}
.rifa-numbers-head h2{
  font-size:18px;
  font-weight:800;
  margin-bottom:4px;
  color:#fff;
}
.rifa-numbers-head p{
  font-size:12px;
  color:var(--text-dim,#b8b8c0);
}
.rifa-legend{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  font-size:11px;
  color:var(--text-dim,#b8b8c0);
}
.leg-item{display:inline-flex;align-items:center;gap:6px}
.leg-item .dot{
  width:10px;height:10px;
  border-radius:3px;
  display:inline-block;
}
.leg-item .dot.available{background:#22c55e;box-shadow:0 0 6px rgba(34,197,94,0.6)}
.leg-item .dot.reserved{background:#ff7a1a;box-shadow:0 0 6px rgba(255,122,26,0.6)}
.leg-item .dot.sold{background:#ff1a1a;box-shadow:0 0 6px rgba(255,26,26,0.6)}
.leg-item .dot.selected{background:#ffd23a;box-shadow:0 0 8px rgba(255,210,58,0.7)}

/* Controles */
.rifa-controls{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:16px;
  padding-bottom:16px;
  border-bottom:1px solid rgba(255,255,255,0.06);
  align-items:center;
}
.btn-rifa-ctrl{
  padding:9px 14px;
  border-radius:999px;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
  color:var(--text-dim,#b8b8c0);
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  transition:all 0.2s;
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.btn-rifa-ctrl:hover{color:#fff;border-color:rgba(255,26,26,0.35);background:rgba(255,26,26,0.08)}
.rifa-search{
  position:relative;
  margin-left:auto;
  min-width:160px;
}
.rifa-search i{
  position:absolute;
  left:14px;top:50%;
  transform:translateY(-50%);
  color:var(--text-mut,#7a7a85);
  font-size:12px;
}
.rifa-search input{
  width:100%;
  padding:9px 14px 9px 36px;
  border-radius:999px;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
  color:#fff;
  font-size:12px;
  outline:none;
  font-family:inherit;
}
.rifa-search input:focus{border-color:rgba(255,26,26,0.4)}

/* Grid de números */
.rifa-grid{
  display:grid;
  grid-template-columns:repeat(10,1fr);
  gap:6px;
  margin-bottom:18px;
}
.rifa-num{
  aspect-ratio:1;
  border-radius:10px;
  border:1px solid transparent;
  font-family:inherit;
  font-weight:800;
  font-size:13px;
  cursor:pointer;
  transition:all 0.18s cubic-bezier(.2,.8,.3,1);
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
}
.rifa-num.available{
  background:linear-gradient(135deg,rgba(34,197,94,0.14),rgba(22,163,74,0.08));
  color:#4ade80;
  border-color:rgba(34,197,94,0.25);
}
.rifa-num.available:hover{
  transform:translateY(-2px);
  background:linear-gradient(135deg,rgba(34,197,94,0.25),rgba(22,163,74,0.15));
  border-color:rgba(34,197,94,0.5);
  box-shadow:0 6px 16px rgba(34,197,94,0.25);
}
.rifa-num.reserved{
  background:linear-gradient(135deg,rgba(255,122,26,0.18),rgba(194,69,0,0.1));
  color:#ff9e5e;
  border-color:rgba(255,122,26,0.4);
  cursor:not-allowed;
  position:relative;
}
.rifa-num.reserved::after{
  content:'';
  position:absolute;
  inset:0;
  background:radial-gradient(circle at center,transparent 40%,rgba(255,122,26,0.12));
  border-radius:inherit;
  animation:reservedPulse 2s ease-in-out infinite;
}
@keyframes reservedPulse{0%,100%{opacity:0.5}50%{opacity:1}}
.rifa-num.sold{
  background:linear-gradient(135deg,rgba(255,26,26,0.15),rgba(138,0,0,0.08));
  color:rgba(255,107,107,0.5);
  border-color:rgba(255,26,26,0.25);
  cursor:not-allowed;
  text-decoration:line-through;
  text-decoration-color:rgba(255,26,26,0.6);
  text-decoration-thickness:2px;
}
.rifa-num.selected{
  background:linear-gradient(135deg,#ffd23a,#c49a00);
  color:#1a0f00;
  border-color:#ffd23a;
  box-shadow:0 0 0 2px rgba(255,210,58,0.3),0 8px 20px rgba(255,210,58,0.5);
  transform:scale(1.05);
  font-weight:900;
}
.rifa-num.selected::before{
  content:'✓';
  position:absolute;
  top:2px;
  right:4px;
  font-size:9px;
  color:#1a0f00;
  font-weight:900;
}

.rifa-pagination{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding-top:16px;
  border-top:1px solid rgba(255,255,255,0.06);
  font-size:12px;
  color:var(--text-dim,#b8b8c0);
}
.rifa-pagination .pages{display:flex;gap:4px}
.rifa-pagination .page-btn{
  min-width:34px;height:34px;
  padding:0 10px;
  border-radius:8px;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
  color:var(--text-dim);
  font-size:12px;
  cursor:pointer;
  transition:all 0.2s;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.rifa-pagination .page-btn.active{
  background:linear-gradient(135deg,#ff1a1a,#d70000);
  color:#fff;
  border-color:transparent;
}

/* ===== RESUMO (sidebar compra) ===== */
.rifa-summary-wrap{
  position:sticky;
  top:260px;
  align-self:start;
}
.rifa-summary{
  padding:24px;
  border-radius:20px;
}
.rifa-summary h3{
  font-size:14px;
  font-weight:800;
  letter-spacing:1.5px;
  text-transform:uppercase;
  color:#fff;
  margin-bottom:16px;
  padding-bottom:12px;
  border-bottom:1px solid rgba(255,255,255,0.08);
}
.rifa-selected-list{
  min-height:140px;
  max-height:240px;
  overflow-y:auto;
  margin-bottom:16px;
}
.rifa-selected-list::-webkit-scrollbar{width:4px}
.rifa-selected-list::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.1);border-radius:2px}
.rifa-empty{
  text-align:center;
  padding:30px 10px;
  color:var(--text-mut,#7a7a85);
}
.rifa-empty i{font-size:32px;margin-bottom:10px;display:block;opacity:0.5}
.rifa-empty p{font-size:12px}
.sel-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 8px 6px 12px;
  margin:3px;
  border-radius:999px;
  background:linear-gradient(135deg,#ffd23a,#c49a00);
  color:#1a0f00;
  font-size:12px;
  font-weight:800;
}
.sel-chip button{
  background:rgba(0,0,0,0.15);
  border:none;
  width:18px;height:18px;
  border-radius:50%;
  color:#1a0f00;
  font-size:10px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.sel-chip button:hover{background:rgba(0,0,0,0.3)}

.rifa-totals{
  padding:14px 0;
  border-top:1px solid rgba(255,255,255,0.08);
  border-bottom:1px solid rgba(255,255,255,0.08);
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-bottom:18px;
}
.rifa-totals .row{
  display:flex;
  justify-content:space-between;
  font-size:13px;
  color:var(--text-dim,#b8b8c0);
}
.rifa-totals .row.total{
  padding-top:8px;
  margin-top:4px;
  border-top:1px solid rgba(255,255,255,0.06);
  font-size:14px;
  color:#fff;
}
.rifa-totals .row.total strong{font-size:22px;color:#ffd23a;font-weight:900}

/* COMPRAR AGORA — green glow (same as produto page) */
.btn-rifa-buy{
  width:100%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:18px 30px;
  border-radius:999px;
  background:linear-gradient(135deg,#34e57a 0%,#22c55e 40%,#16a34a 100%);
  color:#fff;
  font-weight:900;
  font-size:15px;
  letter-spacing:1.5px;
  text-transform:uppercase;
  border:1px solid rgba(255,255,255,0.15);
  box-shadow:
    0 0 0 2px rgba(34,197,94,0.15),
    0 8px 35px rgba(34,197,94,0.55),
    0 0 45px rgba(34,197,94,0.4),
    inset 0 1px 0 rgba(255,255,255,0.25);
  cursor:pointer;
  transition:all 0.3s cubic-bezier(.16,1,.3,1);
  position:relative;
  overflow:hidden;
  animation:greenPulse 2.4s ease-in-out infinite;
}
.btn-rifa-buy:disabled{
  filter:grayscale(0.5);
  opacity:0.5;
  cursor:not-allowed;
  animation:none;
}
.btn-rifa-buy:not(:disabled):hover{
  transform:translateY(-2px);
  box-shadow:
    0 0 0 3px rgba(34,197,94,0.2),
    0 12px 45px rgba(34,197,94,0.7),
    0 0 60px rgba(34,197,94,0.55),
    inset 0 1px 0 rgba(255,255,255,0.3);
}
@keyframes greenPulse{
  0%,100%{box-shadow:0 0 0 2px rgba(34,197,94,0.15),0 8px 35px rgba(34,197,94,0.55),0 0 45px rgba(34,197,94,0.4),inset 0 1px 0 rgba(255,255,255,0.25)}
  50%{box-shadow:0 0 0 4px rgba(34,197,94,0.25),0 8px 35px rgba(34,197,94,0.55),0 0 70px rgba(34,197,94,0.6),inset 0 1px 0 rgba(255,255,255,0.25)}
}

.rifa-secure{
  text-align:center;
  font-size:11px;
  color:var(--text-mut,#7a7a85);
  margin-top:14px;
}
.rifa-secure i{color:#22c55e;margin-right:4px}

/* ===== DETALHES: GALERIA + REGRAS ===== */
.rifa-details{margin-top:40px;margin-bottom:40px}
.rifa-details-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}

/* Gallery */
.rifa-gallery{
  border-radius:20px;
  padding:24px;
  align-self:start;
}
.gallery-main{
  position:relative;
  aspect-ratio:1/1;
  border-radius:16px;
  overflow:hidden;
  background:radial-gradient(ellipse at 50% 65%,rgba(0,0,0,0.6) 0%,transparent 70%),
             radial-gradient(ellipse at 50% 30%,rgba(255,26,26,0.08) 0%,transparent 60%),
             linear-gradient(180deg,rgba(20,14,14,0.6) 0%,rgba(5,3,3,0.95) 100%);
  margin-bottom:14px;
}
.gal-item{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  transition:opacity 0.5s ease;
}
.gal-item.active{opacity:1}
.gal-item .car-art.big{
  width:60%;
  height:60%;
  filter:drop-shadow(0 15px 30px rgba(0,0,0,0.8));
}
.gal-prev, .gal-next{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:40px;height:40px;
  border-radius:50%;
  background:rgba(10,10,12,0.7);
  backdrop-filter:blur(10px);
  border:1px solid rgba(255,255,255,0.1);
  color:#fff;
  font-size:14px;
  cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  transition:all 0.2s;
}
.gal-prev{left:12px}
.gal-next{right:12px}
.gal-prev:hover, .gal-next:hover{background:rgba(255,26,26,0.3);border-color:rgba(255,26,26,0.5)}
.gal-dots{
  position:absolute;
  bottom:14px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  gap:6px;
}
.gal-dots .dot{
  width:8px;height:8px;
  border-radius:50%;
  background:rgba(255,255,255,0.3);
  transition:all 0.2s;
  cursor:pointer;
}
.gal-dots .dot.active{background:#ffd23a;box-shadow:0 0 10px rgba(255,210,58,0.6);width:20px;border-radius:999px}

.gallery-thumbs{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
}
.gallery-thumbs .thumb{
  aspect-ratio:1;
  border-radius:10px;
  background:radial-gradient(ellipse at 50% 65%,rgba(0,0,0,0.5),transparent 70%),linear-gradient(180deg,rgba(20,14,14,0.5),rgba(5,3,3,0.9));
  border:2px solid transparent;
  cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  position:relative;
  overflow:hidden;
  transition:all 0.2s;
  padding:12%;
}
.gallery-thumbs .thumb .car-art{
  width:80%;height:60%;
}
.gallery-thumbs .thumb.active{
  border-color:#ffd23a;
  box-shadow:0 0 15px rgba(255,210,58,0.4);
}
.gallery-thumbs .thumb:hover{border-color:rgba(255,210,58,0.5)}

/* Info à direita */
.rifa-info{
  border-radius:20px;
  padding:28px;
}
.rifa-info h2{
  font-size:22px;
  font-weight:800;
  margin-bottom:12px;
  color:#fff;
}
.rifa-info h3{
  font-size:14px;
  font-weight:800;
  letter-spacing:1px;
  text-transform:uppercase;
  color:#fff;
  margin:20px 0 12px;
}
.rifa-info p{
  color:var(--text-dim,#b8b8c0);
  font-size:13px;
  line-height:1.6;
}
.rifa-info strong{color:#fff}

.rifa-pricing{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin:18px 0;
  padding:16px;
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.06);
  border-radius:14px;
}
.rp-item{
  display:flex;
  align-items:center;
  gap:12px;
}
.rp-item i{
  width:36px;height:36px;
  border-radius:10px;
  background:rgba(255,26,26,0.12);
  color:#ff6b6b;
  display:flex;align-items:center;justify-content:center;
  font-size:14px;
  flex-shrink:0;
}
.rp-item div strong{display:block;font-size:14px;color:#fff;font-weight:800;line-height:1.1}
.rp-item div span{display:block;font-size:11px;color:var(--text-dim,#b8b8c0);margin-top:2px}

.rifa-rules{
  padding-left:20px;
  color:var(--text-dim,#b8b8c0);
  font-size:13px;
  line-height:1.7;
}
.rifa-rules li{margin-bottom:8px}
.rifa-rules strong{color:#fff}

.rifa-note{
  display:flex;
  gap:12px;
  padding:14px 16px;
  background:rgba(255,196,0,0.06);
  border:1px solid rgba(255,196,0,0.25);
  border-radius:12px;
  margin-top:20px;
  font-size:12px;
  color:var(--text-dim,#b8b8c0);
  line-height:1.5;
}
.rifa-note i{color:#ffd23a;font-size:16px;flex-shrink:0;margin-top:2px}
.rifa-note strong{color:#ffd23a}

/* ===== car-art shapes ===== */
.car-art.big{width:60%;height:60%}

/* ===== MOBILE STICKY BAR ===== */
.rifa-mobile-bar{
  display:none; /* oculto por padrão */
}

/* ===== RESPONSIVE ===== */
@media (max-width:1100px){
  .rifa-layout{grid-template-columns:1fr}
  .rifa-summary-wrap{position:static}
  .rifa-details-grid{grid-template-columns:1fr}
}

@media (max-width:720px){
  /* ---- HERO ---- */
  .rifa-hero{margin-top:8px;gap:12px}
  .rifa-badge{font-size:10px;padding:6px 14px;margin-bottom:10px}
  .rifa-title{font-size:21px;margin-bottom:8px}
  .rifa-sub{font-size:12px}
  /* Banner mais baixo no mobile, não toma tanta altura */
  .rifa-banner{aspect-ratio:560/90;border-radius:12px}

  /* ---- LAYOUT PRINCIPAL ---- */
  .rifa-main{margin-top:20px}
  /* Esconde o painel lateral de resumo — substituído pela barra fixa */
  .rifa-summary-wrap{display:none}

  /* ---- PAINEL DE NÚMEROS ---- */
  .rifa-numbers-panel{padding:14px;border-radius:16px}
  .rifa-numbers-head{flex-direction:column;gap:10px;margin-bottom:14px}
  .rifa-numbers-head h2{font-size:15px}
  .rifa-numbers-head p{font-size:11px}
  .rifa-legend{font-size:10px;gap:8px;flex-wrap:wrap}

  /* ---- CONTROLES ---- */
  /* Linha 1: 3 botões lado a lado */
  .rifa-controls{
    display:grid;
    grid-template-columns:1fr 1fr 1fr;
    gap:7px;
    flex-wrap:unset;
  }
  /* Busca ocupa linha inteira */
  .rifa-search{
    grid-column:1 / -1;
    margin-left:0;
    min-width:auto;
    width:100%;
  }
  .btn-rifa-ctrl{
    padding:9px 6px;
    font-size:11px;
    justify-content:center;
    min-width:0;
    flex:unset;
    gap:4px;
  }
  .btn-rifa-ctrl i{font-size:11px}

  /* ---- GRID DE NÚMEROS ---- */
  .rifa-grid{grid-template-columns:repeat(5,1fr);gap:5px;margin-bottom:14px}
  .rifa-num{font-size:11px;border-radius:8px}

  /* ---- PAGINAÇÃO ---- */
  .rifa-pagination{flex-direction:column;align-items:flex-start;gap:10px}
  .rifa-pagination .pages{flex-wrap:wrap}

  /* ---- DETALHES (galeria + regras) ---- */
  .rifa-details{margin-top:24px;margin-bottom:80px}/* 80px = altura da barra */
  .rifa-gallery{padding:16px}
  .gallery-thumbs{grid-template-columns:repeat(4,1fr);gap:8px}
  .rifa-info{padding:18px}
  .rifa-info h2{font-size:17px}
  .rifa-info h3{font-size:12px;margin:16px 0 10px}
  .rifa-pricing{grid-template-columns:1fr 1fr;gap:8px;padding:12px}
  .rp-item{gap:8px}
  .rp-item i{width:30px;height:30px;font-size:12px}
  .rp-item div strong{font-size:13px}
  .rifa-rules{font-size:12px}
  .rifa-note{padding:12px;font-size:11px}

  /* ---- BARRA FIXA INFERIOR (mobile buy bar) ---- */
  .rifa-mobile-bar{
    display:flex;
    position:fixed;
    bottom:0;left:0;right:0;
    z-index:400;
    background:rgba(8,8,10,0.97);
    backdrop-filter:blur(20px);
    -webkit-backdrop-filter:blur(20px);
    border-top:1px solid rgba(255,255,255,0.1);
    padding:12px 18px;
    align-items:center;
    gap:16px;
    transform:translateY(110%);
    transition:transform 0.3s cubic-bezier(.16,1,.3,1);
    box-shadow:0 -4px 30px rgba(0,0,0,0.5);
  }
  .rifa-mobile-bar.visible{
    transform:translateY(0);
  }
  .rmb-info{
    flex:1;
    display:flex;
    flex-direction:column;
    gap:2px;
  }
  .rmb-count{
    font-size:11px;
    color:var(--text-dim,#b8b8c0);
    font-weight:600;
  }
  .rmb-total{
    font-size:22px;
    font-weight:900;
    color:#ffd23a;
    line-height:1;
    text-shadow:0 0 20px rgba(255,210,58,0.4);
  }
  .rmb-buy{
    flex-shrink:0;
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:14px 22px;
    border-radius:999px;
    background:linear-gradient(135deg,#34e57a 0%,#22c55e 40%,#16a34a 100%);
    color:#fff;
    font-weight:900;
    font-size:13px;
    letter-spacing:1px;
    text-transform:uppercase;
    border:1px solid rgba(255,255,255,0.15);
    box-shadow:0 4px 20px rgba(34,197,94,0.55),inset 0 1px 0 rgba(255,255,255,0.2);
    cursor:pointer;
    transition:all 0.2s;
  }
  .rmb-buy:disabled{filter:grayscale(0.6);opacity:0.5;cursor:not-allowed}
  .rmb-buy:not(:disabled):active{transform:scale(0.96)}
}

@media (max-width:420px){
  .rifa-grid{grid-template-columns:repeat(4,1fr);gap:4px}
  .rifa-title{font-size:18px}
  /* 4 colunas fica mais fácil de tocar */
  .rifa-num{font-size:10px}
}
