/* ==========================================================================
   GerriTout - Modern Quick View Modal Styling
   ========================================================================== */
html.thnk-quick-view-is-open,
html.thnk-quick-view-is-open body {
  overflow: hidden;
}

.thnk-quick-view-bg {
  position: fixed;
  visibility: hidden;
  overflow: hidden;
  background: rgba(14, 28, 11, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1042;
}

.thnk-quick-view-bg-ready {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  visibility: visible;
}

#thnk-quick-view-modal {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1400;
  text-align: center;
  transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px 15px;
  box-sizing: border-box;
}

#thnk-quick-view-modal .thnk-content-main-wrapper {
  text-align: center;
  position: relative;
  width: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  box-sizing: border-box;
}

#thnk-quick-view-modal .thnk-content-main {
  position: relative;
  pointer-events: auto;
  display: block;
  max-width: 960px;
  width: 100%;
  margin: auto;
  text-align: left;
  z-index: 1045;
  transform: translateY(20px) scale(0.97);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s ease;
}

#thnk-quick-view-modal.open {
  visibility: visible;
  opacity: 1;
}

#thnk-quick-view-modal.open .thnk-content-main {
  transform: translateY(0) scale(1);
  opacity: 1;
}

#thnk-quick-view-modal .thnk-lightbox-content {
  display: flex;
  background-color: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(18, 45, 12, 0.28);
  border: 1px solid #dcedd2;
  position: relative;
  width: 100%;
  max-height: min(640px, 86vh);
}

/* Close Button */
#thnk-quick-view-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  line-height: 34px;
  text-align: center;
  z-index: 10;
  background: #ffffff;
  color: #27401f;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
  border: 1px solid #dcebd4;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#thnk-quick-view-close:hover {
  background: #70b100;
  color: #ffffff;
  border-color: #70b100;
  transform: rotate(90deg) scale(1.08);
  box-shadow: 0 6px 18px rgba(112, 177, 0, 0.35);
}

#thnk-quick-view-close:before {
  content: "\f335";
  font-family: dashicons;
  font-size: 18px;
}

/* Modal Content Structure */
#thnk-quick-view-content {
  width: 100%;
  height: 100%;
}

#thnk-quick-view-content .thnk-woo-product {
  width: 100%;
  height: 100%;
}

#thnk-quick-view-content div.product {
  display: flex !important;
  flex-direction: row;
  width: 100%;
  height: 100%;
  max-height: min(640px, 86vh);
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   Left - Image Container & Product Catalogue
   ========================================================================== */
#thnk-quick-view-content div.images.gerritout-qv-gallery-container {
  flex: 0 0 48% !important;
  width: 48% !important;
  background: linear-gradient(135deg, #f7faf4 0%, #edf5e7 100%) !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  padding: 20px !important;
  position: relative !important;
  overflow: hidden !important;
  border-right: 1px solid #eef5ea !important;
  height: 100% !important;
  box-sizing: border-box !important;
}

/* Hide raw flexslider controls and numbered pagination completely */
#thnk-quick-view-modal .flex-control-nav,
#thnk-quick-view-modal .flex-control-paging,
#thnk-quick-view-modal .flex-direction-nav,
#thnk-quick-view-modal ol.flex-control-nav,
#thnk-quick-view-modal ul.flex-direction-nav {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Left: Vertical Thumbnails Strip (Catalogue) */
.gerritout-qv-thumbnails-wrap {
  flex: 0 0 72px !important;
  width: 72px !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 2px 4px 2px 0 !important;
  box-sizing: border-box !important;
  -webkit-overflow-scrolling: touch;
}

.gerritout-qv-thumbnails-wrap::-webkit-scrollbar {
  width: 4px;
}
.gerritout-qv-thumbnails-wrap::-webkit-scrollbar-track {
  background: rgba(210, 230, 200, 0.4);
  border-radius: 4px;
}
.gerritout-qv-thumbnails-wrap::-webkit-scrollbar-thumb {
  background: #a4c98f;
  border-radius: 4px;
}
.gerritout-qv-thumbnails-wrap::-webkit-scrollbar-thumb:hover {
  background: #70b100;
}

.gerritout-qv-thumbnails {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.gerritout-qv-thumb-item {
  width: 68px !important;
  height: 68px !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  border: 2px solid #ffffff !important;
  box-shadow: 0 2px 8px rgba(28, 55, 20, 0.06) !important;
  cursor: pointer !important;
  padding: 4px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.22s ease-in-out !important;
  position: relative !important;
  overflow: hidden !important;
}

.gerritout-qv-thumb-item:hover {
  border-color: #92cc2d !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(112, 177, 0, 0.18) !important;
}

.gerritout-qv-thumb-item.active {
  border-color: #70b100 !important;
  box-shadow: 0 4px 12px rgba(112, 177, 0, 0.3) !important;
}

.gerritout-qv-thumb-item img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  border-radius: 6px !important;
  display: block !important;
  margin: 0 !important;
  transition: transform 0.2s ease !important;
}

