/* =========================================================================
   Belfy Cards — Hooks Catalog Page (hook.css)
   Bootstrap + the purchased landing template (style.css) already handle the
   generic header/banner chrome. This file owns everything hook-specific:
   the city filter, and — the important part — the grid of gift tiles.

   Continuity with the hook-detail page: every gift is still a ticket stub
   (image + perforated seam + details), just repeated as a grid here instead
   of a single hero card. That repetition is what should feel branded.

   The page markup is lang="en" with no dir="rtl" on <html>; since all real
   content is Farsi, direction is set explicitly here rather than inherited.
   ========================================================================= */

@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
  --navy: #132f5b;
  --navy-deep: #0c2140;
  --surface: #ffffff;
  --surface-soft: #f6f8fc;
  --ink: #1b2433;
  --ink-soft: #6b7488;
  --ink-faint: #98a1b3;
  --border: #e7eaf2;

  --gold: #f2a93b;
  --gold-deep: #d98a1d;
  --teal: #17a398;
  --teal-deep: #0f8079;
  --coral: #ef5b52;
  --coral-deep: #d84239;
  --sky: #3e8ede;

  --font: 'Vazirmatn', Tahoma, sans-serif;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 28px rgba(12, 33, 64, .12);
  --shadow-soft: 0 3px 12px rgba(12, 33, 64, .08);
}

body {
  direction: rtl;
  text-align: right;
  font-family: var(--font) !important;
  color: var(--ink);
  background: var(--surface-soft);
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font) !important; }

/* ---------- Preloader ---------- */
.js-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.preloader-inner { position: relative; display: flex; align-items: center; }
.preloader-inner .dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold);
  animation: belfy-pulse 1s ease-in-out infinite;
}
.preloader-inner .dots { display: flex; gap: .4rem; margin-inline-start: .6rem; }
.preloader-inner .dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.5);
  animation: belfy-pulse 1s ease-in-out infinite;
}
.preloader-inner .dots span:nth-child(2) { animation-delay: .15s; }
.preloader-inner .dots span:nth-child(3) { animation-delay: .3s; }
@keyframes belfy-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: .4; }
}

/* ---------- Header / nav ---------- */
.header-area { background: var(--surface); box-shadow: var(--shadow-soft); }
.main-nav .logo img { height: 70px; border-radius:15px; }
.main-nav .nav { display: flex; gap: 1.75rem; align-items: center; }
.main-nav .nav li a {
  font-weight: 600;
  font-size: .92rem;
  color: var(--ink);
  padding-block: .5rem;
  border-bottom: 2px solid transparent;
}
.main-nav .nav li a.active,
.main-nav .nav li a:hover { color: var(--navy); border-block-end-color: var(--gold); }
.menu-trigger span {
  font-family: var(--font);
  font-weight: 600;
  color: var(--navy);
}

/* ---------- Hero banner ---------- */
.main-banner { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%); }
.main-banner .header-text h2 { color: #fff; font-weight: 800; font-size: 2.1rem; margin-bottom: .75rem; }
.main-banner .header-text p { color: rgba(255,255,255,.82); line-height: 2; font-size: .95rem; }
.white-button.first-button a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #fff !important;
  font-weight: 700;
  border-radius: 999px;
  padding: .75rem 1.6rem;
  box-shadow: 0 8px 20px rgba(217,138,29,.35);
}
.right-image img { filter: drop-shadow(0 20px 30px rgba(0,0,0,.25)); }

/* ---------- Catalog section ---------- */
#services { background: var(--surface-soft); padding-block: 3rem; }
#services .sub-title { text-align: center; margin-bottom: 2rem; }

.catalog-filters .dropdown { display: inline-block; }
.catalog-filters .btn.dropdown-toggle {
  background: var(--navy) !important;
  border: none !important;
  font-weight: 700 !important;
  font-family: var(--font);
  padding: .7rem 1.2rem !important;
}
.catalog-filters .dropdown-menu.city-menu-dropdown {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: .5rem;
}
.catalog-filters .dropdown-menu-item { margin-bottom: .3rem; }
.catalog-filters .dropdown-menu-item .btn.btn-info {
  background: var(--surface-soft) !important;
  color: var(--ink) !important;
  border: 1px solid var(--border) !important;
  font-weight: 600 !important;
  border-radius: var(--radius-sm) !important;
}
.catalog-filters .dropdown-menu-item .btn.btn-info:hover { background: #eef1f8 !important; }

/* =========================================================================
   Gift grid — repeats the "ticket" idea from the detail page across cards.
   ========================================================================= */
.hooks-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.hook-tile {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .16s ease, box-shadow .16s ease;
}
.hook-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.hook-image-div {
  position: relative;
  height: 190px;
  background: var(--surface-soft);
  line-height: 0;
}
.hook-tile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hook-tile-image-reserved,
.hook-tile-image-canceled { filter: grayscale(.25) brightness(.85); }

.reserved-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 33, 64, .45);
}
.reserved-overlay .glyphicon { font-size: 2.6rem !important; line-height: 1; }

