body .cart-widget-side.wd-side-hidden.wd-right[aria-label="Боковая панель корзины"] {
  position: fixed;
  top: 50%;
  left: 50%;
  right: auto !important;
  bottom: auto;
  transform: translate(-50%, -50%) scale(0.985);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

body .cart-widget-side.wd-side-hidden.wd-right[aria-label="Боковая панель корзины"].wd-opened,
body .cart-widget-side.wd-side-hidden.wd-right[aria-label="Боковая панель корзины"].cs-cart-modal {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

body.cs-cart-modal-open {
  overflow: hidden;
}

.cs-cart-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 9998;
}

.cs-cart-modal-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

body .cart-widget-side.cs-cart-modal-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  width: min(700px, calc(100vw - 32px));
  max-width: 700px;
  max-height: min(86vh, 860px);
  height: auto;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.28);
  transform: translate(-50%, -50%) scale(0.985);
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  z-index: 9999;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

body .cart-widget-side.cs-cart-modal-panel:not(.cs-cart-modal):not(.wd-opened) {
  pointer-events: none;
}

body .cart-widget-side.cs-cart-modal-panel.cs-cart-modal,
body .cart-widget-side.cs-cart-modal-panel.wd-opened {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
}

body .cart-widget-side.cs-cart-modal-panel .wd-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 28px;
  border-bottom: 1px solid #dbe3ee;
}

body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__head {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 14px;
  background: #0f1b3d;
  color: #ffffff;
}

body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body .cart-widget-side.cs-cart-modal-panel .wd-heading .title {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 800;
  color: #0f172a;
}

body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__subtitle {
  font-size: 14px;
  line-height: 1.3;
  color: #64748b;
}

body .cart-widget-side.cs-cart-modal-panel .close-side-widget {
  margin-left: auto;
  flex: 0 0 auto;
}

body .cart-widget-side.cs-cart-modal-panel .close-side-widget a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #334155;
}

body .cart-widget-side.cs-cart-modal-panel .close-side-widget .wd-action-text {
  display: none;
}

body .cart-widget-side.cs-cart-modal-panel .close-side-widget .wd-action-icon::before {
  font-size: 20px;
}

body .cart-widget-side.cs-cart-modal-panel .widget,
body .cart-widget-side.cs-cart-modal-panel .widget_shopping_cart_content {
  height: auto;
}

body .cart-widget-side.cs-cart-modal-panel .widget_shopping_cart_content {
  display: flex;
  flex-direction: column;
  max-height: calc(min(86vh, 860px) - 104px);
  min-height: 0;
}

body .cart-widget-side.cs-cart-modal-panel .shopping-cart-widget-body {
  padding: 22px 22px 0;
  height: auto !important;
  max-height: calc(min(86vh, 860px) - 250px);
  min-height: 40px;
  overflow-y: auto !important;
  overflow-x: hidden;
}

body .cart-widget-side.cs-cart-modal-panel .wd-scroll-content {
  display: block !important;
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  transform: none !important;
  padding-right: 4px;
}

body .cart-widget-side.cs-cart-modal-panel .woocommerce-mini-cart {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 18px;
}

body .cart-widget-side.cs-cart-modal-panel .woocommerce-mini-cart-item {
  position: relative;
  margin: 0;
  padding: 22px 24px;
  min-height: 144px;
  border: 1px solid #d9e2ee;
  border-radius: 18px;
  background: #f7fafc;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 24px;
  align-items: start;
}

body .cart-widget-side.cs-cart-modal-panel .cart-item-image {
  display: none;
}

body .cart-widget-side.cs-cart-modal-panel .cart-item-link {
  display: block !important;
  position: absolute;
  top: 20px;
  left: 24px;
  right: 96px;
  height: 34px;
  z-index: 3;
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
  background: transparent !important;
  text-indent: -9999px;
  overflow: hidden;
}

body .cart-widget-side.cs-cart-modal-panel .cart-info {
  min-width: 0;
  min-height: 94px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 54px;
}

body .cart-widget-side.cs-cart-modal-panel .woocommerce-mini-cart-item > a:not(.remove):not(.cart-item-link):not(.cart-item-image) {
  display: none;
}

body .cart-widget-side.cs-cart-modal-panel .wd-entities-title {
  display: block;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
  color: #0f172a;
  padding-right: 32px;
}

body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__title-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
}

body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__title-link:hover {
  color: #0f1b3d;
  text-decoration: underline;
}

body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__title-link-inner {
  color: inherit;
  text-decoration: none;
}

body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__title-link-inner:hover {
  color: #0f1b3d;
  text-decoration: underline;
}

body .cart-widget-side.cs-cart-modal-panel .quantity {
  display: block;
  font-size: 16px;
  line-height: 1.35;
  color: #64748b;
  padding-right: 44px;
}

body .cart-widget-side.cs-cart-modal-panel .quantity .woocommerce-Price-amount {
  color: #64748b;
}

body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2px;
}

body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__unit-price {
  display: none;
}

body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__line-total {
  position: absolute;
  top: 22px;
  right: 24px;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  color: #0f172a;
  text-align: right;
}

body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__stock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
  color: #16a34a;
}

body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__stock-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #7ed8a0;
  flex: 0 0 8px;
}

body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 2px;
}

body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__qty-btn:hover {
  color: #0f1b3d;
}

body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__qty-input {
  width: 44px;
  min-width: 44px;
  height: 30px;
  padding: 0 6px;
  border: 1px solid #cdd8e5;
  border-radius: 10px;
  background: #ffffff;
  text-align: center;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}

