/* ═══════════════════════════════════════════════════════════
   MOJALLAL GOLD — Shared styles
   Light theme · saffron / firuze / ink / mist
   ═══════════════════════════════════════════════════════════ */

html { scroll-behavior: smooth; }
body { font-family: 'Estedad', 'Vazirmatn', sans-serif; }
::selection { background: #E8A013; color: #fff; }
img { max-width: 100%; }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* Persian 8-point star (khatam / girih) tile pattern — saffron */
.pattern-fa {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23E8A013' stroke-opacity='0.16'%3E%3Crect x='20' y='20' width='32' height='32'/%3E%3Crect x='20' y='20' width='32' height='32' transform='rotate(45 36 36)'/%3E%3Ccircle cx='36' cy='36' r='3'/%3E%3C/g%3E%3C/svg%3E");
}
/* same pattern in Persian turquoise */
.pattern-firuze {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%230FA3A3' stroke-opacity='0.14'%3E%3Crect x='20' y='20' width='32' height='32'/%3E%3Crect x='20' y='20' width='32' height='32' transform='rotate(45 36 36)'/%3E%3Ccircle cx='36' cy='36' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

/* Fix letter-spacing in RTL for Latin elements */
.ltr-only { direction: ltr; letter-spacing: inherit !important; }

/* Panels toggled with [hidden] must stay hidden even with display:* utilities */
[hidden] { display: none !important; }

/* Visible keyboard focus ring (saffron) */
:focus-visible { outline: 2px solid #E8A013; outline-offset: 2px; }

/* Inner-page hero background */
.page-hero { background-image: linear-gradient(180deg, #F4F4F5 0%, #FAFAFA 55%, #FFFFFF 100%); }

/* Accordion (details/summary) */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details > summary .chev { transition: transform .25s ease; }
details[open] > summary .chev { transform: rotate(180deg); }

/* Subtle panel-switch animation */
.panel-in { animation: panelIn .3s ease both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Line clamping for card copy */
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Loading shimmer (JS-rendered grids) */
.skeleton {
  background: linear-gradient(90deg, #F4F4F5 25%, #ECECEE 37%, #F4F4F5 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .panel-in { animation: none; }
  .skeleton { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* ═══════════════ Dropdown Animation ═══════════════ */
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════ Filter Dropdown - Open State ═══════════════ */
#filterDropdownWrap.open #filterDropdownBtn {
  background: #0C0C0D;
  color: #fff;
  border-color: #0C0C0D;
}
#filterDropdownWrap.open #filterDropdownBtn svg {
  color: #fff;
}
#filterDropdownWrap.open #filterDropdownBtn svg:last-child {
  transform: rotate(180deg);
}
#filterDropdownWrap.open #filterDropdown {
  display: block;
}

/* ═══════════════ Dropdown Items (Chips inside menu) ═══════════════ */
#catFilters .filter-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.6rem 0.85rem;
  margin-bottom: 0.15rem;
  font-size: 13px;
  font-weight: 500;
  color: #3f3f46;
  background: transparent;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: right;
  border: none;
  font-family: inherit;
}

#catFilters .filter-chip:hover {
  background: #f4f4f5;
  color: #18181b;
}

#catFilters .filter-chip.active {
  background: #FCEFD4;
  color: #C4870A;
  font-weight: 700;
}

#catFilters .filter-chip .chip-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#catFilters .filter-chip .chip-count {
  font-size: 11px;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: #f4f4f5;
  color: #71717a;
}

#catFilters .filter-chip.active .chip-count {
  background: #E8A013;
  color: #fff;
}

/* Check icon for active state */
#catFilters .filter-chip .chip-check {
  width: 16px;
  height: 16px;
  opacity: 0;
  color: #E8A013;
  transition: opacity 0.15s;
}
#catFilters .filter-chip.active .chip-check {
  opacity: 1;
}