/* ============================================================
   КИНО ЭЗЭН — "ЗАР МЭДЭЭ" БҲТЭН ХУУДАС — CSS
   Бие даасан файл. style.css, services.html-ийн дотор юу ч
   өөрчлөхгүй. Бүх class нэрс "zar-" угтвартай — давтагдахгүй.
   ============================================================ */

.zar-page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

/* ---------- Нүүр хуудас руу буцах товч ---------- */
.zar-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 16px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.zar-home-btn:hover {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(74, 222, 128, 0.06);
}

/* ---------- Body ---------- */
.zar-body {
  width: 100%;
}

/* ---------- Category pills ---------- */
.zar-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.zar-subcats {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}
.zar-subcat-pill {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  font-size: 11.5px;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.zar-subcat-pill:hover {
  border-color: rgba(74, 222, 128, 0.4);
  color: #4ade80;
}
.zar-subcat-pill.zar-active {
  background: rgba(74, 222, 128, 0.18);
  border-color: #4ade80;
  color: #4ade80;
  font-weight: 700;
}
.zar-cat-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12.5px;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.zar-cat-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}
.zar-cat-pill:active {
  transform: scale(0.95);
}
.zar-cat-pill.zar-active {
  background: #4ade80;
  color: #0a2a0a;
  font-weight: 700;
  animation: zarPillPop 0.3s ease;
}
@keyframes zarPillPop {
  0% { transform: scale(0.9); }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
  color: #0a2a0a;
  font-weight: 700;
}

/* ---------- Post button ---------- */
.zar-post-btn {
  width: 100%;
  max-width: 280px;
  background: linear-gradient(90deg, #4ade80, #f4a261);
  background-size: 200% 100%;
  border: none;
  color: #0a2a0a;
  font-size: 14px;
  font-weight: 700;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 22px;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5);
  animation: zarPulseGlow 2.8s ease-in-out infinite;
  transition: transform 0.15s, background-position 0.4s;
}
.zar-post-btn:hover {
  transform: translateY(-1px) scale(1.015);
  background-position: 100% 0;
}
.zar-post-btn:active {
  transform: translateY(0) scale(0.99);
}
.zar-post-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  animation: none;
}
@keyframes zarPulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.35); }
  50% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
}

/* ---------- Listing grid ---------- */
.zar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 540px) {
  .zar-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 860px) {
  .zar-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.zar-card {
  background: #1c1c2c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  animation: zarCardIn 0.45s ease both;
}
.zar-card:nth-child(1) { animation-delay: 0.02s; }
.zar-card:nth-child(2) { animation-delay: 0.07s; }
.zar-card:nth-child(3) { animation-delay: 0.12s; }
.zar-card:nth-child(4) { animation-delay: 0.17s; }
.zar-card:nth-child(5) { animation-delay: 0.22s; }
.zar-card:nth-child(6) { animation-delay: 0.27s; }
.zar-card:nth-child(7) { animation-delay: 0.32s; }
.zar-card:nth-child(8) { animation-delay: 0.37s; }
@keyframes zarCardIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.zar-card:hover {
  border-color: rgba(74, 222, 128, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 10px 24px -8px rgba(74, 222, 128, 0.25);
}
.zar-card:hover .zar-card-img img {
  transform: scale(1.06);
}
.zar-card.zar-vip {
  border-color: rgba(244, 162, 97, 0.45);
}
.zar-card.zar-vip:hover {
  box-shadow: 0 10px 24px -8px rgba(244, 162, 97, 0.3);
}
.zar-vip-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: #f4a261;
  color: #3a1f0c;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  z-index: 1;
  animation: zarVipShine 2.2s ease-in-out infinite;
}
@keyframes zarVipShine {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 162, 97, 0.5); }
  50% { box-shadow: 0 0 6px 2px rgba(244, 162, 97, 0.4); }
}
.zar-card-img {
  height: 140px;
  background: #2a2a3e;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.zar-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  animation: zarImgFadeIn 0.4s ease;
}
@keyframes zarImgFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.zar-card-img i {
  font-size: 28px;
  color: rgba(255, 255, 255, 0.25);
}
.zar-card-body {
  padding: 10px;
}
.zar-card-cat {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 6px;
}
.zar-card-title {
  color: #fff;
  font-size: 13px;
  margin: 0 0 4px;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}
