.product-display {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 8rem;
    align-items: top;
}

.product-desc {
    display: flex;
    flex-direction: column;
    width: fit-content;
    align-items: flex-start;
}

.product-desc ul {
    padding-left: 2.5rem;
    list-style-position: outside;
    margin-bottom: 2rem;
}

.product-desc h1 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.product-desc p {
    margin-bottom: 2rem;
}

.v-space {
    padding: 4rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    width: 100%;
    height: fit-content;
}


.main-display {
    grid-column: 1 / -1; 
    width: 100%;
    border-radius: 0.75rem;
    height: 100%;
    object-fit: cover;
}

.gallery-thumb {
    width: 100%;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.gallery-thumb:hover {
    opacity: 0.8;
}

.gallery-thumb.selected {
    opacity: 0.5; 
    pointer-events: none;
}

.stores {
    text-align: center;
    margin-top: 2rem;
    width: 100%;
}

.store-list {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.store-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    color: var(--light);
}

.store-logo img {
    width: 2rem;
}

.buy-text {
    color: var(--Dark-grey);
    margin-bottom: 1rem;
}

.store-link-icon {
    font-size: 0.9rem;
    color: var(--light-grey-b);
}

.half-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8rem;
}



/* 6-Item Responsive Grid */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  width: 100%;
}

/* Individual Card Styling */
.demo-card {
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Track & Pack Titles Above Controls */
.track-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.pack-name-player {
  color: var(--Dark-grey);
  font-size: 0.9rem;
}

/* Play Button + Waveform Row */
.player-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.card-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    border: none;
    background-color: var(--accent);
    color: var(--dark);
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
    padding: 1rem 1.2rem;
    min-width: 0;
    min-height: 0;
    align-self: auto;
    letter-spacing: 0;
}

/* Waveform Container & Bars */
.waveform-container {
  position: relative;
  flex-grow: 1;
  height: 60px;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  /* Removed display: flex, padding, and static span rules */
}

.waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  width: 100%;
  height: 100%;
}

.waveform span {
  flex: 1;
  background-color: #4a4a52; /* Unplayed waveform color */
  border-radius: 2px;
  transition: background-color 0.2s ease;
}

/* Progress Overlay for Active Track */
.demo-card.playing .waveform span {
  background-color: var(--accent); /* SoundCloud/Beatstars Accent Color */
}

/* Free Pack Modal */
/* Free Pack Modal Container */
.modal-overlay {
    display: none; /* Crucial: Keeps modal hidden on page load */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-card {
    background: var(--dark-alt);
    border: var(--border);
    border-radius: 0.75rem;
    max-width: 800px;
    width: 100%;
    padding: 5rem 8rem;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Modal Inner Elements */
.close-modal-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: transparent;
    border: none;
    color: currentColor;
    font-size: 1.4rem;
    cursor: pointer;
    opacity: 0.7;
}

.close-modal-btn:hover {
    opacity: 1;
}

#modal-pack-title {
    margin-bottom: 0.5rem;
    text-align: left;
}

.modal-subtitle {
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

#free-pack-form .field-group .form-input {
    width: 100%;
}

/* Checkbox Alignment & Styling */


.checkbox-label {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: normal;
    margin-bottom: 1rem;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.2rem;
    width: auto !important;
    cursor: pointer;
}

/* Captcha Disclaimer & Submit Button */
.captcha-disclaimer {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.captcha-disclaimer a {
    text-decoration: underline;
}

.gallery-thumbs {
    display: flex;
    gap: 1rem;
    width: max-content;
}

@media (max-width: 1024px) {
    .product-desc {
        min-width: 0;
        max-width: 100%;
    }

    .product-display {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .store-list {
        flex-wrap: wrap;
    }

    .demo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pack-name-player {
        font-size: 1.2rem;
    }

    .half-grid {
        gap: 4rem;
    }

    .product-desc h4 {
        margin-bottom: 1rem;
    }

    .captcha-disclaimer {
        font-size: 1rem;
    }

    .modal-card {
        padding: 4rem;
    }
}

@media (max-width: 768px) {
    .product-desc {
        min-width: 0;
        max-width: 100%;
        align-items: center;
    }

    .product-desc h2 {
        text-align: center;
        margin-bottom: 1rem;
    }

    .product-display {
        grid-template-columns: 1fr;
    }

    .store-list {
        flex-direction: column;
    }

    .demo-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .half-grid {
        grid-template-columns: 1fr;
    }

    .modal-card {
        padding: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}