/* ─── 404 Page ─────────────────────── */
.e404-page {
    font-family: 'DM Sans', sans-serif;
    background: var(--ivory);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    overflow: hidden;
    position: relative;
}

/* Background blobs */
.e404-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.e404-blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.06;
}

.e404-blob-1 {
    width: 420px;
    height: 420px;
    background: var(--primary);
    top: -120px;
    right: -100px;
}

.e404-blob-2 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    bottom: -80px;
    left: -60px;
}

.e404-blob-3 {
    width: 180px;
    height: 180px;
    background: var(--primary);
    bottom: 20%;
    right: 10%;
}

/* Floating product icons */
.e404-floaters {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.e404-float {
    position: absolute;
    font-size: 22px;
    opacity: 0.12;
    animation: e404FloatUp 6s ease-in-out infinite;
}

.e404-float:nth-child(1) {
    left: 5%;
    top: 15%;
    animation-delay: 0s;
    animation-duration: 7s;
}

.e404-float:nth-child(2) {
    left: 15%;
    top: 70%;
    animation-delay: 1s;
    animation-duration: 6s;
}

.e404-float:nth-child(3) {
    left: 80%;
    top: 20%;
    animation-delay: 2s;
    animation-duration: 8s;
}

.e404-float:nth-child(4) {
    left: 88%;
    top: 65%;
    animation-delay: 0.5s;
    animation-duration: 5s;
}

.e404-float:nth-child(5) {
    left: 45%;
    top: 5%;
    animation-delay: 3s;
    animation-duration: 7s;
}

.e404-float:nth-child(6) {
    left: 60%;
    top: 80%;
    animation-delay: 1.5s;
    animation-duration: 6s;
}

.e404-float:nth-child(7) {
    left: 25%;
    top: 40%;
    animation-delay: 4s;
    animation-duration: 9s;
}

.e404-float:nth-child(8) {
    left: 72%;
    top: 45%;
    animation-delay: 2.5s;
    animation-duration: 7s;
}

@keyframes e404FloatUp {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    33% {
        transform: translateY(-18px) rotate(8deg);
    }

    66% {
        transform: translateY(-8px) rotate(-5deg);
    }
}

/* Content */
.e404-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
    width: 100%;
}

/* Giant 404 number */
.e404-number-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 8px;
}

.e404-num {
    font-family: 'Syne', sans-serif;
    font-size: clamp(100px, 22vw, 180px);
    font-weight: 800;
    letter-spacing: -6px;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 3px #e5e7eb;
    user-select: none;
}

/* Animated cart */
.e404-cart-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    animation: e404CartBounce 2s ease-in-out infinite;
}

@keyframes e404CartBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

.e404-cart-svg {
    width: clamp(60px, 10vw, 90px);
    height: clamp(60px, 10vw, 90px);
    filter: drop-shadow(0 8px 24px rgba(6, 118, 208, 0.2));
}

.e404-cart-badge {
    background: var(--accent);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
    letter-spacing: 0.5px;
    animation: e404BadgePop 2s ease-in-out infinite;
}

@keyframes e404BadgePop {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

/* Orange blinking tag */
.e404-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 113, 0, 0.10);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 16px;
}

.e404-tag-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: e404Blink 1.4s ease-in-out infinite;
}

@keyframes e404Blink {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: 0.2
    }
}

/* Heading & sub */
.e404-headline {
    font-family: 'Syne', sans-serif;
    font-size: clamp(22px, 5vw, 32px);
    font-weight: 700;
    color: var(--eerie-black);
    margin: 0 0 12px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.e404-sub {
    font-size: 15px;
    color: var(--gray600);
    line-height: 1.7;
    margin: 0 auto 32px;
    max-width: 440px;
}

/* Search */
.e404-search {
    display: flex;
    align-items: center;
    background: var(--white);
    border: 2px solid var(--gray200);
    border-radius: 100px;
    padding: 6px 6px 6px 20px;
    gap: 8px;
    margin: 0 auto 32px;
    max-width: 420px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.e404-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--shadow-primary);
}

.e404-search-icon {
    color: var(--gray400);
    flex-shrink: 0;
    display: flex;
}

.e404-search input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--eerie-black);
    font-family: 'DM Sans', sans-serif;
    flex: 1;
    min-width: 0;
}

.e404-search input::placeholder {
    color: var(--gray400);
}

.e404-search-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 100px;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    font-family: 'DM Sans', sans-serif;
}

.e404-search-btn:hover {
    background: var(--hover-primary);
}

/* CTA buttons */
.e404-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.e404-btn-home {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 12px 28px;
    background: var(--primary);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    border-radius: 100px;
    text-decoration: none;
    box-shadow: 0 4px 16px var(--shadow-primary);
    transition: background 0.2s, transform 0.15s;
}

.e404-btn-home:hover {
    background: var(--hover-primary);
    transform: translateY(-1px);
    color: var(--white);
}

.e404-btn-shop {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 12px 28px;
    background: transparent;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    border-radius: 100px;
    text-decoration: none;
    border: 2px solid var(--accent);
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.e404-btn-shop:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-1px);
}

/* Category chips */
.e404-links-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray400);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.e404-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.e404-link-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    background: var(--white);
    border: 1.5px solid var(--gray200);
    border-radius: 100px;
    font-size: 13px;
    color: var(--gunmetal);
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, transform 0.15s;
}

.e404-link-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 480px) {
    .e404-page {
        padding: 30px 16px;
    }

    .e404-num {
        letter-spacing: -4px;
    }

    .e404-search {
        padding: 5px 5px 5px 16px;
    }

    .e404-btn-home,
    .e404-btn-shop {
        padding: 10px 20px;
        font-size: 13px;
    }
}
