/*------------------------------------------------------------------
    Bookro – Nayla Template Eklentileri v2
    Nayla'nın sağlamadığı bileşenler ve düzeltmeler burada.
    Ana stil: style.css (değiştirilmez)
-------------------------------------------------------------------*/

/* ─── Nayla Genel Düzeltmeler ─────────────────────────────────── */

/* Kü4 – İlk section header padding düzeltmesi */
.section:first-child,
.section[style*="padding-top"] {
    /* İlk section için header yüksekliği kadar offset */
}

/* O3 – Subscribe form mobil taşma */
.nayla-subscribe-form {
    min-width: unset !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Kü3 – Footer bottom wrapper (Nayla'da tanımsız class) */
.footer-bottom-wrapper {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 32px;
    margin-top: 0;
    margin-bottom: 40px !important;
    font-size: 13px;
    opacity: 0.6;
}

body.dark .footer-bottom-wrapper {
    border-top-color: rgba(255, 255, 255, 0.08);
}

/* O9 – Info box içerik max-width kaldır */
.nayla-info-box.has-bg .info-box-content,
.nayla-info-box.has-bg.light .info-box-content {
    max-width: 100%;
}

/* B7 – Kontrast düzeltmesi: info box metinleri */
.nayla-info-box.has-bg.light p[style*="#696969"],
.nayla-info-box.has-bg.light [style*="color: #696969"] {
    color: #999 !important;
}

/* ─── Site Logo SVG Boyut Düzeltmesi ─────────────────────────── */

.site-logo img,
.sticky-logo img {
    height: 28px;
    width: auto;
    display: block;
}

/* ─── Wizard Progress Bar ─────────────────────────────────────── */

/* Kü1 – Float yerine flex */
.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    padding: 0 0 40px;
    box-sizing: border-box;
    /* float kaldırıldı */
}

.progress-step {
    display: flex;
    align-items: center;
    flex: 1;
}

.progress-step:last-child {
    flex: 0;
}

.progress-step__dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--mainColor);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    opacity: 0.3;
    transition: all 0.4s ease;
    flex-shrink: 0;
}

.progress-step.active .progress-step__dot,
.progress-step.done .progress-step__dot {
    opacity: 1;
    background: var(--mainColor);
    color: var(--mainBackground);
}

.progress-step__line {
    flex: 1;
    height: 1px;
    background: var(--mainColor);
    opacity: 0.15;
    margin: 0 8px;
}

.progress-step.done .progress-step__line {
    opacity: 0.5;
}

/* ─── Wizard Steps ────────────────────────────────────────────── */

.wizard-step {
    display: none;
    width: 100%;
}

.wizard-step.active {
    display: block;
}

/* ─── B4 – Sidebar Sticky (float context fix) ─────────────────── */

/* wrapper-full flex container'ı zaten flex. Sidebar'ı align-items: flex-start ile fixed pozisyona alıyoruz */
.wizard-sidebar {
    position: sticky;
    top: 100px;
    align-self: flex-start;
    height: fit-content;
}

/* ─── Summary Table (O8 – table → flex) ──────────────────────── */

.summary-table {
    width: 100%;
    font-size: 14px;
    margin-bottom: 8px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 12px;
    gap: 8px;
}

.summary-row span:first-child {
    opacity: 0.5;
    flex-shrink: 0;
}

.summary-row span:last-child {
    font-weight: 500;
    text-align: right;
}

/* ─── Mobile Price Bar ────────────────────────────────────────── */

.mobile-price-bar {
    margin-bottom: 24px;
}

/* ─── Selection Cards ─────────────────────────────────────────── */

.nayla-single-product.selection-card .product-wrap {
    border: 2px solid transparent;
    transition: border 0.3s ease;
}

.nayla-single-product.selection-card.selected .product-wrap {
    border-color: var(--mainColor);
}

/* ─── Cover Select Cards ──────────────────────────────────────── */

.nayla-dynamic-banner.cover-select-card {
    border: 2px solid transparent;
    transition: border 0.3s ease;
    cursor: pointer;
}

.nayla-dynamic-banner.cover-select-card.selected {
    border-color: var(--mainColor);
}

