/**
 * Expanding Collection — referans: sabit slayt genişliği, panel görsel genişler.
 */

/* Builder pb-el clip-path, kapak translateY(-64px) animasyonunu üstten keser (card_0 vb.) */
.pb-sp-expanding-collection .pb-ec-card-inner,
.pb-sp-expanding-collection .pb-ec-shell {
    clip-path: none !important;
}

/* FOUC önleme: referans demo — 600px kart, yan boşluk */
[data-pb-expanding="1"] .swiper-slide.pb-ec-card {
    width: min(var(--pb-ec-slide-max, 600px), calc(100% - var(--pb-ec-slide-gutter, 64px))) !important;
    max-width: min(var(--pb-ec-slide-max, 600px), calc(100% - var(--pb-ec-slide-gutter, 64px))) !important;
    flex: 0 0 min(var(--pb-ec-slide-max, 600px), calc(100% - var(--pb-ec-slide-gutter, 64px))) !important;
    box-sizing: border-box;
}

[data-pb-expanding="1"].pb-card-carousel,
[data-pb-expanding="1"] {
    --pb-cc-visible: 1 !important;
    --pb-cc-gap: 0;
}

.pb-sp-expanding-collection.pb-card-carousel,
.pb-card-carousel.pb-ss-expanding-collection {
    position: relative;
    padding-bottom: 52px;
    overflow: visible !important;
    --pb-cc-visible: 1 !important;
    --pb-cc-gap: 0;
}

.pb-sp-expanding-collection.pb-card-carousel,
.pb-sp-expanding-collection .pb-cc-swiper,
.pb-sp-expanding-collection-active.pb-cc-swiper,
.pb-sp-expanding-collection.swiper,
.pb-sp-expanding-collection.pb-swiper-root.swiper {
    overflow: visible !important;
    height: auto !important;
}

.pb-sp-expanding-collection .pb-cc-swiper,
.pb-sp-expanding-collection-active.pb-cc-swiper {
    /* Referans: kapak -64px yukarı animasyonu için üstte sabit rezerv (padding animasyonu YOK) */
    padding: calc(8px + var(--pb-ec-open-lift, 64px)) 0 0;
}

.pb-sp-expanding-collection .pb-cc-track.swiper-wrapper,
.pb-sp-expanding-collection-active .pb-cc-track.swiper-wrapper {
    align-items: flex-start;
    gap: 0 !important;
    overflow: visible !important;
    min-height: calc(var(--pb-ec-cover-fixed-h, var(--pb-ec-cover-max-h, 380px)) + var(--pb-ec-open-lift, 64px) + 72px);
}

.pb-ec-host-has-open.pb-sp-expanding-collection.pb-card-carousel {
    padding-bottom: 160px;
}

.pb-ec-host-has-open.pb-ec-mode-click-panel .swiper-slide.pb-ec-card.is-ec-expanded {
    overflow: visible !important;
}

.pb-ec-host-has-open.pb-ec-mode-click-panel .swiper-slide.pb-ec-card.is-ec-expanded .pb-ec-card-inner,
.pb-ec-host-has-open.pb-ec-mode-click-panel .swiper-slide.pb-ec-card.is-ec-expanded .pb-ec-shell {
    overflow: visible !important;
}