.gerritout-qv-thumb-item:hover img {
  transform: scale(1.05);
}

/* Right: Main Featured Image Card */
.gerritout-qv-main-image-wrap {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  height: 100% !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: center !important;
  position: relative !important;
}

.gerritout-qv-gallery-container.single-image .gerritout-qv-main-image-wrap {
  width: 100% !important;
}

.gerritout-qv-main-image-card {
  width: 100% !important;
  height: 100% !important;
  min-height: 360px !important;
  background: #ffffff !important;
  border-radius: 16px !important;
  border: 1px solid #e1eed8 !important;
  box-shadow: 0 4px 18px rgba(35, 75, 25, 0.05) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 18px !important;
  position: relative !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

#gerritout-qv-active-img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 380px !important;
  object-fit: contain !important;
  border-radius: 10px !important;
  display: block !important;
  margin: auto !important;
  transition: opacity 0.22s ease-in-out, transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

.gerritout-qv-main-image-card:hover #gerritout-qv-active-img {
  transform: scale(1.04);
}

/* Floating Zoom Icon on Main Image */
.gerritout-qv-zoom-icon {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  border: 1px solid #e1ebd8 !important;
  color: #3b5a32 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  z-index: 4 !important;
}

.gerritout-qv-zoom-icon:hover {
  background: #70b100 !important;
  color: #ffffff !important;
  border-color: #70b100 !important;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(112, 177, 0, 0.3) !important;
}

/* Sale Badge */
#thnk-quick-view-content .onsale {
  position: absolute;
  top: 18px;
  left: 18px;
  background: linear-gradient(135deg, #70b100 0%, #4a8000 100%);
  color: #ffffff;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 5px 14px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(112, 177, 0, 0.3);
  z-index: 5;
}

/* Right - Summary Content with Smooth Top-to-Bottom Scroll */
#thnk-quick-view-content div.summary {
  flex: 0 0 54% !important;
  width: 54% !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
  text-align: left;
  background: #ffffff;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: 100% !important;
  max-height: min(640px, 86vh) !important;
  box-sizing: border-box !important;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

#thnk-quick-view-content div.summary .summary-content {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  padding: 30px 32px 36px 30px !important;
  box-sizing: border-box !important;
  min-height: 100%;
  width: 100% !important;
}

#thnk-quick-view-content div.summary::-webkit-scrollbar {
  width: 6px;
}
#thnk-quick-view-content div.summary::-webkit-scrollbar-track {
  background: #f4f8f1;
  border-radius: 8px;
}
#thnk-quick-view-content div.summary::-webkit-scrollbar-thumb {
  background: #a4c98f;
  border-radius: 8px;
}
#thnk-quick-view-content div.summary::-webkit-scrollbar-thumb:hover {
  background: #70b100;
}

#thnk-quick-view-content .product_title {
  font-size: 24px !important;
  font-weight: 700 !important;
  color: #172c13 !important;
  margin: 0 0 8px 0 !important;
  line-height: 1.25 !important;
}

#thnk-quick-view-content .price {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: #3b7400 !important;
  margin: 0 0 16px 0 !important;
  display: block;
}

#thnk-quick-view-content .price del {
  color: #94a68e !important;
  font-weight: 400 !important;
  font-size: 16px !important;
  margin-right: 8px;
}

#thnk-quick-view-content .price ins {
  text-decoration: none !important;
  color: #3b7400 !important;
}

#thnk-quick-view-content .woocommerce-product-details__short-description {
  font-size: 13.5px;
  color: #4e5e49;
  line-height: 1.7;
  margin-bottom: 18px;
  border-bottom: 1px solid #edf5ea;
  padding-bottom: 16px;
}

#thnk-quick-view-content .woocommerce-product-details__short-description p {
  margin: 0;
  line-height: 1.7;
}

/* Metadata Card */
#thnk-quick-view-content .product_meta {
  background: #f8faf5;
  border: 1px solid #e1eed8;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#thnk-quick-view-content .product_meta > span {
  font-size: 12.5px;
  color: #556c4e;
  padding: 0;
  border: none;
  display: block;
  line-height: 1.5;
}

#thnk-quick-view-content .product_meta span.posted_in,
#thnk-quick-view-content .product_meta span.tagged_as {
  font-weight: 600;
  color: #27401f;
}

#thnk-quick-view-content .product_meta a {
  color: #559100;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

#thnk-quick-view-content .product_meta a:hover {
  color: #24461d;
  text-decoration: underline;
}

/* Cart Form & Actions */
#thnk-quick-view-modal div.product form.cart {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  position: static;
  background: transparent;
  width: 100%;
}

