
.products-page {
    padding: 60px 20px;
    background: linear-gradient(to bottom, #f8fbff, #ffffff);
}


/* TITLE */
.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    color: #1e293b;
    position: relative;
}

.section-title::after {
    content: "";
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #3392ff, #1e6bff);
    display: block;
    margin: 10px auto 0;
    border-radius: 10px;
}


/* TOP SECTION */
.products-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    margin: 50px 0;
}

/* TEXT */
.products-text {
    flex: 1;
    font-size: 18px;
    color: #475569;
    line-height: 1.9;
    max-width: 550px;
}

/* ADD HIGHLIGHT TEXT EFFECT */
.products-text p {
    background: linear-gradient(to right, #1e293b, #475569);

    /* Standard property */
    background-clip: text;

    /* Vendor prefix (for Chrome, Safari) */
    -webkit-background-clip: text;

    /* Make text transparent */
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* IMAGE */
.products-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.products-image img {
    max-width: 380px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease;
}

/* HOVER EFFECT */
.products-image img:hover {
    transform: scale(1.05) rotate(1deg);
}
/* LINE */
.products-line {
    margin: 40px 0;
    border: none;
    height: 1px;
    background: #e2e8f0;
}

/* CONTROLS */
.products-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    gap: 20px;
    flex-wrap: wrap;
}

/* SEARCH */
.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    padding: 10px 15px;
    border-radius: 25px;
    border: 1px solid #ccc;
    outline: none;
}

.search-box button {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #3392ff, #1e6bff);
    color: white;
    cursor: pointer;
}

/* FILTER */
.filter-box select {
    padding: 10px 15px;
    border-radius: 25px;
    border: 1px solid #ccc;
    cursor: pointer;
}



.product-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 20px;
    align-items: stretch;
}


.card {
    display: flex;
    flex-direction: column;
    position: relative;

    opacity: 1;
    transform: translateY(0);

    transition: transform 0.35s ease, box-shadow 0.35s ease, opacity 0.35s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}


/* hidden state */
.card.hidden {
    display: none !important;
}

/* show animation */
.card.show {
    display: flex;
    animation: fadeUp 0.4s ease;
}

/* entrance animation */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* RESPONSIVE */
@media (max-width: 768px) {
    .products-top {
        flex-direction: column;
        text-align: center;
    }

    .products-text {
        text-align: center;
    }

    .products-controls {
        flex-direction: column;
        align-items: center;
    }
    .search-box {
        width: 100%;
        flex-direction: column;
    }

    .search-box input {
        width: 100%;
    }

    .search-box button {
        width: 100%;
    }

    .filter-box select {
        width: 100%;
    }
}


/* ========================== not found popup =========================== */


/* Modal Background */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

/* Modal Box */
.modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    width: 90%;
    max-width: 350px;
    animation: popupFade 0.3s ease;
}

/* Title */
.modal-content h3 {
    margin-bottom: 10px;
    color: #1e293b;
}

/* Text */
.modal-content p {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
}

/* Button */
.modal-content button {
    padding: 10px 20px;
    border: none;
    background: linear-gradient(90deg, #3392ff, #1e6bff);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.modal-content button:hover {
    opacity: 0.9;
}

/* Animation */
@keyframes popupFade {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}






@media (max-width: 1024px) {
    .product-cards .card {
        flex: 0 0 calc(50% - 20px);
    }
}


@media (max-width: 992px) {
    .products-top {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .products-text {
        max-width: 100%;
    }

    .products-image img {
        max-width: 300px;
    }
    .product-cards .card {
        flex: 0 0 calc(50% - 20px);
    }
}

@media (max-width: 600px) {

    .product-cards {
        justify-content: center;
    }


    .product-cards .card {
        flex: 0 0 100%;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 28px;
    }

    .products-page {
        padding: 40px 15px;
    }

    .products-text {
        font-size: 16px;
    }
}


/* SMOOTH CARD ANIMATION */

/* Hidden state */



@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.input-error {
    animation: shake 0.3s;
    border: 2px solid red;
}

#searchInput {
    transition: all 0.3s ease;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 50px;
}

/* 🔥 Hover effect */
#searchInput:hover {
    border-color: #3392FF;
    box-shadow: 0 0 8px rgba(51, 146, 255, 0.3);
}


.category-badge {
    position: absolute;
    top: 10px;
    right: 10px;

    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;

    color: white;
    z-index: 2;
    text-transform: capitalize;
}

.card[data-category="android"] .category-badge {
    background: #3ddc84;
}

.card[data-category="windows"] .category-badge {
    background: #00a2ed;
}

.card[data-category="web"] .category-badge {
    background: #6366f1;
}

.card[data-category="chrome"] .category-badge {
    background: #f4b400;
}

