/* =========================================================
   WooCommerce My Account Restyle
   International Implant Institute
   Primary: #e14c2b
   Max width: 1240px
   ========================================================= */


/* =========================================================
   Main My Account Layout
   ========================================================= */

.woocommerce {
  max-width: 1240px !important;
  margin: 0 auto !important;
  padding: 2rem 1rem !important;
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  color: #222222;
  box-sizing: border-box;
}

.woocommerce *,
.woocommerce *::before,
.woocommerce *::after {
  box-sizing: border-box;
}

/* Left sidebar */
.woocommerce .woocommerce-MyAccount-navigation {
  flex: 0 0 280px;
  width: 280px !important;
  background: #ffffff;
  border: 1px solid #eeeeee;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

/* Right content */
.woocommerce .woocommerce-MyAccount-content {
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0;
  background: #ffffff;
  border: 1px solid #eeeeee;
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

/* Remove WooCommerce/theme float behavior */
.woocommerce .woocommerce-MyAccount-navigation,
.woocommerce .woocommerce-MyAccount-content,
.woocommerce .u-column1,
.woocommerce .u-column2,
.woocommerce .col-1,
.woocommerce .col-2 {
  float: none !important;
}

.woocommerce .clear {
  clear: both;
  display: none;
}


/* =========================================================
   Sidebar Navigation
   ========================================================= */

.woocommerce .woocommerce-MyAccount-navigation ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.woocommerce .woocommerce-MyAccount-navigation ul li {
  margin: 0 0 0.5rem 0 !important;
  padding: 0 !important;
  border: none !important;
}

.woocommerce .woocommerce-MyAccount-navigation ul li:last-child {
  margin-bottom: 0 !important;
}

.woocommerce .woocommerce-MyAccount-navigation ul li a {
  display: block;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  background: #ffffff;
  color: #333333 !important;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none !important;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.woocommerce .woocommerce-MyAccount-navigation ul li a:hover {
  background: #fcf7f2;
  color: #e14c2b !important;
  border-color: #f4d8cf;
  text-decoration: none !important;
}

.woocommerce .woocommerce-MyAccount-navigation ul li.is-active a {
  background: #e14c2b;
  color: #ffffff !important;
  border-color: #e14c2b;
}

.woocommerce .woocommerce-MyAccount-navigation-link--customer-logout a {
  color: #b3261e !important;
}

.woocommerce .woocommerce-MyAccount-navigation-link--customer-logout a:hover {
  background: #fff3f1 !important;
  color: #b3261e !important;
  border-color: #f4c4ba !important;
}


/* =========================================================
   Content Typography
   ========================================================= */

.woocommerce .woocommerce-MyAccount-content h1,
.woocommerce .woocommerce-MyAccount-content h2,
.woocommerce .woocommerce-MyAccount-content h3,
.woocommerce .woocommerce-MyAccount-content legend {
  color: #222222;
}

.woocommerce .woocommerce-MyAccount-content h2,
.woocommerce .woocommerce-MyAccount-content h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 1.25rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed #e14c2b;
}

.woocommerce .woocommerce-MyAccount-content p {
  font-size: 1rem;
  line-height: 1.65;
  color: #333333;
  margin: 0 0 1rem 0;
}

.woocommerce .woocommerce-MyAccount-content strong {
  color: #222222;
  font-weight: 700;
}

.woocommerce .woocommerce-MyAccount-content a {
  color: #e14c2b;
  font-weight: 600;
  text-decoration: none;
}

.woocommerce .woocommerce-MyAccount-content a:hover {
  color: #c7482c;
  text-decoration: underline;
}

.woocommerce .required {
  color: #e14c2b;
  text-decoration: none;
}


/* =========================================================
   Notices
   ========================================================= */

.woocommerce .woocommerce-notices-wrapper {
  margin-bottom: 1rem;
}

.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-error {
  border: none !important;
  border-radius: 10px !important;
  background: #fcf7f2 !important;
  color: #333333 !important;
  padding: 1rem 1.25rem !important;
  margin-bottom: 1.25rem !important;
  font-size: 1rem;
  line-height: 1.5;
  box-shadow: none !important;
}

.woocommerce .woocommerce-message::before,
.woocommerce .woocommerce-info::before {
  color: #e14c2b !important;
}

.woocommerce .woocommerce-error {
  background: #fff3f1 !important;
}


/* =========================================================
   Orders Table
   ========================================================= */

.woocommerce table.woocommerce-orders-table,
.woocommerce table.shop_table,
.woocommerce table.account-orders-table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid #eeeeee !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background: #ffffff;
  margin: 1.25rem 0 0 0 !important;
}

