/**
 * BlockVerse Final Layout Fix
 * Última capa de corrección visual para que la tienda se vea limpia,
 * centrada y consistente con el logo/banner morado espacial.
 */

:root {
    --bv-purple: #a45eeb;
    --bv-purple-2: #7c4dff;
    --bv-blue: #5bdcff;
    --bv-dark: #070716;
    --bv-panel: rgba(18, 14, 48, .88);
    --bv-panel-2: rgba(27, 20, 70, .78);
    --bv-border: rgba(196, 151, 255, .18);
    --bv-border-strong: rgba(164, 94, 235, .42);
    --bv-text: #f8f4ff;
    --bv-muted: #c9c1ea;
    --border-radius: 22px;
    --transition: .25s ease;
}

html,
body {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    background: var(--bv-dark) !important;
    color: var(--bv-muted) !important;
}

body {
    background:
        radial-gradient(circle at 14% 0%, rgba(164,94,235,.18), transparent 33rem),
        radial-gradient(circle at 82% 12%, rgba(91,220,255,.10), transparent 30rem),
        linear-gradient(180deg, #060613 0%, #0b0920 40%, #070716 100%) !important;
}

body::before,
body::after {
    pointer-events: none !important;
}

/* Top navigation */
.header-top-row {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 66px !important;
    padding: 0 7vw !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    z-index: 5000 !important;
    background: rgba(8, 7, 24, .78) !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    box-shadow: 0 14px 42px rgba(0,0,0,.24) !important;
    backdrop-filter: blur(14px) !important;
}

.btn-header-new {
    min-height: 42px !important;
    padding: .72rem 1.25rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .55rem !important;
    border-radius: 999px !important;
    color: #fff !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    background: linear-gradient(135deg, var(--bv-purple), var(--bv-purple-2) 55%, #628cff) !important;
    border: 1px solid rgba(255,255,255,.16) !important;
    box-shadow: 0 12px 28px rgba(124,77,255,.25), inset 0 1px 0 rgba(255,255,255,.18) !important;
}

.btn-header-new:hover {
    transform: translateY(-2px) !important;
    filter: brightness(1.06) !important;
}

.cart-badge {
    min-width: 24px !important;
    height: 24px !important;
    padding: 0 .45rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,.18) !important;
    color: #fff !important;
    font-weight: 900 !important;
}

/* Header / hero */
.color-overlay {
    position: relative !important;
    z-index: 1 !important;
}

.header {
    height: 430px !important;
    min-height: 430px !important;
    opacity: 1 !important;
    background-size: cover !important;
    background-position: center center !important;
    border-bottom: 1px solid rgba(164,94,235,.22) !important;
    overflow: hidden !important;
}

.header::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    background:
        linear-gradient(180deg, rgba(5,4,16,.40) 0%, rgba(8,8,23,.34) 45%, #070716 100%),
        radial-gradient(circle at 50% 50%, rgba(164,94,235,.14), transparent 33rem) !important;
}

.header::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 2 !important;
    background: linear-gradient(90deg, rgba(7,7,22,.40), transparent 28%, transparent 72%, rgba(7,7,22,.42)) !important;
}

.logo-ds-flex {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 430px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 120 !important;
    pointer-events: none !important;
}

.logo-container,
.logo-container a,
.logo-container img {
    pointer-events: auto !important;
}

.logo-container {
    width: auto !important;
    height: auto !important;
    padding-top: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.logo {
    width: auto !important;
    height: 230px !important;
    max-width: min(78vw, 360px) !important;
    margin: 0 !important;
    display: block !important;
    object-fit: contain !important;
    opacity: 1 !important;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,.65)) drop-shadow(0 0 30px rgba(164,94,235,.34)) !important;
}

.animated-logo {
    animation: bvLogoFloat 3.2s ease-in-out infinite !important;
}

@keyframes bvLogoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.status-box-container,
.discord-box-container {
    display: none !important;
}

