/* ============================================
   GLOWNETICS HOMEPAGE - MOON BATHROOM EDITION
   MIT Alumni Grade • Est. 2025
   ============================================ */

/* === AMBIENT PARTICLES === */
.gsp-home {
    --gold: #E5C878;
    --gold-dark: #C9A962;
    --gold-glow: rgba(229, 200, 120, 0.4);
    --bg-dark: #0d0d0b;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    position: relative;
    padding: 15px 15px 30px;
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
}

/* Floating gold particles - contained */
.gsp-home::before,
.gsp-home::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.3;
    z-index: 0;
}

.gsp-home::before {
    top: 0;
    right: 0;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    animation: float-particle 20s ease-in-out infinite;
}

.gsp-home::after {
    bottom: 100px;
    left: 0;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    animation: float-particle 25s ease-in-out infinite reverse;
}

@keyframes float-particle {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, 10px) scale(1.05); }
    50% { transform: translate(-10px, 20px) scale(0.95); }
    75% { transform: translate(10px, -10px) scale(1.02); }
}

/* Tiny floating specks - DISABLED */
.gsp-home__particles {
    display: none;
}

/* === GLASS CATEGORY TABS === */
.gsp-home__tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
    position: relative;
    z-index: 10;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}

.gsp-home__tab {
    position: relative;
    padding: 14px 16px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: visible;
    text-align: center;
}

.gsp-home__tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.gsp-home__tab span {
    position: relative;
    z-index: 1;
}

.gsp-home__tab:hover {
    border-color: var(--gold-dark);
    color: #fff;
}

.gsp-home__tab--active {
    color: #000;
    border-color: var(--gold);
}

.gsp-home__tab--active::before {
    opacity: 1;
}

.gsp-home__tab--active:hover {
    color: #000;
}

/* Product count badge - positioned on outer edges */
.gsp-home__tab-count {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: #000;
    color: var(--gold);
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* Left column pills - badge on left */
.gsp-home__tab:nth-child(odd) .gsp-home__tab-count {
    left: -9px;
}

/* Right column pills - badge on right */
.gsp-home__tab:nth-child(even) .gsp-home__tab-count {
    right: -9px;
}

/* === THE STAGE === */
.gsp-home__stage {
    position: relative;
    max-width: 400px;
    margin: 0 auto 16px;
    perspective: 1000px;
}

/* Category label */
.gsp-home__category {
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gold);
    margin-bottom: 12px;
    opacity: 0.8;
}

/* Product card on stage */
.gsp-home__product {
    position: relative;
    background: linear-gradient(180deg, var(--glass) 0%, rgba(0,0,0,0.4) 100%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
    transform-style: preserve-3d;
    animation: stage-entrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes stage-entrance {
    0% { opacity: 0; transform: translateY(40px) rotateX(10deg); }
    100% { opacity: 1; transform: translateY(0) rotateX(0); }
}

.gsp-home__product--exit {
    animation: stage-exit 0.4s cubic-bezier(0.5, 0, 0.75, 0) forwards;
}

@keyframes stage-exit {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-30px) scale(0.95); }
}

/* Glow behind product */
.gsp-home__glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    filter: blur(40px);
    opacity: 0.5;
    z-index: -1;
    animation: glow-breathe 4s ease-in-out infinite;
}

@keyframes glow-breathe {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.1); }
}

/* Product image */
.gsp-home__image {
    position: relative;
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.gsp-home__image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
}

/* Rating badge - top right with pulse */
.gsp-home__rating {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    z-index: 10;
    box-shadow: 0 4px 20px var(--gold-glow);
    animation: rating-pulse 3s ease-in-out infinite;
}

@keyframes rating-pulse {
    0%, 100% { box-shadow: 0 4px 20px var(--gold-glow); }
    50% { box-shadow: 0 4px 30px var(--gold-glow), 0 0 50px var(--gold-glow); }
}

/* Price overlay - bottom left with shimmer */
.gsp-home__price {
    position: absolute;
    bottom: 16px;
    left: 16px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    border-radius: 30px;
    font-size: 18px;
    font-weight: 700;
    color: #000;
    z-index: 10;
    overflow: hidden;
    animation: price-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

@keyframes price-bounce {
    0% { opacity: 0; transform: scale(0.5) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Shimmer effect */
.gsp-home__price::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { left: -100%; }
    50%, 60% { left: 100%; }
}

/* Badge (Sale/New) */
.gsp-home__badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 12px;
    background: #ef4444;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    z-index: 10;
}

.gsp-home__badge--new {
    background: #22c55e;
}

/* Product info */
.gsp-home__info {
    padding: 16px 20px;
    text-align: center;
}

.gsp-home__title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
    line-height: 1.3;
    min-height: 46px;
}

