/**
 * Pozitif Reklam - Layout Düzeltmeleri
 * Elementor flexbox layout sorunlarını çözer
 */

/* ===========================
   CONTAINER GENİŞLİK KONTROLÜ
   =========================== */

/* leversnet-container class'ı - HTML'deki gibi */
.leversnet-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Ana container maksimum genişlik */
.elementor-section.elementor-section-boxed > .elementor-container {
    max-width: 1400px;
    padding-left: 20px;
    padding-right: 20px;
}

/* Full width section'larda container kontrolü */
.elementor-section-full_width > .elementor-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Elementor container padding override */
.elementor-container {
    max-width: 1400px !important;
}

/* ===========================
   SIDEBAR + CONTENT LAYOUT
   =========================== */

/* Sidebar ve content yan yana layout - tekli-urun.html gibi */
.pozitif-sidebar-layout,
.content-with-sidebar {
    display: flex;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    align-items: flex-start;
}

/* Sidebar sabit genişlik */
.pozitif-sidebar-layout .leversnet-sidebar,
.content-with-sidebar .leversnet-sidebar,
.products-sidebar {
    width: 280px;
    flex-shrink: 0;
    align-self: flex-start;
}

/* İçerik alanı esnek */
.pozitif-sidebar-layout .pozitif-products-wrapper,
.pozitif-sidebar-layout .pozitif-single-product,
.content-with-sidebar .pozitif-products-wrapper,
.content-with-sidebar .pozitif-single-product,
.product-main-content {
    flex: 1;
    min-width: 0;
}

/* ===========================
   ELEMENTOR FLEXBOX DÜZELTMELERİ
   =========================== */

/* Elementor section - sıfırla ve arka plan ekle */
.elementor-section {
    padding: 60px 0 !important;
    background: #f8f9fa !important;
}

/* Elementor container - tam sıfırlama */
.elementor-section .elementor-container {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 40px !important;
    align-items: flex-start !important;
}

/* Tüm column yapısını sıfırla */
.elementor-column,
.elementor-column-gap-default > .elementor-column > .elementor-element-populated,
.elementor-column > .elementor-widget-wrap {
    padding: 0 !important;
    margin: 0 !important;
}

/* Widget wrap - tüm padding ve margin sıfır */
.elementor-widget-wrap {
    padding: 0 !important;
    margin: 0 !important;
}

/* Widget container - tüm padding sıfır */
.elementor-widget-container {
    padding: 0 !important;
    margin: 0 !important;
}

/* Widget - tüm padding sıfır */
.elementor-widget {
    padding: 0 !important;
    margin-bottom: 0 !important;
}

/* Elementor row gap - sıfırla */
.elementor-row {
    gap: 0 !important;
}

/* Column gap - container dışındaki tüm gap'leri sıfırla */
.elementor-column-gap-default > .elementor-column > .elementor-element-populated {
    padding: 0 !important;
}

/* Flexbox container içindeki widget genişlik kontrolü */
.elementor-column > .elementor-widget-wrap > .elementor-element {
    max-width: 100%;
    width: 100%;
}

/* Sidebar widget'ı için - sabit genişlik */
.elementor-widget-leversnet-products-sidebar {
    width: 280px !important;
    max-width: 280px !important;
    flex: 0 0 280px !important;
}

.elementor-widget-leversnet-products-sidebar .elementor-widget-container {
    width: 100%;
    max-width: 100%;
}

/* Product listing ve single product için - esnek genişlik */
.elementor-widget-leversnet-products-listing,
.elementor-widget-leversnet-single-product {
    flex: 1 !important;
    min-width: 0 !important;
}

.elementor-widget-leversnet-products-listing .elementor-widget-container,
.elementor-widget-leversnet-single-product .elementor-widget-container {
    width: 100%;
    max-width: 100%;
}

/* ===========================
   2 KOLONLU LAYOUT (25% + 75%)
   =========================== */

/* İki kolonlu yapı için özel class */
.pozitif-two-column-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.pozitif-two-column-layout .sidebar-column {
    width: 100%;
}

.pozitif-two-column-layout .content-column {
    width: 100%;
    min-width: 0;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media screen and (max-width: 1200px) {
    .elementor-section.elementor-section-boxed > .elementor-container,
    .elementor-section-full_width > .elementor-container {
        max-width: 1140px;
    }

    .pozitif-sidebar-layout,
    .pozitif-two-column-layout {
        max-width: 1140px;
    }
}

@media screen and (max-width: 1024px) {
    .pozitif-sidebar-layout,
    .pozitif-two-column-layout,
    .content-with-sidebar {
        flex-direction: column;
        gap: 30px;
    }

    .elementor-section .elementor-container {
        flex-direction: column !important;
        gap: 30px !important;
    }

    .pozitif-sidebar-layout .leversnet-sidebar,
    .content-with-sidebar .leversnet-sidebar,
    .products-sidebar {
        width: 100%;
    }

    .elementor-widget-leversnet-products-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 !important;
    }

    .elementor-widget-leversnet-products-sidebar .elementor-widget-container {
        max-width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .elementor-section-full_width > .elementor-container,
    .pozitif-sidebar-layout,
    .pozitif-two-column-layout {
        padding: 0 15px;
    }
}
