﻿﻿ /* ------------- Rate Modal -------------- */
.stars {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* Base star */
.stars svg {
    width: 32px;
    height: 32px;
    stroke: var(--primary-base1); /* gold outline */
    fill: none;
    cursor: pointer;
    transition: fill 0.2s ease, stroke 0.2s ease, transform 0.15s ease;
}

/* Hover effect */
.stars span:hover svg {
    transform: scale(1.1);
}

/* Active (selected) */
.stars span.active svg {
    fill: var(--primary-base1); /* 🔥 filled star */
    stroke: var(--primary-base1);
}

.rate-value {
    margin: 10px 0;
    font-weight: bold;
}

#submitRateBtn {
    margin-top: 10px;
    padding: 8px 14px;
}

    #submitRateBtn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.rate-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.rate-box {
    background: #fff;
    padding: 25px 30px;
    border-radius: 12px;
    width: 320px;
    max-width: 90%;
    text-align: center;
}

.rate-modal .modal-content {
    background: var(--primary-base2);
    opacity: 1;
    padding: 24px;
    border-radius: 14px;
    text-align: center;
    width: 320px; /* العرض الثابت */
    max-width: 90%; /* للموبايل */
}

.download-all {
    font-size: 12px;
}

.share-icons {
    display: flex;
    align-items: center;
    gap: 5px; /* المسافة بين الأيقونات */
}

.hover-hand {
    cursor: pointer;
}

.empty-state-wrapper {
    width: 100%;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state-card {
    width: 100%;
    max-width: 900px;
    padding: 60px 20px;
    background: linear-gradient(180deg, #1b2533, #141c28);
    border-radius: 20px;
    border: 2px dashed rgba(255,255,255,0.15);
    text-align: center;
    color: #cbd5e1;
}

/* Icon */
.empty-icon {
    font-size: 48px;
    color: #64748b;
    margin-bottom: 20px;
}

/* Title */
.empty-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #cbd5e1;
}

/* Subtitle */
.empty-subtitle {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
}

.side-search-hidden {
    display: none;
}

.products-header {
    width: 100%;
    margin-bottom: 20px;
}

.products-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-radius: 14px;
    background: #1b2533;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.products-header .title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.products-header .count {
    font-size: 15px;
    color: var(--primary-base1);
}

    .products-header .count strong {
        font-size: 18px;
        margin-inline-start: 6px;
    }

@media (max-width: 768px) {
    .products-header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 14px 16px;
    }
}

.empty-state {
    width: 100%;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}

    .empty-state img {
        width: 160px;
        opacity: 0.85;
        margin-bottom: 20px;
    }

    .empty-state h2 {
        font-size: 20px;
        color: #fff;
        margin-bottom: 6px;
    }

    .empty-state p {
        font-size: 14px;
        color: #94a3b8;
    }

.product-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    cursor: pointer;
    background: #f8f8f8;
}

    .product-header img {
        width: 50px;
        height: 50px;
        object-fit: cover;
        border-radius: 12px;
    }


/* ------------- PRODUCT Card ------------- */
.product-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
}

    .product-card,
    .product-card * {
        transition: all 0.35s ease;
    }

        .product-card:hover {
            border: 1px solid var(--primary-base1);
            box-shadow: 0 0 0 1px rgba(176,141,51,0.4), 0 12px 28px rgba(176,141,51,0.25);
        }

            .product-card:hover .product-image img {
                transform: scale(1.12);
            }

            .product-card:hover .product-title {
                color: var(--primary-base1);
            }

            .product-card:hover .meta-right > div {
                border: 1px solid var(--card-border);
                background: rgba(176,141,51,0.15);
            }

            .product-card:hover .share-btn {
                border: 1px solid var(--card-border);
            }

/* ------------- PRODUCT IMAGE ------------- */
.product-image {
    position: relative;
    width: 100%;
    padding-top: 60%;
    overflow: hidden;
}

    .product-image img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* ------------- BADGES CONTAINER ------------- */
.product-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 5;
}

/* ------------- BASE BADGE STYLE ------------- */
.badge {
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    backdrop-filter: blur(6px);
    white-space: nowrap;
    width: fit-content;
}

/* ------------- CATEGORY BADGE ------------- */
.badge-category {
    background: rgb(176, 141, 51, 0.80);
    color: var(--white-base);
    border: 1px solid rgba(176, 141, 51, 0.6);
}

/* ------------- FREE BADGE ------------- */
.badge-free {
    background: rgba(34, 197, 94, 0.80);
    color: var(--white-base);
    border: 1px solid rgba(34, 197, 94, 0.6);
    width: 100% !important
}