body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__qty-input::-webkit-outer-spin-button,
body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__qty-input:focus {
  border-color: #94a3b8;
  outline: none;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.18);
}

body .cart-widget-side.cs-cart-modal-panel .woocommerce-mini-cart-item.cs-cart-modal__item-updating .cs-cart-modal__qty-btn,
body .cart-widget-side.cs-cart-modal-panel .woocommerce-mini-cart-item.cs-cart-modal__item-updating .cs-cart-modal__qty-input {
  opacity: 0.55;
  pointer-events: none;
}

body .cart-widget-side.cs-cart-modal-panel .remove {
  position: absolute;
  right: 18px;
  bottom: 10px;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  width: 28px;
  height: 28px;
  line-height: 0 !important;
  font-size: 0;
  color: transparent !important;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-indent: -9999px;
  overflow: hidden;
  padding: 0 !important;
  opacity: 0.9;
}

body .cart-widget-side.cs-cart-modal-panel .remove::before {
  content: "";
  position: absolute;
  inset: 0;
  display: block;
  text-indent: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M9 3h6l1 2h4v2H4V5h4l1-2Z' stroke='%23ef4444' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M7 7l.8 11a2 2 0 0 0 2 1.9h4.4a2 2 0 0 0 2-1.9L17 7' stroke='%23ef4444' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10 11v5M14 11v5' stroke='%23ef4444' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

body .cart-widget-side.cs-cart-modal-panel .remove::after {
  display: none !important;
  content: none !important;
}

body .cart-widget-side.cs-cart-modal-panel .remove span,
body .cart-widget-side.cs-cart-modal-panel .remove i,
body .cart-widget-side.cs-cart-modal-panel .remove svg {
  display: none !important;
}

body .cart-widget-side.cs-cart-modal-panel .remove:hover {
  opacity: 1;
}

body .woodmart-archive-shop .cs-catalog-card .added_to_cart,
body .woodmart-archive-shop .product .added_to_cart,
body .woodmart-archive-shop .products .added_to_cart {
  display: none !important;
}

body .cart-widget-side.cs-cart-modal-panel .woocommerce-mini-cart__total {
  margin: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  font-size: 18px;
  line-height: 1.2;
}

body .cart-widget-side.cs-cart-modal-panel .woocommerce-mini-cart__total strong {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

body .cart-widget-side.cs-cart-modal-panel .woocommerce-mini-cart__total .amount {
  font-size: 24px;
  font-weight: 800;
  color: #0f1b3d;
}

body .cart-widget-side.cs-cart-modal-panel .shopping-cart-widget-footer {
  padding: 24px 28px 28px;
  /* border-top: 1px solid #dbe3ee; */
  background: #ffffff;
}

body .cart-widget-side.cs-cart-modal-panel .woocommerce-mini-cart__buttons {
  margin: 20px 0 0;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  flex-wrap: nowrap;
  width: 100%;
}

body .cart-widget-side.cs-cart-modal-panel .woocommerce-mini-cart__buttons .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0;
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin: 0 !important;
}

body .cart-widget-side.cs-cart-modal-panel .woocommerce-mini-cart__buttons .btn-cart,
body .cart-widget-side.cs-cart-modal-panel .woocommerce-mini-cart__buttons .btn-default {
  flex: none;
  border: 1px solid #cdd8e5;
  background: #ffffff;
  color: #334155;
}

body .cart-widget-side.cs-cart-modal-panel .woocommerce-mini-cart__buttons .btn-cart.wc-forward {
  display: none !important;
}

body .cart-widget-side.cs-cart-modal-panel .woocommerce-mini-cart__buttons .checkout,
body .cart-widget-side.cs-cart-modal-panel .woocommerce-mini-cart__buttons .btn-primary {
  flex: none;
  grid-column: span 1;
  background: linear-gradient(135deg, #0d1734 0%, #243b67 100%);
  color: #ffffff;
  border: 0;
}

body .cart-widget-side.cs-cart-modal-panel .wd-empty-mini-cart {
  padding: 34px 28px 10px;
  text-align: center;
}

body .cart-widget-side.cs-cart-modal-panel .wd-empty-mini-cart .title {
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

body .cart-widget-side.cs-cart-modal-panel .wd-empty-mini-cart .wc-backward {
  min-height: 48px;
  border-radius: 14px;
}

@media (max-width: 767px) {
  body .cart-widget-side.cs-cart-modal-panel {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 22px;
  }

  body .cart-widget-side.cs-cart-modal-panel .wd-heading {
    padding: 20px 20px 18px;
  }

  body .cart-widget-side.cs-cart-modal-panel .shopping-cart-widget-body {
    padding: 18px 18px 0;
    max-height: calc(100vh - 250px);
  }

  body .cart-widget-side.cs-cart-modal-panel .shopping-cart-widget-footer {
    padding: 20px;
  }

  body .cart-widget-side.cs-cart-modal-panel .woocommerce-mini-cart__buttons {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  body .cart-widget-side.cs-cart-modal-panel .woocommerce-mini-cart__buttons .button {
    width: 100%;
  }

  body .cart-widget-side.cs-cart-modal-panel .remove {
    right: 14px;
    bottom: 8px;
    top: auto !important;
    transform: none !important;
  }

  body .cart-widget-side.cs-cart-modal-panel .cart-item-link {
    top: 18px;
    left: 18px;
    right: 84px;
  }

  body .cart-widget-side.cs-cart-modal-panel .cs-cart-modal__line-total {
    top: 18px;
    right: 18px;
    font-size: 16px;
  }
}
