.cart-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  counter-reset: cart-item;
}
.cart-list .cart-row {
  position: relative;
  padding-left: 37px;
  counter-increment: cart-item;
}
.cart-list .cart-row::before {
  content: counter(cart-item, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 22px;
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
}
.cart-list .cart-row > div:first-child {
  min-width: 0;
  flex: 1;
}
.cart-list .cart-row-right {
  flex-shrink: 0;
  max-width: 35%;
}
.cart-list .cart-row h3 {
  font-size: 17px;
  line-height: 1.4;
}
.cart-list .cart-row p {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.cart-list .cart-row-price {
  white-space: normal;
  text-align: right;
  min-width: 100px;
  font-size: 18px;
}
.cart-list .cart-file-actions {
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}
.cart-list .cart-file-actions button {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: left;
}
.cart-export {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid #f2d9dc;
  background: #fff8f8;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.cart-export strong {
  display: block;
  font-size: 17px;
  line-height: 1.4;
}
.cart-export p {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.cart-export .button {
  flex-shrink: 0;
  min-height: 45px;
}
.cart-export .button:disabled {
  cursor: wait;
  opacity: 0.65;
}
.cart-export-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}
.cart-export-actions .button {
  width: 100%;
  white-space: nowrap;
}
.cart-panel .cart-export-actions {
  min-width: 205px;
}
.cart-pdf-status {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 0;
  min-height: 20px;
}
.dialog.is-cart {
  width: min(900px, calc(100% - 40px));
  border-radius: 20px;
}
.dialog.is-cart-empty {
  width: min(560px, calc(100% - 40px));
}
.is-cart .dialog-top {
  padding: 15px 24px;
}
.is-cart .cart-panel {
  padding: 26px;
}
.cart-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.cart-heading .cart-clear {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--red);
  border-color: #f2d9dc;
  white-space: nowrap;
}
.cart-heading h2,
.cart-panel > h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.8px;
}
.cart-count-label {
  padding: 6px 10px;
  background: #f2f3f5;
  border-radius: 7px;
  font-size: 12px;
  color: #62676b;
  white-space: nowrap;
}
.cart-panel > .dialog-intro {
  margin: 12px 0 24px;
  font-size: 14px;
  line-height: 1.6;
}
.cart-panel .button {
  min-height: 46px;
  padding: 11px 16px;
  font-size: 14px;
  gap: 10px;
}
.cart-panel .button > .icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin: 0;
  color: currentColor;
  flex-shrink: 0;
}
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 26px 8px 12px;
}
.cart-empty-icon {
  width: 70px;
  height: 70px;
  background: #fff0f1;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: var(--red);
  margin-bottom: 21px;
}
.cart-empty-icon > .icon {
  width: 32px;
  height: 32px;
  margin: 0;
  color: currentColor;
}
.cart-empty h3 {
  font-size: 23px;
  line-height: 1.3;
  margin: 0 0 12px;
  letter-spacing: -0.4px;
}
.cart-empty p {
  max-width: 350px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 24px;
}
.cart-empty .button {
  min-width: 220px;
}
.cart-panel .cart-list {
  display: grid;
  gap: 12px;
}
.cart-panel .cart-row {
  padding: 20px 18px 20px 52px;
  border: 1px solid #e5e7ea;
  border-radius: 14px;
  align-items: flex-start;
}
.cart-panel .cart-row::before {
  left: 18px;
  top: 23px;
}
.cart-panel .cart-row::before {
  content: none;
}
.cart-item-content {
  min-width: 0;
  flex: 1;
}
.cart-row-select {
  position: absolute;
  left: 17px;
  top: 22px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.cart-row-select input,
.cart-select-all input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--red);
  cursor: pointer;
}
.cart-panel .cart-row.is-selected {
  border-color: #e996a3;
  background: #fff8fa;
}
.cart-bulk-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding: 14px 16px;
  background: #f6f7f8;
  border: 1px solid #e5e7ea;
  border-radius: 12px;
}
.cart-select-all {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.cart-selected-count {
  font-size: 13px;
  color: #747b86;
}
.cart-bulk-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}
.cart-bulk-actions button {
  min-height: 44px;
  padding: 7px 11px;
  border: 1px solid #e1e4e9;
  background: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
}
.cart-bulk-actions button:hover:enabled {
  color: var(--red);
  border-color: #efb6c0;
  background: #fff5f7;
}
.cart-bulk-actions button:disabled {
  opacity: 0.45;
  cursor: default;
}
.cart-panel .cart-row-right {
  align-items: flex-start;
  gap: 16px;
}
.cart-panel .cart-row-right .icon-button {
  border: 1px solid #e7e9ec;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  color: #82868b;
  display: grid;
  place-items: center;
}
.cart-panel .cart-row-right .icon-button:hover {
  color: var(--red);
  background: #fff0f1;
  border-color: #f2b9bf;
}
.cart-panel .cart-row-right .icon {
  width: 17px;
  height: 17px;
}
.cart-panel .cart-edit-link,
.cart-panel .cart-file-actions :is(label, button) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid #e5e7ea;
  border-radius: 7px;
  background: #f7f8f9;
  color: #30363b;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
  cursor: pointer;
}
.cart-panel .cart-file-actions {
  gap: 8px;
}
.cart-panel .cart-summary {
  padding: 20px;
  border-radius: 12px;
  background: #f6f7f8;
  align-items: center;
  gap: 20px;
  font-size: 16px;
}
.cart-panel .cart-summary strong {
  font-size: 28px;
  line-height: 1.3;
}
.cart-panel .cart-export {
  margin-top: 18px;
  border-color: #e5e7ea;
  background: #f9fafb;
}
.cart-panel .cart-pdf-status:empty {
  display: none;
}
.cart-panel .button:focus-visible,
.cart-panel .cart-file-actions label:focus-within {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}
@media (max-width: 600px) {
  .cart-list .cart-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding-left: 27px;
    gap: 12px;
  }
  .cart-list .cart-row-right {
    max-width: none;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .cart-list .cart-row::before {
    font-size: 11px;
  }
  .cart-list .cart-row h3 {
    font-size: 15px;
  }
  .cart-list .cart-row p {
    font-size: 13px;
  }
  .cart-list .cart-row-price {
    font-size: 16px;
    min-width: 0;
    text-align: left;
  }
  .cart-summary {
    flex-wrap: wrap;
    gap: 8px;
  }
  .cart-summary strong {
    font-size: 24px;
  }
  .cart-export {
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .cart-export strong {
    font-size: 16px;
  }
  .cart-export .button {
    width: 100%;
    font-size: 13px;
  }
  .dialog.is-cart,
  .dialog.is-cart-empty {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 16px;
  }
  .is-cart .dialog-top {
    padding: 12px 18px;
  }
  .is-cart .cart-panel {
    padding: 20px 16px;
  }
  .cart-heading h2,
  .cart-panel > h2 {
    font-size: 26px;
  }
  .cart-heading .cart-clear {
    margin-left: 0;
    width: 100%;
  }
  .cart-empty {
    padding: 22px 0 8px;
  }
  .cart-empty-icon {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }
  .cart-empty h3 {
    font-size: 21px;
  }
  .cart-empty p {
    font-size: 14px;
  }
  .cart-empty .button {
    width: 100%;
    min-width: 0;
  }
  .cart-panel .cart-row {
    padding: 16px 16px 16px 42px;
  }
  .cart-panel .cart-row::before {
    left: 13px;
    top: 20px;
  }
  .cart-row-select {
    left: 13px;
    top: 18px;
  }
  .cart-bulk-controls {
    gap: 12px;
    padding: 13px;
  }
  .cart-bulk-actions {
    width: 100%;
    margin-left: 0;
  }
  .cart-bulk-actions button {
    flex: 1;
    font-size: 12px;
    min-height: 40px;
  }
  .cart-panel .cart-row-right {
    align-items: center;
  }
  .cart-panel .cart-summary {
    padding: 16px;
    font-size: 14px;
  }
  .cart-panel .cart-summary strong {
    font-size: 23px;
    overflow-wrap: anywhere;
    max-width: 100%;
  }
}
/* Preferred customer contact when submitting the basket. */
.checkout-contact {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.checkout-contact legend {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  padding: 0;
}
.checkout-channel-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: 320px;
  max-width: 100%;
  padding: 4px;
  border-radius: 12px;
  background: #f1f2f4;
}
.checkout-channel-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 15px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}
.checkout-channel-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.checkout-channel-option img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.checkout-channel-option:has(input:checked) {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 5px #20202418;
}
.checkout-channel-option:has(input:focus-visible) {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}
.checkout-contact-hint {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  margin: 10px 0 0;
}
.checkout-telegram-field {
  margin-top: 14px;
}
.checkout-telegram-field[hidden] {
  display: none !important;
}
@media (max-width: 380px) {
  .checkout-channel-option {
    gap: 7px;
    padding: 9px 10px;
  }
}
