/* ========================================
   PRODUCT POPUP STYLES
   ======================================== */
/* Base Popup Container */
.product-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  overflow-y: auto;
}
.popup-content {
  background: #ffffff;
  max-width: 1000px;
  width: 100%;
  position: relative;
  margin: 40px auto;
  border-radius: 30px;
  padding: 50px;
  max-height: none;
  box-sizing: border-box;
}
/* Close Button */
.popup-close {
  position: absolute;
  right: 20px;
  top: 15px;
  color: #333F48;
  font-size: 25px;
  cursor: pointer;
  z-index: 1001;
  font-weight: 600;
  background-color: #ebebeb;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, transform 0.6s ease;
}
.popup-close:hover {
  color: #ebebeb;
  background-color: #333F48;
  transform: rotate(365deg);
  transition: background 0.15s, color 0.15s, transform 0.6s ease;
}
/* Popup Layout */
.popup-layout {
  display: flex;
  flex-direction: column;
}
/* ========================================
   POPUP HEADER & CONTENT
   ======================================== */
.popup-title {
  color: #333f48;
  font-size: 42px;
  font-weight: 700;
  margin: 0 0 10px 0;
}
.popup-title::after {
  content: ".";
  color: #94193b;
}
.popup-subtitle {
  color: #00a7b5;
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 15px 0;
}
.popup-body p {
  color: #333F48;
  font-size: 14px;
  margin-bottom: 0;
  font-weight: 400;
  max-width: 800px;
}
/* .popup-body p:first-of-type {} */
/* ========================================
   TABS SYSTEM
   ======================================== */
.popup-tabs {
  margin: 25px 0;
}
.popup-tabs-nav {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  background: #EBEBEE;
  border-radius: 24px;
  padding: 0px;
  border: 3px solid #EBEBEE;
  width: fit-content;
  position: relative;
}
.popup-tabs-slider {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #ffffff;
  border-radius: 24px;
  transition: all 0.3s ease;
  z-index: 1;
  pointer-events: none;
  width: calc(var(--active-tab-width, 0) - 3px);
  transform: translateX(var(--slide-position, 0));
}
.popup-tab-btn {
  background: transparent;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #333F48;
  cursor: pointer;
  border-radius: 24px;
  transition: all 0.2s ease;
  position: relative;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  z-index: 2;
}
.popup-tabs-nav.tabs-3-or-more .popup-tab-btn {
  min-width: 120px;
}
.popup-tab-btn.active {
  text-shadow: .5px 0 0 currentColor;
  background: #ffffff;
}
.popup-tab-btn.active:hover {
  background: #ffffff;
}
.popup-tab-btn:hover {
  background: #fafafa54;
}
.popup-tabs-content {
  position: relative;
}
/* ========================================
   CAROUSEL SYSTEM
   ======================================== */
.popup-carousel {
  position: relative;
  overflow: hidden;
  height: 500px !important;
  max-height: 500px !important;
  padding: 0;
  box-sizing: content-box;
  border-radius: 18px;
}
.popup-carousel-track {
  height: 500px !important;
  max-height: 500px !important;
  display: flex;
  position: relative;
  transition: none;
}
.popup-carousel-slide {
  flex: 0 0 100%;
  height: 500px !important;
  max-height: 500px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.popup-carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}
