/*
Theme Name: Offerte Virali Pro V2
Theme URI: https://www.offerte-migliori.info
Author: CustomGPT
Description: Tema mobile-first moderno per affiliazione Amazon, Temu e AliExpress
Version: 2.0
*/
:root {
  --bg: #f7f8f4;
  --surface: #ffffff;
  --surface-alt: #f1f4ed;
  --text: #19231f;
  --muted: #58645d;
  --line: #d9dfd7;
  --primary: #0f766e;
  --primary-strong: #0a5953;
  --accent: #f59e0b;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(18, 38, 32, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 20%, rgba(245, 158, 11, 0.07), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(15, 118, 110, 0.08), transparent 28%),
    var(--bg);
  font-family: "Manrope", "Segoe UI", sans-serif;
  line-height: 1.55;
}

h1, h2, h3 {
  margin-top: 0;
  line-height: 1.2;
}

a {
  color: var(--primary);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  background: rgba(247, 248, 244, 0.92);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  width: 220px;
  max-height: 48px;
  object-fit: contain;
}

.menu-primary {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu-primary a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
}

.menu-primary a:hover {
  background: var(--surface-alt);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.header-cta:hover {
  background: var(--primary-strong);
  color: #fff;
}

.site-main {
  padding: 28px 0 52px;
}

.category-strip {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
}

.category-strip-inner {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
}

.category-strip-label {
  font-weight: 800;
  color: var(--muted);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.category-strip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-strip-list a {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
}

.category-strip-list a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.hero {
  margin-top: 8px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(120deg, rgba(245, 158, 11, 0.09), rgba(15, 118, 110, 0.1)),
    var(--surface);
  box-shadow: var(--shadow);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 30px;
  align-items: stretch;
}

.hero-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 28px;
}

.hero-copy::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.72), rgba(245, 158, 11, 0.22), rgba(15, 118, 110, 0));
  opacity: 0.9;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(25, 35, 31, 0.08);
  color: var(--text);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  max-width: 16ch;
  margin-bottom: 18px;
  font-weight: 760;
  letter-spacing: -0.035em;
  color: rgba(25, 35, 31, 0.96);
}

.hero-text {
  color: var(--muted);
  max-width: 66ch;
  margin-bottom: 24px;
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-proof {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 28px;
}

.hero-proof-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 16px 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  --hero-proof-accent: rgba(15, 118, 110, 0.88);
  --hero-proof-accent-soft: rgba(15, 118, 110, 0.14);
  --hero-proof-accent-warm: rgba(245, 158, 11, 0.18);
}

.hero-proof-card-daily {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(242, 250, 248, 0.82));
  border-color: rgba(15, 118, 110, 0.15);
  --hero-proof-accent: rgba(15, 118, 110, 0.88);
  --hero-proof-accent-soft: rgba(15, 118, 110, 0.12);
  --hero-proof-accent-warm: rgba(125, 211, 192, 0.16);
}

.hero-proof-card-categories {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(248, 244, 233, 0.84));
  border-color: rgba(217, 119, 6, 0.14);
  --hero-proof-accent: rgba(180, 83, 9, 0.9);
  --hero-proof-accent-soft: rgba(245, 158, 11, 0.14);
  --hero-proof-accent-warm: rgba(251, 191, 36, 0.18);
}

.hero-proof-card-links {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(240, 247, 251, 0.84));
  border-color: rgba(14, 116, 144, 0.14);
  --hero-proof-accent: rgba(14, 116, 144, 0.9);
  --hero-proof-accent-soft: rgba(14, 116, 144, 0.12);
  --hero-proof-accent-warm: rgba(125, 211, 252, 0.16);
}

.hero-proof-icon {
  position: relative;
  display: inline-flex;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--hero-proof-accent-soft), var(--hero-proof-accent-warm));
  border: 1px solid color-mix(in srgb, var(--hero-proof-accent) 16%, white);
}

.hero-proof-icon::before,
.hero-proof-icon::after {
  content: "";
  position: absolute;
}

