 
/*
 * =========================================================
 * Weblinkus POS
 *
 * File:
 * assets/css/pos_products.css
 *
 * Premium Products Page
 * =========================================================
 */


/* =========================================================
   PAGE
========================================================= */

.pos-products-page {
    width: 100%;
    min-height: 100vh;
    padding: 35px 20px 65px;
    box-sizing: border-box;
    background: #f7fbfd;
}

.pos-products-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    box-sizing: border-box;
}


/* =========================================================
   HERO
========================================================= */

.pos-products-hero {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 210px;

    margin-bottom: 42px;
    padding: 40px 45px;

    box-sizing: border-box;

    overflow: hidden;

    border-radius: 20px;

    background:
        linear-gradient(
            135deg,
            #dff5ff 0%,
            #b9e7fa 48%,
            #9edcf5 100%
        );

    border: 1px solid #c2e9f7;

    box-shadow:
        0 15px 40px rgba(35, 130, 170, 0.12);
}


/* زخرفة */

.pos-products-hero::before {
    content: "";

    position: absolute;

    width: 280px;
    height: 280px;

    right: 110px;
    top: -150px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.22);
}

.pos-products-hero::after {
    content: "";

    position: absolute;

    width: 190px;
    height: 190px;

    left: -80px;
    bottom: -120px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.18);
}


/* Hero Content */

.pos-products-hero-content {
    position: relative;
    z-index: 2;

    direction: rtl;
    text-align: right;
}


/* Label */

.pos-products-hero-label {
    display: inline-flex;
    align-items: center;

    margin-bottom: 10px;
    padding: 6px 13px;

    border-radius: 30px;

    background: rgba(255, 255, 255, 0.65);

    border: 1px solid rgba(255, 255, 255, 0.75);

    color: #24637d;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 1.5px;
}


/* Title */

.pos-products-hero-title {
    margin: 0 0 8px;

    color: #123b5d;

    font-size: 38px;
    font-weight: 800;

    line-height: 1.25;
}


/* Description */

.pos-products-hero-description {
    margin: 0;

    color: #426c80;

    font-size: 16px;
    line-height: 1.8;
}


/* =========================================================
   CART BUTTON
========================================================= */

.pos-products-hero-cart {
    position: relative;
    z-index: 3;

    display: flex;
    align-items: center;

    gap: 10px;

    padding: 12px 18px;

    border-radius: 12px;

    background: rgba(255, 255, 255, 0.88);

    border: 1px solid rgba(255, 255, 255, 0.95);

    color: #123b5d;

    text-decoration: none;

    box-shadow:
        0 8px 25px rgba(30, 100, 130, 0.12);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.pos-products-hero-cart:hover {
    transform: translateY(-3px);

    background: #ffffff;

    box-shadow:
        0 12px 30px rgba(30, 100, 130, 0.18);

    color: #123b5d;
}


/* Cart Icon */

.pos-products-cart-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 35px;
    height: 35px;

    border-radius: 9px;

    background: #e8f8ff;

    font-size: 18px;
}


/* Cart Text */

.pos-products-cart-text {
    font-size: 14px;
    font-weight: 700;
}


/* Cart Count */

.pos-products-cart-count {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 25px;
    height: 25px;

    padding: 0 6px;

    border-radius: 20px;

    background: #159bd5;

    color: #ffffff;

    font-size: 12px;
    font-weight: 700;

    box-sizing: border-box;

    transition:
        transform 0.2s ease;
}


/* حركة بسيطة عند تغير العدد */

.pos-products-cart-count.is-updated {
    animation: posCartCountPulse 0.35s ease;
}

@keyframes posCartCountPulse {

    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.25);
    }

    100% {
        transform: scale(1);
    }

}


/* =========================================================
   PRODUCTS GRID
========================================================= */

.pos-products-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 24px;

    width: 100%;
}


/* =========================================================
   PRODUCT CARD
========================================================= */

