/* ===== CODES CAROUSEL ===== */
.codes-section {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px 60px;
    overflow: hidden;
}
.codes-section::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 32px;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(233, 30, 99, 0.1), transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(0, 112, 216, 0.1), transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(109, 40, 217, 0.06), transparent 60%);
    pointer-events: none;
    z-index: 0;
}
.codes-section > * {
    position: relative;
    z-index: 1;
}
/* Floating accent orb */
.codes-bg-accent {
    position: absolute;
    top: -60px;
    right: 10%;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(233,30,99,0.15), transparent 70%);
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
    animation: codesFloat 6s ease-in-out infinite alternate;
}
@keyframes codesFloat {
    0% { transform: translateY(0); opacity: 0.5; }
    100% { transform: translateY(20px); opacity: 0.8; }
}

.codes-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}
.codes-title {
    font-size: 28px;
    font-weight: 800;
}
.codes-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-top: 4px;
}
.codes-link {
    font-size: 14px;
    font-weight: 600;
    color: #e91e63;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.codes-link:hover { opacity: 0.8; }

/* Track */
.codes-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scrollbar-width: none;
    /* scroll-behavior controlled by JS */
    padding: 4px 0;
    cursor: grab;
}
.codes-track::-webkit-scrollbar { display: none; }
.codes-track.grabbing { cursor: grabbing; }

/* Cards inside track */
.codes-track > div {
    flex-shrink: 0;
    width: 260px;
}
.codes-track .product-card {
    height: 100%;
}

@media (max-width: 640px) {
    .codes-section { padding: 24px 16px 40px; }
    .codes-title { font-size: 22px; }
    .codes-track > div { width: 220px; }
}
