/* ==========================================================
   Suracsh — Products page
   Layout follows the supplied design: hero, filter bar, centred category
   headings, image cards with gold tag pills, black CTA block.
   ========================================================== */
.products-page {
  --pg: #B88A0C;          /* pill gold from the design */
  --pg-hover: #a47a09;
  --paper: #f7f4ef;
  --ease: cubic-bezier(.2, .75, .25, 1);
  background: var(--paper);
  color: #101010;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.nav-links a[aria-current="page"] { color: #fff; }

/* ---------- Hero ---------- */
.products-hero {
  min-height: clamp(520px, 45vw, 650px);
  display: grid;
  align-items: center;
  position: relative;
  isolation: isolate;
  background: #06111c;
  color: #fff;
  overflow: hidden;
	height: 100vh;
}
.products-hero:before {
  content: "";
  position: absolute;
  inset: -40px 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(2, 10, 18, .94) 0%, rgba(2, 10, 18, .7) 38%, rgba(2, 10, 18, .06) 74%),
    url('../products/banner.jpg') center/cover no-repeat;
  transform: translate3d(0, var(--hero-y, 0px), 0) scale(var(--hero-s, 1));
  will-change: transform;
}
.products-hero .wrap { width: min(1300px, calc(100% - 48px)); padding: 70px 0; }

.product-crumb {
  font-size: 13px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #e5dbc5;
  margin: 0 0 18px;
}
.products-hero h1 {
  font-size: clamp(36px, 5vw, 72px);
  line-height: .98;
  letter-spacing: -.035em;
  margin: 0;
  max-width: 960px;
}
.br-d { display: none; }
@media (min-width: 900px) { .br-d { display: inline; } }
.products-hero .hero-lead {
  font-size: 16px;
  line-height: 1.5;
  max-width: 640px;
  margin: 26px 0 32px;
  color: #f0f0ed;
}