.popup-carousel-slide img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 18px !important;
  box-sizing: border-box !important;
  transition: border-radius 0.3s ease;
}
/* Carousel Controls */
.popup-carousel-controls {
  position: absolute;
  bottom: 25px;
  left: 30px;
  right: 30px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 10;
}
/* Carousel Dots */
.popup-carousel-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}
.popup-carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #ffffff;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.popup-carousel-dot.active {
  padding: 0 18px;
  border-radius: 10px;
}
/* Carousel Actions */
.popup-carousel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* Download Button */
.popup-download-btn {
  background: #fff;
  color: #333F48;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}
.popup-download-btn:hover {
  background: #00a7b5;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.popup-download-btn svg {
  width: 20px;
  height: 20px;
}
/* Carousel Navigation */
.popup-carousel-nav {
  display: flex;
  flex-direction: row;
  gap: 10px;
}
.popup-carousel-nav button {
  background: #ffffff;
  color: #333F48;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.popup-carousel-nav button:hover {
  background: #00a7b5;
  color: #ffffff;
}
/* ========================================
   POPUP FOOTER & CERTIFICATIONS
   ======================================== */
.popup-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}
.popup-logo {
  max-width: 60px;
  height: auto;
}
/* Dynamic certification logo classes for each product */
.popup-logo-elaro {
  /* Elaro-specific logo styles */
}
.popup-logo-mesa {
  /* Mesa-specific logo styles */
}
.popup-logo-avalon {
  /* Avalon-specific logo styles */
}
.popup-logo-cedar {
  /* Cedar-specific logo styles */
}
.popup-logo-willow {
  /* Willow-specific logo styles */
}
.popup-logo-madison {
  /* Madison-specific logo styles */
}
.popup-logo-vista {
  /* Vista-specific logo styles */
}
.popup-logo-sofia {
  /* Sofia-specific logo styles */
}
.popup-logo-grove {
  /* Grove-specific logo styles */
}
/* Individual logo positioning within each product */
.popup-logo-elaro-1,
.popup-logo-mesa-1,
.popup-logo-avalon-1,
.popup-logo-cedar-1,
.popup-logo-willow-1,
.popup-logo-madison-1,
.popup-logo-vista-1,
.popup-logo-sofia-1,
.popup-logo-grove-1 {
  /* First logo in each product */
}
.popup-logo-elaro-2,
.popup-logo-mesa-2,
.popup-logo-avalon-2,
.popup-logo-cedar-2,
.popup-logo-willow-2,
.popup-logo-madison-2,
.popup-logo-vista-2,
.popup-logo-sofia-2,
.popup-logo-grove-2 {
  /* Second logo in each product */
}
.popup-logo-elaro-3,
.popup-logo-mesa-3,
.popup-logo-avalon-3,
.popup-logo-cedar-3,
.popup-logo-willow-3,
.popup-logo-madison-3,
.popup-logo-vista-3,
.popup-logo-sofia-3,
.popup-logo-grove-3 {
  /* Third logo in each product */
}
img.popup-logo.popup-logo-elaro.popup-logo-elaro-4,
img.popup-logo.popup-logo-mesa.popup-logo-mesa-4,
img.popup-logo.popup-logo-avalon.popup-logo-avalon-2,
img.popup-logo.popup-logo-vista.popup-logo-vista-4,
img.popup-logo.popup-logo-sofia.popup-logo-sofia-4,
img.popup-logo.popup-logo-grove.popup-logo-grove-2 {
  max-width: 58px;
}
img.popup-logo.popup-logo-vista.popup-logo-vista-6 {
  max-width: 45px;
}
img.popup-logo.popup-logo-vista.popup-logo-vista-7 {
  max-width: 55px;
}
img.popup-logo.popup-logo-sofia.popup-logo-sofia-5,
img.popup-logo.popup-logo-vista.popup-logo-vista-5 {
  max-width: 80px;
  margin-left: 5px;
}
/* ========================================
   LITERATURE SECTION
   ======================================== */
