.three-block-section {
    padding: 34px 0;
}

.three-block-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 18px;
}

.three-block-head span {
    color: var(--three-primary-color, #2563eb);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.three-block-head h2 {
    margin: 4px 0 0;
    color: #0f172a;
    font-size: clamp(25px, 2.2vw, 36px);
    font-weight: 950;
    letter-spacing: -.04em;
}

.three-block-view-all {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:40px;
    padding:0 16px;
    border-radius:999px;
    background:#f8fafc;
    border:1px solid #e5e7eb;
    color:#0f172a;
    text-decoration:none;
    font-weight:950;
}

.three-block-products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.three-block-section.is-carousel .three-block-products {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 4px 16px;
}

.three-block-section.is-carousel .three-product-card {
    flex: 0 0 275px;
    scroll-snap-align: start;
}

.three-block-section .three-product-card {
    min-height: 430px;
}

.three-block-section.shape-square .three-product-card,
.three-block-popup.shape-square .three-block-popup-card {
    border-radius: 8px !important;
}

.three-block-section.shape-rounded .three-product-card,
.three-block-popup.shape-rounded .three-block-popup-card {
    border-radius: 28px !important;
}

.three-block-section.shape-oval .three-product-card {
    border-radius: 44px !important;
}

.three-block-section.shape-oval .three-product-image {
    border-radius: 999px !important;
    width: calc(100% - 28px);
    margin: 14px auto 0;
}

.three-block-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(2, 6, 23, .62);
    backdrop-filter: blur(8px);
}

.three-block-popup.active {
    display: flex;
}

.three-block-popup-card {
    width: min(92vw, 560px);
    overflow: hidden;
    background: #fff;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .28);
    position: relative;
}

.three-block-popup-card img {
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    background: #f8fafc;
    display: block;
}

.three-block-popup-content {
    padding: 22px;
}

.three-block-popup-content h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 25px;
    font-weight: 950;
}

.three-block-popup-content p {
    margin: 0 0 16px;
    color: #475569;
    font-weight: 800;
    line-height: 1.55;
}

.three-block-popup-content a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border-radius: 14px;
    background: var(--three-primary-color, #2563eb);
    color: #fff;
    text-decoration: none;
    font-weight: 950;
}

.three-block-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    color: #0f172a;
    font-size: 26px;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(15,23,42,.18);
}

.three-block-popup.shape-square .three-block-popup-card {
    border-radius: 8px !important;
}

.three-block-popup.shape-rounded .three-block-popup-card {
    border-radius: 28px !important;
}

.three-block-popup.shape-oval .three-block-popup-card {
    border-radius: 44px !important;
}

