/* ==========================================================================
   CFM EXPORT PREMIUM PRODUCT CATALOG STYLESHEET (catalog.css)
   VERSION: 4.0 - Dynamic Gallery + Image Caption + Certificates + Catalog PDF
   ========================================================================== */

/* ==========================================================================
   1. SAYFA ARKA PLANI VE ÇERÇEVE
   ========================================================================== */
.catalog-showcase-bg {
  background: #fafbfc !important;
  padding-top: 130px;
  padding-bottom: 90px;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
}

.catalog-premium-frame {
  background: #ffffff !important;
  box-shadow: 0 30px 70px rgba(11, 37, 69, 0.1) !important;
  border: 1px solid rgba(11, 37, 69, 0.05) !important;
  border-radius: 8px !important;
  width: calc(100% - 120px) !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 40px !important;
}

.catalog-container-layout {
  display: flex;
  flex-direction: column;
  gap: 45px;
  width: 100%;
}

/* ==========================================================================
   2. ÜST SATIR: GÖRSEL (SOL) + BİLGİ (SAĞ)
   ========================================================================== */
.catalog-top-row {
  display: flex;
  gap: 50px;
  width: 100%;
  align-items: flex-start;
}

.catalog-gallery-box {
  width: 45%;
  flex-shrink: 0;
  position: relative;
}

.catalog-main-image-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid #eef2f6;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.catalog-main-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.catalog-main-image-wrapper:hover img {
  transform: scale(1.03);
}

/* ==========================================================================
   3. SAĞ BİLGİ KUTUSU
   ========================================================================== */
.catalog-spec-box {
  width: 55%;
  flex-grow: 1;
}

.catalog-meta-tag {
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #00b4d8;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}

.catalog-product-title {
  font-size: 34px;
  color: #0b2545;
  font-weight: 700;
  margin-bottom: 14px;
  font-family: "Montserrat", sans-serif;
}

.catalog-decorator-line {
  height: 4px;
  width: 50px;
  background-color: #00b4d8;
  margin-bottom: 30px;
  border-radius: 2px;
}

.catalog-transparent-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
}

.catalog-glass-card {
  background: rgba(248, 250, 252, 0.8);
  border: 1px solid #eef2f6;
  padding: 18px 22px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.catalog-glass-card:hover {
  background: #ffffff;
  border-color: #00b4d8;
  box-shadow: 0 12px 24px rgba(0, 180, 216, 0.08);
  transform: translateY(-2px);
}

.catalog-glass-card h5 {
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}

.catalog-glass-card span {
  font-family: "Open Sans", sans-serif;
  font-size: 14px;
  color: #0b2545;
  font-weight: 600;
}

/* ==========================================================================
   4. DİNAMİK GÖRSEL AÇIKLAMASI
   ========================================================================== */
.catalog-image-caption {
  margin-top: 24px;
  padding: 22px 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-left: 4px solid #00b4d8;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 4px 15px rgba(11, 37, 69, 0.04);
  transition: all 0.3s ease;
  min-height: 120px;
}

.catalog-image-caption h4 {
  font-family: "Montserrat", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #0b2545;
  margin: 0 0 10px 0;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

.catalog-image-caption p {
  font-family: "Open Sans", sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: #4b5563;
  margin: 0;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

/* ==========================================================================
   5. ESNEK THUMBNAIL GRID (90px SABİT BOYUT)
   ========================================================================== */
.catalog-thumbs-dynamic {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  width: 100%;
  max-width: 100%;
}

.catalog-thumbs-dynamic .catalog-thumb-item {
  aspect-ratio: 1 / 1;
  max-width: 90px;
  max-height: 90px;
  margin: 0 auto;
  border: 2px solid #eef2f6;
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.3s ease;
  background: #ffffff;
}

.catalog-thumbs-dynamic .catalog-thumb-item.is-active,
.catalog-thumbs-dynamic .catalog-thumb-item:hover {
  border-color: #00b4d8;
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 180, 216, 0.15);
}

.catalog-thumbs-dynamic .catalog-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   6. ALT SATIR: SERTİFİKALAR VE CTA
   ========================================================================== */
.catalog-bottom-row {
  width: 100%;
  border-top: 1px solid #f0f2f5;
  padding-top: 40px;
}

/* ==========================================================================
   7. SERTİFİKALAR BÖLÜMÜ
   ========================================================================== */
.catalog-certificates-section {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.catalog-cert-title {
  font-family: "Montserrat", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #0b2545;
  margin: 0 0 20px 0;
}

.catalog-cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.catalog-cert-item {
  display: block;
  aspect-ratio: 4 / 3;
  border: 1px solid #eef2f6;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  transition: all 0.3s ease;
  text-decoration: none;
  position: relative;
  cursor: pointer;
}

.catalog-cert-item:hover {
  border-color: #00b4d8;
  box-shadow: 0 8px 20px rgba(0, 180, 216, 0.15);
  transform: translateY(-2px);
}

.catalog-cert-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  background: #ffffff;
}

.catalog-cert-pdf {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #0b2545;
  background: #f8fafc;
}

.cert-pdf-icon {
  font-family: "Montserrat", sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #00b4d8;
  letter-spacing: 2px;
  background: #ffffff;
  padding: 6px 14px;
  border-radius: 6px;
  border: 2px solid #00b4d8;
}

/* ==========================================================================
   8. CTA BUTONU
   ========================================================================== */
.catalog-action-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 30px;
}

.catalog-corporate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #0b2545;
  color: #ffffff !important;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 16px 50px;
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(11, 37, 69, 0.15);
  transition: all 0.3s ease;
  text-decoration: none;
}

