/* ===================================================
   Santeprint Product Listing Page
   =================================================== */

/* --- Header --- */
.products-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.products-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: opacity 0.2s;
}
.back-link:hover {
  opacity: 0.7;
}
.back-link svg {
  flex-shrink: 0;
  transition: transform 0.2s;
}
.back-link:hover svg {
  transform: translateX(-3px);
}

/* Language buttons */
.lang-switch {
  display: flex;
  gap: 4px;
}
.lang-btn {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}
.lang-btn:hover {
  border-color: var(--green);
  color: var(--green);
}
.lang-btn.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* --- Main --- */
.products-main {
  min-height: 60vh;
  background: var(--bg);
}
.products-main .section {
  padding-top: clamp(40px, 6vw, 64px);
  padding-bottom: clamp(40px, 6vw, 80px);
}

/* --- Search Bar --- */
.search-bar {
  display: flex;
  align-items: center;
  max-width: 520px;
  margin: 0 auto 24px;
  position: relative;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-bar:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(11,111,88,0.1);
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: transparent;
  border-radius: 10px;
}
.search-bar input::placeholder {
  color: var(--muted);
}
.search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  background: var(--paper);
  transition: all 0.2s;
}
.search-clear:hover {
  color: var(--ink);
  background: var(--line);
}
.search-count {
  display: block;
  max-width: 520px;
  margin: 6px auto 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* --- Filter Tabs --- */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  justify-content: center;
}
.filter-tabs button {
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-tabs button:hover {
  border-color: var(--green);
  color: var(--green);
}
.filter-tabs button.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* --- Product Grid --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.product-card-img {
  position: relative;
  background: #fff;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
  cursor: zoom-in;
}
.product-card-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}
.product-card:hover .product-card-img img {
  transform: scale(1.05);
}

.product-card-model {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.product-card-model span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}
.product-card-model .quote-hint {
  font-size: 12px;
  color: var(--green);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.product-card-model .quote-hint a {
  color: inherit;
  text-decoration: none;
}
.product-card-model .quote-hint a:hover {
  text-decoration: underline;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state svg {
  margin: 0 auto 16px;
  opacity: 0.5;
}
.empty-state p {
  font-size: 16px;
}

/* --- Responsive --- */
@media (max-width: 920px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }
  .product-card-img {
    padding: 14px;
  }
}

@media (max-width: 620px) {
  .products-header-inner {
    padding: 12px 16px;
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .product-card-img {
    padding: 10px;
  }
  .product-card-model {
    padding: 10px 12px 12px;
  }
  .product-card-model span {
    font-size: 12px;
  }
  .filter-tabs button {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* ====== Lightbox ====== */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.88);
  align-items: center;
  justify-content: center;
  animation: lbFadeIn 0.25s ease;
}
.lightbox.open {
  display: flex;
}

@keyframes lbFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: lbZoomIn 0.3s ease;
}

@keyframes lbZoomIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-inner img {
  max-width: 90vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

#lightbox-caption {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin-top: 16px;
  text-align: center;
  max-width: 80vw;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  z-index: 10;
  font-size: 40px;
  font-weight: 300;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  transition: opacity 0.2s;
}
.lightbox-close:hover {
  opacity: 0.6;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  font-size: 50px;
  font-weight: 300;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  padding: 20px 16px;
  transition: opacity 0.2s;
  line-height: 1;
}
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 0.6;
}

@media (max-width: 620px) {
  .lightbox-close { top: 12px; right: 16px; font-size: 32px; }
  .lightbox-prev, .lightbox-next { font-size: 36px; padding: 12px 8px; }
  .lightbox-inner img { padding: 8px; }
}

/* ====== WhatsApp Float Button ====== */

.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 800;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
}
.whatsapp-float svg {
  width: 28px;
  height: 28px;
}
.whatsapp-float:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 24px rgba(37,211,102,0.55);
}

@media (max-width: 620px) {
  .whatsapp-float {
    bottom: 20px;
    right: 16px;
    width: 48px;
    height: 48px;
  }
  .whatsapp-float svg {
    width: 24px;
    height: 24px;
  }
}