/* ======================= New badge =================================== */

/* =========================
   NEW BADGE (TOP LEFT)
========================= */
.new-badge {
    position: absolute;
    top: 10px;
    left: 10px;

    background: linear-gradient(135deg, #ff4d4d, #ff1a75);
    color: white;

    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;

    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 0.5px;

    box-shadow: 0 4px 10px rgba(255, 0, 0, 0.25);
    animation: pulseNew 1.5s infinite;
}

/* 🔥 Pulse animation */
@keyframes pulseNew {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}







/* =========================================================
   PRODUCTS PAGE — PREMIUM DARK MODE
   Add this at the VERY BOTTOM of products.css
========================================================= */


/* =========================
   PRODUCTS PAGE BACKGROUND
========================= */

.dark-mode .products-page {
    background:
        radial-gradient(
            circle at 12% 12%,
            rgba(59, 130, 246, 0.08),
            transparent 35%
        ),
        radial-gradient(
            circle at 88% 85%,
            rgba(96, 165, 250, 0.05),
            transparent 35%
        ),
        #0f172a;

    color: #f8fafc;
}


/* =========================
   SECTION TITLE
========================= */

.dark-mode .products-page .section-title {
    color: #f8fafc;
}

.dark-mode .products-page .section-title::after {
    background: linear-gradient(
        90deg,
        #3392ff,
        #1e6bff
    );

    box-shadow:
        0 0 12px rgba(51, 146, 255, 0.25);
}


/* =========================
   TOP DESCRIPTION
========================= */

.dark-mode .products-page .products-text {
    color: #cbd5e1;
}

.dark-mode .products-page .products-text p {
    background: linear-gradient(
        90deg,
        #f8fafc,
        #cbd5e1
    );

    background-clip: text;
    -webkit-background-clip: text;

    color: transparent;
    -webkit-text-fill-color: transparent;
}


/* =========================
   PRODUCTS IMAGE
========================= */

.dark-mode .products-page .products-image img {
    filter:
        brightness(0.94)
        contrast(1.05);

    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.38);

    transition:
        transform 0.4s ease,
        filter 0.4s ease,
        box-shadow 0.4s ease;
}

.dark-mode .products-page .products-image img:hover {
    filter:
        brightness(1)
        contrast(1.08);

    box-shadow:
        0 25px 55px rgba(0, 0, 0, 0.48),
        0 0 30px rgba(59, 130, 246, 0.08);
}


/* =========================
   HORIZONTAL LINE
========================= */

.dark-mode .products-page .products-line {
    background: rgba(148, 163, 184, 0.14);
}


/* =========================
   SEARCH INPUT
========================= */

.dark-mode .products-page .search-box input,
.dark-mode .products-page #searchInput {
    background: #1e293b;
    color: #f8fafc;

    border: 1px solid rgba(148, 163, 184, 0.18);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.02),
        0 6px 18px rgba(0, 0, 0, 0.16);

    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        background 0.3s ease;
}


/* Placeholder */

.dark-mode .products-page #searchInput::placeholder {
    color: #64748b;
}


/* Search focus */

.dark-mode .products-page #searchInput:focus {
    background: #1e293b;

    border-color: #3392ff;

    box-shadow:
        0 0 0 3px rgba(51, 146, 255, 0.12),
        0 8px 22px rgba(0, 0, 0, 0.20);

    outline: none;
}


/* Search hover */

.dark-mode .products-page #searchInput:hover {
    border-color: rgba(51, 146, 255, 0.55);

    box-shadow:
        0 0 12px rgba(51, 146, 255, 0.12);
}


/* =========================
   SEARCH BUTTON
========================= */

.dark-mode .products-page .search-box button {
    background: linear-gradient(
        135deg,
        #3392ff,
        #1e6bff
    );

    color: #ffffff;

    box-shadow:
        0 7px 20px rgba(30, 107, 255, 0.18);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.dark-mode .products-page .search-box button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 11px 28px rgba(30, 107, 255, 0.30);
}


/* =========================
   CATEGORY FILTER
========================= */

.dark-mode .products-page .filter-box select {
    background: #1e293b;
    color: #f8fafc;

    border: 1px solid rgba(148, 163, 184, 0.18);

    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.16);

    outline: none;
}


/* Dropdown options */

.dark-mode .products-page .filter-box select option {
    background: #1e293b;
    color: #f8fafc;
}


/* =========================
   PRODUCT CARDS
========================= */

.dark-mode .products-page .card {
    background:
        linear-gradient(
            145deg,
            rgba(30, 41, 59, 0.97),
            rgba(15, 23, 42, 0.99)
        );

    border: 1px solid rgba(148, 163, 184, 0.12);

    color: #f8fafc;

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}


