/* ==========================================================================
   KOROTKOV QUICK VIEW (БЫСТРЫЙ ПРОСМОТР)
   ========================================================================== */

/* Eye Button on Product Cards */
.kk-product-quickview {
  position: absolute !important;
  top: 12px !important;
  left: 12px !important;
  z-index: 5 !important;
  display: inline-grid !important;
  place-items: center !important;
  width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border: 1px solid #e2e7e3 !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, .94) !important;
  color: var(--kk-forest-900, #1b382b) !important;
  font-size: 13px !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.06) !important;
  transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease !important;
}

.kk-product-quickview:hover {
  background: #ffffff !important;
  color: #1a7f37 !important;
  transform: scale(1.08) !important;
}

@media (max-width: 767px) {
  .kk-product-quickview {
    top: 6px !important;
    left: 6px !important;
    width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    font-size: 11px !important;
  }
}

/* Modal Backdrop */
.kk-quickview-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.kk-quickview-modal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.kk-quickview-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 24, 18, 0.62);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  cursor: pointer;
}

/* Modal Dialog */
.kk-quickview-modal__dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(10, 24, 18, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.4);
  transform: scale(0.93) translateY(18px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: thin;
}

.kk-quickview-modal.is-open .kk-quickview-modal__dialog {
  transform: scale(1) translateY(0);
}

/* Close Button */
.kk-quickview-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f0f3f1;
  color: #55635b;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.kk-quickview-modal__close:hover {
  background: #e1e7e3;
  color: #1a2620;
  transform: rotate(90deg);
}

/* Modal Body: 2 Columns on Desktop */
.kk-quickview-modal__body {
  display: grid;
  grid-template-columns: 280px 1fr;
  align-items: stretch;
}

/* Left: Media */
.kk-quickview-modal__media {
  background: linear-gradient(180deg, #fafbf9 0%, #f2f5f1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  border-right: 1px solid #edf0ee;
}

.kk-quickview-modal__media img {
  max-width: 100%;
  max-height: 320px;
  width: auto;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 0.3s ease;
}

/* Right: Content */
.kk-quickview-modal__content {
  display: flex;
  flex-direction: column;
  padding: 28px 26px 24px;
}

.kk-quickview-modal__category {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7b8882;
  margin-bottom: 6px;
}

.kk-quickview-modal__title {
  margin: 0 0 10px;
  font-family: inherit;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.25;
  color: #172a22;
}

.kk-quickview-modal__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.kk-quickview-modal__title a:hover {
  color: #1a7f37;
}

/* Price Box */
.kk-quickview-modal__price-box {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.kk-quickview-modal__price {
  font-size: 25px;
  font-weight: 800;
  color: #1a7f37;
  letter-spacing: -0.02em;
}

.kk-quickview-modal__price-old {
  font-size: 16px;
  color: #9aa5a0;
  text-decoration: line-through;
}

/* Teaser / Convincing Description */
.kk-quickview-modal__teaser {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7faf8;
  border-left: 3px solid #1a7f37;
  color: #3e4a44;
  font-size: 13.5px;
  line-height: 1.5;
}

/* Actions Row: Qty + Add to Cart */
.kk-quickview-modal__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #edf0ee;
}

/* Quantity Control */
.kk-quantity-control {
  display: inline-flex;
  align-items: center;
  height: 44px;
  border: 1.5px solid #d9e1dd;
  border-radius: 11px;
  background: #ffffff;
  overflow: hidden;
  user-select: none;
}

.kk-qty-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 100%;
  padding: 0;
  border: 0;
  background: #f4f6f4;
  color: #21352b;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.kk-qty-btn:hover {
  background: #e4eae6;
}

.kk-qty-input {
  width: 44px;
  height: 100%;
  padding: 0;
  border: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #182b22;
  background: transparent;
  pointer-events: none;
}

/* Add to Cart Button */
.kk-quickview-modal__add-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  background: #1a7f37;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(26, 127, 55, 0.28);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.kk-quickview-modal__add-btn:hover {
  background: #156d2e;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(26, 127, 55, 0.35);
}

.kk-quickview-modal__add-btn:active {
  transform: translateY(0);
}

.kk-quickview-modal__add-btn.is-success {
  background: #166534;
}

/* More Details Link */
.kk-quickview-modal__footer {
  margin-top: 14px;
  text-align: center;
}

.kk-quickview-modal__more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #2e4439;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease, gap 0.15s ease;
}

.kk-quickview-modal__more-link:hover {
  color: #1a7f37;
  gap: 9px;
  text-decoration: none;
}

/* Mobile Responsiveness */
@media (max-width: 767px) {
  .kk-quickview-modal {
    padding: 10px;
    align-items: flex-end; /* Bottom sheet style on mobile */
  }

  .kk-quickview-modal__dialog {
    max-height: 85vh;
    border-radius: 22px 22px 14px 14px;
  }

  .kk-quickview-modal__body {
    grid-template-columns: 1fr;
  }

  .kk-quickview-modal__media {
    border-right: 0;
    border-bottom: 1px solid #edf0ee;
    padding: 20px 16px 14px;
  }

  .kk-quickview-modal__media img {
    max-height: 180px;
  }

  .kk-quickview-modal__content {
    padding: 18px 18px 20px;
  }

  .kk-quickview-modal__title {
    font-size: 17px;
    margin-bottom: 6px;
  }

  .kk-quickview-modal__price {
    font-size: 21px;
  }

  .kk-quickview-modal__teaser {
    font-size: 12.5px;
    padding: 10px 12px;
    margin-bottom: 14px;
  }

  .kk-quantity-control {
    height: 40px;
  }

  .kk-qty-btn {
    width: 34px;
  }

  .kk-qty-input {
    width: 36px;
    font-size: 14px;
  }

  .kk-quickview-modal__add-btn {
    height: 40px;
    font-size: 13.5px;
    padding: 0 12px;
  }
}

/* When badge is present (Бестселлер, Для ухода, Капсулы), place quickview on the right directly under the wishlist heart */
.image .kk-product-badge ~ .kk-product-quickview,
.kk-showcase-product .kk-product-badge ~ .kk-product-quickview {
  left: auto !important;
  right: 12px !important;
  top: 52px !important;
}

@media (max-width: 767px) {
  .image .kk-product-badge ~ .kk-product-quickview,
  .kk-showcase-product .kk-product-badge ~ .kk-product-quickview {
    left: auto !important;
    right: 8px !important;
    top: 42px !important;
  }
}