.mode-badge-container,
.prison-badge-container {
    position: absolute !important;
    top: 86px !important;
    left: 0 !important;
    right: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 180 !important;
    pointer-events: none !important;
}

.mode-badge,
.prison-badge {
    padding: .62rem 1.75rem !important;
    border-radius: 999px !important;
    color: #fff !important;
    font-size: .82rem !important;
    font-weight: 900 !important;
    letter-spacing: .16em !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
    background: linear-gradient(135deg, var(--bv-purple), #6f4cff 54%, var(--bv-blue)) !important;
    border: 1px solid rgba(255,255,255,.28) !important;
    box-shadow: 0 12px 30px rgba(164,94,235,.32), 0 0 28px rgba(91,220,255,.18) !important;
}

/* Main layout */
.container.top-container {
    width: min(1220px, calc(100% - 32px)) !important;
    max-width: 1220px !important;
    margin: -56px auto 42px !important;
    padding: 0 !important;
    position: relative !important;
    z-index: 200 !important;
}

.container.top-container > .row {
    display: grid !important;
    grid-template-columns: 280px minmax(0, 1fr) !important;
    gap: 28px !important;
    align-items: start !important;
    margin: 0 !important;
}

.container.top-container > .row > .col-lg-3,
.container.top-container > .row > .col-lg-9 {
    float: none !important;
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.container.top-container > .row > .col-lg-9 {
    min-width: 0 !important;
}

/* Panels */
.card,
.product-card,
.user-nav,
.username-box-new,
.store-home,
.hero-section,
.feature-card,
.stat-card,
.cta-section,
.mode-card,
.product-modal-content {
    background: linear-gradient(180deg, rgba(27,20,70,.88), rgba(11,9,32,.90)) !important;
    border: 1px solid var(--bv-border) !important;
    border-radius: 26px !important;
    box-shadow: 0 18px 46px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.07) !important;
    backdrop-filter: blur(8px) !important;
}

.card:hover,
.store-home:hover,
.stat-card:hover,
.user-nav:hover,
.username-box-new:hover,
.mode-card:hover,
.cta-section:hover {
    transform: none !important;
}

.card-header,
.header-theme {
    padding: 1.15rem 1.35rem !important;
    border-radius: 26px 26px 0 0 !important;
    background: linear-gradient(135deg, rgba(164,94,235,.24), rgba(91,220,255,.10)) !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    color: var(--bv-text) !important;
    font-weight: 900 !important;
}

.card-body {
    padding: 1.35rem !important;
}

.store-home {
    margin: 0 0 24px !important;
    padding: 42px 34px !important;
    text-align: center !important;
    overflow: hidden !important;
}

.store-welcome {
    color: var(--bv-blue) !important;
    font-size: .86rem !important;
    font-weight: 900 !important;
    letter-spacing: .14em !important;
    text-transform: uppercase !important;
    margin-bottom: .45rem !important;
}

.store-name,
.section-title,
.cta-title {
    color: var(--bv-text) !important;
    font-weight: 900 !important;
    letter-spacing: -.03em !important;
    text-shadow: 0 0 26px rgba(164,94,235,.25) !important;
}

.store-name {
    font-size: clamp(2rem, 4vw, 3.35rem) !important;
    line-height: 1.05 !important;
}

.section-title {
    margin: 30px 0 20px !important;
    text-align: center !important;
    font-size: clamp(1.65rem, 3vw, 2.45rem) !important;
}

/* Sidebar */
.col-lg-3 {
    position: relative !important;
    z-index: 3 !important;
}

@media (min-width: 992px) {
    .col-lg-3 {
        position: sticky !important;
        top: 86px !important;
    }
}

.username-box-new {
    padding: 1rem !important;
    margin-bottom: 18px !important;
    overflow: hidden !important;
}

.username-input-container {
    gap: .75rem !important;
}

.username-input,
.search-box,
.form-control {
    min-height: 48px !important;
    width: 100% !important;
    padding: .85rem 1rem !important;
    color: var(--bv-text) !important;
    background: rgba(5,5,18,.72) !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 16px !important;
    outline: none !important;
}

.username-input::placeholder,
.search-box::placeholder {
    color: rgba(248,244,255,.45) !important;
}

.btn-check-username,
.btn-theme,
.btn-add-cart,
.btn-hero-primary,
.btn-cta-primary {
    min-height: 46px !important;
    border-radius: 999px !important;
    font-weight: 900 !important;
    color: #fff !important;
    background: linear-gradient(135deg, var(--bv-purple), #6f4cff 55%, #628cff) !important;
    border: 1px solid rgba(255,255,255,.16) !important;
    box-shadow: 0 12px 26px rgba(124,77,255,.25) !important;
}

.user-nav {
    padding: .55rem !important;
    overflow: hidden !important;
}

.user-nav-link {
    display: flex !important;
    align-items: center !important;
    gap: .78rem !important;
    min-height: 48px !important;
    margin: .22rem 0 !important;
    padding: .8rem 1rem !important;
    border-radius: 16px !important;
    border: 1px solid transparent !important;
    color: var(--bv-muted) !important;
    font-size: .95rem !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
}

.user-nav-link::before {
    display: none !important;
}

.user-nav-link i {
    flex: 0 0 22px !important;
    width: 22px !important;
    color: var(--p-color, var(--bv-purple)) !important;
    text-align: center !important;
}

.user-nav-link:hover,
.user-nav-link.active {
    padding-left: 1rem !important;
    color: #fff !important;
    background: rgba(164,94,235,.16) !important;
    border-color: rgba(164,94,235,.34) !important;
}

.sidebar-section-title {
    padding: .85rem 1rem .4rem !important;
    color: rgba(248,244,255,.52) !important;
}

.category-count {
    margin-left: auto !important;
    border-radius: 999px !important;
    background: rgba(164,94,235,.20) !important;
    color: #eadbff !important;
}

/* Main cards/grids */
.stats-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
    margin: 0 0 26px !important;
}

.stat-card {
    min-height: 108px !important;
    padding: 1.25rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    overflow: hidden !important;
}

.stat-icon,
.mode-card-icon {
    flex: 0 0 auto !important;
    border-radius: 20px !important;
    background: linear-gradient(135deg, rgba(164,94,235,.92), rgba(91,220,255,.70)) !important;
    box-shadow: 0 14px 30px rgba(124,77,255,.25) !important;
}

.stat-value {
    color: #fff !important;
    font-weight: 900 !important;
}

.stat-label {
    color: var(--bv-muted) !important;
    font-weight: 700 !important;
}

.hero-buttons,
.cta-buttons,
.mode-actions,
.product-actions,
.product-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: .85rem !important;
}

