/* ==============================
   Products Page
============================== */
.products-page {
    display: grid;
    gap: 28px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.products-hero,
.product-tabs,
.product-card {
    border-radius: 32px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(56, 189, 248, 0.28);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32), 0 0 30px rgba(56, 189, 248, 0.14);
}

.products-hero {
    padding: 42px 34px;
    text-align: center;
}

.products-hero h1 {
    color: #eff6ff;
    font-size: clamp(2.3rem, 5vw, 4rem);
    margin-bottom: 14px;
    text-shadow: 0 0 18px rgba(56, 189, 248, 0.5);
}

.products-hero p {
    max-width: 680px;
    margin: 0 auto;
    color: #cbd5e1;
    font-size: 1.08rem;
    line-height: 1.8;
}

.product-tabs {
    padding: 26px;
    overflow: hidden;
    position: relative;
}

.product-tabs::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 110px;
    bottom: 28px;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(to bottom, rgba(56, 189, 248, 0), rgba(56, 189, 248, 0.36), rgba(56, 189, 248, 0));
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.28);
    pointer-events: none;
    z-index: 1;
}

.product-tabs input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.product-tab-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    position: relative;
    z-index: 3;
}

.product-tab-buttons label {
    padding: 12px 18px;
    border-radius: 16px 16px 6px 6px;
    color: #dbeafe;
    font-weight: 900;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-bottom-color: rgba(56, 189, 248, 0.16);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.product-tab-buttons label:hover {
    color: #ffffff;
    border-color: #38bdf8;
    transform: translateY(-2px);
    box-shadow: 0 0 22px rgba(56, 189, 248, 0.35);
}

#booksTab:checked ~ .product-tab-buttons label[for="booksTab"],
#softwareTab:checked ~ .product-tab-buttons label[for="softwareTab"],
#appsTab:checked ~ .product-tab-buttons label[for="appsTab"],
#gamesTab:checked ~ .product-tab-buttons label[for="gamesTab"],
#toolsTab:checked ~ .product-tab-buttons label[for="toolsTab"] {
    color: #031224;
    background: #38bdf8;
    border-color: #38bdf8;
    transform: translateY(4px);
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.45);
}

.product-book-note {
    color: #94a3b8;
    text-align: center;
    font-size: 0.95rem;
    margin: 16px auto 24px;
}

.product-tab-panels {
    position: relative;
    perspective: 1200px;
    z-index: 2;
}

.product-panel {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 20px;
    border-radius: 28px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015) 49%, rgba(0, 0, 0, 0.18) 50%, rgba(255, 255, 255, 0.025) 51%, rgba(255, 255, 255, 0.04)),
        rgba(2, 6, 23, 0.62);
    border: 1px solid rgba(56, 189, 248, 0.22);
    box-shadow: inset 0 0 28px rgba(56, 189, 248, 0.08), 0 18px 50px rgba(0, 0, 0, 0.24);
    transform-origin: left center;
}

#booksTab:checked ~ .product-tab-panels .books-panel,
#softwareTab:checked ~ .product-tab-panels .software-panel,
#appsTab:checked ~ .product-tab-panels .apps-panel,
#gamesTab:checked ~ .product-tab-panels .games-panel,
#toolsTab:checked ~ .product-tab-panels .tools-panel {
    display: grid;
    animation: productPageTurn 0.55s ease both;
}

.product-card {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    overflow: hidden;
    min-height: 260px;
}

.product-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%);
    pointer-events: none;
}

.featured-product {
    grid-column: span 1;
}

.product-tag {
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    color: #031224;
    background: #38bdf8;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.product-card h2 {
    color: #eff6ff;
    font-size: 1.55rem;
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.32);
    position: relative;
    z-index: 1;
}

.product-card p {
    color: #cbd5e1;
    line-height: 1.8;
    flex: 1;
    position: relative;
    z-index: 1;
}

.product-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
    position: relative;
    z-index: 1;
}

.product-actions a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 15px;
    border-radius: 999px;
    color: #dbeafe;
    text-decoration: none;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-actions a:hover {
    color: #ffffff;
    border-color: #38bdf8;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.35);
    transform: translateY(-2px);
}

@keyframes productPageTurn {
    from {
        opacity: 0;
        transform: rotateY(-28deg) translateX(-18px) scale(0.98);
        filter: blur(2px);
    }

    to {
        opacity: 1;
        transform: rotateY(0deg) translateX(0) scale(1);
        filter: blur(0);
    }
}

@media (max-width: 900px) {
    .product-panel {
        grid-template-columns: 1fr;
    }

    .product-tabs::before {
        display: none;
    }

    .featured-product {
        grid-column: auto;
    }
}

@media (max-width: 768px) {
    .products-hero,
    .product-tabs,
    .product-card {
        padding: 28px 20px;
    }

    .product-panel {
        padding: 14px;
    }

    .product-tab-buttons {
        gap: 10px;
    }

    .product-tab-buttons label {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
}