/* perforated ticket seam between the image and the details */
.hook-tile-details { position: relative; padding: 1.1rem 1.1rem 1.25rem; flex-grow: 1; }
.hook-tile-details::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  border-top: 2px dashed #d8dcea;
}
.hook-tile-details::after {
  /* punch notches, ticket-stub style */
  content: '';
  position: absolute;
  top: -9px;
  inset-inline-start: -9px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  box-shadow: 250px 0 0 0 var(--surface-soft), 250px 0 0 1px var(--border);
}

.hook-tile-header { margin: 0 0 .3rem; }
.hook-tile-header a { display: block; font-size: 1rem; font-weight: 700; color: var(--ink); }
.hook-tile-desc { display: block; font-size: .82rem; font-weight: 400; color: var(--ink-soft); margin-top: .15rem; }
.business-name { display: inline-block; margin-top: .35rem; font-size: .82rem; font-weight: 600; color: var(--sky); }

.hook-tile-actions { margin-top: .6rem; }

.discount { display: flex; align-items: center; gap: .5rem; margin-bottom: .3rem; }
.discount .old-price { color: var(--ink-faint); text-decoration: line-through; font-size: .85rem; }
.discount .free {
  display: inline-block;
  background: rgba(242,169,59,.15);
  color: var(--gold-deep);
  font-weight: 800;
  font-size: .78rem;
  padding: .25rem .6rem;
  border-radius: 999px;
}

.hook-reserved-text {
  display: inline-block;
  background: rgba(23,163,152,.12);
  color: var(--teal-deep);
  font-weight: 700;
  font-size: .82rem;
  padding: .3rem .7rem;
  border-radius: 999px;
}
.hook-waitlisted-text { font-size: .82rem; color: var(--ink-soft); }
.hook-waitlisted-text span:first-child { font-weight: 700; color: var(--ink); }

.hook-tile-buttons { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.hook-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  font-family: var(--font);
  font-weight: 700;
  font-size: .85rem;
  padding: .55rem 1.1rem;
  cursor: pointer;
  transition: filter .12s ease, transform .12s ease;
}
.hook-button:hover { filter: brightness(1.06); }
.hook-button:active { transform: translateY(1px); }

.hook-button.add-hook { background: var(--teal); color: #fff !important; }
.hook-button.waitlist-hook { background: var(--gold); color: #fff !important; }
.hook-button.hook-details.btn-boring {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--ink) !important;
}

.hook-like-comments {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .82rem;
  color: var(--ink-soft);
}
.hook-like-comments .fa-heart { color: var(--coral); }

.loader {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.5rem 0;
  color: var(--ink-soft);
  font-weight: 600;
}

/* ---------- Glyphicon fallback (bootstrap 3 icon font isn't loaded) ---------- */
.glyphicon { font-family: var(--font); font-style: normal; display: inline-block; }
.glyphicon-check::before { content: '✔'; }
.glyphicon-time::before { content: '⏳'; }

/* ---------- Footer ---------- */
#newsletter { background: var(--navy-deep); padding-block: 1.75rem; margin-top: 2rem; }
#newsletter .copyright-text p {
  margin: 0;
  text-align: center;
  color: rgba(255,255,255,.7);
  font-size: .85rem;
}

/* ---------- Accessibility ---------- */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .main-banner .col-lg-6:last-child { display: none; }
}
@media (max-width: 767.98px) {
  .main-nav .nav { display: none; }
  .hooks-list { grid-template-columns: 1fr; gap: 1.1rem; }
  .main-banner .header-text h2 { font-size: 1.6rem; }
}
@media (max-width: 480px) {
  .hook-tile-image { min-height: unset !important; }
  .hook-image-div { height: 160px; }
}
@media (max-width: 320px) {
  .hook-image-div { height: 140px; }
  .catalog-filters .btn.dropdown-toggle { width: 100% !important; }
}