/* ------------- HOVER POLISH (OPTIONAL) ------------- */
.product-card:hover .badge {
    transform: translateY(-1px);
}

.product-meta-overlay {
    bottom: 0;
    inset-inline: 0;
    background: var(--card-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    font-size: 12px;
    color: #fff;
}

.meta-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .meta-right > .togther,
    .meta-right > .share-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgb(255 255 255 / 0.05);
        padding: 0px 0px;
        border: 1px solid #798392b3;
        cursor: pointer;
    }

    .meta-right > .togther {
        border-radius: 20px;
    }

        .meta-right > .togther .favorite {
            cursor: pointer;
            font-size: 13px;
            opacity: .5;
        }

            .meta-right > .togther .favorite:hover {
                opacity: 1;
            }

                .meta-right > .togther .favorite:hover svg {
                    stroke: red;
                }

    .meta-right > .share-btn {
        width: 28px;
        height: 28px;
        border-radius: 50%;
    }

    .meta-right .divider {
        width: 1px;
        height: 10px;
        background-color: #798392b3;
        margin: 0 8px;
    }

.product-title {
    display: flex;
    align-items: center !important;
    padding: 8px 14px;
    color: #fff;
    font-size: 14px;
}

    .product-title:hover {
        color: var(--primary-base1);
    }

    .product-title .icon {
        font-size: 15px;
    }

.product-desc {
    padding: 14px 8px;
    font-size: 12px;
    font-style: italic;
    color: var(--light-gray-base);
}

.product-details-wrapper {
    margin: 10px;
    background: #263144;
    border-radius: 12px;
    padding: 10px;
}

.details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--primary-base1);
    font-size: 12px;
    cursor: pointer;
}

    .details-header .arrow {
        display: inline-block;
        transition: transform 0.3s ease;
    }

    .details-header.open .arrow {
        transform: rotate(180deg); /* السهم يصبح للأعلى */
    }

.detail-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 12px;
    border: 1px solid var(--primary-base1);
    background-color: #b08d3326;
    cursor: pointer;
    transition: all .25s ease;
}

    .detail-card:hover {
        border-color: var(--primary-base1);
        box-shadow: 0 4px 10px rgba(176, 141, 51, 0.15);
    }

.detail-selectable {
    background: #1f2a3a;
    border: 1px solid rgba(255,255,255,.08);
}

    .detail-selectable:has(input:checked) {
        border-color: var(--primary-base1);
        background: linear-gradient(90deg, rgba(176,141,51,.2), rgba(176,141,51,.05));
    }

.detail-open {
    background: #263144;
    border: 1px solid rgba(176,141,51,.4);
}

p {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.detail-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .detail-content .detail-name {
        display: flex;
        justify-content: space-between;
        color: #fff;
        font-size: 12px;
    }

.detail-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}

.detail-type {
    display: flex;
    align-items: center !important;
    gap: 5px;
}

    .detail-type .detail-icon-span {
        font-size: 0.9rem;
        color: var(--primary-base1);
    }

    .detail-type .detail-icon {
        min-width: fit-content;
        height: fit-content;
        border-radius: 8px;
        padding: 0rem;
    }

        .detail-type .detail-icon svg {
            padding: 0.1em;
        }


.detail-price {
    font-size: 14px;
}

    .detail-price .detail-value {
        color: var(--primary-base1);
    }

    .detail-price .detail-sign {
        color: var(--gray-base);
    }

.lock-icon {
    color: #94a3b8;
}

.total-action-row {
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray-base);
}

.total-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .total-col .total-name {
        font-size: 11px;
    }

.total-price {
    font-size: 11px;
}

    .total-price .total-value {
        color: var(--primary-base1);
    }

    .total-price .total-sign {
        color: var(--gray-base);
    }

.action-col button {
    background-color: var(--primary-base1);
    padding: 8px 16px;
    color: var(--white-base);
    font-size: 12px;
}

/* ------------- CUSTOM GREEN CIRCULAR CHECKBOX ------------- */
.detail-check input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid var(--gray-base);
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    position: relative;
    padding: 4px 4px 5px 4px;
}

    /* Hover */
    .detail-check input[type="checkbox"]:hover {
        box-shadow: 0 0 0 3px rgba(34,197,94,0.25);
    }

    /* Checked state */
    .detail-check input[type="checkbox"]:checked {
        background: none;
        border-color: #22c55e;
    }

        /* Check mark */
        .detail-check input[type="checkbox"]:checked::after {
            content: '';
            width: 2px;
            height: 5px;
            border: solid #22c55e;
            border-width: 0 1px 1px 0;
            transform: rotate(45deg);
            position: absolute;
        }

    /* Disabled */
    .detail-check input[type="checkbox"]:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }
