.ppx-account {
  margin: 24px auto 48px;
  padding: 0 16px;
}
.ppx-account__hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 0 8px;
}
.ppx-account__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #eae7e2;
  border: 1px solid #e6e1da;
}
.ppx-account__title {
  font-family: "Playfair Display", serif;
  font-size: 40px;
  margin: 0;
  color: #1f292e;
}
.ppx-account__subtitle {
  margin: 6px 0 0;
  color: #465965;
  font-weight: 600;
}

.ppx-account__tabs {
  margin: 12px 0 16px;
  font-size: 1rem !important;
}
.ppx-account__tablist {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  border: 1px solid #e6e1da;
  border-radius: 999px;
  background: #f6f3ee;
  padding: 4px !important;
  justify-content: center;
}
.ppx-account__tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  font-weight: 700;
  color: #294756;
  text-decoration: none;
  border-radius: 999px;
}

.ppx-account__tab {
  color: #294756 !important;
}

.ppx-account__tab.is-active {
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ppx-account__tab svg {
  width: 18px;
  height: 18px;
  display: inline-block;
}

.ppx-account__content {
  margin-top: 10px;
}

/* Address forms wrapper uses our grid */
.woocommerce-account .woocommerce-address-fields__field-wrapper.ppx-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.ppx-card {
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e6e1da;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  padding: 20px;
}
.ppx-card__title {
  margin: 0 0 14px;
  font-size: 1.57rem !important;
  color: #1f292e;
}

.ppx-form .ppx-field {
  margin: 0 0 12px;
}
.ppx-form label {
  display: block;
  font-weight: 700;
  color: #294756;
  margin-bottom: 6px;
}
.ppx-form input[type="text"],
.ppx-form input[type="email"],
.ppx-form input[type="password"],
.ppx-form select,
.ppx-form textarea {
  width: 100%;
  background: #fff;
  border: 1px solid #e6e1da;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
  color: #1f292e;
}
.ppx-form .ppx-col-12 {
  grid-column: 1 / -1;
}
.ppx-form .ppx-col-6 {
  grid-column: span 6;
}
.ppx-form .ppx-col-4 {
  grid-column: span 4;
}
.ppx-form .ppx-col-8 {
  grid-column: span 8;
}
.ppx-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
@media (max-width: 768px) {
  .ppx-form .ppx-col-6,
  .ppx-form .ppx-col-4,
  .ppx-form .ppx-col-8 {
    grid-column: 1 / -1;
  }
}

/* Custom selects border color */
.ppx-form select,
.ppx-select {
  border-color: rgb(41, 71, 86) !important;
}
.ppx-form select:focus,
.ppx-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(41, 71, 86, 0.15);
}

/* Select2-rendered selects: style the visible wrapper that follows the <select> */
/* Prefer adjacent sibling when we add ppx-select to the <select> */
.ppx-select + .select2 .select2-selection--single,
.ppx-select + .select2 .select2-selection--multiple,
/* Fallback: style any Select2 inside our ppx-form wrapper */
.ppx-form .select2-container .select2-selection--single,
.ppx-form .select2-container .select2-selection--multiple {
  border: 1px solid rgb(41, 71, 86) !important;
  border-radius: 12px !important;
}
.ppx-select + .select2.select2-container--focus .select2-selection,
.ppx-select + .select2.select2-container--open .select2-selection,
.ppx-form .select2-container.select2-container--focus .select2-selection,
.ppx-form .select2-container.select2-container--open .select2-selection {
  box-shadow: 0 0 0 2px rgba(41, 71, 86, 0.15);
}

/* Buttons style for My Account */
.ppx-account-btn,
.edit {
  background-color: rgba(41, 71, 86, 0.9) !important;
  color: #fff !important;
  border-radius: 20px;
  border: none;
  padding: 10px 16px;
  font-weight: 600;
}
.ppx-account-btn:hover,
.edit:hover {
  background: rgba(41, 71, 86, 0.996) !important;
  color: #fff !important;
}

.woocommerce-js input[type="tel"] {
  border: 1px solid rgb(41, 71, 86);
}

.woocommerce-page .select2-container .select2-dropdown,
.woocommerce-page .select2-container .select2-search__field,
.woocommerce-account .woocommerce-Addresses .woocommerce-Address-title,
.woocommerce-account .woocommerce-Addresses address {
  border: 1px solid rgb(41, 71, 86);
}

/* ===== Orders card list ===== */
.ppx-orders-card {
  padding: 22px;
}
.ppx-orders {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ppx-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid #e6e1da;
  border-radius: 16px;
  background: #fff;
}
.ppx-order-left {
  display: flex;
  flex-direction: column;
}
.ppx-order-title {
  font-weight: 800;
  color: #1f292e;
  margin-bottom: 6px;
}
.ppx-order-date {
  color: #7a8790;
  font-weight: 600;
}
.ppx-order-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ppx-order-total {
  font-weight: 800;
  color: #1f292e;
}