.catalog-corporate-btn:hover {
  background: #00b4d8;
  box-shadow: 0 8px 25px rgba(0, 180, 216, 0.25);
  gap: 16px;
}

/* ==========================================================================
   9. MOBİL / DESKTOP AÇIKLAMA GÖRÜNÜRLÜĞÜ
   ========================================================================== */
.catalog-caption-mobile {
  display: none;
}

.catalog-caption-desktop {
  display: block;
  margin-top: 24px;
  padding: 22px 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-left: 4px solid #00b4d8;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 4px 15px rgba(11, 37, 69, 0.04);
  transition: all 0.3s ease;
}

.catalog-caption-desktop .catalog-caption-title {
  font-family: "Montserrat", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #0b2545;
  margin: 0 0 10px 0;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

.catalog-caption-desktop .catalog-caption-desc {
  font-family: "Open Sans", sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: #4b5563;
  margin: 0;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

/* ==========================================================================
   10. SERTİFİKA VE KATALOG LIGHTBOX MODAL
   ========================================================================== */
.cert-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1),
    visibility 0.8s ease;
}

.cert-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.cert-lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 37, 69, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.cert-lightbox-content {
  position: relative;
  z-index: 2;
  width: 90vw;
  max-width: 1100px;
  height: 85vh;
  max-height: 800px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  transform: scale(0.85);
  opacity: 0;
  transition:
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.8s ease;
}

.cert-lightbox.is-open .cert-lightbox-content {
  transform: scale(1);
  opacity: 1;
}

/* Kapatma butonu */
.cert-lightbox-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  color: #0b2545;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 10;
  padding: 0;
}

.cert-lightbox-close svg {
  width: 20px;
  height: 20px;
  stroke: #0b2545;
  display: block;
  transition: stroke 0.25s ease;
}

.cert-lightbox-close:hover {
  background: #00b4d8;
  border-color: #00b4d8;
  transform: rotate(90deg);
}

.cert-lightbox-close:hover svg {
  stroke: #ffffff;
}

/* Başlık + Sayaç alanı */
.cert-lightbox-header {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 10;
  max-width: 70%;
  text-align: center;
}

.cert-lightbox-title {
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #0b2545;
  letter-spacing: 0.5px;
  line-height: 1.3;
  background: #f8fafc;
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid #eef2f6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: opacity 0.2s ease;
}

.cert-lightbox-counter {
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 1.5px;
  background: transparent;
  padding: 0;
  border: none;
}

/* Medya alanı */
.cert-lightbox-media {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.5s ease;
}

.cert-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.cert-lightbox-pdf {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

/* Ok butonları */
.cert-lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 180, 216, 0.9);
  border: 2px solid #ffffff;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  opacity: 1;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  padding: 0;
}

.cert-lightbox-arrow svg {
  width: 24px;
  height: 24px;
  stroke: #ffffff;
  display: block;
}

.cert-lightbox-arrow:hover {
  background: #0b2545;
  border-color: #00b4d8;
  transform: translateY(-50%) scale(1.15);
  box-shadow: 0 8px 25px rgba(0, 180, 216, 0.5);
}

.cert-lightbox-prev {
  left: 15px;
}

.cert-lightbox-next {
  right: 15px;
}

/* ==========================================================================
   11. KATALOG PDF BUTONLARI
   ========================================================================== */
.catalog-pdf-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.catalog-pdf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 2px solid transparent;
  flex: 1;
  min-width: 160px;
}

.catalog-pdf-view {
  background: #00b4d8;
  color: #ffffff;
  border-color: #00b4d8;
}

.catalog-pdf-view:hover {
  background: #0b2545;
  border-color: #0b2545;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11, 37, 69, 0.2);
}

.catalog-pdf-download {
  background: transparent;
  color: #0b2545;
  border-color: #0b2545;
}

.catalog-pdf-download:hover {
  background: #0b2545;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11, 37, 69, 0.2);
}

