/* AngelBoy V176 - auditoría home, previews profesionales y control desde admin */
:root{
  --ab176-red:#d90f2e;
  --ab176-red-dark:#8f001f;
  --ab176-purple:#4e087b;
  --ab176-deep:#2b0d17;
  --ab176-ink:#111213;
  --ab176-white:#ffffff;
}

/* Auditoría HOME: composición compacta, rápida y sin espacios muertos */
.ab104-home-hero{
  min-height:auto!important;
  padding-top:clamp(22px,3.4vw,46px)!important;
  padding-bottom:clamp(10px,1.8vw,22px)!important;
  contain:layout paint!important;
}
.ab104-home-hero + .ab104-section,
.ab104-home-hero + .ab104-featured{
  margin-top:0!important;
  padding-top:clamp(18px,2.4vw,34px)!important;
}
.ab104-hero-grid{
  align-items:center!important;
  gap:clamp(18px,3.8vw,58px)!important;
}
.ab173-hero-copy,.ab104-hero-copy{padding-block:4px!important;}
.ab104-hero-copy h1{
  margin-top:clamp(14px,1.4vw,18px)!important;
  margin-bottom:clamp(12px,1.5vw,18px)!important;
  text-wrap:balance!important;
}
.ab104-hero-copy p{margin-bottom:0!important;}
.ab104-hero-actions{margin-top:clamp(16px,2vw,22px)!important;}
.ab104-love-preview{content-visibility:auto;contain-intrinsic-size:420px 340px;}
.ab104-featured{padding-bottom:clamp(28px,4vw,56px)!important;}
.ab104-section-head{margin-bottom:clamp(16px,2vw,26px)!important;}
.ab112-featured-value{margin-top:clamp(16px,2vw,24px)!important;}
@media(min-width:981px){
  .ab104-hero-copy h1{font-size:clamp(4.55rem,7.2vw,7.7rem)!important;line-height:.86!important;}
  .ab104-phone-card[data-ab104-phone-card]{width:min(340px,calc(100vw - 40px))!important;}
}
@media(max-width:980px){
  .ab104-home-hero{padding-top:20px!important;padding-bottom:18px!important;}
  .ab104-hero-grid{gap:18px!important;}
  .ab104-love-preview{contain-intrinsic-size:360px 300px;}
}
@media(max-width:560px){
  .ab104-home-hero{padding-top:16px!important;padding-bottom:16px!important;}
  .ab104-home-hero + .ab104-section,.ab104-home-hero + .ab104-featured{padding-top:20px!important;}
  .ab104-hero-copy h1{font-size:clamp(3.15rem,15vw,4.72rem)!important;}
}

/* GRID responsivo para home y marketplace */
.ab104-featured-grid,
.template-grid-v81{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:clamp(18px,2.3vw,32px)!important;
  align-items:stretch!important;
}
@media(max-width:1120px){.ab104-featured-grid,.template-grid-v81{grid-template-columns:repeat(2,minmax(0,1fr))!important;}}
@media(max-width:720px){.ab104-featured-grid,.template-grid-v81{grid-template-columns:1fr!important;gap:18px!important;}}

