/* ================== PRODUCT HERO SECTION ================== */
/* ===========================
   PRODUCT HERO SECTION (FULL)
   =========================== */

.product-hero-section{
  height: 40vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  /* ✅ ONLY IMAGE (no blue overlay / no tint) */
  background-image: url("image/banproduct.jpg"); /* ✅ change path if needed */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  color: #fff;
  position: relative;
  overflow: hidden;
}

.product-hero-container{
  width: min(1200px, 92%);
  margin: 0 auto;
  padding: 0 16px;
}

.product-hero-title{
  margin: 0;
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;

  /* ✅ Text readable without overlay */
  display: inline-block;
  padding: 10px 18px;
  border-radius: 14px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(2px);
  text-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

/* ✅ Mobile adjustments */
@media (max-width: 768px){
  .product-hero-section{
    height: 50vh;
  }

  .product-hero-title{
    font-size: clamp(28px, 8vw, 46px);
    padding: 10px 16px;
  }
}


/* section 1 */
/* =========================
   PRODUCT GALLERY BASIC UI
========================= */
.product-gallery{
  padding: 40px 0;
}

.product-container{
  width: min(1200px, 92%);
  margin: 0 auto;
}

.product-row{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.product-card{
  background: #ffffff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.10);
  text-align: center;
  overflow: hidden;
}

.product-card img{
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.product-card h3{
  margin: 12px 0 10px;
  font-size: 18px;
  font-weight: 800;
  color: #1c3a5c;
}
.view-full-image {
  display: inline-block;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.6px;
  text-decoration: underline;  /* This adds the underline */
  color: #1c3a5c;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(21, 101, 192, 0.08);
  transition: transform .2s ease, background .2s ease;
}


.view-full-image:hover{
  transform: translateY(-2px);
  background: rgba(21, 101, 192, 0.14);
}

/* Tablet */
@media (max-width: 1024px){
  .product-row{
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile */
@media (max-width: 768px){
  .product-row{
    grid-template-columns: repeat(2, 1fr);
  }
  .product-card img{
    height: 160px;
  }
}

@media (max-width: 480px){
  .product-row{
    grid-template-columns: 1fr;
  }
  .product-card img{
    height: 190px;
  }
}

/* =========================
   MODAL (FULL IMAGE VIEW)
   Fix: Close button always visible on mobile
   Fix: Click outside closes modal
========================= */
.modal{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.65);
  padding: 20px;
}

/* White modal box */
.modal .modal-box{
  position: relative;
  width: min(1100px, 92vw);
  margin: 6vh auto 0 auto;
  background: #fff;
  border-radius: 18px;
  padding: 54px 22px 22px;   /* ✅ extra top padding for close btn */
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Image fit */
.modal-content{
  display: block;
  max-width: 100%;
  max-height: 75vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ✅ Close button ALWAYS visible */
.close-btn{
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 99999;              /* ✅ above image */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #111;            /* ✅ high contrast */
  color: #fff;
  font-size: 30px;
  line-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.65);
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
  transition: transform .2s ease, opacity .2s ease;
  user-select: none;
}

.close-btn:hover{
  transform: scale(1.05);
}

.close-btn:active{
  transform: scale(0.95);
}

/* Caption */
#caption{
  text-align: center;
  color: #333;
  font-weight: 700;
  margin-top: 12px;
}

/* ✅ Tablet */
@media (max-width: 768px){
  .modal{
    padding: 14px;
  }

  .modal .modal-box{
    margin-top: 10vh;
    width: 94vw;
    border-radius: 14px;
    padding: 56px 16px 16px;   /* ✅ keep top space */
  }

  .close-btn{
    width: 42px;
    height: 42px;
    font-size: 28px;
    line-height: 42px;
    top: 8px;
    right: 8px;
  }

  .modal-content{
    max-height: 70vh;
  }
}

/* ✅ Extra small mobile */
@media (max-width: 480px){
  .modal{
    padding: 12px;
  }

  .modal .modal-box{
    margin-top: 12vh;
    padding: 58px 14px 14px;   /* ✅ more top space */
  }

  .modal-content{
    max-height: 64vh;
  }
}