.hero-proof-icon-daily::before {
  inset: 10px;
  border: 1.5px solid var(--hero-proof-accent);
  border-radius: 999px;
}

.hero-proof-icon-daily::after {
  width: 11px;
  height: 1.5px;
  top: 19px;
  left: 19px;
  background: var(--hero-proof-accent);
  border-radius: 999px;
  box-shadow: -4px -6px 0 0 var(--hero-proof-accent);
  transform-origin: left center;
}

.hero-proof-icon-categories::before {
  width: 7px;
  height: 7px;
  top: 11px;
  left: 11px;
  background: var(--hero-proof-accent);
  border-radius: 2px;
  box-shadow:
    12px 0 0 0 var(--hero-proof-accent),
    0 12px 0 0 color-mix(in srgb, var(--hero-proof-accent) 72%, white),
    12px 12px 0 0 color-mix(in srgb, var(--hero-proof-accent) 72%, white);
}

.hero-proof-icon-links::before {
  width: 16px;
  height: 7px;
  top: 16px;
  left: 9px;
  border: 1.5px solid var(--hero-proof-accent);
  border-right: 0;
  border-radius: 999px 0 0 999px;
  transform: rotate(-18deg);
}

.hero-proof-icon-links::after {
  width: 16px;
  height: 7px;
  top: 16px;
  right: 9px;
  border: 1.5px solid color-mix(in srgb, var(--hero-proof-accent) 78%, white);
  border-left: 0;
  border-radius: 0 999px 999px 0;
  transform: rotate(-18deg);
}

.hero-proof-value {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 800;
}

.hero-proof-label {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.hero-slider {
  min-width: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  padding: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.hero-slider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.hero-slider-head h2 {
  margin: 0;
  font-size: 1rem;
}

.hero-slider-controls {
  display: inline-flex;
  gap: 8px;
}

.hero-slider-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.hero-slider-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.hero-slider-track::-webkit-scrollbar {
  display: none;
}

.hero-slider-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.hero-slider-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.55);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.hero-slider-dot.is-active {
  background: var(--primary);
  transform: scale(1.15);
}

.hero-offer-card {
  scroll-snap-align: start;
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  min-width: 0;
}

.hero-offer-media,
.hero-offer-media img {
  display: block;
  width: 100%;
}

.hero-offer-media {
  background: linear-gradient(180deg, rgba(241, 244, 237, 0.95), rgba(255, 255, 255, 0.98));
}

.hero-offer-media img {
  aspect-ratio: 16 / 10;
  object-fit: contain;
  padding: 12px;
}

.hero-offer-body {
  padding: 14px;
}

.hero-offer-meta {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
}

.hero-offer-body h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.hero-offer-body .deal-cta {
  margin-top: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 10px;
  font-weight: 800;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-strong);
  color: #fff;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
}

.section-head {
  margin-top: 36px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin-bottom: 8px;
}

.section-intro {
  margin: 0;
  color: var(--muted);
}

.cards {
  display: grid;
  gap: 18px;
}

.cards-featured {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 28px rgba(18, 38, 32, 0.14);
}

.thumb-wrap {
  display: block;
  line-height: 0;
  aspect-ratio: 16 / 10;
  background: #fff;
}

.thumb-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* In list cards prefer full product visibility and avoid aggressive upscaling/cropping. */
.cards .thumb-wrap,
.all-posts-grid .thumb-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}

.cards .thumb-wrap img,
.all-posts-grid .thumb-wrap img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 8px;
  image-rendering: auto;
}

.thumb-wrap img.external-product-image {
  object-fit: contain;
  object-position: center;
  padding: 10px;
}

.thumb-fallback {
  position: relative;
  min-height: 240px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  background:
    linear-gradient(145deg, rgba(245, 158, 11, 0.2), rgba(15, 118, 110, 0.78)),
    linear-gradient(180deg, rgba(25, 35, 31, 0.08), rgba(25, 35, 31, 0.62));
  overflow: hidden;
}