/* ─── Color Swatches ─────────────────────────────────────────── */

.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    width: 100%;
}

.color-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.color-swatch__circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid transparent;
    outline: 2px solid transparent;
    transition: outline 0.3s ease, transform 0.2s ease;
}

.color-swatch.selected .color-swatch__circle {
    outline-color: var(--mainColor);
    outline-offset: 3px;
    transform: scale(1.1);
}

.color-swatch:hover .color-swatch__circle {
    transform: scale(1.08);
}

.color-swatch__name {
    font-size: 11px;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ─── Page Slider ─────────────────────────────────────────────── */

.page-slider-wrap {
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.page-count-display {
    font-size: 72px;
    font-weight: 300;
    line-height: 1;
    letter-spacing: -2px;
}

.page-count-label {
    font-size: 14px;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 32px;
}

.page-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 1px;
    background: var(--mainColor);
    opacity: 0.2;
    outline: none;
    cursor: pointer;
    display: block;
}

/* Chrome/Safari */
.page-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--mainColor);
    cursor: pointer;
    transition: transform 0.2s;
}

.page-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

/* O6 – Firefox */
.page-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--mainColor);
    cursor: pointer;
    border: none;
}

/* ─── Cover Preview ───────────────────────────────────────────── */

.cover-preview {
    width: 100%;
    aspect-ratio: 0.7071;
    background: #191919;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #f5f0e8;
    padding: 40px 24px;
    box-sizing: border-box;
    transition: background 0.4s ease, color 0.4s ease;
}

.cover-preview__name {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-align: center;
    margin-bottom: 12px;
}

.cover-preview__date {
    font-size: 13px;
    opacity: 0.5;
    letter-spacing: 0.2em;
    text-align: center;
    margin-bottom: 12px;
}

.cover-preview__msg {
    font-size: 12px;
    opacity: 0.4;
    font-style: italic;
    text-align: center;
}

/* ─── Nayla Form – form-row-half (O4) ────────────────────────── */

.nayla-form .form-row-half {
    display: flex;
    gap: 16px;
}

.nayla-form .form-row-half > div {
    flex: 1;
    min-width: 0;
}

/* ─── Drop Zone ───────────────────────────────────────────────── */

.drop-zone {
    position: relative;
    width: 100%;
    min-height: 280px;
    border: 1px dashed var(--mainColor);
    opacity: 0.7;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: opacity 0.3s ease, background 0.3s ease;
    padding: 40px 20px;
    box-sizing: border-box;
    text-align: center;
}

.drop-zone:hover,
.drop-zone.drag-over {
    opacity: 1;
    background: rgba(128, 128, 128, 0.04);
}

.drop-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.drop-zone__icon {
    font-size: 56px !important;
    opacity: 0.4;
}

.drop-zone__title {
    font-size: 18px;
    font-weight: 500;
}

.drop-zone__subtitle {
    font-size: 13px;
    opacity: 0.5;
    line-height: 1.7;
}

.drop-zone__formats {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.format-badge {
    padding: 4px 12px;
    border: 1px solid var(--mainColor);
    font-size: 11px;
    letter-spacing: 0.1em;
    opacity: 0.5;
}

/* ─── Upload Progress ─────────────────────────────────────────── */

.upload-progress {
    width: 100%;
    margin-top: 20px;
    display: none;
}

.upload-progress.active {
    display: block;
}

.upload-progress__bar {
    width: 100%;
    height: 1px;
    background: rgba(128, 128, 128, 0.15);
    position: relative;
    overflow: hidden;
}

.upload-progress__fill {
    height: 100%;
    background: var(--mainColor);
    transition: width 0.4s ease;
}

.upload-progress__text {
    margin-top: 10px;
    font-size: 13px;
    opacity: 0.5;
}

/* ─── Photo Thumbnails ────────────────────────────────────────── */

.photo-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 6px;
    width: 100%;
    margin-top: 16px;
    max-height: 160px;
    overflow-y: auto;
    padding-right: 4px;
}

