/* Font auto-ospitati (niente più richieste a Google, niente IP trasmesso) */
@font-face {
    font-family: 'Playfair Display';
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    src: url('fonts/playfair-display-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Playfair Display';
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    src: url('fonts/playfair-display-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    src: url('fonts/inter-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    src: url('fonts/inter-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    src: url('fonts/inter-600.woff2') format('woff2');
}

:root {
    --nude: #ffffff;
    --rosa: #e6e6e6;
    --oro: #8c2f39;
    --oro-scuro: #6b232b;
    --testo: #1a1a1a;
    --testo-chiaro: #6e6e6e;
    --bianco: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--nude);
    color: var(--testo);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

header.site-header {
    padding: 28px 20px 20px;
    text-align: center;
    background: var(--bianco);
    border-bottom: 1px solid var(--rosa);
}

header.site-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    letter-spacing: 0.5px;
    color: var(--testo);
}

header.site-header p {
    font-size: 0.85rem;
    color: var(--testo-chiaro);
    margin-top: 4px;
}

.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 20px 16px 60px;
}

/* Griglia articoli homepage */
.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}

@media (min-width: 640px) {
    .articles-grid { grid-template-columns: 1fr 1fr; }
}

.article-card {
    background: var(--bianco);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(169, 129, 63, 0.08);
    transition: transform 0.2s ease;
}

.article-card:active { transform: scale(0.98); }

.article-card img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: var(--bianco);
    padding: 10px;
    box-sizing: border-box;
}

.article-card .card-body { padding: 16px 18px 20px; }

.article-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.article-card p.excerpt {
    font-size: 0.9rem;
    color: var(--testo-chiaro);
}

.article-card .meta {
    font-size: 0.75rem;
    color: var(--oro-scuro);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* Pagina articolo */
.article-hero img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 18px;
    background: var(--rosa);
}

.article-page h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    margin: 4px 0 10px;
}

.eyebrow {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--oro-scuro);
    font-weight: 600;
}

.article-page .body-content { font-size: 1rem; }
.article-page .body-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    margin: 24px 0 10px;
    color: var(--oro-scuro);
}
.article-page .body-content p { margin-bottom: 14px; }
.article-page .body-content ul { margin: 0 0 14px 20px; }

.cta-box {
    margin-top: 28px;
    padding: 20px;
    background: linear-gradient(135deg, var(--rosa), var(--nude));
    border: 1px solid var(--oro);
    border-radius: 16px;
    text-align: center;
}

.cta-box a.btn {
    display: inline-block;
    margin-top: 10px;
    padding: 12px 28px;
    background: var(--oro-scuro);
    color: var(--bianco);
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

.back-link {
    display: inline-block;
    margin-bottom: 18px;
    font-size: 0.85rem;
    color: var(--testo-chiaro);
}

footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--testo-chiaro);
    padding: 30px 16px;
}

/* Ricerca */
/* Menu di navigazione (Post / Codici Sconto) */
.site-nav {
    display: flex;
    justify-content: center;
    gap: 22px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--rosa);
}

.site-nav a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--testo-chiaro);
    padding: 4px 2px;
    border-bottom: 2px solid transparent;
}

.site-nav a.active,
.site-nav a:hover {
    color: var(--oro-scuro);
    border-bottom-color: var(--oro-scuro);
}

.search-wrap {
    max-width: 380px;
    margin: 16px auto 0;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 13px;
    color: var(--oro-scuro);
    pointer-events: none;
    opacity: 0.7;
}

#searchInput {
    width: 100%;
    padding: 9px 14px 9px 36px;
    border: 1px solid var(--rosa);
    border-radius: 24px;
    background: var(--bianco);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--testo);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

#searchInput:focus {
    border-color: var(--oro);
    box-shadow: 0 0 0 3px rgba(201, 161, 90, 0.15);
}

#searchInput::placeholder { color: var(--testo-chiaro); font-size: 0.82rem; }

.search-results {
    max-width: 520px;
    margin: 0 auto 10px;
}

.search-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bianco);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(169, 129, 63, 0.06);
}

.search-thumb, .search-thumb-placeholder {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: var(--bianco);
    border: 1px solid var(--rosa);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-thumb-placeholder {
    background: linear-gradient(135deg, var(--rosa), var(--nude));
}

.search-thumb img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.search-row-text { min-width: 0; }

.search-row-eyebrow {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--oro-scuro);
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-row-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.92rem;
    color: var(--testo);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-load-more {
    display: block;
    margin: 14px auto 0;
    padding: 8px 20px;
    background: var(--bianco);
    border: 1px solid var(--oro);
    color: var(--oro-scuro);
    border-radius: 24px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.search-load-more:hover { background: var(--nude); }

.search-empty {
    text-align: center;
    color: var(--testo-chiaro);
    font-size: 0.85rem;
    padding: 16px 0;
}

/* Banner prodotto stile "annuncio" */
.product-banner {
    display: block;
    background: var(--bianco);
    border: 1px solid var(--rosa);
    border-radius: 14px;
    padding: 10px 14px 12px;
    margin: 22px 0;
}

.product-banner-label {
    font-size: 0.62rem;
    color: var(--testo-chiaro);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-banner-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-banner-photo {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bianco);
    border: 1px solid var(--rosa);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-banner-photo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.product-banner-info {
    flex: 1;
    min-width: 0;
}

.product-banner-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--testo);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-banner-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--oro-scuro);
    margin-top: 2px;
}

