/* =========================================
   BUXNESIA PRODUCT PAGE
========================================= */

.product-page {
    padding: 60px 0 90px;
    background: transparent;
}

/* BREADCRUMB */
.breadcrumb {
    margin-bottom: 16px;

    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
}

.breadcrumb a {
    color: #22d3ee;
}

.breadcrumb a:hover {
    color: #facc15;
}

/* =========================================
   FILTER OVERLAY
========================================= */

.filter-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;

    opacity: 0;
    pointer-events: none;

    background: rgba(3,7,18,.78);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    transition: opacity .25s ease;
}

.filter-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* FILTER BOX */
.filter-box {
    position: absolute;
    top: 90px;
    right: 24px;

    width: 430px;
    max-width: 92%;
    max-height: calc(100vh - 120px);

    display: flex;
    flex-direction: column;
    overflow: hidden;

    color: #e5e7eb;

    background: linear-gradient(180deg, rgba(15,23,42,.98), rgba(7,11,24,.98));
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 26px;

    box-shadow:
        0 28px 90px rgba(0,0,0,.55),
        inset 0 1px 0 rgba(255,255,255,.08);

    transform: translateY(12px) scale(.98);
    transition: .25s ease;
}

.filter-overlay.active .filter-box {
    transform: translateY(0) scale(1);
}

/* FILTER HEADER */
.filter-header {
    padding: 18px 20px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;

    border-bottom: 1px solid rgba(255,255,255,.10);
}

.filter-header h4 {
    color: #ffffff;
    font-size: 17px;
    font-weight: 950;
    letter-spacing: -.03em;
}

.filter-close {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 50%;

    color: #94a3b8;
    font-size: 22px;
    line-height: 1;

    cursor: pointer;
    transition: .25s ease;
}

.filter-close:hover {
    color: #ffffff;
    background: rgba(251,113,133,.16);
    border-color: rgba(251,113,133,.34);
    transform: rotate(90deg);
}

/* FILTER CONTENT */
.filter-content {
    padding: 20px;
    overflow-y: auto;
}

.filter-group {
    margin-bottom: 26px;
}

.filter-group h5 {
    margin-bottom: 14px;

    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
}

/* OPTION */
.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 12px;
    padding: 11px 12px;

    color: #cbd5e1;
    background: rgba(255,255,255,.045);

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;

    font-size: 14px;
    cursor: pointer;

    transition: .25s ease;
}

.filter-option:hover {
    background: rgba(34,211,238,.08);
    border-color: rgba(34,211,238,.22);
}

.filter-option input {
    accent-color: #22d3ee;
}

/* FILTER FOOTER */
.filter-footer {
    padding: 16px 20px;

    border-top: 1px solid rgba(255,255,255,.10);
    background: rgba(3,7,18,.18);
}

.filter-footer button {
    width: 100%;
    height: 46px;

    border: none;
    border-radius: 16px;

    color: #07111f;
    background: linear-gradient(135deg, #22d3ee, #facc15);

    font-weight: 950;
    cursor: pointer;

    transition: .25s ease;
}

.filter-footer button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(34,211,238,.18);
}

/* =========================================
   PRODUCT HEADER
========================================= */

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;

    margin-bottom: 20px;
}

.product-header h1 {
    color: #ffffff;
    font-size: clamp(28px, 3.3vw, 44px);
    font-weight: 950;
    letter-spacing: -.05em;
}

.product-header-actions {
    display: flex;
    gap: 10px;
}

.btn-filter,
.sort-select {
    height: 42px;
    padding: 0 16px;

    border-radius: 15px;

    color: #e5e7eb;
    background: rgba(255,255,255,.055);

    border: 1px solid rgba(255,255,255,.12);

    font-weight: 800;
    outline: none;
}

.btn-filter {
    cursor: pointer;
    transition: .25s ease;
}

.btn-filter:hover {
    color: #07111f;
    background: linear-gradient(135deg, #22d3ee, #facc15);
    border-color: transparent;
}

/* =========================================
   FILTER BAR
========================================= */

.filter-bar {
    display: flex;
    gap: 12px;

    margin-bottom: 18px;
    padding: 14px;

    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 22px;

    box-shadow: 0 18px 45px rgba(0,0,0,.20);
}

.filter-bar input,
.filter-bar select {
    height: 42px;
    padding: 0 14px;

    color: #ffffff;
    background: rgba(3,7,18,.22);

    border: 1px solid rgba(255,255,255,.10);
    border-radius: 14px;

    font-size: 14px;
    outline: none;
}

.filter-bar input::placeholder {
    color: #64748b;
}

/* INFO */
.product-info {
    margin-bottom: 18px;

    color: #94a3b8;
    font-size: 14px;
}

/* =========================================
   PRODUCT GRID
========================================= */

.product-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

/* CARD */
.product-card {
    overflow: hidden;

    background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.035));
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 24px;

    box-shadow: 0 20px 55px rgba(0,0,0,.24);

    transition: .28s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34,211,238,.28);
    box-shadow:
        0 28px 70px rgba(0,0,0,.34),
        0 0 28px rgba(34,211,238,.10);
}

/* THUMB */
.product-thumb {
    position: relative;
    overflow: hidden;
}

.product-thumb img {
    width: 100%;
    height: 160px;
    object-fit: cover;

    transition: .35s ease;
}