/* Card hover */

.dark-mode .products-page .card:hover {
    transform: translateY(-10px);

    border-color:
        rgba(96, 165, 250, 0.30);

    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.40),
        0 0 30px rgba(59, 130, 246, 0.08);
}


/* =========================
   PRODUCT CARD IMAGE
========================= */

.dark-mode .products-page .card img {
    filter:
        brightness(0.96)
        contrast(1.05);

    transition:
        transform 0.35s ease,
        filter 0.35s ease;
}

.dark-mode .products-page .card:hover img {
    filter:
        brightness(1)
        contrast(1.08);
}


/* =========================
   PRODUCT CARD TITLE
========================= */

.dark-mode .products-page .card h3 {
    color: #f8fafc;
}


/* =========================
   PRODUCT CARD DESCRIPTION
========================= */

.dark-mode .products-page .card p {
    color: #94a3b8;
}


/* =========================
   CATEGORY BADGES
   Keep their original colors
========================= */

.dark-mode .products-page .category-badge {
    color: #ffffff;
}


/* Android */
.dark-mode .products-page .card[data-category="android"] .category-badge {
    background: #3ddc84;
}

/* Windows */
.dark-mode .products-page .card[data-category="windows"] .category-badge {
    background: #00a2ed;
}

/* Web */
.dark-mode .products-page .card[data-category="web"] .category-badge {
    background: #6366f1;
}

/* Chrome */
.dark-mode .products-page .card[data-category="chrome"] .category-badge {
    background: #f4b400;
}


/* =========================
   NEW BADGE
   Keep original appearance
========================= */

.dark-mode .products-page .new-badge {
    background: linear-gradient(
        135deg,
        #ff4d4d,
        #ff1a75
    );

    color: #ffffff;

    box-shadow:
        0 4px 10px rgba(255, 0, 0, 0.25);
}


/* =========================
   VIEW BUTTON
   Keep existing blue style
========================= */

.dark-mode .products-page .card-btn {
    color: #ffffff;
}


/* =========================
   NO RESULTS MODAL
========================= */

.dark-mode .products-page ~ .modal {
    background: rgba(2, 6, 23, 0.78);
}


/* Modal box */

.dark-mode .modal-content {
    background:
        linear-gradient(
            145deg,
            rgba(30, 41, 59, 0.98),
            rgba(15, 23, 42, 0.99)
        );

    color: #f8fafc;

    border: 1px solid rgba(148, 163, 184, 0.14);

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.55),
        0 0 35px rgba(59, 130, 246, 0.06);
}


/* Modal heading */

.dark-mode .modal-content h3 {
    color: #f8fafc;
}


/* Modal description */

.dark-mode .modal-content p {
    color: #94a3b8;
}


/* Modal button */

.dark-mode .modal-content button {
    background: linear-gradient(
        90deg,
        #3392ff,
        #1e6bff
    );

    color: #ffffff;

    box-shadow:
        0 8px 22px rgba(30, 107, 255, 0.20);
}

.dark-mode .modal-content button:hover {
    opacity: 1;

    box-shadow:
        0 11px 28px rgba(30, 107, 255, 0.30);
}


/* =========================
   MOBILE DARK MODE
   Keep existing layout
========================= */

@media (max-width: 768px) {

    .dark-mode .products-page .products-text {
        color: #cbd5e1;
    }

    .dark-mode .products-page .products-controls {
        color: #f8fafc;
    }

}


/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 480px) {

    .dark-mode .products-page {
        background:
            radial-gradient(
                circle at 50% 10%,
                rgba(59, 130, 246, 0.07),
                transparent 40%
            ),
            #0f172a;
    }

}




/* =========================
   PRODUCT SEARCH CLEAR BUTTON
========================= */

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper input {
    padding-right: 42px;
}

#clearProductSearch {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);

    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    border: none;
    border-radius: 50%;

    background: transparent;
    color: #94a3b8;

    font-size: 12px;

    cursor: pointer;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

#clearProductSearch.active {
    opacity: 1;
    visibility: visible;
}

#clearProductSearch:hover {
    background: #f1f5f9;
    color: #475569;
}

#clearProductSearch:focus-visible {
    outline: 2px solid rgba(51, 146, 255, 0.3);
    outline-offset: 2px;
}


/* =========================
   DARK MODE
========================= */

.dark-mode #clearProductSearch {
    color: #64748b;
}

.dark-mode #clearProductSearch:hover {
    background: rgba(148, 163, 184, 0.1);
    color: #ffffff;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    .search-input-wrapper {
        width: 100%;
    }

    .search-input-wrapper input {
        width: 100%;
        padding-right: 42px;
    }

    #clearProductSearch {
        right: 10px;
    }

}