.pos-product-card {
    position: relative;

    display: flex;
    flex-direction: column;

    min-width: 0;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e3eef3;

    border-radius: 16px;

    box-sizing: border-box;

    box-shadow:
        0 5px 18px rgba(30, 80, 100, 0.05);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.pos-product-card:hover {
    transform: translateY(-7px);

    border-color: #b5dfef;

    box-shadow:
        0 18px 40px rgba(30, 110, 145, 0.14);
}


/* =========================================================
   PRODUCT IMAGE
========================================================= */

.pos-product-image-link {
    display: block;

    width: 100%;

    text-decoration: none;

    background: #ffffff;
}

.pos-product-image {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 255px;

    overflow: hidden;

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f4fbfe 100%
        );
}

.pos-product-image img {
    display: block;

    width: 100%;
    height: 100%;

    padding: 18px;

    box-sizing: border-box;

    object-fit: contain;

    transition:
        transform 0.35s ease;
}

.pos-product-card:hover
.pos-product-image img {
    transform: scale(1.06);
}


/* =========================================================
   SALE BADGE
========================================================= */

.pos-product-sale-badge {
    position: absolute;

    top: 13px;
    right: 13px;

    z-index: 2;

    padding: 6px 10px;

    border-radius: 20px;

    background: #ffffff;

    color: #159bd5;

    border: 1px solid #ccecf8;

    font-size: 11px;
    font-weight: 700;

    box-shadow:
        0 4px 12px rgba(30, 100, 130, 0.10);
}


/* =========================================================
   NO IMAGE
========================================================= */

.pos-product-no-image {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    color: #8aa2af;

    background: #f3faff;

    font-size: 14px;
}


/* =========================================================
   PRODUCT CONTENT
========================================================= */

.pos-product-content {
    display: flex;
    flex-direction: column;

    flex: 1;

    padding: 19px;

    box-sizing: border-box;
}


/* Product Title */

.pos-product-title {
    margin: 0 0 10px;

    min-height: 52px;

    font-size: 17px;
    font-weight: 700;

    line-height: 1.55;
}

.pos-product-title a {
    color: #183f58;

    text-decoration: none;

    transition:
        color 0.2s ease;
}

.pos-product-title a:hover {
    color: #159bd5;
}


/* =========================================================
   PRICE
========================================================= */

.pos-product-price {
    min-height: 30px;

    margin-bottom: 17px;

    color: #159bd5;

    font-size: 19px;
    font-weight: 800;
}

.pos-product-price del {
    margin-left: 6px;

    color: #9caeb8;

    font-size: 13px;
    font-weight: 500;
}

.pos-product-price ins {
    color: #159bd5;

    text-decoration: none;
}


/* =========================================================
   PRODUCT ACTION
========================================================= */

.pos-product-action {
    margin-top: auto;

    width: 100%;
}


/* =========================================================
   PRODUCT BUTTON
========================================================= */

.pos-product-button {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    width: 100%;

    min-height: 46px;

    padding: 10px 14px;

    box-sizing: border-box;

    border-radius: 9px;

    background:
        linear-gradient(
            135deg,
            #a9e1f8,
            #8fd3f0
        );

    border: 1px solid #83cbe9;

    color: #123b5d;

    text-decoration: none;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        color 0.2s ease;
}

.pos-product-button:hover {
    transform: translateY(-2px);

    background:
        linear-gradient(
            135deg,
            #159bd5,
            #1187bd
        );

    border-color: #159bd5;

    color: #ffffff;

    box-shadow:
        0 7px 18px rgba(21, 155, 213, 0.22);
}


/* =========================================================
   BUTTON ICON
========================================================= */

.pos-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    border-radius: 6px;

    background: rgba(255, 255, 255, 0.5);

    font-size: 17px;

    line-height: 1;
}

.pos-product-button:hover
.pos-button-icon {
    background: rgba(255, 255, 255, 0.2);
}


/* =========================================================
   BUTTON LOADING
========================================================= */

.pos-product-button.loading {
    pointer-events: none;

    opacity: 0.75;

    cursor: wait;
}

.pos-product-button.loading .pos-button-icon {
    animation:
        posButtonSpin 0.8s linear infinite;
}

@keyframes posButtonSpin {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}


/* =========================================================
   SUCCESS STATE
========================================================= */

.pos-product-button.added {
    background:
        linear-gradient(
            135deg,
            #66c9a0,
            #45b989
        );

    border-color: #45b989;

    color: #ffffff;
}


/* =========================================================
   TOAST NOTIFICATION
========================================================= */