.woocommerce table.woocommerce-orders-table thead,
.woocommerce table.shop_table thead {
  background: #fcf7f2;
}

.woocommerce table.woocommerce-orders-table th,
.woocommerce table.shop_table th {
  padding: 1rem !important;
  font-size: 0.95rem;
  font-weight: 700;
  color: #222222;
  text-align: left;
  border: none !important;
  border-bottom: 1px solid #eeeeee !important;
  background: #fcf7f2;
}

.woocommerce table.woocommerce-orders-table td,
.woocommerce table.woocommerce-orders-table tbody th,
.woocommerce table.shop_table td,
.woocommerce table.shop_table tbody th {
  padding: 1rem !important;
  font-size: 1rem;
  color: #333333;
  vertical-align: middle;
  border: none !important;
  border-bottom: 1px solid #eeeeee !important;
  background: #ffffff;
}

.woocommerce table.woocommerce-orders-table tbody tr:last-child td,
.woocommerce table.woocommerce-orders-table tbody tr:last-child th,
.woocommerce table.shop_table tbody tr:last-child td,
.woocommerce table.shop_table tbody tr:last-child th {
  border-bottom: none !important;
}

.woocommerce table.woocommerce-orders-table tbody tr:hover td,
.woocommerce table.woocommerce-orders-table tbody tr:hover th,
.woocommerce table.shop_table tbody tr:hover td,
.woocommerce table.shop_table tbody tr:hover th {
  background: #fffaf7;
}

.woocommerce .woocommerce-orders-table__cell-order-number a {
  color: #e14c2b !important;
  font-weight: 700;
  text-decoration: none !important;
}

.woocommerce .woocommerce-orders-table__cell-order-number a:hover {
  color: #c7482c !important;
  text-decoration: underline !important;
}

.woocommerce .woocommerce-Price-amount {
  font-weight: 700;
  color: #222222;
}


/* =========================================================
   Buttons
   ========================================================= */

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce .woocommerce-button,
.woocommerce .woocommerce-Button,
.woocommerce .button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.7rem 1.1rem !important;
  border-radius: 10px !important;
  background: #e14c2b !important;
  color: #ffffff !important;
  border: 1px solid #e14c2b !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce .woocommerce-button:hover,
.woocommerce .woocommerce-Button:hover,
.woocommerce .button:hover {
  background: #c7482c !important;
  border-color: #c7482c !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

.woocommerce .woocommerce-orders-table__cell-order-actions .button.view {
  min-width: 84px;
}


/* =========================================================
   Address Tab
   ========================================================= */

.woocommerce .woocommerce-Addresses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.woocommerce .woocommerce-Address,
.woocommerce .u-column1.woocommerce-Address,
.woocommerce .u-column2.woocommerce-Address,
.woocommerce .col-1.woocommerce-Address,
.woocommerce .col-2.woocommerce-Address {
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  float: none !important;
  border: 1px solid #eeeeee;
  border-radius: 12px;
  padding: 1.25rem;
  background: #ffffff;
  box-shadow: none;
}

.woocommerce .woocommerce-Address-title,
.woocommerce header.woocommerce-Address-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem 0;
  padding: 0 0 0.75rem 0;
  border-bottom: 1px dashed #e14c2b;
}

.woocommerce .woocommerce-Address-title h2,
.woocommerce .woocommerce-Address-title h3 {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  font-size: 1.2rem !important;
  line-height: 1.3;
  color: #222222;
}

.woocommerce .woocommerce-Address-title a.edit {
  flex: 0 0 auto;
  color: #e14c2b !important;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
}

.woocommerce .woocommerce-Address-title a.edit:hover {
  color: #c7482c !important;
  text-decoration: underline !important;
}

.woocommerce .woocommerce-Address address {
  margin: 0;
  padding: 0;
  color: #333333;
  font-size: 1rem;
  line-height: 1.7;
  font-style: normal;
}


/* =========================================================
   Account Details Form
   ========================================================= */

.woocommerce form.woocommerce-EditAccountForm,
.woocommerce form.edit-account {
  margin-top: 1.25rem;
  width: 100%;
}

.woocommerce form.edit-account::after {
  content: "";
  display: table;
  clear: both;
}

