/* 
===================================================
NEXUS CODE: PREMIUM UI OVERRIDES (XILOGRAVURA BRUTAL)
===================================================
*/

/* --- 1. Elevated Buttons with Kinetic Press --- */
.btn-primary {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease, background-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
    transform: rotate(45deg);
    animation: shimmer 3s infinite linear;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        transform: translateX(-150%) rotate(45deg);
    }

    50%,
    100% {
        transform: translateX(150%) rotate(45deg);
    }
}

.btn-primary:hover {
    background-color: #a82400;
    /* Deep Red Burn */
    transform: translate(-3px, -3px);
    box-shadow: 12px 12px 0px var(--ink-black);
}

.btn-primary:active {
    transform: translate(6px, 6px);
    box-shadow: 2px 2px 0px var(--ink-black);
}

/* --- 2. Brutal Premium Product Cards --- */
.product-card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    z-index: 1;
}

.product-card:hover {
    transform: translate(-8px, -8px) scale(1.03);
    box-shadow: 18px 18px 0px var(--clay-red);
    z-index: 2;
    /* Pop over others */
}

.card-price {
    background: var(--sun-yellow);
    color: var(--ink-black);
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.5);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.5);
}

.product-card:hover .card-price {
    transform: rotate(-5deg) scale(1.15) translateY(-5px);
    background: var(--ink-black);
    color: var(--paper-bg);
    text-shadow: none;
}

/* --- 3. Bouncy Cart Panel (The Sackbag) --- */
.cart-panel {
    box-shadow: -15px 0px 0px var(--ink-black);
    transition: right 0.45s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    /* Bouncy enter */
}

.cart-overlay.show .cart-panel {
    right: 0;
}

/* --- 4. Micro-Interactions on inputs --- */
input:focus,
select:focus {
    outline: none;
    border-color: var(--clay-red) !important;
    box-shadow: 6px 6px 0px rgba(200, 45, 0, 0.2);
    transform: translate(-2px, -2px);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* --- 5. Hero Depth --- */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Adds a cinematic woodcut vignette */
    background: radial-gradient(circle, transparent 20%, rgba(15, 15, 15, 0.7) 120%);
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    z-index: 2;
    position: relative;
    text-shadow: 3px 3px 0px var(--ink-black);
}

/* --- 6. Nexus Security Pulse (Admin Radar) --- */
@keyframes security-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(200, 45, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(200, 45, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(200, 45, 0, 0);
    }
}

.checkout-details-pulse {
    animation: security-pulse 2s infinite;
}

/* --- 7. Responsive Side Menu Drawer --- */
.side-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.side-menu-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.side-menu-panel {
    background: var(--paper-bg);
    width: 80%;
    max-width: 350px;
    height: 100%;
    border-right: 6px solid var(--ink-black);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.side-menu-overlay.show .side-menu-panel {
    transform: translateX(0);
}

.side-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--ink-black);
    color: var(--sun-yellow);
    font-family: var(--font-display);
    font-size: 1.5rem;
    border-bottom: 4px solid var(--clay-red);
}

.side-menu-header .close-btn {
    background: transparent;
    color: var(--sun-yellow);
    border: none;
    font-size: 2rem;
    cursor: pointer;
}

.side-menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.side-menu-links li {
    padding: 20px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    border-bottom: 2px dashed var(--ink-black);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: background 0.2s;
    color: var(--ink-black);
}

.side-menu-links li:hover {
    background: var(--sun-yellow);
}

.side-menu-links li i {
    color: var(--clay-red);
    font-size: 1.5rem;
}

.side-menu-footer {
    padding: 20px;
    border-top: 4px solid var(--ink-black);
    background: #E8D8B9;
}

/* Responsive Header Tweaks */
@media (max-width: 768px) {
    .main-header {
        padding: 10px 10px;
    }

    .brand h1 {
        font-size: 1.2rem;
    }

    .category-nav-container {
        top: 60px;
        /* Adjust according to new header height */
    }
}

/* --- 8. Modal Backdrop Fixes --- */
.product-modal-backdrop,
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 15, 0.75);
    /* Darker brutalist backdrop */
    backdrop-filter: blur(8px) saturate(120%);
    z-index: 4000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-modal-backdrop.active,
.modal-backdrop.active {
    display: flex;
    opacity: 1;
}

/* Modais de Produto e VIP - Scale Up Bounce anim */
.product-modal-backdrop.active .woodcut-card,
.product-modal-backdrop.active .product-modal-content,
.modal-backdrop.active .modal-content {
    animation: scaleUpBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes scaleUpBounce {
    0% {
        transform: scale(0.8) translateY(40px);
        opacity: 0;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* --- 9. Hero Cinematic Transition --- */
.hero-zoom-darken {
    transform: scale(1.05);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(15, 15, 15, 1)) !important;
    transition: transform 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), background 1s ease;
}

.hero-content-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.btn-press-cinematic {
    transform: scale(0.95) !important;
    box-shadow: 0 0 15px var(--clay-red) !important;
    background-color: #a82400 !important;
    color: var(--sun-yellow) !important;
    transition: all 0.2s ease !important;
}

/* --- 10. Particles (Brasas) --- */
#particles-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.particle-ember {
    position: absolute;
    bottom: -10px;
    background: radial-gradient(circle, var(--sun-yellow) 0%, rgba(200, 45, 0, 0.8) 40%, transparent 80%);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    animation-name: floatEmber;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes floatEmber {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    50% {
        transform: translateY(-20vh) translateX(20px) scale(0.8);
        opacity: 0.6;
    }

    100% {
        transform: translateY(-50vh) translateX(-20px) scale(0.5);
        opacity: 0;
    }
}

/* --- 11. Xilogravura SVG Line (Divisor) --- */
.xilo-line-wrapper {
    width: 100%;
    height: 40px;
    background: var(--paper-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: -4px;
    /* Fix gap with hero border */
    position: relative;
    z-index: 5;
    border-bottom: 2px solid var(--ink-black);
}

.xilo-line {
    width: 100%;
    height: 100%;
    display: block;
}

.xilo-path {
    stroke-dashoffset: 1000;
    animation: drawXiloLine 10s linear infinite alternate;
}

@keyframes drawXiloLine {
    0% {
        stroke-dashoffset: 1000;
    }

    100% {
        stroke-dashoffset: 0;
    }
}