.product-card:hover .product-thumb img {
    transform: scale(1.04);
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;

    padding: 5px 10px;

    border-radius: 999px;

    color: #07111f;
    background: linear-gradient(135deg, #22d3ee, #facc15);

    font-size: 11px;
    font-weight: 950;

    box-shadow: 0 12px 24px rgba(34,211,238,.16);
}

/* BODY */
.product-body {
    padding: 15px;
}

.product-body h3 {
    margin-bottom: 5px;

    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.35;
}

.product-meta {
    margin-bottom: 9px;

    color: #94a3b8;
    font-size: 12px;
}

.product-price {
    margin-bottom: 10px;

    color: #facc15;
    font-size: 17px;
    font-weight: 950;
}

.product-extra {
    display: flex;
    justify-content: space-between;
    gap: 10px;

    color: #94a3b8;
    font-size: 12px;
}

/* =========================================
   MOBILE FILTER
========================================= */

.mobile-filter {
    display: none;
    margin-bottom: 16px;
}

.mobile-search input {
    width: 100%;
    height: 44px;
    padding: 0 14px;

    color: #ffffff;
    background: rgba(255,255,255,.055);

    border: 1px solid rgba(255,255,255,.12);
    border-radius: 15px;

    font-size: 14px;
    outline: none;
}

.mobile-search input::placeholder {
    color: #64748b;
}

.mobile-filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.filter-scroll {
    flex: 1;

    display: flex;
    gap: 8px;

    overflow-x: auto;

    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-scroll::-webkit-scrollbar {
    display: none;
}

.filter-pill {
    height: 38px;
    padding: 0 14px;

    display: inline-flex;
    align-items: center;
    gap: 6px;

    white-space: nowrap;

    color: #cbd5e1;
    background: rgba(255,255,255,.055);

    border: 1px solid rgba(255,255,255,.10);
    border-radius: 999px;

    font-size: 13px;
    font-weight: 800;
}

.filter-actions {
    display: flex;
    gap: 6px;
}

.icon-btn {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #22d3ee;
    background: rgba(34,211,238,.08);

    border: 1px solid rgba(34,211,238,.22);
    border-radius: 13px;

    font-size: 14px;
    font-weight: 900;

    cursor: pointer;
}

/* =========================================
   MOBILE BOTTOM SHEET
========================================= */

@media (max-width: 768px) {
    .filter-box {
        top: auto;
        right: 0;
        left: 0;
        bottom: -100%;

        width: 100%;
        max-width: 100%;
        max-height: 85vh;

        border-radius: 26px 26px 0 0;

        transform: none;
        transition: bottom .3s ease;
    }

    .filter-overlay.active .filter-box {
        bottom: 0;
    }

    .filter-header {
        position: sticky;
        top: 0;
        z-index: 2;

        padding: 28px 20px 16px;

        background: rgba(15,23,42,.98);
    }

    .filter-header::before {
        content: "";
        position: absolute;
        top: 9px;
        left: 50%;

        width: 50px;
        height: 4px;

        border-radius: 999px;

        background: rgba(255,255,255,.22);

        transform: translateX(-50%);
    }

    .filter-content {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;

        padding: 16px 20px;
        max-height: 55vh;

        overflow-y: auto;
    }

    .filter-content label {
        display: flex;
        align-items: center;
        gap: 10px;

        width: 100%;
        margin: 0;
        padding: 13px 14px;

        color: #cbd5e1;
        background: rgba(255,255,255,.055);

        border: 1px solid rgba(255,255,255,.10);
        border-radius: 14px;

        font-size: 14px;
        line-height: 1.3;
        cursor: pointer;
    }

    .filter-content label input {
        flex-shrink: 0;
        accent-color: #22d3ee;
    }

    .filter-content label:has(input:checked) {
        color: #07111f;
        background: linear-gradient(135deg, #22d3ee, #facc15);
        border-color: transparent;
        font-weight: 900;
    }

    .filter-footer {
        position: sticky;
        bottom: 0;
        z-index: 2;

        padding: 14px 20px 18px;

        background: rgba(7,11,24,.98);
        border-top: 1px solid rgba(255,255,255,.10);
    }
}

/* =========================================
   RESPONSIVE GRID
========================================= */

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .filter-bar {
        display: none;
    }

    .mobile-filter {
        display: block;
    }

    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .product-page {
        padding: 42px 0 70px;
    }

    .product-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .product-header-actions {
        width: 100%;
    }

    .btn-filter,
    .sort-select {
        flex: 1;
        width: 100%;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .product-thumb img {
        height: 135px;
    }

    .product-body {
        padding: 12px;
    }

    .product-body h3 {
        font-size: 13px;
    }

    .product-price {
        font-size: 15px;
    }

    .product-extra {
        flex-direction: column;
        gap: 3px;
    }
}

/* FORCE OVERLAY FILTER MOBILE */
@media (max-width: 768px) {
    #overlayGame .filter-content,
    #overlayType .filter-content,
    #overlaySort .filter-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        padding: 16px 20px !important;
    }

    #overlayGame .filter-content label,
    #overlayType .filter-content label,
    #overlaySort .filter-content label {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        padding: 13px 14px !important;
        gap: 10px !important;

        color: #cbd5e1 !important;
        background: rgba(255,255,255,.055) !important;

        border: 1px solid rgba(255,255,255,.10) !important;
        border-radius: 14px !important;

        font-size: 14px !important;
        line-height: 1.3 !important;
        white-space: normal !important;
    }

    #overlayGame .filter-content label:has(input:checked),
    #overlayType .filter-content label:has(input:checked),
    #overlaySort .filter-content label:has(input:checked) {
        color: #07111f !important;
        background: linear-gradient(135deg, #22d3ee, #facc15) !important;
        border-color: transparent !important;
        font-weight: 900 !important;
    }
}