#emailCampaignsPage .campaigns-template-marquee-section { overflow: hidden; }
#emailCampaignsPage .template-marquee { padding: 16px 0 36px; }
#emailCampaignsPage .template-marquee::before,
#emailCampaignsPage .template-marquee::after { display: none; }
#emailCampaignsPage .template-marquee-track {
    display: flex;
    align-items: flex-start;
    width: max-content;
    max-width: none !important;
    gap: 22px;
    animation: campaignTemplatesMarquee 28s linear infinite;
}
#emailCampaignsPage .template-marquee-track:hover { animation-play-state: paused; }
#emailCampaignsPage .campaigns-template-marquee-section .template-preview-card {
    width: 300px !important;
    height: 405px;
    flex: none;
    margin-top: 0;
    padding: 12px;
    background: #fff !important;
    background-color: #fff !important;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 14px 35px rgba(20,27,35,.12);
    transition: transform .35s;
}
/* Repeat the same stagger in both copies so the loop joins without a jump. */
#emailCampaignsPage .template-preview-card:is(:nth-child(5n + 2),:nth-child(5n + 4)) { margin-top: 50px; }
#emailCampaignsPage .template-preview-card:hover { transform: translateY(-12px) rotate(1deg); }
#emailCampaignsPage .template-preview-card img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
@keyframes campaignTemplatesMarquee { to { transform: translateX(calc(-50% - 11px)); } }
@media(max-width:560px) {
    #emailCampaignsPage .campaigns-template-marquee-section .template-preview-card { width: 230px !important; height: 320px; }
}
@media(prefers-reduced-motion:reduce) {
    #emailCampaignsPage .template-marquee { overflow-x: auto; }
    #emailCampaignsPage .template-marquee-track { animation: none; }
    #emailCampaignsPage .template-preview-card { transition: none; }
    #emailCampaignsPage .template-preview-card:hover { transform: none; }
    #emailCampaignsPage .template-preview-card[aria-hidden=true] { display: none; }
}