.woocommerce form.edit-account .form-row {
  margin: 0 0 1.1rem 0 !important;
  padding: 0 !important;
  width: 100%;
}

.woocommerce form.edit-account .form-row-first,
.woocommerce form.edit-account .form-row-last {
  width: calc(50% - 0.625rem) !important;
  float: left !important;
}

.woocommerce form.edit-account .form-row-first {
  margin-right: 1.25rem !important;
}

.woocommerce form.edit-account .form-row-wide {
  clear: both;
  width: 100% !important;
}

.woocommerce form.edit-account label {
  display: block;
  margin: 0 0 0.45rem 0;
  color: #222222;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.woocommerce form.edit-account input[type="text"],
.woocommerce form.edit-account input[type="email"],
.woocommerce form.edit-account input[type="password"],
.woocommerce form.edit-account .input-text,
.woocommerce form.edit-account .woocommerce-Input {
  width: 100% !important;
  min-height: 46px;
  padding: 0.75rem 0.9rem !important;
  border: 1px solid #dddddd !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: #222222 !important;
  font-size: 1rem !important;
  line-height: 1.4 !important;
  box-shadow: none !important;
  outline: none !important;
}

.woocommerce form.edit-account input[type="text"]:focus,
.woocommerce form.edit-account input[type="email"]:focus,
.woocommerce form.edit-account input[type="password"]:focus,
.woocommerce form.edit-account .input-text:focus,
.woocommerce form.edit-account .woocommerce-Input:focus {
  border-color: #e14c2b !important;
  box-shadow: 0 0 0 3px rgba(225, 76, 43, 0.12) !important;
}

.woocommerce form.edit-account #account_display_name_description {
  display: block;
  margin-top: 0.45rem;
  color: #666666;
  font-size: 0.9rem;
  line-height: 1.45;
}

.woocommerce form.edit-account #account_display_name_description em {
  font-style: italic;
}


/* Password fieldset */

.woocommerce form.edit-account fieldset {
  clear: both;
  margin: 1.5rem 0 1.25rem 0;
  padding: 1.25rem;
  border: 1px solid #eeeeee;
  border-radius: 12px;
  background: #fffaf7;
}

.woocommerce form.edit-account fieldset legend {
  margin: 0;
  padding: 0 0.5rem;
  color: #222222;
  font-size: 1.15rem;
  font-weight: 700;
  border: none;
}

.woocommerce form.edit-account .password-input {
  position: relative;
  display: block;
  width: 100%;
}

.woocommerce form.edit-account .password-input input {
  padding-right: 3rem !important;
}

.woocommerce form.edit-account .show-password-input {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0 !important;
  border: none !important;
  border-radius: 8px;
  background: #fcf7f2 !important;
  color: #e14c2b !important;
  cursor: pointer;
  box-shadow: none !important;
}

.woocommerce form.edit-account .show-password-input:hover {
  background: #f4d8cf !important;
}

.woocommerce form.edit-account .show-password-input::before {
  content: "??";
  display: block;
  color: #e14c2b;
  font-size: 0.95rem;
  line-height: 32px;
  text-align: center;
}

.woocommerce form.edit-account > p:last-child {
  margin-top: 1.25rem;
  margin-bottom: 0;
}

.woocommerce form.edit-account button[name="save_account_details"] {
  min-width: 150px;
}


/* =========================================================
   General My Account Forms
   Covers address edit, payment methods, login-like forms
   ========================================================= */

.woocommerce .woocommerce-MyAccount-content form:not(.edit-account) .form-row {
  margin-bottom: 1rem !important;
}

.woocommerce .woocommerce-MyAccount-content form:not(.edit-account) label {
  display: block;
  margin-bottom: 0.45rem;
  color: #222222;
  font-size: 1rem;
  font-weight: 700;
}

.woocommerce .woocommerce-MyAccount-content input[type="text"],
.woocommerce .woocommerce-MyAccount-content input[type="email"],
.woocommerce .woocommerce-MyAccount-content input[type="tel"],
.woocommerce .woocommerce-MyAccount-content input[type="password"],
.woocommerce .woocommerce-MyAccount-content select,
.woocommerce .woocommerce-MyAccount-content textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.75rem 0.9rem;
  border: 1px solid #dddddd;
  border-radius: 8px;
  background: #ffffff;
  color: #222222;
  font-size: 1rem;
  line-height: 1.4;
  box-shadow: none;
  outline: none;
}

