/* ==========================================================================
   Smart Product Modal - Broco Smart Series
   ========================================================================== */

.smart-product-modal {
  text-align: center;
  padding: 0 !important;
}

.smart-product-modal:before {
  content: '';
  display: inline-block;
  height: 100%;
  vertical-align: middle;
  margin-right: -4px;
}

.smart-product-modal .modal-dialog {
  display: inline-block;
  text-align: left;
  vertical-align: middle;
  width: 533px;
  max-width: calc(100vw - 32px);
  margin: 16px auto !important;
}

.smart-product-modal__card {
  width: 533px;
  max-width: 100%;
  height: 640px;
  max-height: calc(100vh - 40px);
  background: #ffffff;
  border-radius: 0;
  border: none;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 1;
  transform: rotate(0deg);
  padding: 0;
}

.smart-product-modal__card--compact {
  height: auto;
  padding-bottom: 28px;
}

.smart-product-modal__card--compact .smart-product-modal__code {
  margin-bottom: 0;
}

.smart-product-modal__top {
  display: flex;
  justify-content: flex-end;
  padding: 16px 24px 0;
  flex-shrink: 0;
}

.smart-product-modal__close {
  position: static;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #f1f3f5;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  color: #1e293b;
  transition: background-color 0.2s ease, transform 0.1s ease;
  outline: none !important;
}

.smart-product-modal__close:hover {
  background-color: #e2e8f0;
}

.smart-product-modal__close:active {
  transform: scale(0.95);
}

.smart-product-modal__img-wrap {
  position: relative;
  overflow: hidden;
  height: 252px;
  padding-top: 6px;
  padding-bottom: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.smart-product-modal__img {
  width: 280.44px;
  height: 233.70px;
  max-width: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: center center;
  transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  opacity: 1;
}

/* Zoomed state */
.smart-product-modal__img-wrap.is-zoomed {
  cursor: grab;
  touch-action: none;
}

.smart-product-modal__img-wrap.is-zoomed.is-dragging {
  cursor: grabbing;
}

.smart-product-modal__img-wrap.is-zoomed.is-dragging .smart-product-modal__img {
  transition: none !important;
}

.smart-product-modal__header {
  padding: 0 34px;
  flex-shrink: 0;
}

.smart-product-modal__title {
  font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 28px;
  font-weight: 900;
  color: #111a36;
  text-transform: uppercase;
  letter-spacing: 0%;
  line-height: 100%;
  margin: 0 0 10px 0;
}

.smart-product-modal__code {
  font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #4b5876;
  text-transform: uppercase;
  letter-spacing: 0%;
  line-height: 100%;
  margin: 0 0 18px 0;
}

.smart-product-modal__divider {
  border-top: 1px solid #eceff2;
  margin: 0 34px 18px 34px;
  flex-shrink: 0;
}

.smart-product-modal__scroll-container {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 32px 32px;
}

.smart-product-modal__scroll {
  height: 100%;
  max-height: 100%;
  overflow-y: auto;
  padding-right: 14px;
  padding-bottom: 40px;
  transform: rotate(0deg);
  opacity: 1;
}

.smart-product-modal__scroll::-webkit-scrollbar {
  width: 4px;
}

.smart-product-modal__scroll::-webkit-scrollbar-button,
.smart-product-modal__scroll::-webkit-scrollbar-button:single-button,
.smart-product-modal__scroll::-webkit-scrollbar-button:vertical:decrement,
.smart-product-modal__scroll::-webkit-scrollbar-button:vertical:increment {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.smart-product-modal__scroll::-webkit-scrollbar-track {
  background: #f1f3f5;
}

.smart-product-modal__scroll::-webkit-scrollbar-thumb {
  background: #e30613; 
}

.smart-product-modal__scroll::-webkit-scrollbar-corner {
  display: none;
  background: transparent;
}

@supports not selector(::-webkit-scrollbar) {
  .smart-product-modal__scroll {
    scrollbar-width: thin;
    scrollbar-color: #e30613 #f1f3f5;
  }
}

.smart-product-modal__fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 8px;
  height: 60px;
  background: linear-gradient(360deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 86.14%);
  pointer-events: none;
  z-index: 5;
}

.smart-product-modal__section {
  margin-bottom: 20px;
}

.smart-product-modal__section-title {
  font-family:'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  line-height: 100%;
  margin: 0 0 10px 0;
}

.smart-product-modal__desc-text {
  font-family:'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 19.6px;
  letter-spacing: 0%;
  color: #475569;
  margin: 0;
}

.smart-product-modal__features-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.smart-product-modal__feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.smart-product-modal__feature-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  background-color: #e8f8ee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #22c55e;
  flex-shrink: 0;
  margin-top: 1px;
}

.smart-product-modal__feature-text {
  font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 19.6px;
  letter-spacing: 0%;
  color: #475569;
  margin: 0;
}

.smart-product-modal__specs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.smart-product-modal__spec-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.smart-product-modal__spec-icon {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  background-color: #f1f3f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e293b;
  flex-shrink: 0;
  margin-top: 0;
}

.smart-product-modal__spec-icon svg {
  display: block;
  width: 12px;
  height: 12px;
}

.smart-product-modal__spec-text {
  font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 0%;
  color: #1e293b;
  margin: 0;
}

@media (max-width: 575px) {
  .smart-product-modal .modal-dialog {
    width: calc(100vw - 32px);
    max-width: 533px;
    margin: 16px auto !important;
  }

  .smart-product-modal__card {
    width: 100%;
    height: 580px;
    max-height: calc(100vh - 32px);
  }

  .smart-product-modal__card--compact {
    height: auto;
    padding-bottom: 24px;
  }
  
  .smart-product-modal__top {
    padding: 14px 16px 0;
  }

  .smart-product-modal__header {
    padding-left: 20px;
    padding-right: 20px;
  }

  .smart-product-modal__divider {
    margin: 0 20px 16px;
  }

  .smart-product-modal__scroll-container {
    margin: 0 20px 20px;
  }

  .smart-product-modal__title {
    font-size: 22px;
  }

  .smart-product-modal__img-wrap {
    height: 190px;
    padding-top: 4px;
    padding-bottom: 8px;
  }

  .smart-product-modal__img {
    width: 200px;
    height: auto;
    max-height: 180px;
  }
}
