/* هویت تازه رنگارنگ و مدیریت تصویری دسته‌بندی‌ها */
.logo-mark { width: 42px; height: 42px; object-fit: contain; filter: drop-shadow(0 3px 6px #a855f71c); }
.logo:hover .logo-mark { transform: rotate(-5deg) scale(1.04); }
.brand-lockup { display: block; width: 143px; height: auto; aspect-ratio: 295 / 112; max-width: 100%; object-fit: contain; transition: transform .3s ease; }
.logo:hover .brand-lockup { transform: translateY(-1px); }
.footer-brand .brand-lockup { width: 159px; height: auto; }
.admin-login-icon .logo-mark { width: 47px; height: 47px; }
.admin-avatar-badge .logo-mark { width: 37px; height: 37px; }
.inv-logo { display: flex; align-items: center; gap: 9px; }
.inv-logo .logo-mark { width: 38px; height: 38px; filter: none; }

/* عکس واقعی در کارت دسته‌ها؛ نماد خنثی فقط تا زمان انتخاب عکس */
.cat-card { border-radius: 21px; }
.category-photo-frame { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; background: #f5f3fa; }
.category-photo-frame > img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .5s ease; }
.cat-card:hover .category-photo-frame > img { transform: scale(1.055); }
.category-photo-empty { width: 100%; height: 100%; display: grid; place-items: center; background: radial-gradient(circle at 20% 20%, #ede9fe, transparent 55%), linear-gradient(130deg, #faf6ff, #fff4f1); }
.category-photo-empty .ui-icon { width: 42px; height: 42px; color: #b7a3cf; stroke-width: 1.25; }
.category-photo-label { padding: 13px 13px 14px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; text-align: right; }
.cat-card .category-photo-label h3 { padding: 0; margin: 0; color: #34304b; font-size: 13px; font-weight: 800; line-height: 1.9; }
.category-photo-link { display: flex; align-items: center; gap: 5px; color: #9b8aa8; font-size: 10px; }
.category-photo-link .ui-icon { width: 13px; height: 13px; }
.category-mini-photo { display: inline-flex; width: 21px; height: 21px; flex: none; overflow: hidden; border-radius: 7px; background: #f4eef9; vertical-align: middle; margin-inline-end: 5px; }
.category-mini-photo img { width: 100%; height: 100%; object-fit: cover; }
.p-cat, .ap-cat { display: flex; align-items: center; gap: 3px; }
.chip-btn .category-mini-photo { width: 27px; height: 27px; border-radius: 9px; }
.chip-btn { display: inline-flex; align-items: center; gap: 5px; }

/* فرم ساخت و کارت‌های ویرایش دسته */
.category-admin-intro { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 22px 25px; background: linear-gradient(120deg, #f7f1ff, #fff8f3); border: 1px solid #eee6f9; border-radius: 23px; margin-bottom: 22px; }
.category-admin-intro h3 { font-weight: 900; font-size: 18px; color: #42334f; margin-bottom: 4px; }
.category-admin-intro p { color: #8a7d95; font-size: 12px; line-height: 1.9; max-width: 650px; }
.category-intro-icon { width: 49px; height: 49px; display: grid; place-items: center; flex: none; border-radius: 17px; background: #fff; border: 1px solid #ffffff; color: #a855f7; }
.category-intro-icon .ui-icon { width: 27px; height: 27px; }
.category-admin-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 24px; align-items: start; }
.category-new-form { position: sticky; top: 92px; padding: 23px; border-radius: 23px; box-shadow: 0 10px 30px #7c3aed08; }
.category-form-heading { display: flex; align-items: center; gap: 8px; color: #41314f; font-size: 16px; font-weight: 900; margin: 0 0 15px; }
.category-form-heading .ui-icon { width: 19px; height: 19px; color: #a855f7; }
.category-editor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 20px; }
.category-edit-form { padding: 21px; border-radius: 23px; box-shadow: 0 10px 25px #64748b08; }
.category-edit-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.category-edit-heading strong { font-weight: 900; color: #4b3c59; font-size: 14px; line-height: 1.8; }
.category-product-count { display: inline-block; color: #9c87ae; background: #faf5ff; border-radius: 9px; padding: 5px 9px; white-space: nowrap; font-size: 10px; font-weight: 700; }
.category-admin-layout label { font-size: 12px; font-weight: 700; color: #6b5f77; display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.category-admin-layout .input { font-size: 13px; }
.category-image-picker { margin-bottom: 13px; }
.category-image-preview { position: relative; aspect-ratio: 1; overflow: hidden; width: 100%; border-radius: 17px; border: 1px dashed #d8c9e8; background-color: #fbf9ff; background-image: linear-gradient(45deg, #f5f0fa 25%, transparent 25%), linear-gradient(-45deg, #f5f0fa 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f5f0fa 75%), linear-gradient(-45deg, transparent 75%, #f5f0fa 75%); background-size: 16px 16px; background-position: 0 0,0 8px,8px -8px,-8px 0; }
.category-image-preview > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.category-image-preview > img[hidden], .category-image-placeholder[hidden] { display: none !important; }
.category-image-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 11px; color: #b29cc9; background: linear-gradient(145deg, #f7f1ffb0, #fffbf6c0); }
.category-image-placeholder .ui-icon { width: 43px; height: 43px; stroke-width: 1.35; }
.category-image-placeholder span { font-size: 12px; color: #aa99b9; }
.category-photo-actions { display: flex; gap: 9px; margin-top: 11px; align-items: center; }
.category-admin-layout label.category-photo-choose { position: relative; display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: 6px; flex: 1; min-height: 40px; margin: 0; padding: 9px 10px; border-radius: 11px; background: #f3ecfb; border: 1px solid #eadef6; color: #9b4dd0; font-size: 12px; font-weight: 800; cursor: pointer; overflow: hidden; }
.category-photo-choose .ui-icon { width: 17px; height: 17px; }
.category-photo-choose input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; font-size: 0; }
.category-photo-choose:focus-within { outline: 3px solid #dcc1f4; outline-offset: 2px; }
.category-photo-remove { background: #fff2f5; border: 1px solid #ffe5ed; color: #ce6689; border-radius: 11px; min-height: 40px; padding: 9px 12px; font-size: 11px; font-weight: 700; cursor: pointer; }
.category-photo-remove:disabled { cursor: default; opacity: .35; }
.category-photo-status { color: #8e789c; font-size: 10px; line-height: 1.8; margin-top: 9px; min-height: 20px; }
.category-photo-help { color: #9d8caa; font-size: 10px; line-height: 1.9; margin-bottom: 16px; }
.category-form-actions { display: flex; align-items: center; gap: 10px; }
.category-form-actions .btn { flex: 1; font-size: 12px; padding: 11px 13px; }
.category-delete { width: 40px; height: 40px; display: grid; place-items: center; flex: none; border: 1px solid #fee2e2; background: #fff6f6; border-radius: 12px; color: #e38c99; cursor: pointer; }
.category-delete .ui-icon { width: 18px; height: 18px; }
.category-delete:hover { background: #fff0f2; color: #e11d48; }
.category-admin-layout form[data-saving="true"] { opacity: .75; }
.category-empty { min-height: 300px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 13px; background: #fcfbff; border: 1px dashed #e8dcf2; border-radius: 23px; color: #9989a9; text-align: center; padding: 30px; }
.category-empty .ui-icon { width: 43px; height: 43px; color: #c2aad6; }
.category-empty h4 { color: #7c678b; font-size: 15px; }
.category-empty p { color: #ac9ab8; font-size: 12px; line-height: 1.9; }

@media (max-width: 1050px) {
  .category-admin-layout { grid-template-columns: 290px minmax(0, 1fr); gap: 19px; }
  .category-new-form { padding: 21px; }
}
@media (max-width: 780px) {
  .category-admin-layout { grid-template-columns: 1fr; }
  .category-new-form { position: static; }
  .category-new-form .category-image-preview { max-width: 310px; margin-left: auto; margin-right: auto; }
  .category-editor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
  .category-edit-form { padding: 16px; }
  .category-product-count { padding: 4px 7px; font-size: 9px; }
  .category-edit-heading { flex-direction: column; align-items: flex-start; gap: 6px; }
  .brand-lockup { width: 132px; height: auto; }
  .footer-brand .brand-lockup { width: 155px; height: auto; }
  .category-photo-label { padding: 10px 9px; }
  .cat-card .category-photo-label h3 { font-size: 11px; }
  .category-photo-link { font-size: 9px; }
  .category-photo-empty .ui-icon { width: 30px; height: 30px; }
}
@media (max-width: 480px) {
  .category-editor-grid { grid-template-columns: 1fr; }
  .category-edit-form { padding: 21px; }
  .category-edit-heading { flex-direction: row; align-items: center; }
  .category-admin-intro { padding: 19px; }
  .category-admin-intro h3 { font-size: 16px; }
  .category-admin-intro p { font-size: 11px; }
  .category-new-form .category-image-preview { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .brand-lockup, .logo-mark, .category-photo-frame > img { transition: none; }
}

@media (max-width: 680px) {
  .admin-top-banner { flex-wrap: wrap; padding: 19px; gap: 16px; }
  .admin-top-info { width: 100%; min-width: 0; align-items: center; }
  .admin-top-info > div:last-child { flex: 1; min-width: 0; }
  .admin-top-info h2 { font-size: 16px; line-height: 1.9; }
  .admin-user-tag { font-size: 11px; white-space: normal; }
  .admin-top-actions { width: 100%; min-width: 0; }
  .admin-top-actions .btn { flex: 1; min-width: 0; }
}