.catalog-pdf-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Katalog modal indirme butonu */
.catalog-lightbox-download {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.catalog-lightbox-download .catalog-pdf-btn {
  flex: initial;
  min-width: auto;
  padding: 12px 28px;
  background: #00b4d8;
  color: #ffffff;
  border-color: #00b4d8;
}

.catalog-lightbox-download .catalog-pdf-btn:hover {
  background: #0b2545;
  border-color: #0b2545;
}

/* Katalog modal içinde PDF */
#catalogLightboxIframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

/* ==========================================================================
   12. ANİMASYONLAR
   ========================================================================== */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  animation: cfmRevealUp 0.9s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes cfmRevealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  animation: cfmRevealScale 1.1s cubic-bezier(0.25, 1, 0.5, 1) 0.15s forwards;
}

@keyframes cfmRevealScale {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes cfmFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   13. RESPONSIVE
   ========================================================================== */
@media (max-width: 992px) {
  .catalog-premium-frame {
    width: calc(100% - 40px) !important;
    padding: 20px !important;
  }

  .catalog-top-row {
    flex-direction: column;
    gap: 30px;
  }

  .catalog-gallery-box,
  .catalog-spec-box {
    width: 100% !important;
  }

  .catalog-transparent-grid {
    grid-template-columns: 1fr;
  }

  .catalog-thumbs-dynamic {
    grid-template-columns: repeat(6, 1fr) !important;
  }

  .catalog-image-caption {
    margin-top: 20px;
  }

  /* Mobil: Mobil açıklamayı göster, Desktop açıklamayı gizle */
  .catalog-caption-mobile {
    display: block;
    margin-top: 16px;
    margin-bottom: 16px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-left: 4px solid #00b4d8;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 4px 15px rgba(11, 37, 69, 0.04);
  }

  .catalog-caption-mobile .catalog-caption-title {
    font-family: "Montserrat", sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #0b2545;
    margin: 0 0 8px 0;
    transition:
      opacity 0.15s ease,
      transform 0.15s ease;
  }

  .catalog-caption-mobile .catalog-caption-desc {
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: #4b5563;
    margin: 0;
    transition:
      opacity 0.15s ease,
      transform 0.15s ease;
  }

  .catalog-caption-desktop {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .cert-lightbox-content {
    width: 95vw;
    height: 90vh;
    padding: 15px;
    border-radius: 8px;
  }

  .cert-lightbox-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }

  .cert-lightbox-header {
    top: 15px;
    max-width: 80%;
  }

  .cert-lightbox-title {
    font-size: 12px;
    padding: 6px 14px;
  }

  .cert-lightbox-counter {
    font-size: 10px;
  }

  .cert-lightbox-arrow {
    width: 42px;
    height: 42px;
    opacity: 0.7;
  }

  .cert-lightbox-arrow svg {
    width: 20px;
    height: 20px;
  }

  .cert-lightbox-prev {
    left: 8px;
  }

  .cert-lightbox-next {
    right: 8px;
  }
}

@media (max-width: 576px) {
  .catalog-thumbs-dynamic {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 5px !important;
  }

  .catalog-thumbs-dynamic .catalog-thumb-item {
    max-width: 70px;
    max-height: 70px;
  }

  .catalog-image-caption {
    padding: 16px;
  }

  .catalog-image-caption h4 {
    font-size: 16px;
  }

  .catalog-image-caption p {
    font-size: 13px;
  }

  .catalog-cert-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .catalog-pdf-actions {
    flex-direction: column;
  }

  .catalog-pdf-btn {
    width: 100%;
  }

  .catalog-lightbox-download {
    bottom: 12px;
    width: 80%;
  }
}
/* ==========================================================================
   17. GÖRSEL AÇIKLAMASI VURGU ANİMASYONU (Lazer Çizgi Efekti)
   ========================================================================== */
@keyframes laserSpin {
  0% {
    --angle: 0deg;
  }
  100% {
    --angle: 360deg;
  }
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.catalog-caption-flash {
  position: relative;
  z-index: 5;
  /* Kutunun kendi iç rengini hafifçe aydınlatıyoruz */
  background-color: #ffffff !important;
  box-shadow: 0 5px 20px rgba(0, 180, 216, 0.15) !important;
  transition: all 0.3s ease;
}

/* Sadece dış çerçevede dönen lazer çizgisi */
.catalog-caption-flash::before {
  content: "";
  position: absolute;
  inset: -2px; /* Kutunun 2px dışına taşar */
  border-radius: inherit;
  padding: 2px; /* Çizgi kalınlığı */
  background: conic-gradient(
    from var(--angle),
    transparent 0%,
    transparent 70%,
    #00b4d8 90%,
    #ffffff 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: laserSpin 1.5s linear forwards;
  pointer-events: none;
}

/* Süre bitince animasyonu temizlemek için (opsiyonel) */
.catalog-caption-flash::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: #00b4d8;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* 1.5 saniye sonra lazer kaybolsun */
.catalog-caption-flash.caption-fade-out::after {
  opacity: 1;
}
