/* SweetAlert2 + form overlay — YarnArt marka renkleri */
:root {
    --yarnart-primary: #dc2626;
    --yarnart-primary-dark: #b91c1c;
    --yarnart-success: #16a34a;
    --yarnart-error: #dc2626;
    --yarnart-warning: #ca8a04;
    --yarnart-text: #101828;
    --yarnart-bg: #fff;
}

.swal2-yarnart.popup-class {
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(220, 38, 38, 0.15);
    padding: 2rem;
    border: 1px solid rgba(220, 38, 38, 0.12);
}

.swal2-yarnart .swal2-title {
    color: var(--yarnart-text);
    font-size: 1.25rem;
    font-weight: 600;
}

.swal2-yarnart .swal2-html-container {
    color: #4a5565;
    font-size: 1rem;
    line-height: 1.5;
}

.swal2-yarnart .swal2-success-ring { border-color: var(--yarnart-primary) !important; }
.swal2-yarnart .swal2-success-line-tip,
.swal2-yarnart .swal2-success-line-long { background-color: var(--yarnart-primary) !important; }

.swal2-yarnart .btn-confirm {
    background: var(--yarnart-primary) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 28px !important;
    color: #fff !important;
    font-weight: 600 !important;
}

.swal2-yarnart .btn-confirm:hover {
    background: var(--yarnart-primary-dark) !important;
}

.contact-form-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: rgba(16, 24, 40, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-form-overlay-inner {
    background: #fff;
    border-radius: 12px;
    padding: 2rem 3rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.contact-form-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    border: 3px solid #f3f4f6;
    border-top-color: var(--yarnart-primary);
    border-radius: 50%;
    animation: yarnart-spin 0.8s linear infinite;
}

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

.cms-footer-blocks:empty {
    display: none;
}

/* —— Unified page hero (desenler standardı — tüm site) —— */

.ya-unified-hero--strip {
    display: block;
    width: 100%;
    overflow: hidden;
    margin-bottom: 0;
}

.ya-unified-hero__strip-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 22, 63, 0.72) 0%, rgba(11, 22, 63, 0.2) 45%, transparent 100%);
    pointer-events: none;
}

.ya-unified-hero__strip-content {
    position: absolute;
    inset: auto 0 0;
    z-index: 1;
    padding-top: 2rem;
    padding-bottom: 1.25rem;
}

.ya-unified-hero__strip-title {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.ya-unified-hero__strip-content nav,
.ya-unified-hero__strip-content a,
.ya-unified-hero__strip-content span {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.ya-unified-hero__strip-img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 7.5rem;
    max-height: 14rem;
    object-fit: cover;
    object-position: center center;
}

@media (min-width: 640px) {
    .ya-unified-hero__strip-img {
        min-height: 9rem;
        max-height: 16rem;
    }
}

.ya-unified-hero__content--on-image nav,
.ya-unified-hero__content--on-image h1,
.ya-unified-hero__content--on-image p,
.ya-unified-hero__content--on-image span {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

/* —— Site search modal —— */

body.ya-search-modal-open {
    overflow: hidden;
}

.ya-search-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1rem;
    padding-top: max(1rem, 10vh);
}

.ya-search-modal.hidden {
    display: none;
}

.ya-search-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, 0.62);
    backdrop-filter: blur(4px);
}

.ya-search-modal__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 42rem);
    border-radius: 1rem;
    background: #fff;
    padding: 1.5rem;
    box-shadow: 0 24px 60px rgba(16, 24, 40, 0.22);
}

.ya-search-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.ya-search-modal__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--yarnart-text);
}

.ya-search-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 999px;
    background: #f3f4f6;
    color: #364153;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.ya-search-modal__close:hover {
    background: #e5e7eb;
}

.ya-search-modal__form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ya-search-modal__field,
.ya-search-results__field {
    position: relative;
}

.ya-search-modal__icon,
.ya-search-results__icon {
    pointer-events: none;
    position: absolute;
    left: 1rem;
    top: 50%;
    width: 1.25rem;
    height: 1.25rem;
    transform: translateY(-50%);
    color: #6a7282;
}

.ya-search-modal__input,
.ya-search-results__input {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #f7faf8;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    font-size: 1rem;
    color: var(--yarnart-text);
}

.ya-search-modal__input:focus,
.ya-search-results__input:focus {
    outline: none;
    border-color: var(--yarnart-primary);
    box-shadow: 0 0 0 1px var(--yarnart-primary);
}

.ya-search-modal__submit,
.ya-search-results__submit {
    border: 0;
    border-radius: 999px;
    background: var(--yarnart-primary);
    color: #fff;
    padding: 0.875rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.ya-search-modal__submit:hover,
.ya-search-results__submit:hover {
    background: var(--yarnart-primary-dark);
}

.ya-search-modal__popular {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f3f4f6;
}

.ya-search-modal__popular-label {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6a7282;
}

.ya-search-modal__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ya-search-modal__tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--yarnart-text);
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.ya-search-modal__tag:hover {
    border-color: var(--yarnart-primary);
    color: var(--yarnart-primary);
}

/* —— Search results page —— */

.ya-search-results {
    padding: 2.5rem 0 4rem;
}

.ya-search-results__inner {
    width: min(100%, 48rem);
    margin: 0 auto;
    padding: 0 1rem;
}

.ya-search-results__head {
    margin-bottom: 1.5rem;
}

.ya-search-results__title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--yarnart-text);
}

.ya-search-results__count {
    margin: 0;
    color: #6a7282;
}

.ya-search-results__form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.ya-search-results__empty {
    margin: 0;
    padding: 1.25rem 1rem;
    border-radius: 0.75rem;
    background: #f7faf8;
    color: #4a5565;
}

.ya-search-results__section + .ya-search-results__section {
    margin-top: 2rem;
}

.ya-search-results__section-title {
    margin: 0 0 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--yarnart-text);
}

.ya-search-results__list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #eef2f7;
    border-radius: 0.75rem;
    overflow: hidden;
}

.ya-search-results__list li + li {
    border-top: 1px solid #eef2f7;
}

.ya-search-results__link {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.875rem 1rem;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.ya-search-results__link:hover {
    background: #f7faf8;
}

.ya-search-results__link-title {
    font-weight: 500;
    color: var(--yarnart-text);
}

.ya-search-results__link-meta {
    font-size: 0.875rem;
    color: #6a7282;
}

@media (min-width: 640px) {
    .ya-search-modal__form,
    .ya-search-results__form {
        flex-direction: row;
        align-items: stretch;
    }

    .ya-search-modal__field,
    .ya-search-results__field {
        flex: 1 1 auto;
    }

    .ya-search-modal__submit,
    .ya-search-results__submit {
        flex: 0 0 auto;
        align-self: stretch;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}
