/* Opto Zero v3.84 — cart page quantity controls only.
   Keeps every cart line in its original purchase mode (units / box). */

#checkout-cart.oc-cart-page-v35 .oc-cart-table th:nth-child(4),
#checkout-cart.oc-cart-page-v35 .oc-cart-table td:nth-child(4) {
  width: 230px !important;
}

#checkout-cart .oc-cart-sale-mode-v383 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  padding: 4px 8px;
  border: 1px solid #dce7f5;
  border-radius: 999px;
  background: #f7faff;
  color: #60718a;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 800;
  white-space: nowrap;
}

#checkout-cart .oc-cart-sale-mode-v383.is-box {
  border-color: #cfe0ff;
  background: #eef5ff;
  color: #0d5de6;
}

#checkout-cart .oc-cart-sale-mode-v383.is-units {
  border-color: #dce7f5;
  background: #f7faff;
  color: #4d607a;
}

#checkout-cart .oc-cart-sale-mode-dot-v383 {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 6px;
}

#checkout-cart .oc-cart-line-actions-v383 {
  display: grid;
  grid-template-columns: minmax(132px, 1fr) 40px;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  max-width: 206px;
  margin: 0;
}

#checkout-cart .oc-cart-stepper-v383 {
  display: grid;
  grid-template-columns: minmax(38px, 1fr) 54px minmax(38px, 1fr);
  align-items: stretch;
  width: 100%;
  min-width: 0;
  height: 42px;
  overflow: hidden;
  border: 1px solid #d9e4f2;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(31, 65, 111, .035);
}

#checkout-cart .oc-cart-step-v383 {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #173b67;
  font-size: 21px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s ease, color .12s ease;
}

#checkout-cart .oc-cart-step-v383:hover,
#checkout-cart .oc-cart-step-v383:focus-visible {
  background: #eef5ff;
  color: #0d5de6;
  outline: 0;
}

#checkout-cart .oc-cart-step-v383:active {
  background: #deebff;
}

#checkout-cart .oc-cart-line-qty-v383 {
  display: block;
  width: 100%;
  min-width: 0;
  height: 40px;
  margin: 0;
  padding: 0 3px;
  border: 0;
  border-left: 1px solid #edf1f6;
  border-right: 1px solid #edf1f6;
  border-radius: 0;
  outline: 0;
  background: #fff;
  color: #102f57;
  text-align: center;
  font-size: 16px;
  line-height: 40px;
  font-weight: 900;
  box-shadow: none;
  -moz-appearance: textfield;
}

#checkout-cart .oc-cart-line-qty-v383::-webkit-outer-spin-button,
#checkout-cart .oc-cart-line-qty-v383::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

#checkout-cart .oc-cart-line-qty-v383:focus {
  background: #fbfdff;
}

#checkout-cart .oc-cart-remove-v383 {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 1px solid #fee2e2;
  border-radius: 12px;
  background: #fff1f2;
  color: #dc3f49;
  font-size: 15px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s ease, border-color .12s ease;
}

#checkout-cart .oc-cart-remove-v383:hover,
#checkout-cart .oc-cart-remove-v383:focus-visible {
  border-color: #fecaca;
  background: #ffe4e6;
  outline: 0;
}

#checkout-cart .oc-cart-line-v383.is-oc-cart-saving .oc-cart-stepper-v383 {
  box-shadow: inset 0 0 0 1px rgba(13, 93, 230, .08);
}

#checkout-cart .oc-cart-line-v383.is-oc-cart-error .oc-cart-stepper-v383 {
  border-color: #f5a8ad;
}

@media (max-width: 767px) {
  #checkout-cart.oc-cart-page-v35 .oc-cart-table > tbody > tr.oc-cart-line-v383 {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    grid-template-areas:
      "image name"
      "image price"
      "qty qty"
      "total total" !important;
    gap: 5px 10px !important;
    padding: 11px !important;
  }

  #checkout-cart.oc-cart-page-v35 .oc-cart-table > tbody > tr.oc-cart-line-v383 > td:nth-child(4) {
    grid-area: qty !important;
    display: block !important;
    width: 100% !important;
    margin: 8px 0 0 !important;
  }

  #checkout-cart.oc-cart-page-v35 .oc-cart-table > tbody > tr.oc-cart-line-v383 > td:nth-child(6) {
    position: static !important;
    grid-area: total !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: 100% !important;
    margin-top: 2px !important;
    padding-top: 7px !important;
    border-top: 1px solid #eef2f7 !important;
  }

  #checkout-cart.oc-cart-page-v35 .oc-cart-table > tbody > tr.oc-cart-line-v383 > td:nth-child(6)::before {
    content: "Итого";
    margin-right: auto;
    color: #97a2b3;
    font-size: 10px;
    font-weight: 700;
  }

  #checkout-cart .oc-cart-sale-mode-v383 {
    max-width: 100%;
    margin-top: 4px;
    padding: 3px 7px;
    font-size: 9px;
    white-space: normal;
  }

  #checkout-cart .oc-cart-line-actions-v383 {
    grid-template-columns: minmax(0, 1fr) 42px !important;
    gap: 7px !important;
    width: 100% !important;
    max-width: none !important;
  }

  #checkout-cart .oc-cart-stepper-v383 {
    grid-template-columns: 44px minmax(76px, 1fr) 44px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 44px !important;
    border-radius: 12px !important;
  }

  #checkout-cart .oc-cart-step-v383,
  #checkout-cart .oc-cart-line-qty-v383 {
    height: 42px !important;
    min-height: 42px !important;
  }

  #checkout-cart .oc-cart-step-v383 {
    font-size: 20px !important;
  }

  #checkout-cart .oc-cart-line-qty-v383 {
    font-size: 17px !important;
    line-height: 42px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  #checkout-cart .oc-cart-remove-v383 {
    width: 42px !important;
    height: 44px !important;
    border-radius: 12px !important;
  }
}

@media (max-width: 370px) {
  #checkout-cart .oc-cart-stepper-v383 {
    grid-template-columns: 40px minmax(70px, 1fr) 40px !important;
  }
}


/* v3.84: delete feels immediate; server sync continues in background. */
#checkout-cart .oc-cart-line-v383.is-oc-cart-removing {
  display: none !important;
}


/* Opto Zero v4.07 — same cart design, sale mode is now switchable. */
#checkout-cart .oc-cart-mode-switch-v407 {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .12s ease, background .12s ease, color .12s ease, opacity .12s ease;
}

#checkout-cart .oc-cart-mode-switch-v407:hover,
#checkout-cart .oc-cart-mode-switch-v407:focus-visible {
  border-color: #9fc2ff;
  background: #eaf3ff;
  outline: 0;
}

#checkout-cart .oc-cart-mode-switch-v407:active {
  transform: translateY(1px);
}

#checkout-cart .oc-cart-mode-switch-v407:disabled {
  cursor: wait;
  opacity: .68;
}

#checkout-cart .oc-cart-mode-text-v407 {
  min-width: 0;
}

#checkout-cart .oc-cart-mode-icon-v407 {
  margin-left: 2px;
  font-size: 10px;
  line-height: 1;
  opacity: .72;
  flex: 0 0 auto;
}

#checkout-cart .oc-secondary-btn .fa-home {
  font-size: 12px;
}
