/* ==========================================================================
   EL-MET Category Page Styles
   ========================================================================== */

/* HERO BANNER */
.cat-hero {
  position: relative;
  height: 40vh;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 60px;
  overflow: hidden;
}
.cat-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.cat-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cat-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}
.cat-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
}
.products-hero-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 14px;
}
.cat-hero h1 {
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-top: 0;
}

/* CATEGORY SECTION */
.cat-section {
  padding: 120px 0;
  background: #fff;
}

/* CATEGORY CARDS GRID */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* CATEGORY CARD */
.cat-card {
  background: #f5f5f5;
  overflow: hidden;
  transition: transform 0.3s;
}
.cat-card:hover {
  transform: translateY(-4px);
}
.cat-card-img {
  height: 240px;
  overflow: hidden;
}
.cat-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.cat-card:hover .cat-card-img img {
  transform: scale(1.05);
}
.cat-card-body {
  padding: 30px;
}
.cat-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: #2D2727;
  margin-bottom: 12px;
  line-height: 1.3;
}
.cat-card p {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 24px;
}
.cat-card-btn {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #2D2727;
  text-decoration: none;
  border-bottom: 2px solid #2D2727;
  padding-bottom: 4px;
  transition: color 0.3s, border-color 0.3s;
  cursor: pointer;
}
.cat-card-btn:hover {
  color: #555;
  border-color: #555;
}

/* RESPONSIVE */
@media (max-width: 992px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .cat-hero {
    height: 30vh;
    min-height: 200px;
    padding-bottom: 40px;
  }
  .cat-section {
    padding: 60px 0;
  }
  .cat-grid {
    grid-template-columns: 1fr;
  }
  .cat-card-img {
    height: 280px;
  }
}

/* ==========================================================================
   MESH WELDING MACHINES — hero card layout (image-as-background, text over)
   Scoped to body.term-mesh-welding-machines so no other category page changes.
   ========================================================================== */
body.term-mesh-welding-machines .cat-section { padding: 90px 0 120px; }
body.term-mesh-welding-machines .cat-grid    { gap: 24px; }

body.term-mesh-welding-machines .cat-card {
  position: relative;
  background: #111;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  transform: translateZ(0);
  transition: transform .45s ease, box-shadow .45s ease;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
body.term-mesh-welding-machines .cat-card-img {
  position: absolute;
  inset: 0;
  height: 100%;
  z-index: 0;
}
body.term-mesh-welding-machines .cat-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s cubic-bezier(.2,.6,.2,1);
}
body.term-mesh-welding-machines .cat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.55) 50%, rgba(0,0,0,.75) 100%);
  z-index: 1;
  transition: background .4s ease;
}
body.term-mesh-welding-machines .cat-card-body {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 32px 28px;
  pointer-events: none;
}
body.term-mesh-welding-machines .cat-card h3 {
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 700;
  color: #fff;
  margin: 0 0 14px;
  line-height: 1.25;
  letter-spacing: .3px;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}
body.term-mesh-welding-machines .cat-card p {
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 400;
  color: rgba(255,255,255,.92);
  line-height: 1.55;
  margin: 0;
  max-width: 280px;
  text-shadow: 0 1px 6px rgba(0,0,0,.3);
}
body.term-mesh-welding-machines .cat-card-btn { display: none; }

body.term-mesh-welding-machines .cat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
}
body.term-mesh-welding-machines .cat-card:hover .cat-card-img img {
  transform: scale(1.08);
}
body.term-mesh-welding-machines .cat-card:hover::after {
  background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.45) 50%, rgba(0,0,0,.7) 100%);
}

@media (max-width: 992px) {
  body.term-mesh-welding-machines .cat-card { aspect-ratio: 4 / 5; }
}
@media (max-width: 768px) {
  body.term-mesh-welding-machines .cat-card { aspect-ratio: 16 / 11; }
  body.term-mesh-welding-machines .cat-card-img { height: 100%; }
}
