/* ===================================
   CARD STACK — Vanilla port of React Bits <Stack />
   Replaces the fan-slider section
   =================================== */

.stack-section {
    padding: 80px 0 60px;
    background: linear-gradient(180deg, #FFF8E7 0%, #F5EDE0 50%, #FFF8E7 100%);
    overflow: hidden;
    position: relative;
}

.stack-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Header */
.stack-header {
    text-align: center;
    margin-bottom: 50px;
}

.stack-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #4A7C59;
    background: rgba(74, 124, 89, 0.1);
    padding: 6px 20px;
    border-radius: 30px;
    margin-bottom: 16px;
}

.stack-title {
    font-family: 'Georgia', serif;
    font-size: 2.8rem;
    color: #3A2E1F;
    font-weight: 400;
    line-height: 1.2;
}

/* ===================================
   THE STACK CONTAINER
   =================================== */
.stack-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.stack-container {
    position: relative;
    width: 380px;
    height: 440px;
    perspective: 600px;
}

/* ===================================
   CARD WRAPPER (draggable layer)
   =================================== */
.stack-card-wrap {
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.stack-card-wrap:active {
    cursor: grabbing;
}

.stack-card-wrap.is-dragging {
    cursor: grabbing;
    z-index: 100 !important;
}

/* ===================================
   CARD INNER (the visual card)
   =================================== */
.stack-card {
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12),
        0 4px 15px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
    transform-origin: 90% 90%;
}

.stack-card:hover {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18),
        0 8px 25px rgba(0, 0, 0, 0.1);
}

/* ===================================
   CARD BACKGROUNDS
   =================================== */
.stack-card-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* ===================================
   CARD CONTENT
   =================================== */
.stack-card-content {
    position: relative;
    z-index: 1;
    padding: 36px 32px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Card number watermark */
.stack-card-number {
    position: absolute;
    bottom: 24px;
    right: 28px;
    font-size: 4rem;
    font-weight: 800;
    color: rgba(74, 124, 89, 0.08);
    font-family: 'Georgia', serif;
    line-height: 1;
    pointer-events: none;
}

/* ===================================
   CARD TYPE: TEXT
   =================================== */
.stack-card-icon {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
}

.stack-card-title {
    font-family: 'Georgia', serif;
    font-size: 2rem;
    color: #3A2E1F;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 16px;
}

.stack-card-text {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.stack-card-text::-webkit-scrollbar {
    display: none;
}

.stack-card-text p {
    font-size: 0.88rem;
    line-height: 1.7;
    color: #5A4A3A;
    margin-bottom: 12px;
}

/* ===================================
   CARD TYPE: HERO HEADLINE
   =================================== */
.stack-card-hero-text {
    justify-content: center;
    align-items: flex-start;
}

.stack-card-headline {
    font-family: 'Georgia', serif;
    font-size: 2.4rem;
    color: #3A2E1F;
    font-weight: 700;
    line-height: 1.2;
}

.stack-card-leaf {
    margin-top: 20px;
    animation: stackLeafFloat 3s ease-in-out infinite;
}

@keyframes stackLeafFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-8px) rotate(5deg);
    }
}

/* ===================================
   CARD TYPE: PRODUCT TAGS
   =================================== */
.stack-card-products {
    justify-content: center;
}

.stack-card-subtitle {
    font-size: 0.95rem;
    color: #5A4A3A;
    margin-bottom: 24px;
    line-height: 1.5;
}

.stack-product-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stack-product-eyebrow span {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #D4AF37;
}

.stack-product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stack-product-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #333;
    color: #E8DDD0;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

.stack-product-tag:hover {
    background: #4A7C59;
    transform: translateY(-2px);
}

.stack-shop-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 22px;
    border-radius: 30px;
    background: linear-gradient(135deg, #D4AF37, #B8962E);
    color: #1A1512;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.stack-shop-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.stack-bestseller-tag {
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
}

.stack-bestseller-tag i {
    color: #FFD700;
}

.stack-bestseller-ribbon {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #FF4444;
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    animation: stackRibbonPulse 2s ease-in-out infinite;
}