/* Quantity Box */
.woocommerce #thnk-quick-view-modal .quantity {
  display: inline-flex;
  align-items: center;
  border-radius: 25px;
  border: 1px solid #cee4c2;
  background: #ffffff;
  overflow: hidden;
  height: 42px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  margin: 0;
}

.woocommerce #thnk-quick-view-modal .quantity .qty {
  width: 44px;
  height: 42px;
  line-height: 42px;
  border: none;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #1e3318;
  background: transparent;
  padding: 0;
}

/* Add To Cart Button */
.woocommerce #thnk-quick-view-modal div.product form.cart .button.single_add_to_cart_button,
.woocommerce #thnk-quick-view-modal div.product form.cart button.button {
  background: linear-gradient(135deg, #70b100 0%, #528c00 100%) !important;
  color: #ffffff !important;
  border-radius: 25px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  padding: 0 24px !important;
  height: 42px !important;
  line-height: 42px !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(112, 177, 0, 0.28) !important;
  transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.woocommerce #thnk-quick-view-modal div.product form.cart .button.single_add_to_cart_button:hover,
.woocommerce #thnk-quick-view-modal div.product form.cart button.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(112, 177, 0, 0.38) !important;
  background: linear-gradient(135deg, #599800 0%, #3e6d00 100%) !important;
}

/* Wishlist & Compare Buttons */
#thnk-quick-view-modal .thunk-wishlist,
#thnk-quick-view-modal .thunk-compare,
#thnk-quick-view-modal .yith-wcwl-add-to-wishlist a,
#thnk-quick-view-modal .compare-button a {
  width: 42px;
  height: 42px;
  line-height: 40px;
  border-radius: 50%;
  border: 1px solid #d4e6c8;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #556c4e;
  font-size: 15px;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  text-decoration: none;
}

#thnk-quick-view-modal .thunk-wishlist:hover,
#thnk-quick-view-modal .thunk-compare:hover,
#thnk-quick-view-modal .yith-wcwl-add-to-wishlist a:hover,
#thnk-quick-view-modal .compare-button a:hover {
  background: #70b100;
  color: #ffffff;
  border-color: #70b100;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(112, 177, 0, 0.25);
}

/* Show More Details Button (Above categories box) */
.gerritout-qv-more-details-wrap {
  margin: 16px 0 14px 0 !important;
  padding: 0 !important;
  border: none !important;
  width: 100% !important;
}

.gerritout-qv-more-details-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  background: #f7faf4 !important;
  color: #27401f !important;
  border: 1.5px solid #cee4c2 !important;
  border-radius: 25px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  padding: 10px 22px !important;
  text-decoration: none !important;
  transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
  box-shadow: 0 2px 8px rgba(35, 75, 25, 0.04) !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}

.gerritout-qv-more-details-btn:hover {
  background: #70b100 !important;
  color: #ffffff !important;
  border-color: #70b100 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(112, 177, 0, 0.32) !important;
}

.gerritout-qv-more-details-btn svg {
  transition: transform 0.22s ease;
}

.gerritout-qv-more-details-btn:hover svg {
  transform: translateX(4px);
}

/* Responsive */
@media (max-width: 768px) {
  #thnk-quick-view-modal {
    padding: 15px 10px;
  }
  #thnk-quick-view-modal .thnk-lightbox-content {
    flex-direction: column !important;
    max-height: 88vh !important;
    overflow-y: auto !important;
    border-radius: 16px;
  }
  #thnk-quick-view-content div.product {
    flex-direction: column !important;
    max-height: none !important;
    height: auto !important;
  }
  #thnk-quick-view-content div.images,
  #thnk-quick-view-content div.summary {
    flex: 0 0 auto !important;
    width: 100% !important;
  }
  #thnk-quick-view-content div.images.gerritout-qv-gallery-container {
    padding: 12px !important;
    max-height: none !important;
    height: auto !important;
    border-right: none !important;
    border-bottom: 1px solid #eef5ea !important;
    flex-direction: column-reverse !important;
    gap: 10px !important;
  }
  .gerritout-qv-thumbnails-wrap {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-height: 64px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 2px 0 !important;
  }
  .gerritout-qv-thumbnails {
    flex-direction: row !important;
    justify-content: center !important;
    gap: 8px !important;
  }
  .gerritout-qv-thumb-item {
    width: 52px !important;
    height: 52px !important;
    flex: 0 0 52px !important;
  }
  .gerritout-qv-main-image-card {
    min-height: 200px !important;
    max-height: 240px !important;
    padding: 12px !important;
  }
  #gerritout-qv-active-img {
    max-height: 200px !important;
  }
  #thnk-quick-view-content div.summary {
    padding: 0 !important;
    max-height: none !important;
    height: auto !important;
    overflow-y: visible !important;
  }
  #thnk-quick-view-content div.summary .summary-content {
    padding: 20px 18px 30px 18px !important;
  }
  #thnk-quick-view-content .product_title {
    font-size: 19px !important;
  }
}