/* Typing cursor effect */
.gsp-home__title--typing::after {
    content: '|';
    color: var(--gold);
    animation: blink 0.7s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* CTA Button */
.gsp-home__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: transparent;
    border: 2px solid var(--gold);
    border-radius: 50px;
    color: var(--gold);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.gsp-home__cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gold);
    transform: translateX(-101%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gsp-home__cta span,
.gsp-home__cta svg {
    position: relative;
    z-index: 1;
    transition: color 0.3s, transform 0.3s;
}

.gsp-home__cta svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.gsp-home__cta:hover {
    color: #000;
}

.gsp-home__cta:hover::before {
    transform: translateX(0);
}

.gsp-home__cta:hover svg {
    transform: translateX(4px);
}

/* Pagination dots */
.gsp-home__dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.gsp-home__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gsp-home__dot:hover {
    background: rgba(255, 255, 255, 0.4);
}

.gsp-home__dot--active {
    background: var(--gold);
    width: 24px;
    border-radius: 4px;
    box-shadow: 0 0 15px var(--gold-glow);
}

/* === THE ORBIT === */
.gsp-home__orbit {
    margin-top: 20px;
    padding-top: 16px;
    border: none;
    border-top: 1px solid var(--glass-border);
    position: relative;
    background: transparent;
    background-color: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
}

.gsp-home__orbit-label {
    text-align: center;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 12px;
    background: transparent;
}

.gsp-home__orbit-track {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    padding: 15px 20px;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    background: transparent;
    margin: -10px -10px;
    padding-left: 30px;
    padding-right: 30px;
}

.gsp-home__orbit-track::-webkit-scrollbar {
    display: none;
}

.gsp-home__orbit-item {
    flex-shrink: 0;
    width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gsp-home__orbit-item:hover {
    transform: scale(1.1);
}

.gsp-home__orbit-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 2px solid var(--glass-border);
    transition: all 0.3s ease;
    position: relative;
}

.gsp-home__orbit-item:hover .gsp-home__orbit-img {
    border-color: var(--gold);
    box-shadow: 0 0 15px var(--gold-glow);
}

.gsp-home__orbit-item--active .gsp-home__orbit-img {
    border-color: var(--gold);
    border-width: 2px;
    box-shadow: 0 0 20px var(--gold-glow);
}

/* Gold ring animation for active */
.gsp-home__orbit-item--active .gsp-home__orbit-img::before {
    content: '';
    position: absolute;
    inset: -5px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    opacity: 0.5;
    animation: ring-expand 2s ease-out infinite;
}

@keyframes ring-expand {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.3); opacity: 0; }
}

.gsp-home__orbit-name {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    line-height: 1.2;
    transition: color 0.3s;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gsp-home__orbit-item:hover .gsp-home__orbit-name,
.gsp-home__orbit-item--active .gsp-home__orbit-name {
    color: var(--gold);
}

/* === SCROLL INDICATOR - DISABLED === */
.gsp-home__scroll {
    display: none;
}

/* === RESPONSIVE === */
@media (min-width: 640px) {
    .gsp-home {
        padding: 20px 30px 40px;
    }
    
    .gsp-home__tabs {
        max-width: 420px;
        gap: 12px;
    }
    
    .gsp-home__tab {
        padding: 16px 20px;
        font-size: 13px;
    }
    
    .gsp-home__stage {
        max-width: 450px;
    }
    
    .gsp-home__title {
        font-size: 22px;
    }
    
    .gsp-home__orbit-item {
        width: 80px;
    }
    
    .gsp-home__orbit-img {
        width: 65px;
        height: 65px;
    }
    
    .gsp-home__orbit-name {
        font-size: 10px;
        max-width: 80px;
    }
    
    .gsp-home__orbit::before,
    .gsp-home__orbit::after {
        width: 60px;
    }
}

@media (min-width: 1024px) {
    .gsp-home__tabs {
        max-width: 500px;
    }
    
    .gsp-home__stage {
        max-width: 480px;
    }
    
    .gsp-home__product {
        border-radius: 28px;
    }
    
    .gsp-home__info {
        padding: 20px 24px;
    }
    
    .gsp-home__title {
        font-size: 24px;
    }
    
    .gsp-home__orbit-track {
        justify-content: center;
        gap: 20px;
    }
    
    .gsp-home__orbit-img {
        width: 75px;
        height: 75px;
    }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    .gsp-home::before,
    .gsp-home::after,
    .gsp-home__particle,
    .gsp-home__rating,
    .gsp-home__price::before,
    .gsp-home__glow,
    .gsp-home__scroll,
    .gsp-home__orbit-item--active .gsp-home__orbit-img::before {
        animation: none;
    }
    
    .gsp-home__product {
        animation: none;
        opacity: 1;
    }
}
