/* Desktop cart: visible >= 720px, hidden on mobile */
#cart-wrapper-desktop {
  display: block;
}

#cart-wrapper-mobile {
  display: none;
}

@media (max-width: 768px) {
  #cart-wrapper-desktop {
    display: none;
  }

  #cart-wrapper-mobile {
    display: block;
  }
}

.only-empty-cart {
  display: flex;
  justify-content: center;
  color: #848484;
  font-weight: 700;
  font-size: 20px;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-collapse: separate;
  border-spacing: 0px 12px;
}

.cart-table th,
.cart-table td {
  padding: 12px 10px;
  border: 1px solid #eee;
  vertical-align: middle;
  padding-right: 30px;
}

.cart-table td {
  background: #fff;
  border: none;
  border-top: 2px solid #eee;
  border-bottom: 2px solid #eee;

  &.cart-price,
  &.cart-remove {
    text-align: center;
  }
}

.cart-table td:first-child {
  border-left: 2px solid #eee;
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.cart-table td:last-child {
  border-right: 2px solid #eee;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.cart-table thead th {
  background: transparent;
  border: none;
}

.split {
  display: flex;
  flex-direction: column;
  align-items: center;
}


.cart-product-meta .sku {
  color: #888;
  font-size: 0.9em;
}

.note {
  color: #d0026b;
  font-weight: 700;
}

.cart-qty {
  text-align: center;
  display: table-cell;
}

.cart-qty-block {
  display: flex;

}

.qty-btn {
  background: none;
  &:hover {
    opacity: 0.8;
  }
}

.cart-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-continue {
  display: inline-block;
  background: #f3c;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
}

.btn-link.back {
  border-radius: 8px;
  padding: 10px 16px;
  background: #f3c;
  color: #fff;
  font-weight: 600;
}

.cart-summary {
  text-align: right;
}

.summary-label {
  font-weight: 700;
  margin-bottom: 6px;
}

.summary-value {
  font-size: 1.5em;
  font-weight: 700;
}

.contact-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  gap: 15px;
}

.contact-form-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #0d0d0d;
  flex: 1;
}

.btn-checkout {
  background-color: #00c853;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.3s;
  font-size: 0.95rem;
  margin-top: 10px;
}

.btn-checkout:hover {
  background-color: #00a840;
}

/* Кнопка переходу до оформлення: заблокований стан */
.btn-checkout.btn-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-input,
.form-textarea {
  padding: 12px 15px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #00c853;
  box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  /* color: #e8a5a5; */
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-weight: bold;
  color: #0d0d0d;
  font-size: 1rem;
}

.form-textarea {
  resize: vertical;
  /* min-height: 120px; */
  font-size: 0.95rem;
}


.cart-item {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 11px;
  overflow: hidden;
}

.cart-item-inner {
  padding: 16px;
  display: flex;
  flex-direction: row;
  gap: 16px;
}

.cart-item-title {
  color: #848484 !important;
  font-size: 10px;
}

/* --- HEADER --- */
.cart-item-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  flex-direction: column;
  width: 100%;
}

.cart-no {
  font-weight: 600;
  font-size: 16px;
  color: #000;
  line-height: 1.4;
  min-width: 20px;
  padding-top: 4px;
}

.cart-info {
  flex: 1;
  display: flex;
  /* flex-direction: column; */
  gap: 2px;
  justify-content: space-between;
  width: 100%;
}

.cart-product-title {
  font-size: 15px;
  font-weight: 600;
}

.cart-product-color {
  font-size: 15px;
  color: #848484 !important;
}

.cart-product-article {
  font-size: 13px;
  color: #848484 !important;
}




/* --- BOTTOM SECTION --- */
.cart-row-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}


.cart-total-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.label {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 4px;
}

.cart-price,
.cart-line-total {
  font-weight: 600;
  font-size: 16px;
}

.cart-qty {
  align-items: center;
  /* gap: 8px; */
}

.btn-remove {
  background: none;
  border: none;
  cursor: pointer;
}

.qty-decrease,
.qty-increase {
  border: 1px solid #ddd;
  padding: 5px;
  cursor: pointer;
}

.qty-decrease {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  border-right: none;
}
.qty-increase {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  border-left: none;
}

.qty-input {
  width: 40px;
  text-align: center;
  border: none;
  background: none;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  font-size: 15px;
  padding: 5px;
  text-align: center;
  box-sizing: border-box;
  &::-webkit-outer-spin-button,
  &::-webkit-inner-spin-button {
    -webkit-appearance: none;
    -moz-appearance: none;
    margin: 0;
  }
}


@media (max-width: 768px) {
  .contact-form-section {
    padding: 0;
    background-color: transparent;
  }

  .contact-form-header {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 20px;
    gap: 12px;
  }

  .contact-form-header h2 {
    font-size: 1rem;
    margin: 0;
    order: -1;
  }

  .btn-checkout {
    width: 100%;
    text-align: center;
    padding: 14px 12px;
    background-color: #00c853;
    order: 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-input,
  .form-textarea {
    padding: 12px 15px;
    border: 1px solid #e0d9d9;
  }

  .form-textarea {
    height: 66px;
  }

  .form-label {
    font-size: 0.95rem;
  }

  .cart-price-block,
  .cart-qty-block,
  .cart-total-block {
    flex: 1;
    min-width: inherit;
  }

  .cart-qty-block {
    flex-direction: column;
    align-items: center;
  }

  .cart-qty {
    display: flex;
    align-items: center;
    height: 28px;
  }

  .qty-input {
    /* border-radius: inherit; */
    width: 30px;
    height: 28px;
    box-sizing: border-box;
  }
  .qty-decrease,
  .qty-increase {
    font-size: 16px;
    padding: 0 7px;
    /* border: 1px solid #ddd; */
    /* border-radius: inherit; */
    cursor: pointer;
    height: 28px;
    background: none;
  }

  .cart-remove {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .cart-actions {
    justify-content: center;
    text-align: center !important;
    margin-bottom: 15px;
    .back, .cart-summary {
      width: 100%;;
    }

    .cart-summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
  }
}


input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}