/* =========================================
   Poharam Flip Product Cards v1.1.0
   WP 7.0 + Elementor 4.x kompatibilis
   ========================================= */

.poharam-flip-wrapper {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.poharam-flip-wrapper *,
.poharam-flip-wrapper *::before,
.poharam-flip-wrapper *::after {
    box-sizing: border-box;
}

.poharam-flip-wrapper .swiper {
    width: 100%;
    overflow: hidden;
    padding-bottom: 40px;
}

/* Fallback: ha a Swiper nem töltődik be, CSS scrollozható lesz */
.poharam-flip-wrapper .swiper.poharam-no-swiper-fallback {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}
.poharam-flip-wrapper .swiper.poharam-no-swiper-fallback .swiper-wrapper {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
}
.poharam-flip-wrapper .swiper.poharam-no-swiper-fallback .swiper-slide {
    flex: 0 0 auto;
    width: calc(25% - 18px);
    scroll-snap-align: start;
}
@media (max-width: 1023px) {
    .poharam-flip-wrapper .swiper.poharam-no-swiper-fallback .swiper-slide {
        width: calc(45% - 12px);
    }
}
@media (max-width: 767px) {
    .poharam-flip-wrapper .swiper.poharam-no-swiper-fallback .swiper-slide {
        width: 82%;
    }
}

.poharam-slide {
    height: auto;
    display: flex;
}

/* ============== KÁRTYA ============== */
.poharam-card {
    width: 100%;
    background: #FFFFFF;
    border-radius: 16px;
    padding: 16px 16px 20px 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.poharam-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
}

/* ============== FLIP KÉP RÉSZ ============== */
.poharam-flip-container {
    width: 100%;
    height: 280px;
    perspective: 1200px;
    margin-bottom: 18px;
    position: relative;
}

.poharam-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    border-radius: 8px;
    will-change: transform;
}

.poharam-flip-container:hover .poharam-flip-inner,
.poharam-flip-container.is-flipped .poharam-flip-inner {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
}

.poharam-flip-front,
.poharam-flip-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poharam-flip-front {
    background: #f5f5f5;
    z-index: 2;
}

.poharam-flip-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.poharam-flip-back {
    background: #1a1a1a;
    color: #FFFFFF;
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
    padding: 24px;
    text-align: center;
}

.poharam-back-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.poharam-back-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    color: #FFFFFF;
}

.poharam-back-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #e5e5e5;
}

/* ============== KÁRTYA TARTALOM ============== */
.poharam-card-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.poharam-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a;
}

.poharam-card-subtitle {
    font-size: 18px;
    font-weight: 700;
    color: #1f4ed8;
    line-height: 1.3;
}

.poharam-card-bottom {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.poharam-card-badge {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #888888;
}

.poharam-card-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #1f4ed8;
    text-decoration: none;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.poharam-card-arrow:hover {
    transform: translateX(3px);
}

.poharam-card-arrow svg {
    width: 20px;
    height: 20px;
}

/* ============== NAVIGÁCIÓ ============== */
.poharam-nav-btn {
    position: absolute;
    top: calc(50% - 30px);
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #FFFFFF;
    color: #1a1a1a;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    padding: 0;
}

.poharam-nav-btn:hover {
    transform: translateY(-50%) scale(1.07);
}

.poharam-nav-btn:disabled,
.poharam-nav-btn.swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.poharam-nav-prev { left: -10px; }
.poharam-nav-next { right: -10px; }

@media (min-width: 768px) {
    .poharam-nav-prev { left: -22px; }
    .poharam-nav-next { right: -22px; }
}

/* Pagination */
.poharam-flip-wrapper .swiper-pagination {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
}

.poharam-flip-wrapper .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #cccccc;
    opacity: 1;
    transition: width 0.25s ease, background 0.25s ease;
    border-radius: 4px;
    display: inline-block;
    margin: 0 4px;
    cursor: pointer;
}

.poharam-flip-wrapper .swiper-pagination-bullet-active {
    width: 24px;
    background: #1f4ed8;
}

/* ============== RESZPONZÍV ============== */
@media (max-width: 1024px) {
    .poharam-flip-container { height: 260px; }
}

@media (max-width: 767px) {
    .poharam-flip-container { height: 240px; }
    .poharam-card-title { font-size: 17px; }
    .poharam-card-subtitle { font-size: 17px; }
    .poharam-back-title { font-size: 18px; }
    .poharam-back-description { font-size: 13px; }
    .poharam-nav-btn { width: 38px; height: 38px; }
}

@media (hover: none) {
    .poharam-flip-container:hover .poharam-flip-inner {
        transform: none;
        -webkit-transform: none;
    }
    .poharam-flip-container.is-flipped .poharam-flip-inner {
        transform: rotateY(180deg);
        -webkit-transform: rotateY(180deg);
    }
}

/* Elementor 4.x Atomic Editor compatibility -
   biztosítjuk, hogy ne kapja meg az atomic container CSS reset stílusokat */
.elementor-widget-poharam_cards > .elementor-widget-container > .poharam-flip-wrapper {
    /* preventív védelem az Atomic CSS-től */
    isolation: isolate;
}
