/* --- How to Buy Section --- */
.how-to-buy-section {
    position: relative;
    overflow: hidden;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--color-highlight-fun), var(--color-bg-light));
    color: var(--color-base-deep);
}

/* Subtle confetti animation in the background */
.how-to-buy-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(239, 55, 44, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(239, 55, 44, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(239, 55, 44, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 90% 10%, rgba(239, 55, 44, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 20% 90%, rgba(239, 55, 44, 0.1) 0%, transparent 50%);
    background-size: 300px 300px, 400px 400px, 350px 350px, 250px 250px, 450px 450px;
    background-repeat: repeat;
    animation: confetti-drift 30s linear infinite;
    z-index: -1;
    opacity: 0.5;
    pointer-events: none;
}

@keyframes confetti-drift {
    0% { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
    100% { background-position: 300% 300%, -400% -400%, 500% 500%, -200% 200%, 600% -600%; }
}

.how-to-buy-section .section-title {
    color: var(--color-base-deep); /* Ensure title color is consistent */
    text-shadow: 3px 3px 0 var(--color-accent-danger), -3px -3px 0 var(--color-highlight-fun);
}

.how-to-buy-section .section-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    text-align: center;
    margin-top: -2rem;
    margin-bottom: 3rem;
    color: var(--color-base-deep);
    opacity: 0.8;
}

.how-to-buy-steps {
    display: flex; /* Changed from grid to flex */
    flex-wrap: wrap;
    justify-content: center; /* Center steps horizontally */
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto 4rem auto;
}

.step-card {
    background-color: var(--color-bg-light);
    border-radius: 1.5rem; /* 2xl rounded corners */
    box-shadow: 0 8px 16px rgba(81, 27, 17, 0.1); /* Pastel shadow (#511b11 10% opacity) */
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: url('/white_glove_cursor.png'), auto;
    flex-basis: 280px; /* Minimum width for the card */
    flex-grow: 1; /* Allow cards to grow and fill available space */
    max-width: calc(25% - (3 * 2.5rem / 4)); /* Default for 4 cards per row on large desktop with gap */
}

.step-card:hover {
    transform: scale(1.03); /* Slight scale-up */
    box-shadow: 0 12px 24px rgba(81, 27, 17, 0.2), 0 0 15px var(--color-accent-danger); /* Shadow glow */
}

.step-number-bubble {
    width: 80px;
    height: 80px;
    background-color: var(--color-accent-danger);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    position: relative; /* For icon positioning */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.step-number-bubble span {
    position: absolute;
    bottom: 0px; /* Adjust position relative to bubble */
    right: -5px;
    font-size: 1rem;
    background: var(--color-base-deep);
    border-radius: 50%;
    padding: 0.2em 0.5em;
    line-height: 1;
    border: 2px solid white;
}

.step-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.3));
}

.step-card h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--color-base-deep); /* Bold, pastel #511b11 */
    margin-bottom: 1rem;
}

.step-card p {
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    color: var(--color-accent-surreal); /* Clean sans-serif #5860c3 */
    line-height: 1.6;
}

.step-card p a {
    color: var(--color-accent-danger);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.step-card p a:hover {
    color: var(--color-base-deep);
    text-decoration: underline;
}

.how-to-buy-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
}

.how-to-buy-cta-buttons .btn-primary {
    background-color: var(--color-accent-danger); /* Filled #ef372c */
    box-shadow: 0 0 0 rgba(239, 55, 44, 0); /* Initial shadow for pulse effect */
}

.how-to-buy-cta-buttons .btn-primary:hover {
    animation: pulse-glow 1s infinite alternate; /* Hover pulse glow */
    transform: translateY(-3px) scale(1.05); /* Added for consistency with hero */
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 10px rgba(239, 55, 44, 0.4);
    }
    100% {
        box-shadow: 0 0 25px rgba(239, 55, 44, 0.8);
    }
}

.how-to-buy-cta-buttons .btn-secondary {
    border-color: var(--color-accent-surreal); /* Outlined #5860c3 */
    color: var(--color-base-deep); /* Text color for outlined button */
    background-color: transparent;
    box-shadow: 0 0 0 rgba(88, 96, 195, 0); /* Initial shadow for glow */
}

.how-to-buy-cta-buttons .btn-secondary:hover {
    background-color: rgba(88, 96, 195, 0.1);
    box-shadow: 0 0 20px rgba(88, 96, 195, 0.6); /* Hover glow */
    transform: scale(1.05); /* Added for consistency with hero */
}

/* Reduced Motion for How to Buy Section */
@media (prefers-reduced-motion: reduce) {
    .how-to-buy-section::before {
        animation: none; /* Disable confetti background animation */
        background-image: none;
    }
    .step-card:hover {
        transform: none; /* Disable scale on hover */
        box-shadow: 0 8px 16px rgba(81, 27, 17, 0.1); /* Remove glow */
    }
    .how-to-buy-cta-buttons .btn-primary:hover {
        animation: none; /* Disable pulse glow */
        box-shadow: 0 0 10px rgba(239, 55, 44, 0.4); /* Keep a static glow */
    }
    .how-to-buy-cta-buttons .btn-secondary:hover {
        box-shadow: 0 0 10px rgba(88, 96, 195, 0.4); /* Keep a static glow */
    }
}

/* Responsive Adjustments */
@media (min-width: 1200px) {
    .step-card {
        max-width: calc(25% - (3 * 2.5rem / 4)); /* 4 steps per row */
    }
}
@media (min-width: 769px) and (max-width: 1199px) {
    .step-card {
        max-width: calc(50% - (1 * 2.5rem / 2)); /* 2 steps per row on tablet */
    }
}

@media (max-width: 768px) {
    .step-card {
        max-width: calc(100% - 2rem); /* 1 step per row on mobile (adjusting for parent padding) */
    }
    .how-to-buy-section {
        padding: 3rem 1rem;
    }
    .step-card {
        padding: 1.5rem;
    }
    .step-number-bubble {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    .step-icon {
        width: 40px;
        height: 40px;
    }
    .step-card h3 {
        font-size: clamp(1.2rem, 4vw, 1.8rem);
    }
}