/* ================================================================
   Product Catalog Custom Styling (other_product.html)
   Theme: Premium Green (Chaiyapruek Kaset)
   ================================================================ */

/* Page Header overrides to match the sub-page look */
.sub-page-header {
  background: linear-gradient(135deg, #16a34a 0%, #047857 100%);
  padding: 15px 0;
  box-shadow: var(--shadow-md);
}

.sub-header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sub-logo-block {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
  font-weight: 700;
  font-size: 1.3rem;
}

.sub-logo-block img {
  height: 40px;
  width: auto;
  border-radius: 50%;
  background: white;
  padding: 2px;
}

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-back-home:hover {
  background: white;
  color: #047857;
  transform: translateX(-3px);
}

/* Page Intro Block */
.text-center-block {
  text-align: center;
  padding: 40px 20px;
}

.badge-wrapper {
  margin-bottom: 12px;
}

.knowledge-badge {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: inline-block;
}

.page-main-title {
  font-size: 2.2rem;
  color: #1b5e20;
  margin-bottom: 10px;
  font-weight: 700;
}

.page-desc-text {
  font-size: 1.05rem;
  color: #555;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Tabs Filter Control */
.filter-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 35px;
  padding: 0 10px;
}

.filter-btn {
  background: white;
  border: 1px solid #e2e8f0;
  color: #4b5563;
  padding: 10px 20px;
  border-radius: 30px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.filter-btn:hover {
  border-color: #16a34a;
  color: #16a34a;
  transform: translateY(-1px);
}

.filter-btn.active {
  background: #16a34a;
  border-color: #16a34a;
  color: white;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

/* Product Grid System */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 50px;
}

.product-card {
  background: white;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
  border-color: #d1fae5;
}

.product-image-container {
  position: relative;
  background: #f8fafc;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid #f1f5f9;
  cursor: zoom-in;
}

.product-image-container img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image-container img {
  transform: scale(1.06);
}

/* Card Badges */
.card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 5;
}

.badge-item {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  color: white;
}

.badge-brand {
  background: #1e293b;
}

.badge-cat {
  background: #059669;
}

/* Card Content Details */
.product-info-block {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-main-name {
  font-size: 1.25rem;
  color: #1f2937;
  font-weight: 700;
  margin-bottom: 6px;
  transition: color 0.2s;
}

.product-card:hover .product-main-name {
  color: #16a34a;
}

.product-ingredient {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 12px;
  font-style: italic;
}

.product-details-desc {
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.5;
  margin-bottom: 15px;
  flex-grow: 1;
}

.product-action-footer {
  border-top: 1px solid #f3f4f6;
  padding-top: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-label-text {
  font-size: 0.85rem;
  color: #9ca3af;
  font-weight: 500;
}

.btn-zoom-trigger {
  background: transparent;
  border: none;
  color: #16a34a;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}

.btn-zoom-trigger:hover {
  color: #047857;
}

/* Image Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-modal.show {
  display: flex;
  opacity: 1;
}

.lightbox-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-modal-content img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox-modal.show .lightbox-modal-content img {
  transform: scale(1);
}

.lightbox-caption-text {
  color: white;
  margin-top: 15px;
  font-size: 1.1rem;
  font-weight: 500;
  text-align: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px 20px;
  border-radius: 30px;
}

.lightbox-close-trigger {
  position: absolute;
  top: -45px;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.lightbox-close-trigger:hover {
  background: white;
  color: #0f172a;
  transform: rotate(90deg);
}

/* Animations for filter filtering */
.product-card.hide {
  display: none;
}

/* Responsive adjust */
@media (max-width: 640px) {
  .page-main-title {
    font-size: 1.8rem;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
  .filter-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
}