.pb-sp-expanding-collection .swiper-slide.pb-ec-card {
    flex: 0 0 auto !important;
    width: auto;
    height: auto;
    overflow: visible !important;
    transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Referans demo: dar kart (600px) + peek, tam genişlik değil */
.pb-ec-mode-click-panel .pb-sp-expanding-collection .swiper-slide.pb-ec-card,
.pb-ec-mode-click-panel.pb-sp-expanding-collection .swiper-slide.pb-ec-card {
    width: var(--pb-ec-slide-w, min(600px, calc(100% - 64px))) !important;
    max-width: min(600px, calc(100% - 64px)) !important;
    flex: 0 0 var(--pb-ec-slide-w, min(600px, calc(100% - 64px))) !important;
    box-sizing: border-box;
    transition: none;
}

.pb-ec-mode-click-panel .swiper-slide.pb-ec-card.is-ec-expanded {
    position: relative;
    z-index: 8;
}

.pb-ec-card.pb-cc-card {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
    overflow: visible;
}

.pb-ec-card-inner {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.pb-ec-shell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    overflow: visible;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.pb-ec-mode-click-panel .pb-ec-shell {
    position: relative;
    display: block;
    width: 100%;
    /* Referans: container slide içinde 16px içeride; panel scale(1) iken slide genişliğine taşar */
    max-width: calc(100% - (2 * var(--pb-ec-content-h-offset, 16px)));
    margin-inline: auto;
    transition: none;
}

.pb-ec-mode-click-panel .is-ec-expanded .pb-ec-shell,
.pb-ec-mode-click-panel .pb-ec-shell.pb-ec-opened {
    transform: none;
}

.pb-ec-mode-click-panel .pb-ec-shell {
    overflow: visible;
}

.pb-ec-mode-click-panel .pb-ec-card-inner,
.pb-ec-mode-click-panel .pb-ec-shell {
    overflow: visible !important;
}

.pb-ec-mode-on-center .is-ec-expanded .pb-ec-shell {
    width: var(--pb-ec-open-shell-w, 100%);
    margin-inline: auto;
}

.pb-ec-mode-click-panel .pb-ec-card:not(.swiper-slide-active) .pb-ec-toggle {
    pointer-events: none;
    opacity: 0.55;
}

.pb-ec-mode-click-panel .pb-ec-card.swiper-slide-active .pb-ec-cover,
.pb-ec-mode-click-panel .pb-ec-card.swiper-slide-active .pb-ec-toggle {
    cursor: pointer;
}

/* Kapak tıklaması .pb-ec-cover üzerinden — görsel/metin katmanları tıklamayı yutmasın */
.pb-ec-mode-click-panel .pb-ec-card.swiper-slide-active .pb-ec-cover-shade,
.pb-ec-mode-click-panel .pb-ec-card.swiper-slide-active .pb-ec-cover-content,
.pb-ec-mode-click-panel .pb-ec-card.swiper-slide-active .pb-ec-cover-img,
.pb-ec-mode-click-panel .pb-ec-card.swiper-slide-active .pb-ec-cover-placeholder {
    pointer-events: none;
}

.pb-ec-mode-click-panel .pb-ec-card.swiper-slide-active .pb-ec-toggle {
    pointer-events: auto;
}

.pb-ec-mode-click-panel .pb-ec-card.swiper-slide-active .pb-ec-cover {
    -webkit-tap-highlight-color: transparent;
}

.pb-ec-mode-click-panel .pb-ec-card:not(.swiper-slide-active) .pb-ec-cover {
    cursor: grab;
}

.pb-ec-mode-click-panel .pb-ec-card:not(.swiper-slide-active) .pb-ec-cover:active {
    cursor: grabbing;
}

.pb-ec-tray {
    display: none;
    pointer-events: none;
}

.pb-ec-mode-click-panel .pb-ec-tray {
    display: none !important;
}

.pb-ec-mode-click-panel .is-ec-expanded .pb-ec-card-inner {
    position: relative;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.pb-ec-mode-on-center .is-ec-expanded .pb-ec-tray {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: var(--pb-ec-tray-top, 9.5rem);
    z-index: 0;
    background: var(--pb-ec-panel-bg, #fff);
    border-radius: 18px;
    box-shadow: 0 20px 56px rgba(15, 23, 42, 0.16);
}

.pb-ec-cover {
    position: relative;
    width: 100%;
    aspect-ratio: var(--pb-ec-ratio, 4/5);
    max-height: var(--pb-ec-cover-max-h, 380px);
    overflow: hidden;
    background: linear-gradient(145deg, #1e293b, #334155);
    flex-shrink: 0;
    border-radius: 14px;
    box-shadow: 0 10px 36px rgba(15, 23, 42, 0.14);
    z-index: 2;
    margin-top: var(--pb-ec-cover-offset-y, 0px);
    transition:
        width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.35s ease,
        opacity 0.35s ease,
        filter 0.35s ease,
        margin-top 0.35s ease,
        height 0.35s ease,
        transform 0.3s ease;
}

/* Referans click_panel: kapak üstte, panel arkada — yalnızca transform animasyonu */
.pb-ec-mode-click-panel .pb-ec-cover {
    aspect-ratio: auto;
    height: var(--pb-ec-cover-fixed-h, auto);
    max-height: var(--pb-ec-cover-fixed-h, var(--pb-ec-cover-max-h, 380px));
    width: 100%;
    margin-inline: auto;
    border-radius: var(--pb-ec-content-radius, 8px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
    transition: none;
}

.pb-ec-mode-click-panel.pb-ec-initialized .pb-ec-cover {
    transition: transform 0.3s ease;
}

.pb-ec-mode-click-panel .pb-ec-shell.pb-ec-opened .pb-ec-cover {
    transform: translateY(var(--pb-ec-open-translate-y, -64px));
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.pb-ec-mode-click-panel .is-ec-expanded .pb-ec-cover,
.pb-ec-mode-click-panel .pb-ec-shell.pb-ec-opened .pb-ec-cover {
    width: 100%;
    margin-inline: auto;
}

.pb-ec-mode-on-center .is-ec-expanded .pb-ec-cover {
    height: var(--pb-ec-cover-fixed-h, auto);
    max-height: var(--pb-ec-cover-fixed-h, var(--pb-ec-cover-max-h, 380px));
}

.pb-ec-ref-layout .pb-cc-swiper {
    max-width: 100%;
}

/* card-carousel.css flex kurallarını devre dışı bırak */
.pb-sp-expanding-collection .pb-cc-card.pb-ec-card.swiper-slide {
    flex: 0 0 auto !important;
    scroll-snap-align: none;
    max-width: none;
}

.pb-ec-mode-click-panel .swiper-slide.pb-ec-card:not(.swiper-slide-active) .pb-ec-cover {
    opacity: 0.5;
    filter: saturate(0.88);
    transition: opacity 0.35s ease, filter 0.35s ease;
}

.pb-ec-mode-click-panel .swiper-slide.pb-ec-card.swiper-slide-active .pb-ec-cover {
    opacity: 1;
    filter: none;
}

.pb-ec-mode-click-panel.pb-ec-host-has-open .pb-ec-card.is-ec-expanded .pb-ec-cover {
    opacity: 1;
    filter: none;
}

.pb-ec-mode-on-center .pb-ec-card:not(.is-ec-expanded):not(.swiper-slide-active) .pb-ec-cover {
    opacity: 0.82;
    filter: saturate(0.88);
}

.is-ec-expanded .pb-ec-cover {
    opacity: 1;
    filter: none;
}

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

.pb-ec-mode-click-panel .pb-ec-cover-img {
    border-radius: 8px;
}

.pb-ec-cover-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(139, 92, 246, 0.45));
}

.pb-ec-cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.08) 55%, transparent 100%);
    pointer-events: none;
}

.pb-ec-cover-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 16px 52px 18px 18px;
    color: #fff;
}

.pb-ec-cover-title {
    margin: 0;
    font-size: clamp(15px, 2.2vw, 22px);
    font-weight: 700;
    line-height: 1.25;
}

.pb-ec-badge {
    display: inline-block;
    margin-bottom: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.pb-ec-toggle {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 3;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    font-size: 22px;
    line-height: 1;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.is-ec-expanded .pb-ec-toggle span {
    transform: rotate(45deg);
    display: inline-block;
}

.pb-ec-expand {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    width: 100%;
    margin-top: 0;
    padding-inline: 0;
    transition:
        grid-template-rows 0.55s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.35s ease,
        margin-top 0.45s ease,
        padding 0.35s ease,
        transform 0.3s ease;
}

/* Referans panel: kapak arkasında, scale ile gizli → açılınca translateY */
.pb-ec-mode-click-panel .pb-ec-expand {
    position: absolute;
    left: calc(-1 * var(--pb-ec-content-h-offset, 16px));
    right: calc(-1 * var(--pb-ec-content-h-offset, 16px));
    top: 0;
    z-index: 0;
    display: block;
    width: auto;
    margin: 0;
    padding-top: calc(var(--pb-ec-cover-fixed-h, var(--pb-ec-cover-height, 280px)) - var(--pb-ec-content-v-offset, 32px));
    padding-inline: var(--pb-ec-content-padding, 16px);
    padding-bottom: var(--pb-ec-content-padding, 16px);
    box-sizing: border-box;
    border-radius: var(--pb-ec-content-radius, 8px);
    background: var(--pb-ec-panel-bg, #fff);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
    grid-template-rows: none;
    opacity: 1;
    pointer-events: none;
    visibility: hidden;
    transform: scaleX(0.94) scaleY(0.35);
    transform-origin: center top;
    overflow: hidden;
    transition: none;
}

.pb-ec-mode-click-panel .pb-ec-shell.pb-ec-metrics-ready:not(.pb-ec-opened) .pb-ec-expand {
    visibility: visible;
    transform: scaleX(var(--pb-ec-scale-x)) scaleY(var(--pb-ec-scale-y));
}

.pb-ec-mode-click-panel.pb-ec-initialized .pb-ec-expand {
    transition: transform 0.3s ease;
}

.pb-ec-mode-click-panel .swiper-slide:not(.swiper-slide-active) .pb-ec-expand {
    opacity: 0;
    pointer-events: none;
}

/* Referans: kapak -64px yukarı; panel scale(1) + translateY(-64px + 32px) → kapakla arada açılır */
.pb-ec-mode-click-panel .pb-ec-shell.pb-ec-opened .pb-ec-expand {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    overflow: visible;
    transform: scale(1) translateY(calc(var(--pb-ec-open-translate-y, -64px) + var(--pb-ec-content-v-offset, 32px)));
}

.pb-ec-mode-click-panel .pb-ec-expand-inner {
    overflow: visible;
    max-height: none;
    min-height: 0;
}

.pb-ec-mode-click-panel .pb-ec-expand-body {
    text-align: center;
    font-size: 15px;
    line-height: 1.5;
    color: var(--pb-ec-panel-text, #334155);
}

.pb-ec-mode-click-panel .pb-ec-expand-footer {
    margin-top: 12px;
}

.pb-ec-mode-on-center .is-ec-expanded .pb-ec-expand {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: var(--pb-ec-panel-gap, 12px);
    padding-inline: var(--pb-ec-shell-padding, 14px);
    padding-bottom: var(--pb-ec-shell-padding, 14px);
}

.pb-ec-expand-inner {
    overflow: hidden;
    min-height: 0;
    color: var(--pb-ec-panel-text, #334155);
    font-size: 14px;
    line-height: 1.55;
}

.pb-ec-mode-on-center .is-ec-expanded .pb-ec-expand-inner {
    max-height: var(--pb-ec-expand-max-h, 140px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.pb-ec-expand-body {
    margin: 0;
    text-align: center;
}

.pb-ec-expand-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.pb-ec-expand-footer:empty {
    display: none;
}

.pb-ec-expand-footer .pb-ec-link:only-child {
    margin-inline: auto;
}

.pb-ec-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--pb-ec-panel-price, var(--color-primary, #1a365d));
    margin: 0;
}

.pb-ec-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    color: var(--pb-ec-panel-link-text, #fff);
    background: var(--pb-ec-panel-link-bg, var(--color-primary, #1a365d));
}

.pb-sp-expanding-collection .pb-cc-nav--swiper {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(var(--pb-ec-open-lift, 64px) + 8px + (var(--pb-ec-cover-fixed-h, var(--pb-ec-cover-max-h, 380px)) / 2) - 20px);
    bottom: auto;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 6px;
    margin: 0;
    pointer-events: none;
}

.pb-sp-expanding-collection .pb-cc-nav--swiper .pb-cc-arrow,
.pb-sp-expanding-collection .pb-cc-nav--swiper .swiper-button-prev,
.pb-sp-expanding-collection .pb-cc-nav--swiper .swiper-button-next {
    position: static !important;
    transform: none !important;
    margin: 0 !important;
    pointer-events: auto;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    background: #fff;
    color: var(--color-primary, #1a365d);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.pb-sp-expanding-collection .pb-cc-nav--swiper .swiper-button-prev::after,
.pb-sp-expanding-collection .pb-cc-nav--swiper .swiper-button-next::after {
    content: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .pb-sp-expanding-collection .swiper-slide.pb-ec-card,
    .pb-ec-expand,
    .pb-ec-cover,
    .pb-ec-shell,
    .pb-ec-tray {
        transition: none !important;
    }
}
