/* Reset */
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #fff;
  color: #333;
}

/* Banner */
.banner {
  background: url('../images/factory-gallery-11.jpg') no-repeat center center/cover;
  height: 60vh;
  position: relative;
  text-align: center;
}
.banner-overlay {
  background: rgba(0,0,0,0.5);
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner-overlay h2 {
  color: #fff;
  font-size: 28px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
}

/* Layout */
.page-layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding: 20px;
  gap: 20px;
  width: 80%;
  margin-left: 50px;
  margin-bottom: 0;
}

/* Sidebar */
.sidebar {
  flex: 0 0 250px;
  background: #f8f8f8;
  border: 1px solid #ddd;
}
.sidebar h3 a {
  padding: 8px;
  background-color: #0073e6;
  color: #fff;
  font-size: 16px;
  margin-top: 2px;
  margin-bottom: 5px;
  text-decoration: none;
}

.sidebar h5 a {
  display: block;
  color: #eef1f5;
  background-color: #0073e6;
  text-decoration: none;
  margin: 2px;
  font-size: 15px;
  text-align: left;
  transition: color 0.3s ease;
}
.sidebar .categories {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar .categories li {
  border-bottom: 1px solid #ddd;
}
.sidebar .cat-title {
  display: block;
  padding: 10px 15px;
  font-weight: bold;
  background: #0073e6;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s;
}
.sidebar .cat-title:hover {
  background: #005bb5;
}
.sidebar .categories ul {
  list-style: none;
  margin: 0;
  padding: 0 0 0 15px;
}
.sidebar .categories ul li a {
  display: block;
  padding: 8px 15px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s ease;
}
.sidebar .categories ul li a:hover {
  color: #0073e6;
  background: #f0f0f0;
}
.sidebar h5 a:hover {
  text-decoration: none;
}

.sidebar div {
  border-top: 1px solid #ddd;
}
.sidebar h5 a {
  text-decoration: none;
  margin-top: 0;
  padding: 5px 5px 5px 5px;
  font-size: 17px;
  color: #eef1f5;
  text-align: center;
  background-color:#1a73e8 ;
}
 .about-logo {
  display: block;
  width: 290px;
  height: 250px;
  object-fit: cover;
}

.sidebar p {
  font-size: 14px;
  color: #555;
  margin: 4px 0;
}
.sidebar p.phone::before { content: "📞 "; }
.sidebar p.email::before { content: "✉️ "; }
.sidebar p.location::before { content: "📍 "; }

/* Main Content */
.main-content {
  flex: 1;
  width: 90%;
}

/* Product List */
.product-list {
  display: flex;
  flex-wrap: wrap;   /* allows items to wrap neatly */
  gap: 20px;
}

.product-item {
  flex: 0 0 320px;   /* fixed base width */
  max-width: 920px;  /* prevents stretching */
  min-width: 800px;  /* ensures consistency */
  display: flex;
  flex-direction: column;
  border: 1px solid #ddd;
  background: #fff;
  padding: 15px;
  margin-bottom: 20px;
  transition: box-shadow 0.3s;
}

.product-item:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.product-item img {
  width: 300px;
  height: auto;
  max-height: 380px;
  object-fit: cover;
  border: 1px solid #eee;
}
.product-item .info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* pushes footer to bottom */
}
.product-item h4 {
  margin: 0 0 10px;
  font-size: 18px;
}
.product-item p,
.product-item li {
  font-size: 14px;
  line-height: 1.5;
  color: #555;
  margin-bottom: 8px;
}

/* Info Footer (button + socials) */
.info-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

/* Inquiries Button */
.product-item a[href*="contact.php"] {
  display: inline-block;
  padding: 4px 5px;
  width: 20%;
  background-color: #0073e6;
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  border-radius: 6px;
  text-align: center;
  transition: background 0.3s ease, transform 0.2s ease;
}
.product-item a[href*="contact.php"]:hover {
  background-color: #005bb5;
  transform: translateY(-2px);
}