/* skewed buttons (shared by hero + CTA) */
.hero-actions { display: flex; flex-wrap: wrap; padding-left: 7px; }
.hero-btn {
  transform: skewX(-10deg);
  border: 1px solid #eee;
  padding: 16px 26px;
  color: #fff;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: .03em;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.hero-btn span { display: block; transform: skewX(10deg); text-align: center; }
.hero-btn-light { background: #fff; color: #111; }
.hero-btn-light:hover { background: #B8913A; border-color: #B8913A; }
.hero-btn-dark { border-left: 0; background: rgba(0, 0, 0, .28); border-color: rgba(255, 255, 255, .4); }
.hero-btn-dark:hover { background: rgba(255, 255, 255, .14); }
.hero-btn:focus-visible { outline: 3px solid #c49533; outline-offset: 5px; }

/* ---------- Main ---------- */
.container { width: min(1140px, calc(100% - 48px)); margin: 0 auto; }
.products-main { padding: 52px 0 90px; }

/* filter bar */
.filter-bar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 66px;
}
.filter-select { position: relative; flex: 0 1 565px; }
.filter-search { position: relative; flex: 0 1 447px; }
.filter-select select,
.filter-search input {
  width: 100%;
  height: 54px;
  border: 1px solid #ebe6dc;
  border-radius: 4px;
  background: #fff;
  font: 600 15px/1 "Afacad", sans-serif;
  color: #111;
  padding: 0 52px 0 22px;
  box-shadow: 0 2px 7px rgba(40, 30, 10, .08);
  transition: border-color .25s, box-shadow .25s;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 4px;
}
.filter-select select { cursor: pointer; text-overflow: ellipsis; }
.filter-search input { font-weight: 500; }
.filter-search input::placeholder { color: #9b958a; }
.filter-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.filter-select select:hover,
.filter-search input:hover { border-color: #d8cfb9; }
.filter-select select:focus-visible,
.filter-search input:focus-visible { outline: 0; border-color: var(--pg); box-shadow: 0 0 0 3px rgba(184, 138, 12, .25); }
.filter-select:after {
  content: "";
  position: absolute; right: 22px; top: 50%;
  margin-top: -3px;
  border: 6px solid transparent; border-top-color: #111; border-bottom: 0;
  pointer-events: none;
}
.filter-search svg { position: absolute; right: 18px; top: 50%; margin-top: -10px; color: #5e5a52; pointer-events: none; }

/* category block */
.category { padding: 0; margin: 0 0 84px; }
.category[hidden], .product-card[hidden], .no-results[hidden] { display: none; }
.category-head { text-align: center; max-width: 760px; margin: 0 auto 38px; }
.category h2 {
  font-size: clamp(26px, 3.1vw, 38px);
  letter-spacing: -.03em;
  line-height: 1.1;
  margin: 0;
  position: relative;
  padding-bottom: 16px;
}
.category h2:after {
  content: "";
  position: absolute; left: 50%; bottom: 0;
  width: 56px; height: 3px; margin-left: -28px;
  background: var(--pg);
  transform-origin: center;
  transition: transform .9s var(--ease) .35s;
}
.category-head > p {
  font-size: 17px;
  line-height: 1.45;
  margin: 12px auto 0;
  color: #5b5751;
  max-width: 620px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px;
}

/* card */
.product-card {
  background: #fff;
  border-radius: 6px;
  padding: 25px 25px 25px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-shadow: 0 1px 2px rgba(40, 30, 10, .04);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), opacity .8s var(--ease);
}
.product-card.is-done:hover { transform: translateY(-6px); box-shadow: 0 20px 38px rgba(40, 30, 10, .12); }

.card-media { overflow: hidden; border-radius: 6px; background: #e9e6df; aspect-ratio: 160 / 74; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.product-card:hover .card-media img { transform: scale(1.07); }

.product-card h3 {
  font-size: 19px;
  line-height: 1.22;
  letter-spacing: -.01em;
  font-weight: 900;
  margin: 30px 0 12px;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.card-desc {
  font-size: 15px;
  line-height: 1.5;
  color: #4f4a43;
  margin: 0 0 50px;
}
.tag-list { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tag {
  background: var(--pg);
  color: #fff;
  font-size: 13.5px;
  line-height: 1.25;
  font-weight: 600;
  min-height: 34px;
  padding: 8px 18px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  transition: background-color .25s;
}
.product-card:hover .tag { background: var(--pg-hover); }

.card-link {
  margin-top: 26px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-top: 1px solid #e8e3da;
  padding-top: 18px;
  color: #111;
}
.card-link svg { flex: none; transition: transform .3s var(--ease); }
.card-link:hover svg, .card-link:focus-visible svg { transform: translateX(6px); }
.card-link:focus-visible { outline: 2px solid var(--pg); outline-offset: 4px; }

.no-results { text-align: center; font-size: 18px; color: #5b5751; padding: 30px 0 70px; }
.no-results a { color: var(--pg); font-weight: 700; }

/* ---------- CTA ---------- */
.requirement {
  background: #0a0a0a;
  color: #fff;
  padding: 50px 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border-radius: 6px;
  margin-top: 6px;
}
.requirement h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.08; margin: 0; letter-spacing: -.03em; }
.requirement p { margin: 10px 0 0; color: #d9d9d9; font-size: 15px; }
.req-actions { flex-wrap: nowrap; justify-content: flex-end; }
.hero-btn-gold { background: var(--pg); border-color: var(--pg); color: #111; }
.hero-btn-gold:hover { background: #d1a21a; border-color: #d1a21a; }
.hero-btn-ghost { background: transparent; color: var(--pg); border-color: rgba(184, 138, 12, .75); border-left: 0; }
.hero-btn-ghost:hover { background: rgba(184, 138, 12, .15); color: #e0b43a; }
.req-actions .hero-btn { padding: 18px 30px; white-space: nowrap; }

/* ==========================================================
   Scroll animations (only when JS is on and motion is allowed)
   ========================================================== */
@media (prefers-reduced-motion: no-preference) {
  /* hero opening sequence */
  .js .hero-in { animation: p-up 1s var(--ease) calc(.15s + var(--h, 0) * .13s) both; }
  .js .products-hero:before { animation: p-hero-zoom 2.2s var(--ease) both; }

  /* generic reveal */
  .js .reveal { opacity: 0; transform: translate3d(0, 34px, 0); transition-delay: var(--d, 0s); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  .js .reveal.is-done { transition-delay: 0s; }
  .js .filter-bar.reveal, .js .category-head.reveal, .js .requirement.reveal, .js footer .reveal {
    transition: opacity .9s var(--ease), transform .9s var(--ease);
  }
  .js .product-card.reveal { transform: translate3d(0, 44px, 0) scale(.97); }
  .js .product-card.reveal.is-visible { transform: none; }

  /* underline under category title draws in */
  .js .category-head.reveal h2:after { transform: scaleX(0); }
  .js .category-head.reveal.is-visible h2:after { transform: scaleX(1); }

  /* inside the card: image un-masks, pills slide in one after another */
  .js .product-card.reveal .card-media img { transform: scale(1.22); clip-path: inset(0 0 100% 0); transition: transform 1.2s var(--ease), clip-path 1s var(--ease); transition-delay: calc(var(--d, 0s) + .15s); }
  .js .product-card.reveal.is-visible .card-media img { transform: scale(1); clip-path: inset(0 0 0 0); }
  .js .product-card.reveal.is-done .card-media img { transition: transform .8s var(--ease); clip-path: none; }
  .js .product-card.reveal .tag { opacity: 0; transform: translate3d(-18px, 0, 0); transition: opacity .6s var(--ease), transform .6s var(--ease), background-color .25s; transition-delay: calc(var(--d, 0s) + .35s + var(--t, 0) * .09s); }
  .js .product-card.reveal.is-visible .tag { opacity: 1; transform: none; }
  .js .product-card.reveal.is-done .tag { transition-delay: 0s; }
  .tag:nth-child(2) { --t: 1; } .tag:nth-child(3) { --t: 2; } .tag:nth-child(4) { --t: 3; } .tag:nth-child(5) { --t: 4; }

  /* CTA buttons rise after the block */
  .js .requirement.reveal .hero-btn { opacity: 0; transform: skewX(-10deg) translate3d(0, 18px, 0); transition: opacity .7s var(--ease) .35s, transform .7s var(--ease) .35s, background-color .3s, color .3s, border-color .3s; }
  .js .requirement.reveal.is-visible .hero-btn { opacity: 1; transform: skewX(-10deg); }
  .js .requirement.reveal.is-visible .hero-btn + .hero-btn { transition-delay: .5s, .5s, 0s, 0s, 0s; }

  /* cards re-appear after a filter change */
  .filter-in { animation: p-up .6s var(--ease) var(--fd, 0s) both; }
}
@keyframes p-up { from { opacity: 0; transform: translate3d(0, 28px, 0); } to { opacity: 1; transform: none; } }
@keyframes p-hero-zoom { from { transform: translate3d(0, var(--hero-y, 0px), 0) scale(1.12); } to { transform: translate3d(0, var(--hero-y, 0px), 0) scale(1); } }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1100px) {
  .product-card { padding: 32px 30px 26px; }
  .requirement { padding: 44px 40px; flex-direction: column; align-items: flex-start; }
  .req-actions { justify-content: flex-start; }
}

@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .products-hero { min-height: 540px; }
  .products-hero:before {
    background:
      linear-gradient(90deg, rgba(2, 10, 18, .92), rgba(2, 10, 18, .55)),
      url('../products/banner.jpg') 66% center/cover no-repeat;
  }
  .category { margin-bottom: 66px; }
}

@media (max-width: 760px) {
  .filter-bar { flex-direction: column; gap: 14px; margin-bottom: 48px; }
  .filter-select, .filter-search { flex: none; width: 100%; }
  .products-hero .wrap { padding: 56px 0; }
  .products-hero .hero-lead { font-size: 16px; margin: 22px 0 28px; }
  .req-actions { flex-direction: column; align-items: flex-start; gap: 12px; width: 100%; }
  .req-actions .hero-btn { white-space: normal; }
  .req-actions .hero-btn-ghost { border-left: 1px solid rgba(184, 138, 12, .75); }
}

@media (max-width: 640px) {
  .container, .products-hero .wrap { width: min(100% - 32px, 1300px); }
  .product-grid { grid-template-columns: 1fr; gap: 16px; }
  .product-card { padding: 28px 24px 24px; }
  .products-main { padding: 36px 0 64px; }
  .category { margin-bottom: 54px; }
  .category-head { margin-bottom: 28px; }
  .category-head > p { font-size: 16px; }
  .products-hero { min-height: 500px; }
  .products-hero h1 { font-size: clamp(32px, 9.4vw, 44px); line-height: 1.02; }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 12px; padding-left: 6px; }
  .hero-btn-dark { border-left: 1px solid rgba(255, 255, 255, .4); }
  .hero-btn { padding: 15px 22px; }
  .requirement { padding: 34px 24px; gap: 24px; }
  .req-actions .hero-btn { width: calc(100% - 8px); }
}

/* keep the card entrance subtle on touch screens */
@media (hover: none) {
  .product-card.is-done:hover { transform: none; box-shadow: 0 1px 2px rgba(40, 30, 10, .04); }
  .product-card:hover .card-media img { transform: none; }
}

@media print {
  .js .reveal, .js .hero-in, .js .tag, .js .card-media img { opacity: 1 !important; transform: none !important; clip-path: none !important; animation: none !important; }
}