.product-banner-coupon {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 10px;
    background: var(--nude);
    border: 1px dashed var(--oro);
    border-radius: 20px;
    font-size: 0.74rem;
    color: var(--testo);
    line-height: 1.4;
}

.product-banner-coupon strong {
    color: var(--oro-scuro);
    letter-spacing: 0.3px;
}

.product-banner-cta {
    flex-shrink: 0;
    background: var(--oro-scuro);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Scheda tecnica prodotto */
.scheda-tecnica {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: var(--bianco);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 28px;
    box-shadow: 0 4px 18px rgba(169, 129, 63, 0.08);
}

@media (min-width: 640px) {
    .scheda-tecnica { flex-direction: row; }
}

.scheda-foto {
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bianco);
    border: 1px solid var(--rosa);
}

@media (min-width: 640px) {
    .scheda-foto { width: 220px; }
}

.scheda-foto img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 14px;
    box-sizing: border-box;
}

.scheda-foto-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--rosa), var(--nude));
}

.scheda-info { flex: 1; }

.scheda-info h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.scheda-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.tag {
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--nude);
    border: 1px solid var(--oro);
    color: var(--oro-scuro);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tag-brand {
    background: var(--oro-scuro);
    color: var(--bianco);
    border-color: var(--oro-scuro);
}

.piramide { margin-bottom: 18px; }

.piramide-riga {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
    padding: 4px 0;
    border-bottom: 1px dashed var(--rosa);
}

.piramide-label {
    flex-shrink: 0;
    width: 55px;
    font-weight: 600;
    color: var(--oro-scuro);
}

.accordi-titolo {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--testo-chiaro);
    margin-bottom: 8px;
}

.accordo-riga {
    background: var(--nude);
    border-radius: 6px;
    margin-bottom: 5px;
    overflow: hidden;
}

.accordo-barra {
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 1px rgba(0,0,0,0.15);
    white-space: nowrap;
    border-radius: 6px;
}

/* Carosello "Altri profumi da scoprire" */
.altri-articoli {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--rosa);
}

.altri-articoli-titolo {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    margin-bottom: 14px;
}

.carosello {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.carosello::-webkit-scrollbar { height: 6px; }
.carosello::-webkit-scrollbar-thumb { background: var(--rosa); border-radius: 10px; }

.carosello-card {
    flex: 0 0 130px;
    scroll-snap-align: start;
    background: var(--bianco);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(169, 129, 63, 0.08);
}

.carosello-foto {
    width: 130px;
    height: 130px;
    background: var(--bianco);
    border-bottom: 1px solid var(--rosa);
}

.carosello-foto img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    box-sizing: border-box;
}

.carosello-testo {
    padding: 8px 10px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
}

@media (min-width: 640px) {
    .carosello-card { flex-basis: 150px; }
    .carosello-foto { width: 150px; height: 150px; }
}

/* Footer */
.site-footer {
    background: var(--bianco);
    border-top: 1px solid var(--rosa);
    padding: 32px 20px 24px;
    margin-top: 20px;
}

.site-footer-inner {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 640px) {
    .site-footer-inner {
        flex-direction: row;
        justify-content: space-between;
        flex-wrap: wrap;
    }
}

.site-footer-block h3 {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--testo);
}

.site-footer-block p, .site-footer-block a {
    font-size: 0.82rem;
    color: var(--testo-chiaro);
    line-height: 1.7;
}

.site-footer-block a { display: block; }
.site-footer-block a:hover { color: var(--oro-scuro); text-decoration: underline; }

.site-footer-bottom {
    max-width: 760px;
    margin: 24px auto 0;
    padding-top: 16px;
    border-top: 1px solid var(--rosa);
    text-align: center;
    font-size: 0.75rem;
    color: var(--testo-chiaro);
}

/* Banner cookie */
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: var(--testo);
    color: #fff;
    padding: 16px 18px;
    z-index: 1000;
    display: none;
}

.cookie-banner.visible { display: block; }

.cookie-banner-inner {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 640px) {
    .cookie-banner-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

.cookie-banner p {
    font-size: 0.82rem;
    line-height: 1.5;
    margin: 0;
}

.cookie-banner p a { color: #fff; text-decoration: underline; }

.cookie-banner-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.cookie-banner-buttons button {
    padding: 9px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.cookie-btn-accept { background: var(--oro); color: #fff; }
.cookie-btn-essential { background: transparent; color: #fff; border: 1px solid #fff !important; }