/* Social Links */
.social-links {
  display: flex;
  justify-content: center;   /* center on larger screens */
  gap: 14px;
  margin: 12px 0 0 0;
  padding: 0;
  list-style: none;
}
.social-links li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #f0f0f0;
  border-radius: 50%;
  font-size: 16px;
  color: #333;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.social-links li a:hover {
  background: #0073e6;
  color: #fff;
  transform: translateY(-3px);
}

/* Gallery Section */
h2 {
  text-align: center;
  padding: 20px;
  color: #333;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  padding: 20px;
  max-width: 1000px;
  margin: auto;
}
.gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 8px;
  transition: transform 0.3s ease;
}
.gallery img:hover {
  transform: scale(1.05);
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 8px;
}
.lightbox span {
  position: absolute;
  top: 20px;
  right: 40px;
  font-size: 40px;
  color: white;
  cursor: pointer;
  font-weight: bold;
}
/* Inquiries button */
.product-item > a,
.info-footer a {
  display: block;              /* full block so it doesn't cut off */
  width: 100%;                 /* take full width on mobile */
  max-width: 280px;            /* keep it neat, not too wide */
  margin: 12px auto;           /* center it */
  background: #0073e6;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  padding: 12px 0;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s ease;
}
.product-item > a:hover,
.info-footer a:hover {
  background: #005bb5;
}

/* Chat Button */
.chat_button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 16px;
  background-color: #0c9;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
/* =========================
   Responsive Styles
========================= */

/* Tablet screens (≤1024px) */
@media (max-width: 1024px) {
  .page-layout {
    width: 95%;
    margin: 0 auto;
    gap: 15px;
    padding: 15px;
  }

  .sidebar {
    flex: 0 0 220px;
  }

  .main-content {
    width: 100%;
  }

  .banner-overlay h2 {
    font-size: 24px;
  }
}

/* Mobile screens (≤768px) */
@media (max-width: 768px) {
  .page-layout {
    flex-direction: column;   /* stack vertically */
    width: 100%;
    margin: 0;
    padding: 10px;
    gap: 20px;
  }

  .sidebar {
    flex: 1 1 100%;
    width: 100%;
    margin-bottom: 20px;
  }

  .main-content {
    width: 100%;
  }

  .banner {
    height: 140px;
  }
  .banner-overlay h2 {
    font-size: 20px;
    letter-spacing: 1px;
  }

  .product-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .product-item img {
    width: 100%;
    max-width: 250px;
    height: auto;
  }
  .product-item .info {
    width: 100%;
  }

  .gallery {
    grid-template-columns: 1fr;   /* single column gallery */
  }

  .pagination {
    gap: 6px;
  }
  .pagination .page {
    min-width: 35px;
    height: 35px;
    font-size: 13px;
  }
  /* Main Content Responsive Enhancements */

/* For product info section */
.product-item .info {
  text-align: left;       /* better readability */
  padding: 10px 15px;
}

.product-item .info h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;     /* title centered */
}

.product-item .info p {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
  color: #444;
  text-align: justify;    /* neat paragraph alignment */
}

/* Style the bullet points */
.product-item .info ul {
  margin: 10px 0 15px 18px;
  padding: 0;
}
.product-item .info ul li {
  margin-bottom: 6px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #555;
}

/* Inquiries button */
.info-footer a,
.product-item > a { /* for single inquiry links */
  display: inline-block;
  background: #0073e6;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 20px;
  margin: 10px 0;
  border-radius: 6px;
  text-decoration: none;
  text-align: center;
  transition: background 0.3s ease;
}
.info-footer a:hover,
.product-item > a:hover {
  background: #005bb5;
}

/* Social links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 12px 0 0 0;
  padding: 0;
  list-style: none;
}
.social-links li a {
  font-size: 16px;
  color: #555;
  transition: color 0.3s ease;
}
.social-links li a:hover {
  color: #0073e6;
}

 .product-item > a,
  .info-footer a {
    font-size: 14px;
    padding: 12px;
    width: 100%;      /* always full width */
    max-width: none;  /* remove fixed limit */
  }
}

