/* =========================================================
   SILAX LIMITED — Products page
   Loads AFTER styles.css and reuses its tokens/classes.
   ========================================================= */

/* ---------- Page banner ---------- */
.page-hero{position:relative;background:linear-gradient(180deg,var(--navy-deep) 0%,var(--navy-mid) 100%);color:#fff;overflow:hidden;padding:44px 0 40px;}
.page-hero .wrap{position:relative;z-index:2;}
.page-hero h1{font-size:clamp(1.7rem,6vw,3rem);color:#fff;margin-bottom:.35em;line-height:1.05;}
.page-hero p{color:#C7D9E3;max-width:640px;font-size:.95rem;margin-bottom:0;}
.breadcrumb{font-family:var(--font-mono);font-size:.7rem;letter-spacing:.08em;color:#7FC4EE;margin-bottom:14px;}
.breadcrumb a{color:#9FC7DE;transition:color .15s ease;}
.breadcrumb a:hover{color:#fff;}
.breadcrumb span{margin:0 6px;opacity:.6;}

/* active nav link */
.main-nav a.is-active{color:#fff;}
.main-nav a.is-active:not(.nav-cta)::after{width:100%;}
.mobile-nav a.is-active{background:rgba(255,255,255,.06);color:#fff;}

/* ---------- Product grid ---------- */
.products{padding:40px 0 56px;}
.products-head{margin-bottom:24px;}
.products-head h2{font-size:clamp(1.4rem,5vw,2rem);margin-bottom:.3em;}
.products-head p{max-width:620px;margin-bottom:0;}

.product-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:18px;
}
@media (min-width:600px){.product-grid{grid-template-columns:repeat(2,1fr);gap:20px;}}
@media (min-width:1100px){.product-grid{grid-template-columns:repeat(4,1fr);gap:22px;}}

.product-card{
  display:flex;flex-direction:column;
  background:#fff;
  border:1px solid var(--line-light);
  border-radius:8px;
  overflow:hidden;
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.product-card:hover{transform:translateY(-4px);box-shadow:0 14px 30px rgba(7,43,68,.14);border-color:rgba(28,111,165,.35);}

/* image area — name sits on the image, category chip on top */
.product-media{
  width:100%;margin:0; /* Swiper adds margin:auto, which collapses the box to 0 width inside a flex card */
  height:0;padding-bottom:75%;flex-shrink:0; /* fixed 4:3 box that never grows with content */
  position:relative;
  overflow:hidden;
  background:
    linear-gradient(var(--line-dark) 1px,transparent 1px) 0 0/24px 24px,
    linear-gradient(90deg,var(--line-dark) 1px,transparent 1px) 0 0/24px 24px,
    linear-gradient(160deg,var(--navy-mid),var(--navy-deep));
}
/* slider inside each card */
.product-swiper{--swiper-theme-color:#1E9E63;--swiper-navigation-size:14px;}
/* Wrapper is pinned inside the 4:3 box so a photo's own size can never stretch the card */
.product-swiper .swiper-wrapper{position:absolute;top:0;left:0;width:100%;height:100%;}
.product-swiper .swiper-slide{position:relative;height:100%;overflow:hidden;}
.product-swiper .swiper-slide img{position:absolute;top:0;left:0;width:100%;height:100%;max-width:none;object-fit:cover;transition:transform .5s ease;}
.product-card:hover .product-swiper .swiper-slide img{transform:scale(1.05);}
.product-media::after{ /* darkens the bottom so the name stays readable on any photo */
  content:'';position:absolute;inset:0;z-index:2;
  background:linear-gradient(0deg,rgba(7,43,68,.92) 0%,rgba(7,43,68,.35) 45%,transparent 70%);
  pointer-events:none;
}
.product-category{
  position:absolute;top:12px;left:12px;z-index:3;pointer-events:none;
  font-family:var(--font-mono);font-size:.66rem;letter-spacing:.08em;text-transform:uppercase;
  background:var(--green-signal);color:#06231A;font-weight:600;
  padding:5px 10px;border-radius:3px;
  max-width:calc(100% - 24px);
}
.product-name{
  position:absolute;left:0;right:0;bottom:0;z-index:3;pointer-events:none;
  margin:0;padding:16px 16px 32px; /* extra bottom space leaves room for the dots */
  font-size:clamp(1.15rem,3.6vw,1.35rem);
  line-height:1.15;color:#fff;
  text-shadow:0 1px 8px rgba(0,0,0,.35);
}

/* dots + arrows */
.product-swiper .swiper-pagination{bottom:10px !important;z-index:4;}
.product-swiper .swiper-pagination-bullet{background:#fff;opacity:.55;}
.product-swiper .swiper-pagination-bullet-active{background:var(--green-signal);opacity:1;}
.product-swiper .swiper-button-prev,
.product-swiper .swiper-button-next{
  z-index:4;top:50%;margin-top:-16px;width:32px;height:32px;
  background:rgba(7,43,68,.65);border:1px solid rgba(255,255,255,.35);border-radius:50%;
  color:#fff;padding:0;cursor:pointer;
  opacity:0;transition:opacity .2s ease, background .2s ease;
}
.product-swiper .swiper-button-prev{left:10px;}
.product-swiper .swiper-button-next{right:10px;}
.product-swiper .swiper-button-prev:hover,
.product-swiper .swiper-button-next:hover{background:var(--green-signal);}
.product-card:hover .product-swiper .swiper-button-prev,
.product-card:hover .product-swiper .swiper-button-next,
.product-swiper .swiper-button-prev:focus-visible,
.product-swiper .swiper-button-next:focus-visible{opacity:1;}
.product-swiper.is-single .swiper-pagination,
.product-swiper.is-single .swiper-button-prev,
.product-swiper.is-single .swiper-button-next{display:none;}
.product-swiper.is-single .product-name{padding-bottom:16px;}

.product-body{display:flex;flex-direction:column;flex:1;padding:16px 16px 18px;}
.product-body p{font-size:.9rem;line-height:1.55;margin-bottom:1em;}
.product-link{
  margin-top:auto;
  font-family:var(--font-mono);font-size:.78rem;letter-spacing:.03em;
  color:var(--blue-steel);
  display:inline-flex;align-items:center;gap:8px;
  padding:6px 0;
  transition:color .2s ease, gap .2s ease;
}
.product-link:hover{color:var(--green-signal);gap:12px;}

/* ---------- Bottom call-to-action ---------- */
.products-cta{background:linear-gradient(180deg,var(--navy-mid) 0%,var(--navy-deep) 100%);color:#fff;text-align:center;padding:48px 0;position:relative;overflow:hidden;}
.products-cta .blueprint-grid{opacity:.3;}
.products-cta .wrap{position:relative;z-index:2;}
.products-cta h2{color:#fff;font-size:clamp(1.4rem,5vw,2rem);}
.products-cta p{color:#C7D9E3;max-width:520px;margin:0 auto 1.4em;}
.products-cta .btn{width:100%;max-width:320px;}

@media (min-width:861px){
  .page-hero{padding:64px 0 56px;}
  .page-hero p{font-size:1rem;}
  .products{padding:56px 0 80px;}
  .products-head{margin-bottom:32px;}
  .product-body{padding:18px 18px 20px;}
  .products-cta{padding:64px 0;}
  .products-cta .btn{width:auto;max-width:none;}
}

/* very small phones */
@media (max-width:359px){
  .product-name{font-size:1.05rem;padding:14px 12px 30px;}
  .product-category{font-size:.6rem;top:10px;left:10px;}
}

/* touch: keep tap target comfortable, no hover-lift stickiness */
@media (hover:none){
  .product-card:hover{transform:none;box-shadow:none;border-color:var(--line-light);}
  .product-card:hover .product-swiper .swiper-slide img{transform:none;}
  .product-swiper .swiper-button-prev,.product-swiper .swiper-button-next{display:none;} /* touch users swipe */
  .product-link{padding:12px 0;}
}

@media print{
  .product-card{break-inside:avoid;border:1px solid #ccc;}
  .products-cta{display:none;}
}