/* =============================================================================
   MERCH PAGE STYLES
   ============================================================================= */

/* --- PAGE LAYOUT --- */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 80px;
    position: relative;
    z-index: 1;
}

.merch-section {
    text-align: center;
    padding: 60px 20px;
}

/* --- PAGE HEADER --- */
.page-header {
    margin-bottom: 60px;
}

.page-header h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    text-transform: uppercase;
    margin-bottom: 1rem;
    text-shadow: none;
    animation: none;
}

.merch-tagline {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ff9999;
    text-shadow: 0 0 5px var(--main-red);
    margin-top: -10px;
}

/* --- MERCH GRID --- */
.merch-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto 80px;
}

/* --- MERCH ITEM CARD --- */
.merch-item {
    background: #1e1e1e;
    border: 1px solid var(--main-red);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform var(--transition-speed) ease,
                box-shadow var(--transition-speed) ease;
}

.merch-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(255, 85, 85, 0.5);
}

/* --- CAROUSEL --- */
.merch-carousel {
    position: relative;
    width: 100%;
    max-width: 250px;
    height: 250px;
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d0d0d;
}

.merch-carousel img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 5px;
    position: absolute;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.merch-carousel img.active {
    opacity: 1;
    position: relative;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 85, 85, 0.9);
    color: var(--text-primary);
    border: 1px solid var(--text-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    user-select: none;
}

.carousel-arrow:hover {
    background: rgba(255, 119, 119, 1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-arrow.left {
    left: 10px;
}

.carousel-arrow.right {
    right: 10px;
}

/* --- MERCH ITEM DETAILS --- */
.merch-title {
    font-size: 1.5rem;
    margin: 10px 0;
    color: var(--text-primary);
}

.merch-price {
    font-size: 1.2rem;
    color: var(--main-red);
    font-weight: 700;
    margin-bottom: 10px;
}

.credit-tag {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    display: block;
}

.credit-tag a {
    color: var(--main-red);
    text-decoration: none;
    transition: color var(--transition-speed) ease,
                text-shadow var(--transition-speed) ease;
}

.credit-tag a:hover {
    color: var(--hover-red);
    text-shadow: 0 0 8px var(--main-red);
}

.merch-button {
    background: #333;
    color: var(--text-primary);
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: not-allowed;
    font-size: 1rem;
    font-weight: 700;
    opacity: 0.6;
    transition: all var(--transition-speed) ease;
}

.merch-button:not(:disabled) {
    background: var(--main-red);
    cursor: pointer;
    opacity: 1;
}

.merch-button:not(:disabled):hover {
    background: var(--hover-red);
    box-shadow: 0 0 15px var(--main-red);
}

/* --- CALL-TO-ACTION SECTION --- */
.merch-cta {
    margin-top: 80px;
    padding: 40px 20px;
    background: rgba(26, 26, 26, 0.5);
    border-radius: 10px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.merch-cta-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--main-red);
    text-shadow: 0 0 10px var(--main-red);
    margin-bottom: 15px;
}

.merch-cta-body {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ff9999;
    text-shadow: 0 0 5px var(--main-red);
    line-height: 1.6;
    margin-bottom: 30px;
}

.merch-cta-actions {
    margin-top: 30px;
}

.merch-submit-btn {
    display: inline-block;
    background: var(--main-red);
    color: var(--text-primary);
    border: 2px solid var(--hover-red);
    border-radius: 5px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    transition: transform var(--transition-speed) ease,
                box-shadow var(--transition-speed) ease,
                background-color var(--transition-speed) ease;
    animation: pulseGlow 2s infinite ease-in-out;
}

.merch-submit-btn:hover {
    background-color: var(--hover-red);
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--main-red),
                0 0 50px var(--main-red);
}