.thumb-fallback-chip,
.thumb-fallback-badge {
  position: relative;
  z-index: 1;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
}

.thumb-fallback-title {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.15;
  font-weight: 800;
  max-width: 14ch;
}

.thumb-fallback-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}

.thumb-fallback-orb-one {
  width: 180px;
  height: 180px;
  top: -30px;
  right: -24px;
  background: rgba(255, 255, 255, 0.16);
}

.thumb-fallback-orb-two {
  width: 110px;
  height: 110px;
  bottom: 18px;
  right: 30px;
  background: rgba(245, 158, 11, 0.28);
}

.card-body {
  padding: 16px;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.read-more {
  display: inline-block;
  margin-top: 14px;
  font-weight: 700;
}

.pagination-wrap {
  margin-top: 24px;
}

.pagination-wrap .page-numbers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pagination-wrap .page-numbers li {
  margin: 0;
}

.pagination-wrap .page-numbers a,
.pagination-wrap .page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
}

.pagination-wrap .page-numbers .current {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.all-posts-head {
  margin-top: 10px;
}

.all-posts-list-wrap {
  margin-top: 8px;
}

.all-posts-count {
  margin: 0 0 14px;
  color: var(--muted);
  font-weight: 700;
}

.all-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.all-post-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.all-post-item-body {
  padding: 14px;
}

.all-post-item-body h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.all-post-item-body p {
  margin: 0;
  color: var(--muted);
}

.all-post-item-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.85rem;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.deal-cta {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.07), rgba(245, 158, 11, 0.08));
}

.deal-badge {
  display: inline-block;
  margin: 0 0 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  color: #7a4a00;
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.deal-prices {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.deal-old-price {
  color: #7f8f88;
  text-decoration: line-through;
  font-size: 0.9rem;
}

.deal-current-price {
  color: #0a5953;
  font-weight: 900;
  font-size: 1.2rem;
}

.deal-button {
  width: 100%;
}

.single-wrap {
  max-width: 860px;
}

.single-article {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.single-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 20px;
  padding: 22px 22px 0;
}

.single-header,
.single-content,
.single-article .deal-cta {
  margin-left: 22px;
  margin-right: 22px;
}

.single-header {
  margin: 0;
  padding: 8px 0 10px;
}

.single-header h1 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.single-kicker {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.single-meta {
  margin: 0 0 20px;
  color: var(--muted);
}

.single-summary {
  margin: 0;
  max-width: 54ch;
  color: var(--muted);
  font-size: 1.04rem;
}

.single-media-wrap {
  align-self: stretch;
}

.single-media-wrap .thumb-wrap {
  height: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.single-media-wrap .thumb-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  padding: 14px;
}

.single-content {
  margin-top: 20px;
  margin-bottom: 24px;
}

.single-content > *:first-child {
  margin-top: 0;
}

.single-content > *:last-child {
  margin-bottom: 0;
}

.site-footer {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.footer-inner {
  padding: 30px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-copy,
.footer-meta {
  margin: 0;
  color: var(--muted);
}

.footer-meta {
  max-width: 65ch;
}

.fade-in-up {
  opacity: 1;
  transform: none;
}

.fade-in-up.visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

@media (max-width: 1024px) {
  .cards-featured,
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .all-posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .fade-in-up {
    opacity: 1;
    transform: none;
  }

  .fade-in-up.visible {
    transition: none;
  }

  .header-inner {
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 0;
  }

  .brand-logo {
    width: 190px;
  }

  .menu-primary {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero {
    padding: 22px;
  }

  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding-left: 0;
  }

  .hero-copy::before {
    display: none;
  }

  .hero-proof {
    display: none;
  }

  .hero-slider {
    order: 2;
    display: none !important;
  }

  .category-strip-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .cards-featured,
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .all-posts-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
  }

  .single-header,
  .single-content,
  .single-article .deal-cta {
    margin-left: 14px;
    margin-right: 14px;
  }

  .single-hero {
    grid-template-columns: 1fr;
    padding: 14px 14px 0;
  }
}