.zar-card-price {
  color: #4ade80;
  font-size: 14px;
  margin: 0 0 6px;
  font-weight: 700;
}
.zar-card-foot {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.4);
  font-size: 10.5px;
  gap: 6px;
}
.zar-card-foot span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zar-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  animation: zarHeroIn 0.4s ease;
}
.zar-empty-icon {
  font-size: 38px;
  display: block;
  margin-bottom: 10px;
  animation: zarFloatBounce 2.4s ease-in-out infinite;
}
@keyframes zarFloatBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.zar-loading {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 540px) { .zar-loading { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 860px) { .zar-loading { grid-template-columns: repeat(4, 1fr); } }
.zar-skel-card {
  background: #1c1c2c;
  border-radius: 10px;
  overflow: hidden;
  height: 220px;
  position: relative;
}
.zar-skel-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.06) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: zarShimmer 1.4s ease-in-out infinite;
}
@keyframes zarShimmer {
  from { background-position: 150% 0; }
  to { background-position: -50% 0; }
}

/* ---------- Login prompt (нэвтрэлгүй үед) ---------- */
.zar-login-prompt {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  margin-bottom: 16px;
}
.zar-login-prompt a {
  color: #4ade80;
  font-weight: 700;
  text-decoration: none;
}

/* ============================================================
   ЗАР НИЙТЛЭХ ФОРМ
   ============================================================ */
.zar-form-wrap {
  display: none;
  max-width: 560px;
}
.zar-form-wrap.zar-open {
  display: block;
}

.zar-back-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 14px;
  padding: 0;
}
.zar-back-btn:hover {
  color: #fff;
}

.zar-field {
  margin-bottom: 14px;
}
.zar-field label {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12.5px;
  margin-bottom: 6px;
  font-weight: 600;
}
.zar-field input,
.zar-field select,
.zar-field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  padding: 10px 12px;
  font-family: inherit;
  box-sizing: border-box;
}
.zar-field input:focus,
.zar-field select:focus,
.zar-field textarea:focus {
  outline: none;
  border-color: #4ade80;
}
.zar-field textarea {
  resize: vertical;
  min-height: 80px;
}
.zar-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.zar-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.zar-checkbox-row input {
  width: auto;
}
.zar-checkbox-row label {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12.5px;
}

/* ---------- Image upload ---------- */
.zar-img-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.zar-img-slot {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  flex-shrink: 0;
}
.zar-img-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.zar-img-slot i {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.3);
}
.zar-img-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.zar-submit-btn {
  width: 100%;
  background: linear-gradient(90deg, #4ade80, #f4a261);
  border: none;
  color: #0a2a0a;
  font-size: 14px;
  font-weight: 700;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 6px;
}
.zar-submit-btn:hover {
  opacity: 0.92;
}
.zar-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.zar-form-msg {
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  display: none;
}
.zar-form-msg.zar-show {
  display: block;
}
.zar-form-msg.zar-success {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
}
.zar-form-msg.zar-error {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

/* ============================================================
   ЗАРЫН ДЭЛГЭРЭНГҲЙ ХАРАГДАЦ
   ============================================================ */
.zar-detail-wrap {
  display: none;
  max-width: 720px;
}
.zar-detail-wrap.zar-open {
  display: block;
}
.zar-detail-imgs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 14px;
}
.zar-detail-imgs img {
  width: 140px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.zar-detail-title {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}
.zar-detail-price {
  color: #4ade80;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 14px;
}
.zar-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12.5px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.zar-detail-desc {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  margin-bottom: 16px;
}
.zar-detail-contact {
  background: rgba(74, 222, 128, 0.1);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.zar-detail-contact-phone {
  color: #4ade80;
  font-size: 16px;
  font-weight: 700;
}
.zar-call-btn {
  background: #4ade80;
  color: #0a2a0a;
  border: none;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- Spinner ---------- */
.zar-spin {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #0a2a0a;
  border-radius: 50%;
  animation: zar-spin-anim 0.6s linear infinite;
}
@keyframes zar-spin-anim {
  to { transform: rotate(360deg); }
}