.btn,
.btn-hero,
.btn-cta,
.mode-filter-btn,
.filter-btn {
    border-radius: 999px !important;
    white-space: normal !important;
}

.network-mode-grid,
.mode-cards-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 20px !important;
    margin: 24px 0 30px !important;
}

.mode-card {
    min-height: 0 !important;
    padding: 1.35rem !important;
    overflow: hidden !important;
}

.mode-card h3 {
    color: #fff !important;
    font-size: 1.35rem !important;
    line-height: 1.15 !important;
}

.mode-card p,
.mode-card li,
.store-home p,
.cta-subtitle {
    color: var(--bv-muted) !important;
}

.cta-section {
    margin-top: 36px !important;
    padding: 38px 30px !important;
    text-align: center !important;
    overflow: hidden !important;
}

.cta-title {
    font-size: clamp(1.7rem, 3.4vw, 2.7rem) !important;
    margin-bottom: .8rem !important;
}

/* Store / product grid */
.products-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)) !important;
    gap: 20px !important;
}

.product-card {
    overflow: hidden !important;
    transform: none !important;
}

.product-card:hover {
    transform: translateY(-4px) !important;
    border-color: var(--bv-border-strong) !important;
}

.product-image {
    min-height: 160px !important;
}

.product-content {
    padding: 1.15rem !important;
}