@keyframes stackRibbonPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* ===================================
   CARD TYPE: VIDEO
   =================================== */
.stack-card-video {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.stack-video-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 230, 211, 0.1);
    border: 1px solid rgba(245, 230, 211, 0.15);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(245, 230, 211, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.stack-play-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.stack-play-ring {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid rgba(245, 230, 211, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    position: relative;
}

.stack-play-ring::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid rgba(245, 230, 211, 0.08);
    animation: stackRingPulse 2.5s ease-in-out infinite;
}

@keyframes stackRingPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.15);
        opacity: 0;
    }
}

.stack-play-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4A7C59, #3D6B4D);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.stack-play-icon i {
    margin-left: 3px;
}

.stack-play-btn:hover .stack-play-ring {
    border-color: rgba(245, 230, 211, 0.5);
}

.stack-play-btn:hover .stack-play-icon {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(74, 124, 89, 0.4);
}

.stack-play-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(245, 230, 211, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* ===================================
   CARD TYPE: CONTACT
   =================================== */
.stack-card-contact {
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.stack-contact-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(74, 124, 89, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #4A7C59;
    margin-bottom: 4px;
}

.stack-contact-title {
    font-family: 'Georgia', serif;
    font-size: 1.8rem;
    color: #3A2E1F;
    font-weight: 700;
    line-height: 1.2;
}

.stack-contact-sub {
    font-size: 0.85rem;
    color: #5A4A3A;
    line-height: 1.6;
    max-width: 280px;
}

.stack-contact-socials {
    display: flex;
    gap: 14px;
    margin-top: 4px;
}

.stack-contact-socials a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(74, 124, 89, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4A7C59;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.stack-contact-socials a:hover {
    background: #4A7C59;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(74, 124, 89, 0.3);
}

.stack-contact-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.stack-contact-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #4A7C59;
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(74, 124, 89, 0.08);
    transition: all 0.3s ease;
}

.stack-contact-links a:hover {
    background: rgba(74, 124, 89, 0.18);
    transform: translateX(4px);
}

.stack-hint {
    text-align: center;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #999;
    font-weight: 500;
    margin-bottom: 8px;
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
    .stack-section {
        padding: 40px 0 30px;
    }

    .stack-header {
        margin-bottom: 24px;
    }

    .stack-title {
        font-size: 1.6rem;
    }

    .stack-container {
        width: 300px;
        height: 380px;
    }

    .stack-card-title {
        font-size: 1.3rem;
    }

    .stack-card-headline {
        font-size: 1.5rem;
    }

    .stack-card-text p {
        font-size: 0.78rem;
    }

    .stack-card-content {
        padding: 24px 20px;
    }

    .stack-card-number {
        font-size: 3rem;
    }

    .stack-product-tag {
        padding: 7px 12px;
        font-size: 0.75rem;
    }

    .stack-bestseller-ribbon {
        font-size: 0.5rem;
        padding: 2px 6px;
    }

    .stack-play-ring {
        width: 56px;
        height: 56px;
    }

    .stack-play-icon {
        width: 40px;
        height: 40px;
        font-size: 0.85rem;
    }

    .stack-contact-title {
        font-size: 1.4rem;
    }

    .stack-contact-sub {
        font-size: 0.78rem;
    }

    .stack-hint {
        display: block;
        margin-top: -10px;
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    .stack-container {
        width: 270px;
        height: 350px;
    }

    .stack-card-title {
        font-size: 1.15rem;
    }

    .stack-card-headline {
        font-size: 1.3rem;
    }

    .stack-card-content {
        padding: 20px 16px;
    }

    .stack-card-text p {
        font-size: 0.74rem;
    }
}

/* ===================================
   VIDEO MODAL (PC fullscreen player)
   =================================== */
.video-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.video-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.video-modal-box {
    position: relative;
    width: 90vw;
    max-width: 900px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.video-modal-overlay.is-open .video-modal-box {
    transform: scale(1) translateY(0);
}

.video-modal-player {
    width: 100%;
    display: block;
    background: #000;
}

.video-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .video-modal-box {
        width: 95vw;
        border-radius: 12px;
    }
}