@media(max-width: 1200px) {
    .three-block-products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media(max-width: 820px) {
    .three-block-products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media(max-width: 560px) {
    .three-block-products {
        grid-template-columns: 1fr;
    }

    .three-block-section.is-carousel .three-product-card {
        flex-basis: 82%;
    }
}
.three-block-head:has(h2:empty):not(:has(span:not(:empty))) {
    display: none;
}

/* three_block_empty_heading_hide */

/* 3E Blok Yönetimi - gerçek carousel + premium ürün kartı */
.three-block-section {
    position: relative !important;
}

.three-block-section .three-shell {
    position: relative !important;
}

.three-block-section.is-carousel .three-block-products {
    display: flex !important;
    gap: 22px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    scroll-behavior: smooth !important;
    padding: 6px 6px 20px !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.three-block-section.is-carousel .three-block-products::-webkit-scrollbar {
    display: none !important;
}

.three-block-section.is-carousel .three-product-card {
    flex: 0 0 285px !important;
    min-width: 285px !important;
    scroll-snap-align: start !important;
}

/* Blok ürün kartlarını premium hale getir */
.three-block-section .three-product-card {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 26px !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 16px 38px rgba(15, 23, 42, .065) !important;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease !important;
}

.three-block-section .three-product-card:hover {
    transform: translateY(-5px) !important;
    border-color: #bfdbfe !important;
    box-shadow: 0 26px 60px rgba(15, 23, 42, .13) !important;
}

.three-block-section .three-product-image {
    height: 225px !important;
    display: grid !important;
    place-items: center !important;
    background: linear-gradient(145deg, #f8fafc, #ffffff) !important;
    overflow: hidden !important;
}

.three-block-section .three-product-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: 90% !important;
    max-height: 200px !important;
    object-fit: contain !important;
    object-position: center !important;
    padding: 12px !important;
    transition: transform .24s ease !important;
}

.three-block-section .three-product-card:hover .three-product-image img {
    transform: scale(1.045) !important;
}

.three-block-section .three-product-info {
    padding: 15px !important;
    display: grid !important;
    gap: 9px !important;
}

.three-block-section .three-product-title,
.three-block-section .three-product-info a {
    color: #0f172a !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 950 !important;
    line-height: 1.35 !important;
}

.three-block-section .three-product-price,
.three-block-section .three-product-price strong {
    color: var(--three-primary-color, #2563eb) !important;
    font-size: 19px !important;
    font-weight: 950 !important;
}

/* Sepete ekle butonu modern hover */
.three-block-section .three-card-cart,
.three-block-section form[action*="/cart"] {
    margin-top: 6px !important;
}

.three-block-section .three-card-cart .three-btn,
.three-block-section form[action*="/cart"] button,
.three-block-section button[type="submit"] {
    width: 100% !important;
    min-height: 42px !important;
    border: 0 !important;
    border-radius: 15px !important;
    background: var(--three-add-to-cart-background, #0f172a) !important;
    color: var(--three-add-to-cart-text, #fff) !important;
    font-size: 13px !important;
    font-weight: 950 !important;
    cursor: pointer !important;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .14) !important;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease !important;
}

.three-block-section .three-card-cart .three-btn:hover,
.three-block-section form[action*="/cart"] button:hover,
.three-block-section button[type="submit"]:hover {
    transform: translateY(-2px) !important;
    background: var(--three-add-to-cart-hover-background, #2563eb) !important;
    box-shadow: 0 18px 38px rgba(37, 99, 235, .24) !important;
}

.three-block-section .three-card-cart .three-btn:active,
.three-block-section form[action*="/cart"] button:active,
.three-block-section button[type="submit"]:active {
    transform: translateY(0) scale(.99) !important;
}

/* Carousel okları */
.three-block-carousel-nav {
    position: absolute !important;
    top: 50% !important;
    z-index: 10 !important;
    width: 46px !important;
    height: 46px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, .96) !important;
    color: #0f172a !important;
    display: grid !important;
    place-items: center !important;
    font-size: 28px !important;
    font-weight: 950 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .16) !important;
    transform: translateY(-50%) !important;
    transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease !important;
}

.three-block-carousel-nav:hover {
    background: var(--three-primary-color, #2563eb) !important;
    color: #fff !important;
    transform: translateY(-50%) scale(1.04) !important;
    box-shadow: 0 22px 50px rgba(37, 99, 235, .28) !important;
}

.three-block-carousel-nav.prev {
    left: -18px !important;
}

.three-block-carousel-nav.next {
    right: -18px !important;
}

/* Noktalar */
.three-block-carousel-dots {
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 12px !important;
}

.three-block-carousel-dots button {
    width: 9px !important;
    height: 9px !important;
    border: 0 !important;
    border-radius: 999px !important;
    padding: 0 !important;
    background: #cbd5e1 !important;
    cursor: pointer !important;
    transition: width .18s ease, background .18s ease !important;
}

.three-block-carousel-dots button.active {
    width: 28px !important;
    background: var(--three-primary-color, #2563eb) !important;
}

/* Başlık alanı biraz toparlansın */
.three-block-head {
    margin-bottom: 20px !important;
}

.three-block-head h2 {
    color: #0f172a !important;
    font-size: clamp(28px, 2.2vw, 38px) !important;
    letter-spacing: -.045em !important;
}

@media (max-width: 900px) {
    .three-block-carousel-nav {
        width: 40px !important;
        height: 40px !important;
        border-radius: 14px !important;
    }

    .three-block-carousel-nav.prev {
        left: 4px !important;
    }

    .three-block-carousel-nav.next {
        right: 4px !important;
    }

    .three-block-section.is-carousel .three-product-card {
        flex-basis: 260px !important;
        min-width: 260px !important;
    }
}

@media (max-width: 560px) {
    .three-block-section.is-carousel .three-product-card {
        flex-basis: 82% !important;
        min-width: 82% !important;
    }
}

/* Blok Yönetimi - ürün vitrini sepet alanı hover ile açılır */
.three-block-section .three-product-card {
    overflow: hidden !important;
}

.three-block-section .three-card-cart,
.three-block-section .three-product-card form[action*="/cart"] {
    max-height: 0 !important;
    opacity: 0 !important;
    transform: translateY(12px) !important;
    overflow: hidden !important;
    pointer-events: none !important;
    margin-top: 0 !important;
    transition:
        max-height .28s ease,
        opacity .22s ease,
        transform .22s ease,
        margin-top .22s ease !important;
}

.three-block-section .three-product-card:hover .three-card-cart,
.three-block-section .three-product-card:focus-within .three-card-cart,
.three-block-section .three-product-card:hover form[action*="/cart"],
.three-block-section .three-product-card:focus-within form[action*="/cart"] {
    max-height: 72px !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    margin-top: 8px !important;
}

.three-block-section .three-card-cart .three-btn,
.three-block-section .three-product-card form[action*="/cart"] button,
.three-block-section .three-product-card button[type="submit"] {
    width: 100% !important;
    min-height: 42px !important;
    border: 0 !important;
    border-radius: 15px !important;
    background: var(--three-add-to-cart-background, #0f172a) !important;
    color: var(--three-add-to-cart-text, #fff) !important;
    font-size: 13px !important;
    font-weight: 950 !important;
    cursor: pointer !important;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .14) !important;
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        background .18s ease,
        color .18s ease !important;
}

.three-block-section .three-card-cart .three-btn:hover,
.three-block-section .three-product-card form[action*="/cart"] button:hover,
.three-block-section .three-product-card button[type="submit"]:hover {
    transform: translateY(-2px) !important;
    background: var(--three-add-to-cart-hover-background, #2563eb) !important;
    box-shadow: 0 18px 38px rgba(37, 99, 235, .24) !important;
}

/* Dokunmatik cihazlarda hover olmadığı için buton açık kalsın */
@media (hover: none) {
    .three-block-section .three-card-cart,
    .three-block-section .three-product-card form[action*="/cart"] {
        max-height: 72px !important;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
        margin-top: 8px !important;
    }
}

.three-image-tiles {
    padding: 30px 0;
}

.three-image-tile-track {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}

.three-image-tiles.is-carousel .three-image-tile-track {
    display: flex;
    overflow-x: auto;
    gap: 18px;
    padding-bottom: 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.three-image-tiles.is-carousel .three-image-tile-track::-webkit-scrollbar {
    display: none;
}

.three-image-tiles.is-carousel .three-image-tile {
    flex: 0 0 170px;
}

.three-image-tile {
    display: grid;
    gap: 10px;
    text-decoration: none;
    color: #0f172a;
    text-align: center;
    font-weight: 950;
}

.three-image-tile-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 28px;
    box-shadow: 0 16px 38px rgba(15,23,42,.07);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.three-image-tile:hover .three-image-tile-img {
    transform: translateY(-4px);
    border-color: #bfdbfe;
    box-shadow: 0 24px 55px rgba(15,23,42,.12);
}

.three-image-tile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.three-image-tile strong {
    font-size: 14px;
    line-height: 1.3;
}

.three-image-tiles.shape-square .three-image-tile-img {
    border-radius: 8px;
}

.three-image-tiles.shape-rounded .three-image-tile-img {
    border-radius: 28px;
}

.three-image-tiles.shape-oval .three-image-tile-img {
    border-radius: 999px;
}

@media(max-width:1100px) {
    .three-image-tile-track {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media(max-width:760px) {
    .three-image-tile-track {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }
}

@media(max-width:520px) {
    .three-image-tile-track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* === 3E CORE BLOCK UI CONTRACT === */
/* /admin/theme/blocks çıktıları aktif temanın /admin/theme/settings > Ana Sayfa / Blok Renkleri alanından beslenir. */

body.three-theme-runtime-active .three-block-section {
    background: var(--three-block-section-background, transparent) !important;
}

body.three-theme-runtime-active .three-block-head span {
    color: var(--three-block-badge-background, var(--three-primary-color)) !important;
}

body.three-theme-runtime-active .three-block-head h2 {
    color: var(--three-block-title, var(--three-text-color)) !important;
}

body.three-theme-runtime-active .three-block-head p,
body.three-theme-runtime-active .three-block-head small {
    color: var(--three-block-subtitle, var(--three-muted-color)) !important;
}

/* Ürün kartı */
body.three-theme-runtime-active .three-block-section .three-product-card {
    background: var(--three-block-card-background, var(--three-card-background)) !important;
    border-color: var(--three-block-border, var(--three-border-color)) !important;
    color: var(--three-block-card-text, var(--three-text-color)) !important;
}

body.three-theme-runtime-active .three-block-section .three-product-card:hover {
    border-color: var(--three-block-badge-background, var(--three-primary-color)) !important;
}

body.three-theme-runtime-active .three-block-section .three-product-image,
body.three-theme-runtime-active .three-block-section .three-product-image-wrap,
body.three-theme-runtime-active .three-block-section .three-product-media {
    background: var(--three-block-image-background, var(--three-surface-soft)) !important;
    border-color: var(--three-block-border, var(--three-border-color)) !important;
}

body.three-theme-runtime-active .three-block-section .three-product-title,
body.three-theme-runtime-active .three-block-section .three-product-info a,
body.three-theme-runtime-active .three-block-section .three-product-card h3,
body.three-theme-runtime-active .three-block-section .three-product-card h4 {
    color: var(--three-block-card-text, var(--three-text-color)) !important;
}

body.three-theme-runtime-active .three-block-section .three-product-card p,
body.three-theme-runtime-active .three-block-section .three-product-card small,
body.three-theme-runtime-active .three-block-section .three-product-card span:not(.badge):not(.three-product-price):not(.three-product-price *) {
    color: var(--three-block-card-muted, var(--three-muted-color)) !important;
}

body.three-theme-runtime-active .three-block-section .three-product-price,
body.three-theme-runtime-active .three-block-section .three-product-price strong,
body.three-theme-runtime-active .three-block-section .price,
body.three-theme-runtime-active .three-block-section .price strong {
    color: var(--three-warning-color, var(--three-primary-color)) !important;
}

/* Sepete ekle / incele butonları */
body.three-theme-runtime-active .three-block-section .three-card-cart .three-btn,
body.three-theme-runtime-active .three-block-section form[action*="/cart"] button,
body.three-theme-runtime-active .three-block-section button[type="submit"],
body.three-theme-runtime-active .three-block-section .three-product-card .three-btn {
    background: var(--three-block-button-background, var(--three-add-to-cart-background)) !important;
    color: var(--three-block-button-text, var(--three-add-to-cart-text)) !important;
    border-color: var(--three-block-button-background, var(--three-add-to-cart-border)) !important;
}

/* Carousel ok/nokta */
body.three-theme-runtime-active .three-block-carousel-nav {
    background: var(--three-block-arrow-background, var(--three-card-background)) !important;
    color: var(--three-block-arrow-text, var(--three-text-color)) !important;
    border-color: var(--three-block-border, var(--three-border-color)) !important;
}

body.three-theme-runtime-active .three-block-carousel-nav:hover {
    background: var(--three-block-badge-background, var(--three-primary-color)) !important;
    color: var(--three-block-badge-text, #ffffff) !important;
    border-color: var(--three-block-badge-background, var(--three-primary-color)) !important;
}

body.three-theme-runtime-active .three-block-carousel-dots button {
    background: var(--three-block-dot, var(--three-border-color)) !important;
}

body.three-theme-runtime-active .three-block-carousel-dots button.active {
    background: var(--three-block-dot-active, var(--three-primary-color)) !important;
}

/* Görsel blok / image tiles */
body.three-theme-runtime-active .three-image-tile {
    color: var(--three-block-card-text, var(--three-text-color)) !important;
}

body.three-theme-runtime-active .three-image-tile-img {
    background: var(--three-block-image-background, var(--three-surface-soft)) !important;
    border-color: var(--three-block-border, var(--three-border-color)) !important;
}

body.three-theme-runtime-active .three-image-tile:hover .three-image-tile-img {
    border-color: var(--three-block-badge-background, var(--three-primary-color)) !important;
}

/* Popup blok */
body.three-theme-runtime-active .three-block-popup-card {
    background: var(--three-block-popup-background, var(--three-card-background)) !important;
    color: var(--three-block-popup-text, var(--three-text-color)) !important;
    border: 1px solid var(--three-block-border, var(--three-border-color)) !important;
}

body.three-theme-runtime-active .three-block-popup-card img {
    background: var(--three-block-image-background, var(--three-surface-soft)) !important;
}

body.three-theme-runtime-active .three-block-popup-content h3 {
    color: var(--three-block-popup-text, var(--three-text-color)) !important;
}

body.three-theme-runtime-active .three-block-popup-content p {
    color: var(--three-block-popup-muted, var(--three-muted-color)) !important;
}

body.three-theme-runtime-active .three-block-popup-content a {
    background: var(--three-block-button-background, var(--three-primary-color)) !important;
    color: var(--three-block-button-text, #ffffff) !important;
}

body.three-theme-runtime-active .three-block-popup-close {
    background: var(--three-block-arrow-background, var(--three-card-background)) !important;
    color: var(--three-block-arrow-text, var(--three-text-color)) !important;
    border: 1px solid var(--three-block-border, var(--three-border-color)) !important;
}
/* === /3E CORE BLOCK UI CONTRACT === */
