/* ===============================
   New Products Page Styles
   =============================== */

/* --- Page Titles --- */

.new-page-header {
    text-align: center;
    margin: 30px auto;
    direction: rtl;
}

.new-page-header h1 {
    display: table;
    margin: 20px auto;
    padding-bottom: 7px;
    font-size: 24px;
    color: #222;
    border-bottom: 2px solid #e63946;
    cursor: default;
    animation: pop 0.5s ease forwards;
}

.new-page-header p {
    display: table;
    margin: 0 auto;
    font-size: 14px;
    font-weight: normal;
    color: #555;
    cursor: default;
    animation: pop 0.5s ease forwards;
}

/* --- Main Container --- */

.all-new-products {
    direction: rtl;
    width: 100%;
    box-sizing: border-box;
    margin: 20px auto;
    padding: 10px;
}

/* --- Grid Layout --- */

.all-new-products .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
    justify-items: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    margin: 20px;
}

/* --- Product Card --- */

.all-new-products .product-card-mini {
    position: relative;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 300px;
    max-width: 100%;
    animation: pop 0.5s ease forwards;
}

.all-new-products .product-card-mini:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
}

/* --- Animation --- */

@keyframes pop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- Image Container --- */

.all-new-products .container-img {
    position: relative;
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
}

.all-new-products .container-img img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    display: block;
}

/* --- New Badge --- */

.all-new-products .product-stock.in-stock {
    color: white;
    border: 1px solid #74c69d;
    padding: 4px 9px;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    background-color: #74c69d;
    box-shadow: 0 0 10px rgba(116, 198, 157, 0.7);
    position: absolute;
    top: 20px;
    left: 10px;
    font-size: 12px;
    z-index: 2;
}

/* --- Product Button --- */

.all-new-products .new-product-bottom {
    display: block;
    width: calc(100% - 20px);
    box-sizing: border-box;
    margin: 10px auto 0;
    padding: 8px 12px;
    background-color: #74c69d;
    color: white;
    border: 1px solid #74c69d;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    transition: 0.2s ease-in;
}

.all-new-products .new-product-bottom:hover {
    background-color: white;
    color: #74c69d;
}

/* --- Product Details --- */

.all-new-products .text {
    padding: 10px 15px 15px;
    text-align: center;
    direction: rtl;
}

.all-new-products .text h3 {
    font-size: 16px;
    margin: 10px 0;
    color: #111;
    text-align: center;
    min-height: 45px;
    line-height: 1.8;
}

.all-new-products .text p {
    font-size: 13px;
    color: #666;
    line-height: 1.8;
    text-align: center;
    height: 48px;
    overflow: hidden;
    margin: 8px 0;
}

/* --- Product Price --- */

.all-new-products .product-price {
    color: #e60023;
    font-weight: bold;
    font-size: 18px;
    display: inline-block;
    margin-top: 10px;
}

.all-new-products .text > span:last-child {
    color: #555;
    font-size: 13px;
    margin-right: 4px;
}

/* --- Empty Products --- */

.all-new-products .empty-message {
    margin: 50px;
    border-bottom: 2px solid red;
    font-size: 20px;
    text-align: center;
}

/* --- Tablet --- */

@media (max-width: 900px) {
    .all-new-products .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 15px;
        margin: 15px;
        padding: 15px;
    }

    .all-new-products .product-card-mini {
        width: 100%;
        max-width: 300px;
    }
}

/* --- Mobile --- */

@media (max-width: 600px) {

    .new-page-header h1 {
        font-size: 20px;
    }

    .new-page-header p {
        font-size: 12px;
    }

    .all-new-products {
        padding: 5px;
    }

    .all-new-products .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin: 10px;
        padding: 12px 8px;
    }

    .all-new-products .product-card-mini {
        width: 100%;
        height: 330px;
    }

    .all-new-products .container-img {
        padding: 8px;
    }

    .all-new-products .container-img img {
        height: 160px;
    }

    .all-new-products .text {
        padding: 5px 8px 10px;
    }

    .all-new-products .text h3 {
        font-size: 13px;
        min-height: 42px;
    }

    .all-new-products .text p {
        font-size: 11px;
        height: 42px;
    }

    .all-new-products .product-price {
        font-size: 14px;
    }

    .all-new-products .new-product-bottom {
        font-size: 11px;
        padding: 7px;
    }
}

/* --- Small Mobile --- */

@media (max-width: 380px) {
    .all-new-products .products-grid {
        gap: 8px;
        padding: 8px 5px;
    }

    .all-new-products .product-card-mini {
        height: 310px;
    }

    .all-new-products .container-img img {
        height: 140px;
    }

    .all-new-products .text h3 {
        font-size: 12px;
    }
}
