/* Cart overlay styles */
.cart-overlay {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 70vw;
    height: 70vh;
    background: #dbd6e7;
    border-radius: 20px;
    box-shadow: 0 0 80px 0 #dbd6e7, 0 8px 48px rgba(0,0,0,0.18);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-overlay-content {
    width: 90%;
    height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}
.cart-overlay-title {
    font-size: 2.2rem;
    color: #534367;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}
.cart-list {
    flex: 1;
    width: 100%;
    overflow-y: auto;
    margin-bottom: 2rem;
}
.cart-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    font-size: 70%;
    color: #534367;
}
.cart-list-item-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 1.2rem;
}
.cart-overlay-footer {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}
.cart-overlay-total {
    font-size: 1.2rem;
    color: #534367;
    font-weight: 700;
}
.buy-btn {
    background: #a9add2;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.7rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: background 0.2s;
    margin-left: auto;
}
.buy-btn:hover {
    background: #534367;
}
.close-cart-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #534367;
    cursor: pointer;
    z-index: 101;
}
/* Cart tab styles */
.cart-tab {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 32px;
    min-width: 120px;
    background: #534367;
    color: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.40);
    padding: 0.6rem 1.2rem;
    font-size: 1.1rem;
    font-weight: 500;
    z-index: 20;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}
/* Carousel price style */
.carousel-price {
    font-size: 1.15rem;
    color: #534367;
    font-weight: 700;
    margin-bottom: 1rem;
    margin-top: 1.2rem;
}
/* Layout containers */
.card-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
}

body {
    background: #534367;
    font-family: 'Segoe UI', Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

/* Card styles */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #dbd6e7;
    border-radius: 20px;
    box-shadow: 0 0 60px 0 #dbd6e7, 0 4px 32px rgba(0,0,0,0.12);
    padding: 3.5rem 2.5rem 2.5rem 2.5rem;
    max-width: 700px;
    min-width: 420px;
    min-height: 250px;
    width: auto;
    height: auto;
    text-align: center;
    box-sizing: border-box;
    animation: candle-glow 2.5s infinite linear;
    opacity: 1;
    transform: scale(1);
    transition:
        transform 0.6s cubic-bezier(.4,0,.2,1),
        opacity 0.4s cubic-bezier(.4,0,.2,1),
        box-shadow 0.4s cubic-bezier(.4,0,.2,1);
    will-change: transform, opacity;
    z-index: 1;
}
.card.expanded {
    transform: scale(1.08);
    opacity: 1;
    width: 70vw;
    height: 70vh;
    z-index: 10;
    box-shadow: 0 0 80px 0 #dbd6e7, 0 8px 48px rgba(0,0,0,0.18);
}

/* Card faces */
.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.card-front {
    z-index: 2;
}
.card-back {
    background: #dbd6e7;
    border-radius: 20px;
    box-shadow: 0 0 60px 0 #fff, 0 4px 32px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    z-index: 1;
}

/* Shop section */
.shop-title {
    font-size: 2.5rem;
    color: #a9add2;
    margin-bottom: 2.5rem;
    font-weight: 700;
    text-align: center;
}
.shop-grid {
    display: none;
/* Carousel styles */
.carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    max-width: 500px;
    height: 100%;
}
.carousel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 260px;
    height: 80%;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    text-align: center;
}
.carousel-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    margin-bottom: 1.2rem;
    border-radius: 12px;
    box-shadow: 0 0 16px #dbd6e7;
}
.carousel-desc {
    font-size: 1.2rem;
    color: #534367;
    margin-bottom: 1.2rem;
    font-weight: 500;
}
.carousel-desc-detail {
    display: block;
    font-size: 1rem;
    color: #a9add2;
    margin-top: 0.5rem;
}
.carousel-btn {
    background: #dbd6e7;
    border: none;
    color: #534367;
    font-size: 2rem;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: background 0.2s;
}
.carousel-btn:hover {
    background: #a9add2;
}
.add-cart-btn {
    background: #a9add2;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: background 0.2s;
}
.add-cart-btn:hover {
    background: #534367;
}
}
.shop-item {
    background: #fff;
    color: #534367;
    border-radius: 14px;
    padding: 1.5rem 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    font-weight: 500;
    font-size: 1.2rem;
    text-align: center;
    width: 100%;
    max-width: 220px;
}
.card-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    width: 100%;
}
.link {
    color: #a9add2;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.link:hover {
    color: #534367;
}
.dot {
    color: #a9add2;
    font-size: 1.3rem;
    line-height: 1;
}

/* Card face visibility logic */
.card.expanded .card-front {
    display: none;
}
.card.expanded .card-back {
    display: flex;
}
.card:not(.expanded) .card-front {
    display: flex;
}
.card:not(.expanded) .card-back {
    display: none;
}

.avatar {
    width: 130px;
    height: 130px;
    object-fit: contain;
    margin-bottom: 1rem;
}

@keyframes candle-glow {
    0% {
        box-shadow:
            0 0 60px 0 #fff,
            0 4px 32px rgba(0,0,0,0.12),
            0 0 80px 0 rgba(255,255,200,0.15);
    }
    20% {
        box-shadow:
            0 0 65px 0 #fff,
            0 4px 32px rgba(0,0,0,0.12),
            0 0 90px 0 rgba(255,255,200,0.22);
    }
    40% {
        box-shadow:
            0 0 55px 0 #fff,
            0 4px 32px rgba(0,0,0,0.12),
            0 0 70px 0 rgba(255,255,200,0.10);
    }
    60% {
        box-shadow:
            0 0 70px 0 #fff,
            0 4px 32px rgba(0,0,0,0.12),
            0 0 100px 0 rgba(255,255,200,0.25);
    }
    80% {
        box-shadow:
            0 0 60px 0 #fff,
            0 4px 32px rgba(0,0,0,0.12),
            0 0 80px 0 rgba(255,255,200,0.18);
    }
    100% {
        box-shadow:
            0 0 60px 0 #fff,
            0 4px 32px rgba(0,0,0,0.12),
            0 0 80px 0 rgba(255,255,200,0.15);
    }
}
