#playlist {
    min-height: 150vh;
    display: flex;
    align-items: flex-start;
    position: relative;
    z-index: 45;
    background-color: var(--primary-bg);
    background-image: var(--gradient-bg-dots);
    background-size: 24px 24px;
    background-attachment: fixed;
    padding: 100px 5% 0 5%;
    overflow: hidden;
}

#playlist::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--primary-bg) 0%, transparent 60%, var(--primary-bg) 100%);
    z-index: 15;
    /* Above grid, below text container */
    pointer-events: none;
}

.playlist-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 5%;
    position: relative;
    z-index: 20;
    pointer-events: none;
    /* Allow interaction with bg if needed, or re-enable on children */
}

.playlist-container>* {
    pointer-events: auto;
}

.playlist-left {
    flex: 1;
    position: sticky;
    top: 35vh;
    height: max-content;
    z-index: 20;
}

.playlist-heading {
    font-family: var(--font-heading);
    font-size: clamp(50px, 10vw, 130px);
    color: var(--text-dark);
    line-height: 0.9;
    letter-spacing: -3px;
    font-weight: 500;
    margin: 0;
    text-shadow: 2px 2px 10px var(--rgba-black-05);
}

.playlist-text {
    font-family: var(--font-paragraph-text);
    font-size: clamp(18px, 1.5vw, 22px);
    line-height: 1.6;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 30px;
}

.playlist-right {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    padding-left: 5%;
}

/* Scroll3D Grid Type 1 Styling */
.perspective-grid-wrapper {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 30vh;
    left: 0;
    --perspective: 1000px;
    perspective: var(--perspective);
    perspective-origin: center center;
    display: grid;
    place-items: center;
    z-index: 0;
    pointer-events: none;
}

.grid-wrap {
    height: 150%;
    width: 150%;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 2vw;
    transform-style: preserve-3d;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateY(25deg);
}

.playlist-grid-item {
    aspect-ratio: 4/6;
    width: 75%;
    height: auto;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
    box-shadow: 0 15px 35px var(--rgba-black-20);
    will-change: transform;
    background: #000;
    display: grid;
    place-items: center;
}

.playlist-grid-item:hover {
    box-shadow: 0 20px 45px var(--rgba-black-20);
}

.playlist-grid-item-inner {
    position: relative;
    /* width: calc(1 / 0.5 * 100%);
    height: calc(1 / 0.5 * 100%); */
    transform-origin: center center;
}

.playlist-grid-item-inner img {
    border-radius: 12px;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.airpods-model-container {
    width: 100%;
    height: 53vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 10vh;
    z-index: 50;
}

#airpods-canvas-container {
    width: 100%;
    height: 100%;
}

.apple-music-cta {
    position: absolute;
    bottom: -5vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.explore-btn.playlist-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
}

.apple-music-icon-btn {
    width: 100%;
    object-fit: contain;
}
