/* Section boutique — page d'accueil (au-dessus des avis Etsy) */

.home-shop-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(28px, 4vw, 40px);
    background: transparent;
}

/* Halo dégradé derrière les cartes */
.home-shop-section::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 58%;
    width: min(110%, 720px);
    height: 55%;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        ellipse 70% 60% at 50% 50%,
        rgba(251, 0, 255, 0.08) 0%,
        rgba(93, 190, 255, 0.06) 40%,
        transparent 72%
    );
    pointer-events: none;
    z-index: 0;
}

.home-shop-section__header,
.home-shop-section__frame-wrap,
.home-shop-section__cta-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
}

.home-shop-section__header--pending,
.home-shop-section__cta-wrap--pending {
    opacity: 0;
    transform: translateY(20px);
}

.home-shop-section__header--visible,
.home-shop-section__cta-wrap--visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-shop-section__cta-wrap--visible {
    transition-delay: 0.35s;
}

.home-shop-section__heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.home-shop-section__title {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.15;
    margin: 0;
    background: var(--top-bar-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.home-shop-section__title-secondary {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: clamp(1rem, 2.2vw, 1.35rem);
    color: var(--color-lightpurple, #666a81);
    letter-spacing: 0.02em;
    margin: 0;
    max-width: 36em;
}

/* Cadre animé (contour dégradé) */
@keyframes home-shop-border-shift {
    0%, 100% {
        background-position: 0% 45%;
    }
    50% {
        background-position: 100% 55%;
    }
}

@keyframes home-shop-card-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

@keyframes home-shop-card-glow {
    0%, 100% {
        box-shadow:
            0 8px 22px rgba(44, 18, 59, 0.08),
            0 0 0 0 rgba(251, 0, 255, 0);
    }
    50% {
        box-shadow:
            0 14px 32px rgba(93, 190, 255, 0.14),
            0 6px 20px rgba(251, 0, 255, 0.1),
            0 0 0 1px rgba(93, 190, 255, 0.18);
    }
}

@keyframes home-shop-card-reveal {
    0% {
        opacity: 0;
        transform: translateY(36px) scale(0.92);
        filter: blur(10px);
    }
    65% {
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.home-shop-section__frame {
    --hs-br: 22px;
    --hs-ring: 3px;
    position: relative;
    isolation: isolate;
    border-radius: var(--hs-br);
    padding: clamp(20px, 3vw, 28px) clamp(14px, 2.5vw, 22px) clamp(22px, 3vw, 30px);
    background: transparent;
}

.home-shop-section__frame::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    padding: var(--hs-ring);
    background: var(--top-bar-gradient-75deg);
    background-size: 260% 260%;
    background-position: 0% 50%;
    animation: home-shop-border-shift 9s ease-in-out infinite;
    pointer-events: none;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
}

.home-shop-section__badge {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-darkpurple);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.625rem;
    box-shadow: 0 4px 14px rgba(20, 11, 27, 0.1);
}

.home-shop-section__grid-wrap {
    position: relative;
    z-index: 1;
}

.home-shop-section .shop-grid {
    gap: clamp(14px, 2vw, 20px);
}

/* Révélation au scroll — cartes */
.home-shop-section:not(.home-shop-section--visible) .shop-card-wrapper {
    opacity: 0;
    transform: translateY(36px) scale(0.92);
    filter: blur(10px);
}

.home-shop-section--visible .shop-card-wrapper {
    animation: home-shop-card-reveal 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-shop-section--visible .shop-card-wrapper:nth-child(1) {
    animation-delay: 0.08s;
}

.home-shop-section--visible .shop-card-wrapper:nth-child(2) {
    animation-delay: 0.18s;
}

.home-shop-section--visible .shop-card-wrapper:nth-child(3) {
    animation-delay: 0.28s;
}

.home-shop-section--visible .shop-card-wrapper:nth-child(4) {
    animation-delay: 0.38s;
}

/* Flottement continu après apparition */
.home-shop-section--visible .shop-card {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(76, 46, 139, 0.1);
    animation:
        home-shop-card-float 4s ease-in-out infinite,
        home-shop-card-glow 4s ease-in-out infinite;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-shop-section--visible .shop-card-wrapper:nth-child(1) .shop-card {
    animation-delay: 0.9s, 0.9s;
}

.home-shop-section--visible .shop-card-wrapper:nth-child(2) .shop-card {
    animation-delay: 1.35s, 1.35s;
}

.home-shop-section--visible .shop-card-wrapper:nth-child(3) .shop-card {
    animation-delay: 1.8s, 1.8s;
}

.home-shop-section--visible .shop-card-wrapper:nth-child(4) .shop-card {
    animation-delay: 2.25s, 2.25s;
}

.home-shop-section--visible .shop-card:hover {
    animation: none;
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 18px 40px rgba(251, 0, 255, 0.16),
        0 10px 28px rgba(93, 190, 255, 0.14);
}

/* CTA vers le shop */
.home-shop-section__cta {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: clamp(200px, 38vw, 280px);
    padding: clamp(14px, 2.2vw, 18px) clamp(32px, 6vw, 52px);
    border: none;
    border-radius: 16px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    background: var(--top-bar-gradient-75deg);
    background-size: 240% 240%;
    background-position: 0% 50%;
    box-shadow:
        0 8px 28px rgba(251, 0, 255, 0.22),
        0 4px 16px rgba(93, 190, 255, 0.18);
    animation: home-shop-cta-gradient 7s ease-in-out infinite;
    transition:
        transform 0.35s cubic-bezier(0.34, 1.25, 0.64, 1),
        box-shadow 0.35s ease,
        filter 0.3s ease;
    overflow: hidden;
}

@keyframes home-shop-cta-gradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.home-shop-section__cta::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        105deg,
        transparent 28%,
        rgba(255, 255, 255, 0.45) 50%,
        transparent 72%
    );
    transform: translateX(-130%);
    animation: home-shop-cta-shine 4.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes home-shop-cta-shine {
    0%, 20% {
        transform: translateX(-130%);
    }
    48%, 100% {
        transform: translateX(130%);
    }
}

.home-shop-section__cta-label {
    position: relative;
    z-index: 2;
}

.home-shop-section__cta:hover {
    transform: translateY(-4px) scale(1.04);
    filter: brightness(1.08);
    box-shadow:
        0 14px 36px rgba(251, 0, 255, 0.32),
        0 8px 24px rgba(93, 190, 255, 0.26);
}

@media (max-width: 1024px) {
    .home-shop-section .shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .home-shop-section .shop-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin: 0 auto;
    }

    .home-shop-section__badge {
        top: 10px;
        right: 10px;
        font-size: 0.5625rem;
        padding: 5px 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-shop-section__header--pending,
    .home-shop-section__cta-wrap--pending {
        opacity: 1;
        transform: none;
    }

    .home-shop-section__frame::before {
        animation: none;
    }

    .home-shop-section:not(.home-shop-section--visible) .shop-card-wrapper,
    .home-shop-section--visible .shop-card-wrapper {
        opacity: 1;
        transform: none;
        filter: none;
        animation: none;
    }

    .home-shop-section--visible .shop-card {
        animation: none;
    }

    .home-shop-section__cta,
    .home-shop-section__cta::before {
        animation: none;
    }

    .home-shop-section__cta:hover {
        transform: translateY(-2px);
    }
}