.woocommerce .woocommerce-MyAccount-content input[type="text"]:focus,
.woocommerce .woocommerce-MyAccount-content input[type="email"]:focus,
.woocommerce .woocommerce-MyAccount-content input[type="tel"]:focus,
.woocommerce .woocommerce-MyAccount-content input[type="password"]:focus,
.woocommerce .woocommerce-MyAccount-content select:focus,
.woocommerce .woocommerce-MyAccount-content textarea:focus {
  border-color: #e14c2b;
  box-shadow: 0 0 0 3px rgba(225, 76, 43, 0.12);
}


/* =========================================================
   Downloads / Payment Methods Tables
   ========================================================= */

.woocommerce table.woocommerce-table--order-downloads,
.woocommerce table.woocommerce-MyAccount-downloads,
.woocommerce table.woocommerce-MyAccount-paymentMethods {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid #eeeeee !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background: #ffffff;
}


/* =========================================================
   Mobile / Responsive
   ========================================================= */

@media (max-width: 900px) {
  .woocommerce {
    display: block;
    padding: 1.5rem 1rem !important;
  }

  .woocommerce .woocommerce-MyAccount-navigation {
    width: 100% !important;
    margin-bottom: 1.25rem;
  }

  .woocommerce .woocommerce-MyAccount-content {
    width: 100% !important;
  }

  .woocommerce .woocommerce-MyAccount-navigation ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .woocommerce .woocommerce-MyAccount-navigation ul li {
    margin: 0 !important;
  }

  .woocommerce .woocommerce-MyAccount-navigation ul li a {
    text-align: center;
    padding: 0.8rem 0.75rem;
  }

  .woocommerce .woocommerce-Addresses {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 600px) {
  .woocommerce {
    padding: 1rem 0.75rem !important;
  }

  .woocommerce .woocommerce-MyAccount-navigation,
  .woocommerce .woocommerce-MyAccount-content {
    border-radius: 12px;
    padding: 1rem;
  }

  .woocommerce .woocommerce-MyAccount-navigation ul {
    grid-template-columns: 1fr;
  }

  .woocommerce .woocommerce-Address-title,
  .woocommerce header.woocommerce-Address-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .woocommerce .woocommerce-Address-title a.edit {
    white-space: normal;
  }

  .woocommerce form.edit-account .form-row-first,
  .woocommerce form.edit-account .form-row-last {
    width: 100% !important;
    float: none !important;
    margin-right: 0 !important;
  }

  .woocommerce form.edit-account fieldset {
    padding: 1rem;
  }

  .woocommerce form.edit-account button[name="save_account_details"] {
    width: 100%;
  }

  /* Mobile order table cards */
  .woocommerce table.shop_table_responsive,
  .woocommerce table.woocommerce-orders-table {
    border: none !important;
    background: transparent;
  }

  .woocommerce table.shop_table_responsive thead,
  .woocommerce table.woocommerce-orders-table thead {
    display: none;
  }

  .woocommerce table.shop_table_responsive tbody,
  .woocommerce table.woocommerce-orders-table tbody {
    display: block;
  }

  .woocommerce table.shop_table_responsive tr,
  .woocommerce table.woocommerce-orders-table tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid #eeeeee;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
  }

  .woocommerce table.shop_table_responsive td,
  .woocommerce table.shop_table_responsive tbody th,
  .woocommerce table.woocommerce-orders-table td,
  .woocommerce table.woocommerce-orders-table tbody th {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 0.9rem 1rem !important;
    border-bottom: 1px solid #eeeeee !important;
    text-align: right !important;
  }

  .woocommerce table.shop_table_responsive tr td:last-child,
  .woocommerce table.shop_table_responsive tr th:last-child,
  .woocommerce table.woocommerce-orders-table tr td:last-child,
  .woocommerce table.woocommerce-orders-table tr th:last-child {
    border-bottom: none !important;
  }

  .woocommerce table.shop_table_responsive td::before,
  .woocommerce table.shop_table_responsive tbody th::before,
  .woocommerce table.woocommerce-orders-table td::before,
  .woocommerce table.woocommerce-orders-table tbody th::before {
    content: attr(data-title);
    font-weight: 700;
    color: #222222;
    text-align: left;
  }

  .woocommerce .woocommerce-orders-table__cell-order-actions {
    justify-content: center !important;
    text-align: center !important;
  }

  .woocommerce .woocommerce-orders-table__cell-order-actions::before {
    display: none !important;
  }

  .woocommerce .woocommerce-orders-table__cell-order-actions .button {
    width: 100%;
  }
}