/* Tarjeta premium, sin tapar portada */
.ab176-template-card,
.ab104-featured-grid .template-card,
.template-grid-v81 .template-card{
  position:relative!important;
  overflow:hidden!important;
  border-radius:32px!important;
  border:1px solid color-mix(in srgb,var(--accent1,#d90f2e) 45%,rgba(255,255,255,.18))!important;
  background:
    radial-gradient(circle at 18% -8%,color-mix(in srgb,var(--accent1,#d90f2e) 26%,transparent),transparent 38%),
    radial-gradient(circle at 100% 0%,color-mix(in srgb,var(--accent2,#4e087b) 18%,transparent),transparent 32%),
    linear-gradient(155deg,rgba(43,13,23,.96),rgba(17,18,19,.94))!important;
  box-shadow:0 26px 76px rgba(0,0,0,.38),inset 0 1px 0 rgba(255,255,255,.055)!important;
  transform:translateZ(0)!important;
}
.ab176-template-card:hover,
.ab104-featured-grid .template-card:hover,
.template-grid-v81 .template-card:hover{
  transform:translateY(-5px)!important;
  border-color:color-mix(in srgb,var(--accent1,#d90f2e) 72%,rgba(255,255,255,.22))!important;
  box-shadow:0 34px 94px rgba(0,0,0,.44),0 0 46px color-mix(in srgb,var(--accent1,#d90f2e) 18%,transparent)!important;
}

/* Previsualización nítida: elimina overlays viejos y respeta control admin */
.ab176-preview-thumb,
.ab104-featured-grid .template-card .thumb,
.ab104-featured-grid .template-card .thumb-pro,
.template-grid-v81 .template-card .thumb,
.template-grid-v81 .template-card .thumb-pro{
  display:block!important;
  position:relative!important;
  aspect-ratio:16/9!important;
  height:auto!important;
  min-height:0!important;
  margin:14px 14px 0!important;
  border-radius:24px!important;
  overflow:hidden!important;
  isolation:isolate!important;
  background:
    radial-gradient(circle at 50% 35%,color-mix(in srgb,var(--accent1,#d90f2e) 24%,transparent),transparent 55%),
    linear-gradient(135deg,#111213,#2b0d17 56%,#4e087b)!important;
  border:1px solid rgba(255,255,255,.18)!important;
  box-shadow:0 17px 42px rgba(0,0,0,.34),inset 0 0 0 1px color-mix(in srgb,var(--accent1,#d90f2e) 18%,transparent)!important;
  outline:0!important;
}
.ab176-template-card[data-preview-clear="1"] .thumb::before,
.ab176-template-card[data-preview-clear="1"] .thumb::after,
.ab176-template-card[data-preview-clear="1"] .thumb-pro::before,
.ab176-template-card[data-preview-clear="1"] .thumb-pro::after,
.ab104-featured-grid .template-card .thumb::before,
.ab104-featured-grid .template-card .thumb::after,
.template-grid-v81 .template-card .thumb::before,
.template-grid-v81 .template-card .thumb::after{
  content:none!important;display:none!important;opacity:0!important;animation:none!important;filter:none!important;background:none!important;
}
.ab176-template-card .thumb-glow,
.ab176-template-card .category-particles,
.ab104-featured-grid .template-card .thumb-glow,
.template-grid-v81 .template-card .thumb-glow,
.ab104-featured-grid .template-card .category-particles,
.template-grid-v81 .template-card .category-particles{display:none!important;opacity:0!important;animation:none!important;}

.ab176-preview-thumb img,
.ab176-preview-thumb video,
.ab104-featured-grid .template-card .thumb img,
.ab104-featured-grid .template-card .thumb video,
.template-grid-v81 .template-card .thumb img,
.template-grid-v81 .template-card .thumb video{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:var(--ab176-fit,cover)!important;
  object-position:var(--ab176-focus,center center)!important;
  opacity:1!important;
  visibility:visible!important;
  mix-blend-mode:normal!important;
  filter:brightness(var(--ab176-bright,1.62)) saturate(var(--ab176-sat,1.46)) contrast(var(--ab176-con,1.10))!important;
  transform:translateZ(0) scale(1.006)!important;
  transition:filter .28s ease,transform .34s ease!important;
  backface-visibility:hidden!important;
}
.ab176-template-card:hover .ab176-preview-thumb img,
.ab176-template-card:hover .ab176-preview-thumb video,
.ab104-featured-grid .template-card:hover .thumb img,
.ab104-featured-grid .template-card:hover .thumb video,
.template-grid-v81 .template-card:hover .thumb img,
.template-grid-v81 .template-card:hover .thumb video{
  transform:translateZ(0) scale(1.035)!important;
  filter:brightness(calc(var(--ab176-bright,1.62) + .08)) saturate(calc(var(--ab176-sat,1.46) + .09)) contrast(calc(var(--ab176-con,1.10) + .03))!important;
}

/* Valor agregado: luces por categoría, sin oscurecer el centro */
.ab176-preview-light,.ab176-preview-shine,.ab176-preview-orbit{position:absolute;inset:0;pointer-events:none;z-index:2;}
.ab176-preview-light{opacity:.72;background:radial-gradient(circle at 22% 18%,rgba(255,255,255,.18),transparent 28%),radial-gradient(circle at 83% 78%,color-mix(in srgb,var(--accent2,#4e087b) 36%,transparent),transparent 32%);mix-blend-mode:screen;}
.ab176-preview-shine{opacity:.0;background:linear-gradient(110deg,transparent 0 38%,rgba(255,255,255,.34) 47%,transparent 58%);transform:translateX(-125%);}
.ab176-template-card[data-preview-motion="shine"] .ab176-preview-shine,
.ab176-template-card[data-preview-motion="soft"] .ab176-preview-shine{animation:ab176PreviewShine 5.8s ease-in-out infinite;}
.ab176-template-card[data-preview-motion="none"] .ab176-preview-shine,
.ab176-template-card[data-preview-motion="none"] .ab176-preview-orbit{display:none!important;animation:none!important;}
.ab176-preview-orbit i{position:absolute;width:5px;height:5px;border-radius:50%;background:#fff;box-shadow:0 0 14px #fff,0 0 24px var(--accent1,#d90f2e);opacity:.72;}
.ab176-preview-orbit i:nth-child(1){left:10%;top:20%;animation:ab176Spark 4.8s ease-in-out infinite;}
.ab176-preview-orbit i:nth-child(2){right:16%;top:18%;animation:ab176Spark 5.4s ease-in-out infinite -.8s;}
.ab176-preview-orbit i:nth-child(3){right:12%;bottom:22%;animation:ab176Spark 6s ease-in-out infinite -1.7s;}
@keyframes ab176PreviewShine{0%,58%{opacity:0;transform:translateX(-125%)}70%{opacity:.50}100%{opacity:0;transform:translateX(125%)}}
@keyframes ab176Spark{0%,100%{transform:scale(.55);opacity:.25}48%{transform:scale(1.35);opacity:.92}}

/* Temas de portada acordes a categoría */
.ab176-template-card[data-preview-theme="valentine"]{--accent1:#d90f2e;--accent2:#4e087b;}
.ab176-template-card[data-preview-theme="amistad"]{--accent1:#ff7a18;--accent2:#ff4d6d;}
.ab176-template-card[data-preview-theme="birthday"]{--accent1:#ffcf33;--accent2:#ff4d6d;}
.ab176-template-card[data-preview-theme="anniversary"]{--accent1:#f6b73c;--accent2:#8f001f;}
.ab176-template-card[data-preview-theme="family"]{--accent1:#f97316;--accent2:#8f001f;}
.ab176-template-card[data-preview-theme="gamer"]{--accent1:#39f5ff;--accent2:#7c3aed;}
.ab176-template-card[data-preview-theme="wedding"]{--accent1:#f8e7b1;--accent2:#a855f7;}
.ab176-template-card[data-preview-theme="christmas"]{--accent1:#e0f2fe;--accent2:#16a34a;}
.ab176-template-card[data-preview-theme="all"]{--accent1:#d90f2e;--accent2:#4e087b;}

/* Badges pequeños y fuera del centro */
.ab176-template-card .anim-badge,
.ab176-template-card .cat-badge,
.ab176-template-card .free24-badge,
.ab176-template-card .youth-badge,
.ab104-featured-grid .anim-badge,
.ab104-featured-grid .cat-badge,
.ab104-featured-grid .free24-badge,
.ab104-featured-grid .youth-badge,
.template-grid-v81 .anim-badge,
.template-grid-v81 .cat-badge,
.template-grid-v81 .free24-badge,
.template-grid-v81 .youth-badge{
  z-index:12!important;
  border-radius:999px!important;
  border:1px solid rgba(255,255,255,.20)!important;
  backdrop-filter:blur(11px)!important;
  -webkit-backdrop-filter:blur(11px)!important;
  box-shadow:0 8px 20px rgba(0,0,0,.24)!important;
  font-size:9.5px!important;
  line-height:1!important;
  white-space:nowrap!important;
  text-shadow:none!important;
}
.ab176-template-card .anim-badge,
.ab104-featured-grid .anim-badge,
.template-grid-v81 .anim-badge{left:10px!important;top:10px!important;right:auto!important;bottom:auto!important;max-width:calc(100% - 96px)!important;overflow:hidden!important;text-overflow:ellipsis!important;padding:6px 9px!important;background:rgba(17,18,19,.58)!important;color:#fff!important;}
.ab176-template-card .cat-badge,
.ab104-featured-grid .cat-badge,
.template-grid-v81 .cat-badge{left:10px!important;bottom:10px!important;top:auto!important;right:auto!important;max-width:48%!important;overflow:hidden!important;text-overflow:ellipsis!important;padding:6px 9px!important;background:rgba(43,13,23,.56)!important;color:#fff!important;}
.ab176-template-card .youth-badge,
.ab104-featured-grid .youth-badge,
.template-grid-v81 .youth-badge{right:73px!important;bottom:10px!important;top:auto!important;left:auto!important;padding:7px 9px!important;background:linear-gradient(135deg,var(--accent1,#d90f2e),var(--accent2,#4e087b))!important;color:#fff!important;}
.ab176-template-card .free24-badge,
.ab104-featured-grid .free24-badge,
.template-grid-v81 .free24-badge{right:10px!important;bottom:10px!important;top:auto!important;left:auto!important;min-width:50px!important;padding:7px 9px!important;background:linear-gradient(135deg,#fff,#ffe6eb)!important;color:#2b0d17!important;animation:none!important;}

/* Texto y acciones de tarjetas */
.ab176-template-card .card-body,.ab104-featured-grid .card-body,.template-grid-v81 .card-body{padding:16px 16px 18px!important;gap:10px!important;}
.ab176-template-card .card-topline h3,.ab104-featured-grid .card-topline h3,.template-grid-v81 .card-topline h3{font-size:clamp(20px,1.65vw,25px)!important;line-height:1.02!important;color:#fff!important;margin:0!important;text-wrap:balance;}
.ab176-template-card .style-chip,.ab104-featured-grid .style-chip,.template-grid-v81 .style-chip{border-color:color-mix(in srgb,var(--accent1,#d90f2e) 48%,rgba(255,255,255,.18))!important;background:color-mix(in srgb,var(--accent1,#d90f2e) 16%,transparent)!important;color:#fff!important;}
.ab176-template-card .card-body p,.ab104-featured-grid .card-body p,.template-grid-v81 .card-body p{color:rgba(255,255,255,.91)!important;line-height:1.46!important;min-height:0!important;max-height:84px!important;overflow:hidden!important;}
.ab176-template-card .rating-row-v20,.ab104-featured-grid .rating-row-v20,.template-grid-v81 .rating-row-v20{display:grid!important;grid-template-columns:1fr auto!important;gap:10px!important;align-items:center!important;}
.ab176-template-card .rating-compact,.ab176-template-card .rate-now,.ab104-featured-grid .rating-compact,.ab104-featured-grid .rate-now,.template-grid-v81 .rating-compact,.template-grid-v81 .rate-now{min-height:38px!important;border-radius:999px!important;box-shadow:none!important;}
.ab176-template-card .rate-now,.ab104-featured-grid .rate-now,.template-grid-v81 .rate-now{background:linear-gradient(135deg,#ff4d6d,#8f001f)!important;color:#fff!important;}
.ab176-template-card .card-actions,.ab104-featured-grid .card-actions,.template-grid-v81 .card-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;margin-top:auto!important;}
.ab176-template-card .card-actions .btn,.ab104-featured-grid .card-actions .btn,.template-grid-v81 .card-actions .btn{border-radius:16px!important;min-height:48px!important;}
.ab176-template-card .ab141-social-like,.ab104-featured-grid .ab141-social-like,.template-grid-v81 .ab141-social-like{display:flex!important;flex-wrap:wrap!important;gap:8px!important;align-items:center!important;}
.ab176-template-card .ab141-social-like a,.ab176-template-card .ab141-social-like button,.ab104-featured-grid .ab141-social-like a,.ab104-featured-grid .ab141-social-like button,.template-grid-v81 .ab141-social-like a,.template-grid-v81 .ab141-social-like button{min-height:35px!important;padding:8px 10px!important;border-radius:13px!important;border:1px solid rgba(255,255,255,.13)!important;background:rgba(255,255,255,.075)!important;color:#fff!important;font-weight:900!important;font-size:12px!important;line-height:1!important;box-shadow:none!important;text-decoration:none!important;}
.ab176-template-card .ab141-social-like .like,.ab176-template-card .ab141-social-like button[data-ab141-copy],.ab104-featured-grid .ab141-social-like .like,.ab104-featured-grid .ab141-social-like button[data-ab141-copy],.template-grid-v81 .ab141-social-like .like,.template-grid-v81 .ab141-social-like button[data-ab141-copy]{background:linear-gradient(135deg,#ff4d6d,#d90f2e)!important;}

/* Templates page hero y filtros más limpios */
.templates-hero-v81,.templates-shell-v81{border-color:rgba(255,77,109,.24)!important;background:linear-gradient(145deg,rgba(43,13,23,.90),rgba(17,18,19,.86))!important;box-shadow:0 28px 90px rgba(0,0,0,.34)!important;}
.templates-hero-v81 h1{background:linear-gradient(100deg,#fff,#ffd6df 38%,#ff4d6d 68%,#b45cff)!important;-webkit-background-clip:text!important;background-clip:text!important;color:transparent!important;}
.filters-v81 input,.filters-v81 select{border-color:rgba(255,77,109,.24)!important;background:rgba(17,18,19,.58)!important;}
.tabs-v81 .tab.active,.tabs-v81 .tab:hover{background:linear-gradient(135deg,#ff4d6d,#8f001f)!important;color:#fff!important;}

@media(max-width:720px){
  .ab176-preview-thumb,.ab104-featured-grid .template-card .thumb,.template-grid-v81 .template-card .thumb{margin:12px 12px 0!important;border-radius:21px!important;}
  .ab176-template-card .card-actions,.ab104-featured-grid .card-actions,.template-grid-v81 .card-actions{grid-template-columns:1fr!important;}
  .ab176-template-card .rating-row-v20,.ab104-featured-grid .rating-row-v20,.template-grid-v81 .rating-row-v20{grid-template-columns:1fr!important;}
}
@media(prefers-reduced-motion:reduce){
  .ab176-preview-shine,.ab176-preview-orbit i{animation:none!important;display:none!important;}
  .ab176-template-card,.ab176-preview-thumb img{transition:none!important;}
}