.pos-products-toast {
    position: fixed;

    right: 25px;
    bottom: 25px;

    z-index: 999999;

    display: flex;
    align-items: center;

    gap: 12px;

    max-width: 360px;

    padding: 14px 18px;

    border-radius: 12px;

    background: #ffffff;

    border: 1px solid #d8edf5;

    box-shadow:
        0 15px 45px rgba(20, 80, 110, 0.18);

    color: #183f58;

    font-size: 14px;
    font-weight: 700;

    direction: rtl;

    opacity: 0;

    transform: translateY(20px);

    pointer-events: none;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.pos-products-toast.is-visible {
    opacity: 1;

    transform: translateY(0);
}

.pos-products-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;

    flex: 0 0 32px;

    border-radius: 50%;

    background: #e3f8ef;

    color: #32a878;

    font-size: 17px;
}


/* =========================================================
   EMPTY
========================================================= */

.pos-products-empty {
    padding: 70px 20px;

    text-align: center;

    background: #ffffff;

    border: 1px solid #e2edf2;

    border-radius: 16px;

    box-shadow:
        0 8px 25px rgba(30, 80, 100, 0.05);
}

.pos-products-empty-icon {
    margin-bottom: 15px;

    font-size: 48px;
}

.pos-products-empty h2 {
    margin: 0 0 10px;

    color: #123b5d;

    font-size: 25px;
}

.pos-products-empty p {
    margin: 0;

    color: #718592;

    font-size: 15px;
}


/* =========================================================
   ERROR
========================================================= */

.pos-products-error {
    padding: 55px 20px;

    text-align: center;

    background: #ffffff;

    border: 1px solid #e2edf2;

    border-radius: 16px;
}

.pos-products-error h2 {
    margin: 0 0 10px;

    color: #123b5d;
}

.pos-products-error p {
    margin: 0;

    color: #718592;
}


/* =========================================================
   PAGINATION
========================================================= */

.pos-products-pagination {
    margin-top: 42px;

    text-align: center;
}

.pos-products-pagination ul {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.pos-products-pagination li {
    margin: 0;
    padding: 0;
}

.pos-products-pagination a,
.pos-products-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 40px;
    height: 40px;

    padding: 0 10px;

    box-sizing: border-box;

    border: 1px solid #d5e8f0;

    border-radius: 8px;

    background: #ffffff;

    color: #315a70;

    text-decoration: none;

    font-size: 14px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.pos-products-pagination a:hover {
    background: #b5e4f8;

    border-color: #96d5ed;

    color: #123b5d;
}

.pos-products-pagination .current {
    background: #159bd5;

    border-color: #159bd5;

    color: #ffffff;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1050px) {

    .pos-products-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


/* =========================================================
   TABLET / SMALL DESKTOP
========================================================= */

@media (max-width: 820px) {

    .pos-products-page {
        padding: 25px 16px 50px;
    }

    .pos-products-hero {
        min-height: 190px;

        padding: 30px;

        margin-bottom: 30px;
    }

    .pos-products-hero-title {
        font-size: 32px;
    }

    .pos-products-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 18px;
    }

    .pos-product-image {
        height: 230px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .pos-products-page {
        padding: 18px 12px 40px;
    }

    .pos-products-hero {
        display: block;

        min-height: auto;

        padding: 25px 20px;

        border-radius: 16px;
    }

    .pos-products-hero-content {
        text-align: center;
    }

    .pos-products-hero-title {
        font-size: 29px;
    }

    .pos-products-hero-description {
        font-size: 14px;
    }

    .pos-products-hero-cart {
        width: fit-content;

        margin: 20px auto 0;
    }

    .pos-products-grid {
        grid-template-columns: 1fr;

        gap: 18px;
    }

    .pos-product-image {
        height: 260px;
    }

    .pos-product-content {
        padding: 17px;
    }

    .pos-product-title {
        min-height: auto;

        font-size: 17px;
    }

    .pos-products-toast {
        right: 12px;
        left: 12px;

        bottom: 15px;

        max-width: none;
    }

}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .pos-products-page {
        padding-left: 10px;
        padding-right: 10px;
    }

    .pos-products-hero {
        padding: 22px 15px;
    }

    .pos-products-hero-title {
        font-size: 26px;
    }

    .pos-product-image {
        height: 230px;
    }

}
 
