/* =========================================
   FANTOUKIS - newsletter: the slim top bar, the "what it means" window,
   the cart card and the checkout tick box. (newsletter.js)
   Also: page parts you hid in the admin (Pages → Page layout).
   ========================================= */

/* ----- Parts of a page hidden in the admin ----- */
.part-off { display: none !important; }

/* ----- The slim bar at the very top ----- */
.news-bar {
    background: var(--ink, #2B2230);
    color: var(--cream, #FFF8F1);
    font-size: 14px;
    line-height: 1.35;
    position: relative;
    z-index: 11;
    animation: news-drop 0.5s var(--spring, ease) backwards;
}
.news-bar.is-closing { animation: news-lift 0.25s ease forwards; }

.news-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px 14px;
    flex-wrap: wrap;
    min-height: 38px;
    padding-top: 6px;
    padding-bottom: 6px;
    padding-right: 44px;   /* room for the little × */
    position: relative;
    text-align: center;
}

.news-bar-text { margin: 0; }
.news-bar-text strong { font-weight: 700; color: var(--yellow, #FFE9A8); }
.news-spark {
    display: inline-block;
    color: var(--pink, #F7C6D6);
    margin-right: 2px;
    animation: news-twinkle 3s ease-in-out infinite;
}

.news-bar-btn {
    font: inherit;
    font-weight: 700;
    font-size: 13px;
    color: var(--ink, #2B2230);
    background: var(--pink, #F7C6D6);
    border: none;
    border-radius: 999px;
    padding: 4px 14px;
    cursor: pointer;
    transition: transform 0.3s var(--spring, ease), background 0.2s ease;
}
.news-bar-btn:hover, .news-bar-btn:focus-visible { background: var(--yellow, #FFE9A8); transform: translateY(-1px) scale(1.04); outline: none; }
.news-bar-btn:active { transform: scale(0.95); }

.news-bar-done { font-weight: 700; font-size: 13px; color: var(--mint, #C4EBDF); }

.news-bar-x {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    opacity: 0.65;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.news-bar-x:hover, .news-bar-x:focus-visible { opacity: 1; background: rgba(255, 255, 255, 0.12); outline: none; }

@media (max-width: 600px) {
    .news-bar { font-size: 13px; }
    .news-bar-inner { padding-left: 14px; padding-right: 40px; gap: 4px 10px; }
    .news-bar-x { right: 6px; }
}

/* ----- "Newsletter" in the footer, styled like the other footer links ----- */
.news-footer-link {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    padding: 0;
    text-align: left;
    cursor: pointer;
    transition: transform 0.3s var(--spring, ease), color 0.2s ease;
}
.news-footer-link:hover { color: var(--yellow, #FFE9A8); }

/* ----- The window ----- */
.news-no-scroll, .news-no-scroll body { overflow: hidden; }

.news-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(43, 34, 48, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: news-fade 0.25s ease;
    overflow-y: auto;
}
.news-overlay.is-closing { opacity: 0; transition: opacity 0.2s ease; }

.news-dialog {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin: auto;
    background: var(--cream, #FFF8F1);
    border-radius: 26px;
    padding: 34px 30px 26px;
    box-shadow: 0 30px 80px rgba(43, 34, 48, 0.30);
    animation: news-pop 0.45s var(--spring, ease);
}

.news-badge {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--yellow, #FFE9A8);
    display: grid;
    place-items: center;
    transform: rotate(-8deg);
}
.news-badge img { width: 46px; height: 46px; }

.news-dialog h2 {
    font-size: 26px;
    text-align: center;
    margin-bottom: 6px;
}
.news-lead { text-align: center; color: var(--muted, #6B5E66); margin-bottom: 16px; }

.news-points {
    list-style: none;
    display: grid;
    gap: 10px;
    margin: 0 0 20px;
    padding: 16px 18px;
    background: var(--white, #fff);
    border: 1px solid var(--line, rgba(43, 34, 48, 0.12));
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.45;
}
.news-points li { display: flex; gap: 12px; align-items: flex-start; }
.news-point-icon {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 14px;
    background: var(--mint, #C4EBDF);
    color: var(--ink, #2B2230);
}
.news-points li:nth-child(2) .news-point-icon { background: var(--yellow, #FFE9A8); }
.news-points li:nth-child(3) .news-point-icon { background: var(--pink, #F7C6D6); }
.news-points li:nth-child(4) .news-point-icon { background: var(--peach, #FFD9C7); }

.news-label {
    display: block;
    font-family: var(--font-heading, sans-serif);
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 6px;
}
.news-row { display: flex; gap: 8px; }
.news-row input, .news-card-form input {
    flex: 1;
    min-width: 0;
    font-family: var(--font-body, sans-serif);
    font-size: 16px;   /* stops phones from zooming in */
    color: var(--ink, #2B2230);
    background: var(--white, #fff);
    border: 1.5px solid var(--line, rgba(43, 34, 48, 0.12));
    border-radius: 999px;
    padding: 11px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.news-row input:focus, .news-card-form input:focus {
    outline: none;
    border-color: var(--accent, #D9467A);
    box-shadow: 0 0 0 4px rgba(217, 70, 122, 0.15);
}
.news-row input.is-invalid { border-color: var(--accent, #D9467A); background: #FFF0F4; }
.news-row .btn, .news-card-form .btn { padding: 11px 20px; font-size: 16px; white-space: nowrap; }
.news-row .btn:disabled, .news-card-form .btn:disabled { opacity: 0.7; cursor: wait; transform: none; }

.news-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.news-error { color: var(--accent-dark, #B8335F); font-weight: 600; font-size: 14px; margin-top: 8px; }
.news-error[hidden] { display: none; }

.news-small { font-size: 13px; color: var(--muted, #6B5E66); text-align: center; margin-top: 14px; }
.news-wide { width: 100%; margin-top: 18px; }

.news-x {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--muted, #6B5E66);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.3s var(--spring, ease);
}
.news-x:hover, .news-x:focus-visible { background: rgba(43, 34, 48, 0.07); transform: rotate(90deg); outline: none; }

@media (max-width: 480px) {
    .news-dialog { padding: 28px 18px 20px; border-radius: 22px; }
    .news-dialog h2 { font-size: 23px; }
    .news-row { flex-direction: column; }
    .news-row .btn { width: 100%; }
}

/* ----- The gentle card on the cart page (only shown once) ----- */
.news-card {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 150;
    width: min(360px, calc(100vw - 32px));
    background: var(--white, #fff);
    border: 1px solid var(--line, rgba(43, 34, 48, 0.12));
    border-radius: 22px;
    padding: 20px 20px 14px;
    box-shadow: 0 24px 60px rgba(43, 34, 48, 0.22);
    transform: translateY(30px) scale(0.96);
    opacity: 0;
    transition: transform 0.45s var(--spring, ease), opacity 0.3s ease;
}
.news-card.is-in { transform: none; opacity: 1; }
.news-card .news-x { top: 8px; right: 8px; width: 30px; height: 30px; font-size: 20px; }

.news-card-title {
    font-family: var(--font-heading, sans-serif);
    font-weight: 600;
    font-size: 18px;
    line-height: 1.25;
    padding-right: 26px;
    margin-bottom: 6px;
}
.news-card-text { font-size: 14px; color: var(--muted, #6B5E66); margin-bottom: 12px; line-height: 1.45; }
.news-card-form { display: flex; gap: 8px; }
.news-card-form input { padding: 9px 14px; }
.news-card-form .btn { padding: 9px 16px; font-size: 15px; }

.news-what, .news-no {
    font: inherit;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--accent, #D9467A);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.news-no { display: block; margin: 10px auto 0; font-size: 14px; color: var(--muted, #6B5E66); }

@media (max-width: 600px) {
    .news-card { right: 16px; left: 16px; bottom: 16px; width: auto; }
}

/* ----- Checkout: the un-ticked box under the details ----- */
.news-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: -2px 0 22px;
    padding: 14px 16px;
    background: #FFFBF0;
    border: 1.5px dashed var(--yellow, #FFE9A8);
    border-radius: 16px;
    cursor: pointer;
}
.news-check input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--accent, #D9467A);
    cursor: pointer;
}
.news-check-copy { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.news-check-copy strong { font-weight: 600; }
.news-check-copy small { font-size: 13px; color: var(--muted, #6B5E66); }
.news-check .news-what { font-size: 13px; align-self: flex-start; }
.news-check.is-joined { background: #F1FAF6; border-color: var(--mint, #C4EBDF); border-style: solid; cursor: default; }
.news-check.is-joined input { display: none; }

/* ----- Animations ----- */
@keyframes news-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes news-pop { from { opacity: 0; transform: translateY(16px) scale(0.95); } to { opacity: 1; transform: none; } }
@keyframes news-drop { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes news-lift { to { transform: translateY(-100%); opacity: 0; } }
@keyframes news-twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.25) rotate(20deg); } }

@media (prefers-reduced-motion: reduce) {
    .news-bar, .news-dialog, .news-overlay, .news-spark { animation: none; }
    .news-card { transition: none; }
}

/* =========================================
   PARTS YOU ADDED IN THE ADMIN (layout.js)
   They use the same building blocks as the rest of the site.
   ========================================= */
.part-custom[hidden] { display: none; }
.part-text .part-text-body { max-width: 680px; margin: 0 auto 26px; color: var(--muted, #6B5E66); }
.part-text .part-text-body p { margin-bottom: 12px; }
.part-text .section-sub:last-child, .part-text .section-title:last-child { margin-bottom: 0; }
.part-text .cta-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.part-cards { justify-content: center; }
.part-cards-1 { grid-template-columns: minmax(0, 480px); }
.part-cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.part-cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.part-custom .center { text-align: center; margin-top: 32px; }
.part-banner { margin-top: 0; }
.part-banner .btn { margin-top: 4px; }
.part-custom .split-text p { color: var(--muted, #6B5E66); margin-bottom: 14px; }
.part-custom .split-image .photo { aspect-ratio: 4 / 3; border-radius: var(--radius, 14px); border: 1px solid var(--line, rgba(43,34,48,.12)); }
.part-custom .section-sub:last-child { margin-bottom: 0; }
.part-colored.section-tinted { border-color: transparent; }
@media (max-width: 900px) {
    .part-cards-2, .part-cards-4 { grid-template-columns: 1fr 1fr; max-width: none; }
}
@media (max-width: 600px) {
    .part-cards-2, .part-cards-4 { grid-template-columns: 1fr; }
}
.part-custom .section-title + .shop-grid,
.part-custom .section-title + .feature-grid { margin-top: 30px; }
