/* JoyExperience — Mobile-First Public Styles */

:root {
    --color-bg: #ffffff;
    --color-surface: #ffffff;
    --color-text: #1a1a22;
    --color-muted: #6b6b7b;
    --color-border: #e2e2ea;
    --color-brand: #93117e;
    --color-accent: #93117e;
    --color-accent-soft: #a91492;
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --radius: 12px;
    --space: 1rem;
    --header-h: 72px;
    --whatsapp: #25d366;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    padding-bottom: 80px;
}

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

a {
    color: var(--color-accent-soft);
}

/* Header */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0.65rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-logo-link {
    display: block;
    line-height: 0;
    text-decoration: none;
    flex-shrink: 0;
}

.site-logo {
    display: block;
    height: 48px;
    width: auto;
    max-width: min(180px, 42vw);
    object-fit: contain;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    color: #fff;
    background: var(--color-brand);
    border: 1px solid transparent;
    border-radius: 999px;
    white-space: nowrap;
    transition: background 0.15s, opacity 0.15s;
}

.header-btn:hover {
    background: #a91492;
    opacity: 0.95;
}

/* Feed */
.feed {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

.site-intro {
    padding-top: 1.25rem;
    margin-bottom: 1.5rem;
}

.intro-inner {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    font-size: 0.95rem;
    line-height: 1.6;
}

.intro-inner p {
    margin: 0 0 0.75rem;
}

.intro-inner p:last-child {
    margin-bottom: 0;
}

.intro-inner h1,
.intro-inner h2,
.intro-inner h3,
.intro-inner h4 {
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.intro-inner ul,
.intro-inner ol {
    margin: 0 0 0.75rem;
    padding-left: 1.25rem;
}

.intro-inner a {
    color: var(--color-accent-soft);
    text-decoration: underline;
}

.intro-inner img {
    max-width: 100%;
    border-radius: 6px;
    margin: 0.5rem 0;
}

.feed-day-card .feed-day-title {
    margin: 0 0 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-muted);
}

.feed-article-divider {
    border: none;
    height: 1px;
    margin: 1.25rem 0;
    background: var(--color-border);
}

.feed-day-card .feed-title {
    font-size: 1.2rem;
}

.feed-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.feed-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    margin-bottom: 0.5rem;
}

.feed-date {
    display: block;
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-bottom: 0.5rem;
}

.feed-title {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
    line-height: 1.3;
}

.feed-body {
    font-size: 0.95rem;
    color: var(--color-text);
}

.feed-body-block {
    font-size: 0.95rem;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.feed-body-block:last-of-type {
    margin-bottom: 0;
}

.feed-body-block p {
    margin: 0 0 0.75rem;
}

.feed-body-block h1,
.feed-body-block h2,
.feed-body-block h3,
.feed-body-block h4 {
    margin: 1rem 0 0.5rem;
    line-height: 1.3;
}

.feed-body-block ul,
.feed-body-block ol {
    margin: 0 0 0.75rem;
    padding-left: 1.25rem;
}

.feed-body-block a {
    color: var(--color-accent-soft);
    text-decoration: underline;
}

.feed-body-block img {
    max-width: 100%;
    border-radius: 6px;
    margin: 0.5rem 0;
}

.feed-separator {
    border: none;
    height: 1px;
    margin: 1.25rem 0;
    background: linear-gradient(90deg, transparent, var(--color-border) 15%, var(--color-border) 85%, transparent);
}

/* Rubrica colors */
.badge-esperienza_settimana { background: #6b21a8; color: #f3e8ff; }
.badge-cosa_chiedono { background: #1d4ed8; color: #dbeafe; }
.badge-trend_momento { background: #b45309; color: #fef3c7; }
.badge-consiglio_joy { background: #be185d; color: #fce7f3; }
.badge-top_settimana { background: #047857; color: #d1fae5; }
.badge-outfit_mese { background: #7c3aed; color: #ede9fe; }

/* Banners */
.feed-banner-row {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0;
}

.feed-banner-row--1 {
    grid-template-columns: 1fr;
}

.feed-banner-row--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.feed-banner-row .feed-banner {
    margin: 0;
    min-width: 0;
    height: 100%;
}

.feed-banner-row .feed-banner img {
    height: 100%;
    object-fit: cover;
}

.feed-banner {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
    margin: 1rem 0;
}

.feed-banner img {
    width: 100%;
    transition: opacity 0.2s;
}

.feed-banner:hover img {
    opacity: 0.9;
}

/* Prodotti vetrina */
.prodotto-vetrina {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem;
    background: #f5f5f8;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin: 1rem 0;
}

.prodotto-vetrina img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
}

.prodotto-info h3 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
}

.prodotto-prezzo {
    margin: 0 0 0.5rem;
    font-weight: 700;
    color: var(--color-accent-soft);
}

.btn-acquista {
    display: inline-block;
    padding: 0.45rem 1rem;
    background: var(--color-accent);
    color: #fff !important;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-acquista:hover {
    background: var(--color-accent-soft);
}

/* Loader & end */
.feed-loader,
.feed-end {
    text-align: center;
    padding: 1rem;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-muted);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.feed-sentinel {
    height: 1px;
}

/* Footer */
.site-footer {
    background: var(--color-brand);
    color: rgba(255, 255, 255, 0.92);
    border-top: none;
    margin-top: 1rem;
}

.footer-inner {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1.25rem 5rem;
    font-size: 0.8rem;
    line-height: 1.65;
    text-align: center;
}

.footer-inner p {
    margin: 0 0 0.65rem;
}

.footer-inner p:last-child {
    margin-bottom: 0;
}

.footer-inner > :last-child {
    margin-bottom: 0;
}

.site-footer a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.site-footer a:hover {
    opacity: 0.88;
}

.legal {
    margin: 0.75rem 0;
    opacity: 0.88;
    font-size: 0.75rem;
}

/* WhatsApp sticky */
.whatsapp-sticky {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 200;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--whatsapp);
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    text-decoration: none;
}

.whatsapp-sticky:hover {
    transform: scale(1.05);
}

/* Tablet+ */
@media (min-width: 768px) {
    .feed-title {
        font-size: 1.6rem;
    }

    .prodotto-vetrina {
        grid-template-columns: 140px 1fr;
    }

    .prodotto-vetrina img {
        width: 140px;
        height: 140px;
    }

    body {
        padding-bottom: 2rem;
    }

    .whatsapp-sticky {
        bottom: 1.5rem;
        right: 1.5rem;
    }
}
