/* ============================================================
   AlbumBuilder PRO — templates.css
   Pagina Template Designer
   ============================================================ */

/* ── HERO ─────────────────────────────────────────────────── */
.tpl-hero {
  padding: 100px 0 60px;
  position: relative;
  overflow: hidden;
}
.tpl-hero-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 30%, rgba(174,135,68,0.12) 0%, transparent 65%);
  pointer-events: none;
}
.tpl-hero-content { text-align: center; position: relative; z-index: 1; }
.tpl-hero-content h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}
.tpl-hero-sub {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.75;
}
.tpl-hero-meta {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}
.tpl-meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--color-text-dim);
}
.tpl-meta-item svg { color: var(--color-gold); }

/* ── GRID SECTION ─────────────────────────────────────────── */
.tpl-grid-section { padding: var(--section-py) 0; }
.tpl-section-head {
  text-align: center;
  margin-bottom: 60px;
}
.tpl-section-head h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 12px; }
.tpl-section-head p { font-size: 1rem; color: var(--color-text-muted); }
.tpl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ── CARD ─────────────────────────────────────────────────── */
.tpl-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--color-gold-dark);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  display: flex;
  flex-direction: column;
}
.tpl-card:hover {
  transform: translateY(-8px);
  border-color: rgba(174,135,68,0.4);
  border-top-color: var(--color-gold);
  box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 40px rgba(174,135,68,0.1);
}
.tpl-card-free {
  border-top-color: var(--color-gold);
  background: linear-gradient(160deg, rgba(174,135,68,0.06) 0%, var(--color-bg-card) 40%);
}

/* Badge */
.tpl-card-badge {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 3;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 5px 10px;
  border-radius: 6px;
}
.tpl-badge-free {
  background: var(--gradient-gold-h);
  color: #000;
}
.tpl-badge-new {
  background: rgba(0,180,120,0.15);
  border: 1px solid rgba(0,180,120,0.4);
  color: #4ade80;
}

/* Image */
.tpl-card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #111;
}
.tpl-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.tpl-card:hover .tpl-card-img { transform: scale(1.03); }
.tpl-card-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all .3s ease;
}
.tpl-card:hover .tpl-card-overlay {
  background: rgba(0,0,0,0.35);
  opacity: 1;
}
.tpl-overlay-label {
  background: rgba(174,135,68,0.9);
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 8px 18px;
  border-radius: 8px;
}

/* Body */
.tpl-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.tpl-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.tpl-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 4px;
}
.tpl-tag-type {
  background: rgba(174,135,68,0.1);
  border: 1px solid rgba(174,135,68,0.25);
  color: var(--color-gold);
}
.tpl-tag-free {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--color-border);
  color: var(--color-text-dim);
}
.tpl-tag-new {
  background: rgba(0,180,120,0.1);
  border: 1px solid rgba(0,180,120,0.3);
  color: #4ade80;
}
.tpl-card-name {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 6px;
  line-height: 1.2;
}
.tpl-card-tagline {
  font-size: 0.78rem;
  color: var(--color-gold);
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  opacity: 0.8;
}
.tpl-card-desc {
  font-size: 0.87rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 18px;
  flex: 1;
}

/* Varianti colore */
.tpl-card-variants {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}
.tpl-variant {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: block;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: transform .2s;
}
.tpl-variant:hover { transform: scale(1.2); }

/* Footer card */
.tpl-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}
.tpl-card-price { display: flex; flex-direction: column; }
.tpl-price-free {
  font-size: 1rem;
  font-weight: 700;
  background: var(--gradient-gold-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tpl-price-amount {
  font-size: 1.3rem;
  font-weight: 800;
  background: var(--gradient-gold-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.tpl-price-once {
  font-size: 0.72rem;
  color: var(--color-text-dim);
}
.tpl-btn { flex-shrink: 0; font-size: 0.85rem; padding: 10px 18px; }
.tpl-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: linear-gradient(135deg, rgba(138,106,48,0.2), rgba(174,135,68,0.1)) !important;
  box-shadow: none !important;
}

/* ── CUSTOM SECTION ───────────────────────────────────────── */
.tpl-custom { padding: var(--section-py) 0; background: linear-gradient(180deg, #000 0%, #040404 100%); }
.tpl-custom-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  background: linear-gradient(135deg, rgba(174,135,68,0.08), rgba(174,135,68,0.03));
  border: 1px solid rgba(174,135,68,0.2);
  border-left: 3px solid var(--color-gold);
  border-radius: 16px;
  padding: 44px 48px;
}
.tpl-custom-icon { color: var(--color-gold); flex-shrink: 0; }
.tpl-custom-text { flex: 1; }
.tpl-custom-text h2 { font-size: 1.5rem; margin-bottom: 10px; }
.tpl-custom-text p { font-size: 0.92rem; color: var(--color-text-muted); line-height: 1.75; }
.tpl-custom-text strong { color: var(--color-gold-light); }

/* ── CTA ──────────────────────────────────────────────────── */
.tpl-cta { padding: 60px 0 80px; }
.tpl-cta-inner { text-align: center; border-top: 1px solid var(--color-border); padding-top: 60px; }
.tpl-cta-inner .ornament { margin-bottom: 24px; }
.tpl-cta-inner h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 14px; }
.tpl-cta-inner p { font-size: 1rem; color: var(--color-text-muted); margin-bottom: 36px; }
.tpl-cta-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .tpl-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .tpl-grid { grid-template-columns: 1fr; }
  .tpl-custom-inner { flex-direction: column; text-align: center; padding: 32px 24px; }
}