/* Small phones (≤480px) */
@media (max-width: 480px) {
  .banner {
    height: 40vh;      /* Reduce height for small phones */
    background-position: center top;
    background-size: cover;
  }
  .banner-overlay h2 {
    font-size: 18px;
  }

  .sidebar h3 a {
    font-size: 14px;
    padding: 6px;
  }
  .sidebar h5 a {
    font-size: 13px;
    padding: 4px;
  }
  .sidebar p {
    font-size: 12px;
  }

  .product-item h4 {
    font-size: 16px;
  }
  .product-item p {
    font-size: 13px;
  }

  .feedback-form input,
  .feedback-form textarea {
    font-size: 14px;
  }

  .pagination .page {
    min-width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .product-item .info h4 {
    font-size: 16px;
  }
  .product-item .info p {
    font-size: 13px;
  }
  .product-item .info ul li {
    font-size: 13px;
  }
  .info-footer a,
  .product-item > a {
    width: 100%;  /* full-width CTA button */
    padding: 12px;
    font-size: 14px;
  }

    .product-item > a,
  .info-footer a {
    font-size: 14px;
    padding: 12px;
    border-radius: 8px;
  }
}


/* Default (desktop/tablet) */


/* Social links on mobile (≤768px) */
@media (max-width: 768px) {
  .social-links {
    justify-content: flex-start;  /* align left on mobile */
    flex-wrap: wrap;              /* allow wrapping neatly */
    gap: 12px;
  }
}

/* Mobile screens (≤768px) */
@media (max-width: 768px) {
  .product-list {
    display: grid;
    grid-template-columns: 1fr;  /* single column layout */
    gap: 20px;
  }

  .product-item {
    flex: none;            /* remove flex sizing */
    width: 100%;           /* take full width */
    min-width: auto;       /* reset min-width */
    max-width: 100%;       /* reset max-width */
  }

  .product-item img {
    width: 100%;           /* responsive image */
    max-width: 100%;
    height: auto;
  }
}
/* =========================
   Sidebar - Mobile (max-width: 480px)
========================= */
@media (max-width: 480px) {

  .sidebar {
    flex: 1 1 100%;       /* Full width */
    width: 100%;
    border: none;
    padding: 10px;
    margin-bottom: 20px;
    background: #f8f8f8;
  }

  .sidebar h3 a,
  .sidebar h5 a {
    font-size: 14px;
    padding: 6px 8px;
  }

  .sidebar .categories li {
    border-bottom: 1px solid #ccc;
  }

  .sidebar .cat-title {
    font-size: 14px;
    padding: 8px 10px;
  }

  .sidebar .categories ul li a {
    font-size: 13px;
    padding: 6px 10px;
  }

  .sidebar p {
    font-size: 12px;
    margin: 3px 0;
  }

  .about-logo {
    width: 100%;
    height: auto;
    max-height: 200px;
  }
}
/* ====== Mobile CSS: Max 480px ====== */
@media only screen and (max-width: 480px) {

  /* Product List - Stack vertically */
  .product-list {
    flex-direction: column;
    gap: 15px;
    padding: 10px;
  }

  .product-item {
    flex: 1 1 auto;
    min-width: 100%;
    max-width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 8px;
  }

  /* Images scale nicely */
  .product-item img {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
  }

  /* Product info text */
  .product-item h4 {
    font-size: 16px;
    margin-bottom: 6px;
  }

  .product-item p,
  .product-item li {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 6px;
  }

  /* Info footer adjustments */
  .info-footer {
    align-items: stretch;
    gap: 8px;
  }

  /* Inquiry button full width */
  .product-item > a,
  .info-footer a {
    width: 100%;
    max-width: 100%;
    font-size: 10px;
    padding: 10px 0;
  }

  /* Social links centered and smaller */
  .social-links {
    justify-content: flex-start;
    gap: 10px;
    margin-top: 8px;
  }

  .social-links li a {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  /* Gallery section */
  .gallery {
    grid-template-columns: 1fr; /* one column */
    gap: 10px;
    padding: 10px;
  }

  .gallery img {
    height: 180px;
    border-radius: 6px;
  }

  /* Lightbox */
  .lightbox img {
    max-width: 95%;
    max-height: 70%;
  }

  /* Chat button smaller and more accessible */
  .chat_button {
    bottom: 15px;
    right: 15px;
    padding: 8px 14px;
    font-size: 12px;
  }

  /* Headings */
  h2 {
    font-size: 20px;
    padding: 15px 10px;
  }
}