.photo-thumb {
    aspect-ratio: 1;
    overflow: hidden;
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ─── Analysis Overlay ────────────────────────────────────────── */

.analysis-overlay {
    position: fixed;
    inset: 0;
    background: var(--mainBackground);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    z-index: 9999;
}

.analysis-overlay.active {
    display: flex;
}

.analysis-spinner {
    width: 48px;
    height: 48px;
    border: 1px solid var(--mainColor);
    border-top-color: transparent;
    border-radius: 50%;
    animation: albumSpin 1s linear infinite;
}

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

.analysis-text {
    font-size: 20px;
    font-weight: 500;
}

.analysis-sub {
    font-size: 13px;
    opacity: 0.5;
}

/* ─── Responsive ──────────────────────────────────────────────── */

@media (max-width: 767px) {
    .color-swatches {
        gap: 16px;
    }

    .cover-preview {
        margin-top: 32px;
    }

    .page-count-display {
        font-size: 56px;
    }

    .wizard-sidebar {
        position: static !important;
    }

    /* O3 – Subscribe mobil */
    .nayla-subscribe-form {
        flex-direction: column;
        gap: 12px;
    }

    /* form-row-half mobilde alt alta */
    .nayla-form .form-row-half {
        flex-direction: column;
        gap: 0;
    }
}

/* ─── Homepage Tabs Override ─── */
.nayla-infinite-tabs .tab-title {
    opacity: 0.35 !important;
    font-size: clamp(16px, 2.5vw, 24px) !important;
    margin-right: clamp(20px, 4vw, 50px) !important;
    letter-spacing: 0.05em;
    font-weight: 500;
}
.nayla-infinite-tabs .tab-title.active {
    opacity: 1 !important;
    color: var(--mainColor) !important;
}

/* ─── Premium Empty Image Placeholders ─── */
.product-image,
.banner-background {
    background-color: #f2f2ee !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.product-image img,
.banner-background img {
    display: none !important;
}
.product-image::before,
.banner-background::before {
    content: "📷" !important;
    font-size: 24px !important;
    opacity: 0.2 !important;
    position: absolute !important;
    top: 40% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}
.product-image::after,
.banner-background::after {
    content: "GÖRSEL ALANI" !important;
    position: absolute !important;
    bottom: 15% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-size: 10px !important;
    font-family: inherit !important;
    font-weight: 500 !important;
    letter-spacing: 0.1em !important;
    opacity: 0.4 !important;
    color: var(--mainColor) !important;
    white-space: nowrap !important;
}

/* ─── Cover Preview Upload Style ─── */
.cover-preview {
    background-size: cover !important;
    background-position: center !important;
    position: relative !important;
    z-index: 1;
}
.cover-preview::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.45) !important;
    z-index: -1 !important;
}

/* ─── Single Screen Wizard ───────────────────────────────────── */
body.wizard-page {
    height: 100vh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

body.wizard-page #page {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

body.wizard-page main.site-main {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

body.wizard-page .page-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    height: 100% !important;
}

body.wizard-page .section {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding-top: 80px !important;
    padding-bottom: 20px !important;
}

body.wizard-page .section > .wrapper-full:first-of-type {
    flex: 0 0 auto !important;
}

body.wizard-page .section > .wrapper-full:last-of-type {
    flex: 1 !important;
    display: flex !important;
    overflow: hidden !important;
    margin-top: 0 !important;
}

body.wizard-page .section > .wrapper-full:last-of-type > .c-col-8,
body.wizard-page .section > .wrapper-full:last-of-type > .sm-12:not(.wizard-sidebar) {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

body.wizard-page .wizard-sidebar {
    height: 100% !important;
    position: static !important;
    overflow-y: auto !important;
}

body.wizard-page .wizard-step {
    height: 100% !important;
    display: none;
    flex-direction: column !important;
    justify-content: flex-start !important;
    overflow-y: auto !important;
    padding-right: 8px;
    gap: 0;
}

/* Navigation buttons always pushed to bottom */
body.wizard-page .wizard-step > .wrapper:last-child {
    margin-top: auto !important;
    flex-shrink: 0;
}

/* Prevent inner wrappers from shrinking */
body.wizard-page .wizard-step > .wrapper,
body.wizard-page .wizard-step > .wrapper-full {
    flex-shrink: 0;
}

body.wizard-page .wizard-step.active {
    display: flex !important;
}

