/* ============================================================
   HONARA — کارتِ محصولِ جدید (طرحِ یکپارچه‌ی سایت)
   یک منبعِ واحد؛ در همه‌ی صفحاتی که کارتِ محصول دارند لود می‌شود.
   کلاسِ پایه: .hn-pcard  (کلیک روی کل کارت → صفحه‌ی جزئیات)
   حالت‌های ادمین: .hn-pcard--admin + overlayهای ویرایش/انتخاب
   ============================================================ */
.hn-pcard {
    background: #fff;
    border: 1px solid #ece5d8;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(60, 50, 35, .04);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    transition: box-shadow .28s ease, border-color .28s ease;
}

.hn-pcard:hover {
    box-shadow: 0 18px 38px rgba(60, 50, 35, .16);
    border-color: #c9d1b6;
}

.hn-pcard-imgwrap {
    position: relative;
    background: #fff;
    padding: 14px;
}

.hn-pcard-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: #f6e2dd;
    color: #c0503f;
    font-size: 11.5px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 9px;
}

.hn-pcard-imgbox {
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    overflow: hidden;
    background: #f6f2ec;
}

.hn-pcard-imgbox img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.hn-pcard:hover .hn-pcard-imgbox img {
    transform: scale(1.05);
}

.hn-pcard-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 11px;
    flex: 1;
}

.hn-pcard-head {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hn-pcard-cat {
    font-size: 10.5px;
    color: #a99b88;
    font-weight: 600;
}

.hn-pcard-name {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
    color: #2f2a24;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hn-pcard-foot {
    margin-top: auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

.hn-pcard-price {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    background: #f2ede4;
    border-radius: 11px;
    padding: 7px 11px;
}

.hn-pcard-price .hn-pcard-old {
    font-size: 11.5px;
    color: #c0503f;
    text-decoration: line-through;
}

.hn-pcard-price .hn-pcard-new {
    font-size: 16px;
    font-weight: 800;
    color: #2f2a24;
}

.hn-pcard-price .hn-pcard-unit {
    font-size: 10.5px;
    color: #a99b88;
    font-weight: 600;
}

.hn-pcard-oos {
    display: inline-flex;
    align-items: center;
    background: #f6e2dd;
    color: #c0503f;
    font-size: 12.5px;
    font-weight: 700;
    border-radius: 11px;
    padding: 7px 12px;
}

/* ---------- حالت‌های ادمین (overlay ویرایش / انتخاب) ---------- */
.hn-pcard-admin-actions {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hn-pcard-edit {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    border: 1px solid #e6ded0;
    background: #fbf9f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5f7a4f;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.hn-pcard-edit:hover {
    background: #eef1e7;
    border-color: #7e8c66;
}

.hn-pcard-select {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    border: 1px solid #e6ded0;
    background: #fbf9f5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.hn-pcard.is-selected {
    border-color: #7e8c66;
    box-shadow: 0 0 0 2px #dbe3cd, 0 18px 38px rgba(60, 50, 35, .16);
}

.hn-pcard.is-disabled {
    opacity: .55;
    pointer-events: none;
}

/* ---------- اسکلتونِ بارگذاری ---------- */
.hn-pcard--skel {
    cursor: default;
    pointer-events: none;
}

.hn-skel {
    position: relative;
    overflow: hidden;
    background: #efe9df;
    border-radius: 8px;
}

.hn-skel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent);
    transform: translateX(-100%);
    animation: hnSkel 1.3s ease-in-out infinite;
}

.hn-skel-line {
    display: block;
    height: 12px;
    border-radius: 6px;
}

.hn-skel-pill {
    display: inline-block;
    width: 96px;
    height: 34px;
    border-radius: 11px;
}

.hn-pcard--skel .hn-pcard-imgbox.hn-skel {
    border-radius: 14px;
}

@keyframes hnSkel {
    100% {
        transform: translateX(100%);
    }
}


@media (max-width: 768px) {
    .hn-pcard-price .hn-pcard-new{
        font-size: 14px;
    }
}