/* --- GLITCH EFFECT --- */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    overflow: hidden;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--main-red);
    animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #2AABEE, 2px 2px var(--main-red);
    animation: glitch-anim-2 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip: rect(42px, 9999px, 44px, 0); }
    5% { clip: rect(12px, 9999px, 60px, 0); }
    10% { clip: rect(40px, 9999px, 40px, 0); }
    15% { clip: rect(30px, 9999px, 50px, 0); }
    20% { clip: rect(50px, 9999px, 20px, 0); }
    25% { clip: rect(35px, 9999px, 55px, 0); }
    30% { clip: rect(45px, 9999px, 45px, 0); }
    35% { clip: rect(55px, 9999px, 35px, 0); }
    40% { clip: rect(45px, 9999px, 65px, 0); }
    45% { clip: rect(65px, 9999px, 45px, 0); }
    50% { clip: rect(25px, 9999px, 55px, 0); }
    55% { clip: rect(60px, 9999px, 30px, 0); }
    60% { clip: rect(30px, 9999px, 70px, 0); }
    65% { clip: rect(70px, 9999px, 50px, 0); }
    70% { clip: rect(50px, 9999px, 80px, 0); }
    75% { clip: rect(80px, 9999px, 60px, 0); }
    80% { clip: rect(60px, 9999px, 90px, 0); }
    85% { clip: rect(90px, 9999px, 70px, 0); }
    90% { clip: rect(70px, 9999px, 100px, 0); }
    95% { clip: rect(100px, 9999px, 80px, 0); }
    100% { clip: rect(80px, 9999px, 120px, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(85px, 9999px, 90px, 0); }
    5% { clip: rect(35px, 9999px, 95px, 0); }
    10% { clip: rect(90px, 9999px, 25px, 0); }
    15% { clip: rect(25px, 9999px, 65px, 0); }
    20% { clip: rect(65px, 9999px, 15px, 0); }
    25% { clip: rect(15px, 9999px, 75px, 0); }
    30% { clip: rect(75px, 9999px, 5px, 0); }
    35% { clip: rect(5px, 9999px, 85px, 0); }
    40% { clip: rect(85px, 9999px, 25px, 0); }
    45% { clip: rect(25px, 9999px, 95px, 0); }
    50% { clip: rect(95px, 9999px, 35px, 0); }
    55% { clip: rect(35px, 9999px, 105px, 0); }
    60% { clip: rect(105px, 9999px, 45px, 0); }
    65% { clip: rect(45px, 9999px, 115px, 0); }
    70% { clip: rect(115px, 9999px, 55px, 0); }
    75% { clip: rect(55px, 9999px, 125px, 0); }
    80% { clip: rect(125px, 9999px, 65px, 0); }
    85% { clip: rect(65px, 9999px, 135px, 0); }
    90% { clip: rect(135px, 9999px, 75px, 0); }
    95% { clip: rect(75px, 9999px, 145px, 0); }
    100% { clip: rect(145px, 9999px, 85px, 0); }
}

/* --- MOBILE NAVIGATION (HIDDEN ON DESKTOP) --- */
.buy-btn-mobile,
.hamburger {
    display: none;
}

.mobile-menu {
    display: none;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .merch-section {
        padding: 40px 10px;
    }

    .merch-container {
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 350px;
    }

    .merch-carousel {
        width: 100%;
        max-width: 100%;
        height: 280px;
    }

    .carousel-arrow {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    .merch-item {
        max-width: 100%;
    }

    .merch-cta {
        margin-top: 60px;
        padding: 30px 15px;
    }

    .merch-cta-title {
        font-size: 1.5rem;
    }

    .merch-cta-body {
        font-size: 1rem;
    }

    .merch-submit-btn {
        padding: 12px 30px;
        font-size: 1rem;
        width: 100%;
        max-width: 300px;
    }

    /* Mobile Navigation */
    .buy-btn-mobile,
    .hamburger {
        display: flex;
        align-items: center;
    }

    .buy-btn-mobile {
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 1100;
        background-color: var(--main-red);
        color: white;
        padding: 8px 15px;
        border-radius: 5px;
        text-decoration: none;
        font-family: 'Inter', sans-serif;
        font-weight: 700;
        font-size: 0.9rem;
        transition: background-color 0.3s ease;
    }

    .buy-btn-mobile:hover {
        background-color: var(--hover-red);
    }

    .hamburger {
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 22px;
        cursor: pointer;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1100;
        padding: 5px;
        background-color: rgba(13, 13, 13, 0.8);
        border: 1px solid var(--border-color);
        border-radius: 5px;
    }

    .hamburger div {
        width: 20px;
        height: 2px;
        background-color: #eee;
        margin: 0 auto;
        transition: all 0.3s ease;
    }

    .hamburger.active div:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active div:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active div:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -4px);
    }

    .mobile-menu {
        position: fixed;
        top: 60px;
        left: 15px;
        width: 180px;
        background-color: rgba(13, 13, 13, 0.9);
        backdrop-filter: blur(10px);
        border-radius: 8px;
        border: 1px solid var(--border-color);
        z-index: 1099;
        padding: 10px 0;
        max-height: 80vh;
        overflow-y: auto;
    }

    .mobile-menu a {
        display: block;
        color: var(--text-primary);
        padding: 12px 20px;
        text-decoration: none;
        font-weight: 700;
        transition: color 0.3s, background-color 0.3s;
    }

    .mobile-menu a:hover {
        color: var(--main-red);
        background-color: rgba(255, 255, 255, 0.05);
    }
}