.ppx-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
}
.ppx-pill--done {
  background: #e9b1a3;
  color: #1f292e;
}
.ppx-pill--ship {
  background: #294756;
  color: #fff;
}
.ppx-pill--hold {
  background: #f0efea;
  color: #294756;
}
.ppx-pill--cancel {
  background: #eee;
  color: #8a8a8a;
}
.ppx-pill--refund {
  background: #e6f4ea;
  color: #246b3f;
}
.ppx-pill--fail {
  background: #fde8e8;
  color: #9b1c1c;
}

.ppx-orders-pagination {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 640px) {
  .ppx-order {
    flex-direction: column;
    align-items: flex-start;
  }
  .ppx-order-right {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Order again button uses ppx-account-btn via template override */

/* ===== Order view page ===== */
.ppx-order-view {
  padding: 22px;
}
.ppx-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.ppx-order-head__left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ppx-order-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #465965;
  font-weight: 600;
}
.ppx-order-total {
  font-weight: 800;
  color: #1f292e;
  font-size: 18px;
}
.ppx-sec-title {
  margin: 16px 0 8px;
  font-size: 18px;
  color: #1f292e;
}

/* Downloads list */
.ppx-downloads {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ppx-download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 14px;
  border: 1px solid #e6e1da;
  border-radius: 12px;
  background: #fff;
}
.ppx-download__name {
  font-weight: 700;
  color: #1f292e;
  font-size: 1.2rem;
}
.ppx-download__meta {
  color: #7a8790;
  font-weight: 600;
  display: flex;
  gap: 10px;
}
.button.ppx-account-btn {
  padding: 10px 12px !important;
  font-size: 1.2rem !important;
}

/* Items list */
.ppx-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ppx-item {
  display: grid;
  grid-template-columns: 72px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #e6e1da;
  border-radius: 12px;
  background: #fff;
}
.ppx-item__media img {
  width: 72px;
  height: auto;
  border-radius: 8px;
}
.ppx-item__title a {
  color: #1f292e;
  text-decoration: none;
  font-weight: 700;
}
.ppx-item__meta {
  color: #7a8790;
  font-size: 0.95rem;
}
.ppx-item__qty {
  color: #294756;
  font-weight: 700;
}
.ppx-item__total {
  color: #1f292e;
  font-weight: 800;
}
@media (max-width: 640px) {
  .ppx-item {
    grid-template-columns: 56px 1fr;
    grid-auto-rows: auto;
  }
  .ppx-item__qty,
  .ppx-item__total {
    justify-self: end;
  }
}

/* Totals */
.ppx-totals {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ppx-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}
.ppx-total__label {
  color: #7a8790;
  font-weight: 600;
}
.ppx-total__value {
  color: #1f292e;
  font-weight: 800;
}
.ppx-order-actions {
  margin-top: 12px;
}

/* Addresses */
.ppx-addresses-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ppx-address__title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: #1f292e;
}
.ppx-address address {
  border: 1px solid #e6e1da;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
}
@media (max-width: 768px) {
  .ppx-addresses-grid {
    grid-template-columns: 1fr;
  }
}

/* Table tidy-up */
.ppx-order-details .woocommerce-table--order-details {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.ppx-order-details .woocommerce-table--order-details th,
.ppx-order-details .woocommerce-table--order-details td {
  padding: 10px 12px;
  border-bottom: 1px solid #e6e1da;
}
.ppx-order-details .woocommerce-table--order-details thead th {
  color: #294756;
  font-weight: 700;
}
.ppx-order-details .woocommerce-table--order-details tfoot th,
.ppx-order-details .woocommerce-table--order-details tfoot td {
  font-weight: 700;
}
.ppx-order-details .woocommerce-customer-details address {
  border: 1px solid #e6e1da;
  border-radius: 12px;
  padding: 12px 14px;
}

@media (max-width: 640px) {
  .ppx-order-head {
    flex-direction: column;
    gap: 8px;
  }
  .ppx-order-head__right {
    align-self: flex-end;
  }
}

.woocommerce-js table.shop_table,
.woocommerce-page table.shop_table,
.woocommerce-js table.shop_table,
.woocommerce-js table.shop_table td,
.woocommerce-page table.shop_table td,
.woocommerce-js table.shop_table tfoot th,
.woocommerce-account .woocommerce-customer-details .woocommerce-column__title {
  border: 1px solid rgba(41, 71, 86, 0.1) !important;
}