.popup-literature-section {
  padding-top: 0px;
}
.popup-literature-title {
  padding: 30px 0 5px;
  font-size: 18px;
  color: #00a7b5;
  font-weight: 700;
}
.popup-literature-buttons {
  align-content: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.popup-literature-btn {
  background: #ebebee;
  color: #333f48;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 28px;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.3s ease;
}
.popup-literature-btn:hover {
  background: #333f48 !important;
  color: #ffffff !important;
}
/* Dropdown Styles for Popup Literature */
.popup-literature-btn.dropdown-container {
  position: relative;
  display: inline-block;
  z-index: 10000;
  background: #ebebee;
  color: #333f48;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 28px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.3s ease;
  border: 1px solid #ff000000;
}
.dropdown-btn {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
}
.dropdown-list {
  position: absolute;
  left: 0;
  top: 100%;
  background: #333f48;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  min-width: 200px;
  width: 200px;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: all 0.3s ease;
  padding: 0;
  margin-top: 5px;
  border: 1px solid #ffffff;
  display: none;
}
.dropdown-list.show {
  display: block;
}
.dropdown-link {
  display: block;
  width: 100%;
  padding: 7px 16px;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0;
  text-align: center;
  text-decoration: none;
}
.dropdown-link:hover {
  background: #00a7b5;
  color: #ffffff;
}
.dropdown-link:first-child:hover {
  border-radius: 12px 12px 0 0;
}
.dropdown-link:last-child:hover {
  border-radius: 0 0 12px 12px;
}
.dropdown-link:not(:first-child):not(:last-child):hover {
  border-radius: 0;
}
.popup-literature-btn.dropdown-container:hover .dropdown-arrow,
.popup-literature-btn.dropdown-container .dropdown-btn:active .dropdown-arrow {
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}
/* ========================================
   CONTACT SECTION
   ======================================== */
.popup-contact-section {
  padding-top: 40px;
}
.popup-contact-title {
  font-size: 38px;
  color: #333f48;
  font-weight: 700;
}
.popup-contact-subtitle {
  font-size: 18px;
  color: #00a7b5;
  font-weight: 500;
}
.popup-contact-desc {
  font-size: 14px;
  padding-top: 20px;
  max-width: 570px;
}
.popup-contact-desc p {
  margin: 0 0 10px 0;
}
.popup-contact-btn {
  background: linear-gradient(to bottom, #00a7b5 0%, #00a7b5 50%, #333f48 50%, #333f48 100%);
  background-size: 100% 200%;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 600;
  box-shadow: 7px 5px 15px rgba(0, 0, 0, 0.3);
  border-radius: 30px;
  padding: 12px 24px;
  margin: 20px 0 10px;
  font-size: 14px;
}
.popup-contact-btn:hover {
  background-position: 0 100%;
  color: #ffffff;
  text-shadow: .5px 0 0 currentColor;
}
a:focus {
  color: #333f48 !important;
}
/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
/* Small Mobile (1px to 500px) */
@media screen and (min-width: 1px) and (max-width: 500px) {
  .popup-tabs-nav {
    display: flex !important;
    background: transparent;
    border: none;
    flex-direction: row;
    width: 100%;
    padding: 0px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .popup-tabs-slider {
    display: none;
  }
  .popup-tab-btn {
    width: 200px;
    background: #EBEBEE;
    border: 1px solid #EBEBEE;
    border-radius: 24px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
  }
  .popup-tab-btn:hover {
    background: #ffffff;
    border-color: #ebebee;
  }
  .popup-tab-btn.active {
    background: #ffffff;
    border-color: #00a7b5;
    color: #00a7b5;
  }
  .popup-tab-btn.active:hover {
    background: #ffffff;
    border-color: #00a7b5;
    color: #00a7b5;
  }
}
/* Mobile (767px and below) */
@media screen and (min-width: 1px) and (max-width: 767px) {
  /* Popup Content */
  .popup-content {
    padding: 30px;
  }
  /* Typography */
  .popup-title {
    font-size: 30px;
  }
  .popup-subtitle {
    font-size: 16px;
  }
  /* Tabs */
  .popup-tabs {
    margin: 20px 0;
  }
  .popup-tab-btn {
    font-size: 12px;
    padding: 8px 16px;
    border-radius: 20px;
  }
  .popup-tabs-slider {
    border-radius: 20px;
  }
  /* Carousel */
  .popup-carousel {
    height: 350px !important;
    max-height: 350px !important;
  }
  .popup-carousel-track {
    height: 350px !important;
    max-height: 350px !important;
  }
  .popup-carousel-slide {
    height: 350px !important;
    max-height: 350px !important;
  }
  .popup-carousel-slide img {
    height: 350px !important;
  }
  /* Carousel Controls */
  .popup-carousel-controls {
    bottom: 20px;
    left: 25px;
    right: 25px;
  }
  /* Navigation */
  .popup-carousel-nav button {
    width: 35px;
    height: 35px;
    font-size: 25px;
  }
  /* Download Button */
  .popup-download-btn {
    width: 35px;
    height: 35px;
  }
  /* Buttons */
  .carousel-arrow,
  .collection-btn {
    width: 32px;
    height: 32px;
    font-size: 30px;
  }
  .popup-download-btn svg {
    width: 15x;
    height: 15px;
  }
  /* Literature */
  .popup-literature-buttons {
    gap: 5px;
  }
  .popup-literature-title {
    padding: 20px 0 5px;
  }
  /* Logos */
  .popup-logo {
    max-width: 45px;
  }
  /* Mobile responsive styles for dynamic logo classes */
  .popup-logo-elaro,
  .popup-logo-mesa,
  .popup-logo-avalon,
  .popup-logo-cedar,
  .popup-logo-willow,
  .popup-logo-madison,
  .popup-logo-vista,
  .popup-logo-sofia,
  .popup-logo-grove {
    max-width: 40px;
  }
  .popup-contact-section {
    padding-top: 30px;
  }
  .popup-contact-title {
    font-size: 28px;
  }
  .popup-contact-subtitle {
    font-size: 16px;
  }
  img.popup-logo.popup-logo-elaro.popup-logo-elaro-4,
  img.popup-logo.popup-logo-mesa.popup-logo-mesa-4,
  img.popup-logo.popup-logo-avalon.popup-logo-avalon-2,
  img.popup-logo.popup-logo-vista.popup-logo-vista-4,
  img.popup-logo.popup-logo-sofia.popup-logo-sofia-4,
  img.popup-logo.popup-logo-grove.popup-logo-grove-2 {
    max-width: 38px;
  }
  img.popup-logo.popup-logo-vista.popup-logo-vista-6 {
    max-width: 35px;
  }
  img.popup-logo.popup-logo-vista.popup-logo-vista-7 {
    max-width: 40px;
  }
  img.popup-logo.popup-logo-sofia.popup-logo-sofia-5,
  img.popup-logo.popup-logo-vista.popup-logo-vista-5 {
    max-width: 40px;
    margin-left: 3px;
  }
  .popup-carousel-dots {
    display: none;
  }
}
.popup-literature-buttons>a.popup-literature-btn:first-of-type {
  display: none;
}