/* Small WordPress-layer corrections for the read-only legacy templates. */

.dn-account-link {
    flex: 0 0 auto;
    text-decoration: none !important;
}

#add-review-btn-trigger {
    margin-top: 20px !important;
}

.dn-form-feedback {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-family: var(--font-sans, Inter, Arial, sans-serif);
    font-size: .86rem;
    line-height: 1.5;
    text-align: left;
}

.dn-form-feedback.is-loading {
    color: var(--color-text-muted, #6d6259);
    background: #faf6ee;
    border-color: var(--color-border, #dfd1bd);
}

.dn-form-feedback.is-success {
    color: #315d38;
    background: #f2f8f1;
    border-color: #9fc49f;
}

.dn-form-feedback.is-error {
    color: #7a121a;
    background: #fff4f4;
    border-color: #d9a0a4;
}

#kontakt-form button[type="submit"]:disabled,
#newsletter-form button[type="submit"]:disabled {
    cursor: wait;
    opacity: .72;
}

/*
 * One visual system for every internal-page hero.
 * The home page keeps its dedicated hero. Background images remain page-specific.
 */
:is(
    .blog-hero-section,
    .hiw-hero-section,
    .kontakt-hero-section,
    .about-hero-section,
    .occasion-hero,
    .sklep-hero
) {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    min-height: 320px !important;
    width: 100% !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    background-color: #f5efe4 !important;
    border-bottom: 1px solid var(--color-border, #dfd1bd) !important;
    text-align: left !important;
}

:is(
    .blog-hero-bg,
    .hiw-hero-bg,
    .kontakt-hero-bg,
    .about-hero-bg,
    .occasion-hero-bg,
    .sklep-hero-bg
) {
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    width: 100% !important;
    height: 100% !important;
    background-position: right center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
}

:is(
    .blog-hero-inner,
    .hiw-hero-content,
    .kontakt-hero-content,
    .about-hero-content,
    .occasion-hero-inner,
    .sklep-hero-inner
) {
    position: relative !important;
    z-index: 2 !important;
    width: min(100%, 1728px) !important;
    max-width: 1728px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
}

:is(
    .blog-hero-content,
    .hiw-hero-text,
    .kontakt-hero-text,
    .about-hero-text,
    .occasion-hero-content,
    .sklep-hero-content
) {
    width: 100% !important;
    max-width: 620px !important;
    padding: 40px 0 !important;
    box-sizing: border-box !important;
    text-align: left !important;
}

:is(
    .blog-eyebrow,
    .occasion-eyebrow,
    .blog-hero-content > span,
    .hiw-hero-text > span,
    .kontakt-hero-text > span,
    .about-hero-text > span,
    .sklep-hero-content > span
) {
    display: block !important;
    margin: 0 0 8px !important;
    color: var(--color-accent-gold, #c79855) !important;
    font-family: var(--font-heading, "Cormorant Garamond", Georgia, serif) !important;
    font-size: .95rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    letter-spacing: .2em !important;
    text-transform: uppercase !important;
}

:is(
    .blog-hero-section,
    .hiw-hero-section,
    .kontakt-hero-section,
    .about-hero-section,
    .occasion-hero,
    .sklep-hero
) h1 {
    margin: 5px 0 10px !important;
    color: var(--color-primary, #2c1a0e) !important;
    font-family: var(--font-heading, "Cormorant Garamond", Georgia, serif) !important;
    font-size: clamp(2rem, 4.5vw, 2.6rem) !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

:is(
    .blog-hero-section,
    .hiw-hero-section,
    .kontakt-hero-section,
    .about-hero-section,
    .occasion-hero,
    .sklep-hero
) h1 em {
    font-family: var(--font-serif-italic, "Cormorant Garamond", Georgia, serif) !important;
    font-style: italic !important;
    font-weight: 400 !important;
}

:is(
    .blog-hero-desc,
    .hiw-hero-text > p,
    .kontakt-hero-text > p,
    .about-hero-text > p,
    .occasion-hero-desc,
    .occasion-hero-content > p,
    .sklep-hero-desc
) {
    max-width: 520px !important;
    margin: 0 !important;
    color: var(--color-text-muted, #6d6259) !important;
    font-family: var(--font-sans, Inter, Arial, sans-serif) !important;
    font-size: .94rem !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
}

:is(
    .blog-hero-section,
    .hiw-hero-section,
    .kontakt-hero-section,
    .about-hero-section,
    .occasion-hero,
    .sklep-hero
) :is(.blog-breadcrumb, .sklep-breadcrumb) {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    font-family: var(--font-sans, Inter, Arial, sans-serif) !important;
    font-size: .78rem !important;
    line-height: 1.4 !important;
}

/* Older occasion pages have no inner/background wrappers. */
.occasion-hero:not(:has(.occasion-hero-inner)) {
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 52px max(20px, calc((100% - 1728px) / 2 + 20px)) !important;
}

.occasion-hero:not(:has(.occasion-hero-inner)) > :is(h1, p, span, nav) {
    width: 100% !important;
    max-width: 620px !important;
    box-sizing: border-box !important;
}

.occasion-hero:not(:has(.occasion-hero-inner)) > nav { order: 1; }
.occasion-hero:not(:has(.occasion-hero-inner)) > span { order: 2; }
.occasion-hero:not(:has(.occasion-hero-inner)) > h1 { order: 3; }
.occasion-hero:not(:has(.occasion-hero-inner)) > p {
    order: 4;
    max-width: 520px !important;
    margin: 0 !important;
    color: var(--color-text-muted, #6d6259) !important;
    font-family: var(--font-sans, Inter, Arial, sans-serif) !important;
    font-size: .94rem !important;
    line-height: 1.6 !important;
}

@media (max-width: 768px) {
    :is(
        .blog-hero-section,
        .hiw-hero-section,
        .kontakt-hero-section,
        .about-hero-section,
        .occasion-hero:has(.occasion-hero-inner),
        .sklep-hero
    ) {
        min-height: auto !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    :is(
        .blog-hero-bg,
        .hiw-hero-bg,
        .kontakt-hero-bg,
        .about-hero-bg,
        .occasion-hero-bg,
        .sklep-hero-bg
    ) {
        position: relative !important;
        inset: auto !important;
        height: 250px !important;
        background-position: center !important;
    }

    :is(
        .blog-hero-inner,
        .hiw-hero-content,
        .kontakt-hero-content,
        .about-hero-content,
        .occasion-hero-inner,
        .sklep-hero-inner
    ) {
        padding: 0 !important;
    }

    :is(
        .blog-hero-content,
        .hiw-hero-text,
        .kontakt-hero-text,
        .about-hero-text,
        .occasion-hero-content,
        .sklep-hero-content
    ) {
        max-width: 100% !important;
        padding: 25px 15px 20px !important;
        text-align: center !important;
    }

    :is(
        .blog-hero-section,
        .hiw-hero-section,
        .kontakt-hero-section,
        .about-hero-section,
        .occasion-hero,
        .sklep-hero
    ) :is(.blog-breadcrumb, .sklep-breadcrumb) {
        justify-content: center !important;
    }

    :is(
        .blog-hero-desc,
        .hiw-hero-text > p,
        .kontakt-hero-text > p,
        .about-hero-text > p,
        .occasion-hero-desc,
        .occasion-hero-content > p,
        .sklep-hero-desc
    ) {
        margin-right: auto !important;
        margin-left: auto !important;
    }

    .occasion-hero:not(:has(.occasion-hero-inner)) {
        align-items: center !important;
        min-height: auto !important;
        padding: 36px 20px !important;
        text-align: center !important;
    }

    .occasion-hero:not(:has(.occasion-hero-inner)) > :is(h1, p, span, nav) {
        text-align: center !important;
        margin-right: auto !important;
        margin-left: auto !important;
    }
}

@media (max-width: 480px) {
    :is(
        .blog-hero-bg,
        .hiw-hero-bg,
        .kontakt-hero-bg,
        .about-hero-bg,
        .occasion-hero-bg,
        .sklep-hero-bg
    ) {
        height: 180px !important;
    }

    :is(
        .blog-hero-section,
        .hiw-hero-section,
        .kontakt-hero-section,
        .about-hero-section,
        .occasion-hero,
        .sklep-hero
    ) h1 {
        font-size: 1.7rem !important;
    }
}

/* Editorial cards: three columns, with links only on the image and title. */
.blog-grid-section .blog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.dn-blog-card-image-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.blog-card-title a,
.blog-card .blog-content h3 a {
    color: inherit;
    text-decoration: none;
}

.dn-blog-card-image-link:focus-visible,
.blog-card-title a:focus-visible,
.blog-card .blog-content h3 a:focus-visible {
    outline: 2px solid var(--color-accent-gold, #c5a880);
    outline-offset: 3px;
}

.blog-card .dn-blog-card-image-link:hover img,
.blog-card .dn-blog-card-image-link:focus-visible img {
    transform: scale(1.05);
}

.blog-card-title a:hover,
.blog-card .blog-content h3 a:hover {
    color: var(--color-accent-burgundy, #591a24);
}

/* The static header search is upgraded to a real WooCommerce product form. */
body.dn-legacy-page .search-bar-container .dn-product-search-form {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

body.dn-legacy-page .search-bar-container #search-input {
    width: 100%;
    min-width: 0;
}

body.dn-legacy-page .search-bar-container .dn-search-submit {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 8px 13px;
    color: #fffdf9;
    background: var(--color-accent-burgundy, #591a24);
    border: 1px solid var(--color-accent-burgundy, #591a24);
    border-radius: 3px;
    font: 600 .66rem/1 var(--font-sans, Inter, sans-serif);
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
}

body.dn-legacy-page .search-bar-container .dn-search-submit:hover,
body.dn-legacy-page .search-bar-container .dn-search-submit:focus-visible {
    background: var(--color-primary, #2c1a0e);
    border-color: var(--color-primary, #2c1a0e);
}

/* Branded replacement for native constructor alert dialogs. */
.dn-builder-notice {
    position: fixed;
    top: 132px;
    right: 24px;
    z-index: 10050;
    width: min(420px, calc(100vw - 32px));
    padding: 18px 48px 18px 18px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: start;
    gap: 13px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-14px) scale(.985);
    color: #fff9f0;
    background: linear-gradient(135deg, #6e1724 0%, #50121c 100%);
    border: 1px solid rgba(211,177,118,.72);
    border-radius: 5px;
    box-shadow: 0 20px 48px rgba(44,26,14,.24), 0 3px 10px rgba(44,26,14,.12);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.dn-builder-notice.is-visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
}
.dn-builder-notice-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: #5b1420;
    background: #ead3a7;
    border-radius: 50%;
    font: 600 1.1rem/1 "Cormorant Garamond", Georgia, serif;
}
.dn-builder-notice-copy { min-width: 0; }
.dn-builder-notice-title {
    display: block;
    margin: 1px 0 5px;
    color: #f5dfb7;
    font: 500 1.08rem/1.2 "Cormorant Garamond", Georgia, serif;
    letter-spacing: .025em;
}
.dn-builder-notice-message {
    margin: 0;
    color: rgba(255,249,240,.9);
    font: 400 .78rem/1.55 Inter, sans-serif;
}
.dn-builder-notice-close {
    position: absolute;
    top: 9px;
    right: 10px;
    width: 30px;
    height: 30px;
    padding: 0;
    color: rgba(255,249,240,.78);
    background: transparent;
    border: 0;
    border-radius: 50%;
    font: 300 1.45rem/1 Inter, sans-serif;
    cursor: pointer;
}
.dn-builder-notice-close:hover,
.dn-builder-notice-close:focus-visible {
    color: #fff;
    background: rgba(255,255,255,.09);
    outline: none;
}

@media (max-width: 680px) {
    .dn-builder-notice {
        top: auto;
        right: 16px;
        bottom: 18px;
        left: 16px;
        width: auto;
        padding: 16px 43px 16px 15px;
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 11px;
    }
    .dn-builder-notice-icon { width: 32px; height: 32px; }
    .dn-builder-notice-title { font-size: 1rem; }
    .dn-builder-notice-message { font-size: .75rem; }
}

@media (max-width: 1100px) {
    .blog-grid-section .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 680px) {
    .blog-grid-section .blog-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Home hero: keep every trust badge visible on mobile. */
@media (max-width: 768px) {
    body.dn-legacy-page .hero-section {
        min-height: auto !important;
        max-height: none !important;
        padding: 38px 0 42px !important;
    }

    body.dn-legacy-page .hero-inner {
        padding: 22px 16px !important;
    }

    body.dn-legacy-page .hero-scroll-down {
        display: none !important;
    }
}

@media (max-width: 480px) {
    body.dn-legacy-page .hero-trust {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 6px !important;
        width: 100% !important;
        padding-top: 14px !important;
    }

    body.dn-legacy-page .hero-trust .trust-item {
        min-width: 0;
        gap: 4px !important;
    }

    body.dn-legacy-page .hero-trust .trust-icon-box {
        height: 34px !important;
        margin-bottom: 0 !important;
    }

    body.dn-legacy-page .hero-trust .trust-icon-img {
        height: 30px !important;
        max-width: 100% !important;
    }

    body.dn-legacy-page .hero-trust .trust-label {
        max-width: 100%;
        font-size: .5rem !important;
        line-height: 1.35 !important;
        letter-spacing: .055em !important;
        overflow-wrap: normal;
    }
}
