.ps-product-box,
.ps-cart-page,
.ps-checkout-page {
  max-width: 1100px;
  margin: 20px auto;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 18px;
  background: #fff;
  box-sizing: border-box;
}

.ps-product-box__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.ps-product-box__price {
  font-size: 28px;
  font-weight: 700;
}

.ps-product-box__deadline {
  font-size: 14px;
  color: #555;
}

.ps-product-box__grid,
.ps-grid-2 {
  display: grid;
  gap: 12px;
}

.ps-product-box__grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ps-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ps-field label,
.ps-checkout-form label,
.ps-cart-edit-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.ps-field select,
.ps-field input,
.ps-checkout-form input,
.ps-checkout-form textarea,
.ps-checkout-form select,
.ps-cart-edit-field input,
.ps-cart-edit-field select {
  width: 100%;
  max-width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  background: #fff;
}

.ps-checkout-form textarea {
  min-height: 110px;
}

.ps-product-box__extra {
  margin-top: 14px;
}

.ps-product-box__paint-note {
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

.ps-product-box__actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.js-ps-add,
.ps-btn-secondary,
.js-ps-checkout-btn,
.ps-payment-btn,
.ps-cart-update,
.ps-cart-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  background: #111;
  color: #fff;
  border: 0;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
  box-sizing: border-box;
}

.ps-btn-secondary,
.ps-payment-btn--secondary {
  background: #444;
}

.ps-cart-remove {
  background: #b91c1c;
}

.js-ps-message,
.ps-alert {
  margin-top: 12px;
  font-size: 14px;
  padding: 10px;
  border-radius: 8px;
  background: #f8f8f8;
  box-sizing: border-box;
}

.ps-table {
  width: 100%;
  border-collapse: collapse;
}

.ps-table th,
.ps-table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.ps-cart-total {
  margin-top: 16px;
  font-size: 20px;
}

.ps-cart-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.ps-cart-qty {
  width: 100%;
  min-width: 0;
  padding: 8px;
}

.ps-cart-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fafafa;
  box-sizing: border-box;
}

.ps-cart-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.ps-cart-summary__row--grand {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #ddd;
  font-size: 18px;
}

.ps-cart-summary__actions {
  margin-top: 10px;
}

.ps-cart-empty {
  padding: 14px;
  background: #f8f8f8;
  border-radius: 10px;
}

.ps-cart-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.ps-cart-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ps-cart-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
  background: #fff;
  overflow: hidden;
  box-sizing: border-box;
}

.ps-cart-card__form {
  display: block;
  width: 100%;
}

.ps-cart-card__title-full {
  width: 100%;
  margin: 0 0 18px 0;
  font-size: 18px;
  line-height: 1.35;
  color: #111;
}

.ps-cart-card__edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
  width: 100%;
  min-width: 0;
  align-items: end;
}

.ps-cart-edit-field {
  min-width: 0;
  width: 100%;
}

.ps-cart-edit-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #111;
}

.ps-cart-edit-field select,
.ps-cart-edit-field input {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.2;
  border: 1px solid #cfcfcf;
  border-radius: 10px;
  background: #fff;
  color: #111;
  box-sizing: border-box;
}

.ps-cart-card__action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.ps-cart-remove-form {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.ps-cart-card__action-row .ps-btn-secondary,
.ps-cart-card__action-row .ps-cart-update,
.ps-cart-card__action-row .ps-cart-remove,
.ps-cart-remove-form .ps-cart-remove {
  min-height: 46px;
  padding: 12px 18px;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ps-payment-box {
  max-width: 900px;
  margin: 30px auto;
  border: 1px solid #ddd;
  border-radius: 14px;
  padding: 20px;
  background: #fff;
  box-sizing: border-box;
}

.ps-payment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ps-payment-card {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  background: #fafafa;
  box-sizing: border-box;
}

.ps-payment-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.ps-payment-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ps-payment-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

.ps-payment-card p strong {
  font-weight: 700;
}

.ps-checkout-extra {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fafafa;
}

.ps-checkout-check {
  display: flex !important;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin: 0;
}

.ps-checkout-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 0;
}

.ps-checkout-check span {
  display: block;
  line-height: 1.45;
}

.ps-checkout-extra__note {
  margin-top: 8px;
  color: #666;
  font-size: 14px;
}

.ps-paint-price {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
}

.ps-field-note {
  margin-top: 8px;
  font-size: 14px;
  color: #666;
}

.ps-checkout-total {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fafafa;
  font-size: 18px;
  line-height: 1.7;
  color: #111827;
}

.ps-checkout-total strong {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
}

#paint_line {
  color: #065f46;
  font-weight: 600;
}

#subtotal_value,
#paint_price_value,
#total_value {
  font-variant-numeric: tabular-nums;
}