.product-title {
    color: #fff !important;
    font-size: 1.1rem !important;
    line-height: 1.25 !important;
}

.product-description {
    color: var(--bv-muted) !important;
}

.product-price {
    color: #fff !important;
    font-weight: 900 !important;
}

.products-carousel-container,
.products-carousel {
    min-height: 120px !important;
}

.loading {
    min-height: 120px !important;
}

/* Cart/modal safety */
.overlay:not(.active),
.cart-menu:not(.active) {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.cart-menu.active {
    display: block !important;
    visibility: visible !important;
}

.overlay.active {
    display: block !important;
    visibility: visible !important;
}

/* Footer */
.footer {
    margin-top: auto !important;
    background: rgba(6,5,18,.92) !important;
    border-top: 1px solid rgba(255,255,255,.08) !important;
}

.footer .container {
    width: min(1220px, calc(100% - 32px)) !important;
    max-width: 1220px !important;
    margin: 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Responsive */
@media (max-width: 1100px) {
    .container.top-container > .row {
        grid-template-columns: 255px minmax(0, 1fr) !important;
        gap: 22px !important;
    }
    .network-mode-grid,
    .mode-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 991px) {
    .header-top-row {
        padding: 0 18px !important;
    }
    .header {
        height: 360px !important;
        min-height: 360px !important;
    }
    .logo-ds-flex {
        height: 360px !important;
    }
    .logo {
        height: 170px !important;
        max-width: 72vw !important;
    }
    .mode-badge-container,
    .prison-badge-container {
        top: 82px !important;
    }
    .container.top-container {
        width: min(760px, calc(100% - 28px)) !important;
        margin-top: -40px !important;
    }
    .container.top-container > .row {
        grid-template-columns: 1fr !important;
        gap: 22px !important;
    }
    .container.top-container > .row > .col-lg-3,
    .container.top-container > .row > .col-lg-9 {
        max-width: 100% !important;
        width: 100% !important;
        display: block !important;
    }
    .stats-grid,
    .network-mode-grid,
    .mode-cards-grid {
        grid-template-columns: 1fr !important;
    }
    .user-nav {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: .4rem !important;
    }
    .sidebar-section-title,
    #sidebar-categories-container {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 640px) {
    .header-top-row {
        height: 60px !important;
        padding: 0 12px !important;
    }
    .btn-header-new {
        min-height: 38px !important;
        padding: .62rem .85rem !important;
        font-size: .82rem !important;
    }
    .header {
        height: 310px !important;
        min-height: 310px !important;
    }
    .logo-ds-flex {
        height: 310px !important;
    }
    .logo {
        height: 135px !important;
        max-width: 78vw !important;
    }
    .mode-badge-container,
    .prison-badge-container {
        top: 72px !important;
    }
    .mode-badge,
    .prison-badge {
        padding: .55rem 1.1rem !important;
        font-size: .68rem !important;
        letter-spacing: .12em !important;
    }
    .container.top-container {
        width: calc(100% - 22px) !important;
        margin-top: -32px !important;
    }
    .store-home {
        padding: 30px 18px !important;
    }
    .stat-card {
        min-height: 96px !important;
    }
    .user-nav {
        grid-template-columns: 1fr !important;
    }
    .cta-section {
        padding: 30px 18px !important;
    }
}

@media (max-width: 420px) {
    .btn-header-new span:not(.cart-badge) {
        display: none !important;
    }
    .btn-header-new {
        width: 44px !important;
        padding: 0 !important;
    }
    .cart-toggler {
        width: auto !important;
        padding: 0 .65rem !important;
    }
}