.ps-cart-extra-line {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: #111827;
}

.ps-cart-extra-line__label {
  font-weight: 700;
  margin-right: 6px;
}

.ps-cart-extra-line__value {
  color: #065f46;
}

.js-ps-message {
  margin-top: 14px;
}

.ps-go-checkout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 18px;
  border-radius: 10px;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  line-height: 1;
  transition: opacity .2s ease, transform .2s ease;
}

.ps-go-checkout-btn:hover {
  opacity: .9;
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}

/* Checkout redesign */
.ps-checkout-page {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 15px;
}

.ps-checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: stretch;
}

.ps-checkout-form-box,
.ps-checkout-summary-box {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.ps-checkout-form-box {
  padding: 24px;
}

.ps-checkout-summary-box {
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.ps-checkout-form-box h1,
.ps-checkout-summary-box h3 {
  margin: 0 0 20px 0;
  color: #111;
  line-height: 1.2;
}

.ps-checkout-form-box h1 {
  font-size: 32px;
  font-weight: 700;
}

.ps-checkout-summary-box h3 {
  font-size: 22px;
  font-weight: 700;
}

.ps-checkout-form {
  display: block;
}

.ps-checkout-row {
  margin: 0 0 16px 0;
}

.ps-checkout-row label {
  display: block;
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #222;
}

.ps-checkout-row input,
.ps-checkout-row textarea,
.ps-checkout-row select {
  width: 100%;
  display: block;
  box-sizing: border-box;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid #d8d8d8;
  border-radius: 12px;
  background: #fff;
  color: #111;
  font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.ps-checkout-row textarea {
  min-height: 110px;
  resize: vertical;
}

.ps-checkout-row input:focus,
.ps-checkout-row textarea:focus,
.ps-checkout-row select:focus {
  outline: none;
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.ps-checkout-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  margin-top: 20px;
}

.ps-checkout-actions .ps-payment-btn,
.ps-checkout-submit-btn,
#ps-checkout-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease;
}

.ps-checkout-actions .ps-payment-btn:hover,
.ps-checkout-submit-btn:hover,
#ps-checkout-submit-btn:hover {
  opacity: .92;
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}

.ps-checkout-actions .ps-payment-btn:disabled,
.ps-checkout-submit-btn:disabled,
#ps-checkout-submit-btn:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
}

.ps-checkout-actions .ps-alert {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  flex: 0 0 auto;
}

.ps-checkout-actions .js-ps-checkout-btn {
  margin-top: 0;
  flex: 0 0 auto;
}

#ps-checkout-totals-wrap {
  display: block;
  width: 100%;
  padding-top: 24px;
  padding-bottom: 24px;
}

.ps-checkout-totals-box {
  display: block;
  width: 100%;
}

.ps-checkout-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 15px;
  color: #222;
}

.ps-checkout-total-row span {
  color: #555;
}

.ps-checkout-total-row strong {
  color: #111;
  font-weight: 700;
}

.ps-checkout-total-row--grand {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 2px solid #e8e8e8;
  border-bottom: 0;
  font-size: 18px;
}

.ps-checkout-total-row--grand span,
.ps-checkout-total-row--grand strong {
  color: #111;
}

.ps-checkout-total-note {
  margin: 14px 0 8px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7f7f7;
  font-size: 14px;
  color: #555;
}

#ps-checkout-message {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff4f4;
  border: 1px solid #ffd7d7;
  color: #b42318;
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .ps-product-box__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ps-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .ps-checkout-grid {
    grid-template-columns: 1fr;
  }

  .ps-checkout-page {
    margin: 24px auto;
  }

  .ps-checkout-form-box,
  .ps-checkout-summary-box {
    padding: 18px;
    border-radius: 16px;
  }

  .ps-checkout-form-box h1 {
    font-size: 28px;
  }

  #ps-checkout-totals-wrap {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .ps-cart-card__edit-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 768px) {
  .ps-payment-grid {
    grid-template-columns: 1fr;
  }

  .ps-cart-card__edit-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 640px) {
  .ps-checkout-total {
    font-size: 16px;
    padding: 14px 16px;
  }

  .ps-checkout-total strong {
    font-size: 24px;
  }

  .ps-checkout-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .ps-checkout-actions .ps-alert {
    width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .ps-product-box__grid {
    grid-template-columns: 1fr;
  }

  .ps-cart-card__edit-grid {
    grid-template-columns: 1fr;
  }

  .ps-cart-card__action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ps-cart-card__action-row .ps-btn-secondary,
  .ps-cart-card__action-row .ps-cart-update,
  .ps-cart-card__action-row .ps-cart-remove,
  .ps-cart-remove-form,
  .ps-cart-remove-form .ps-cart-remove {
    width: 100%;
  }
}

