/* ==========================================================================
   ILRITORNO — account-bulletproof.css
   Único CSS de Mi Cuenta (todos los demás se desregistran)
   ========================================================================== */

body.woocommerce-account #site-main,
body.woocommerce-account main {
  background: #F5EFE0;
  padding: 32px 0 60px;
}

body.woocommerce-account .container,
body.woocommerce-account .ir-account-container {
  max-width: 1180px !important;
  margin: 0 auto;
  padding: 0 16px;
}

body.woocommerce-account * { box-sizing: border-box; }

body.woocommerce-account .entry-title,
body.woocommerce-account h1.page-title {
  font-family: 'Marcellus SC', 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 400;
  text-align: center;
  margin: 0 0 32px;
  color: #2A2620;
  letter-spacing: 0.5px;
}

/* Reset floats heredados */
body.woocommerce-account .woocommerce,
body.woocommerce-account .woocommerce > *,
body.woocommerce-account .u-columns,
body.woocommerce-account .u-columns > *,
body.woocommerce-account .col2-set,
body.woocommerce-account .col2-set > *,
body.woocommerce-account .woocommerce-MyAccount-navigation,
body.woocommerce-account .woocommerce-MyAccount-content {
  float: none !important;
  position: static !important;
  clear: both !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* ============================================================
   SIN LOGIN — Layout 2 columnas (Acceder | Registrarse)
   ============================================================ */
body.woocommerce-account:not(.logged-in) .woocommerce {
  display: block !important;
}

body.woocommerce-account:not(.logged-in) #customer_login,
body.woocommerce-account:not(.logged-in) .u-columns {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 20px !important;
  width: 100% !important;
  margin: 0;
}

@media (min-width: 768px) {
  body.woocommerce-account:not(.logged-in) #customer_login,
  body.woocommerce-account:not(.logged-in) .u-columns {
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
  }
}

body.woocommerce-account:not(.logged-in) .col-1,
body.woocommerce-account:not(.logged-in) .col-2,
body.woocommerce-account:not(.logged-in) .u-column1,
body.woocommerce-account:not(.logged-in) .u-column2 {
  width: 100% !important;
  margin: 0;
  padding: 28px 24px;
  background: #fff;
  border: 1px solid rgba(104, 97, 80, 0.10);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(46, 47, 36, 0.04);
}

body.woocommerce-account:not(.logged-in) .col-1 h2,
body.woocommerce-account:not(.logged-in) .col-2 h2,
body.woocommerce-account:not(.logged-in) .u-column1 h2,
body.woocommerce-account:not(.logged-in) .u-column2 h2 {
  font-family: 'Marcellus SC', 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 400;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid #D3C8B1;
  color: #2A2620;
}

/* ============================================================
   CON LOGIN — Sidebar + Content
   ============================================================ */
body.woocommerce-account.logged-in .woocommerce {
  display: block !important;
}

@media (min-width: 1024px) {
  body.woocommerce-account.logged-in .woocommerce {
    display: grid !important;
    grid-template-columns: 280px 1fr !important;
    grid-template-areas: "nav content" !important;
    gap: 32px !important;
    align-items: start !important;
  }

  body.woocommerce-account.logged-in .woocommerce-MyAccount-navigation {
    grid-area: nav !important;
    margin: 0;
  }

  body.woocommerce-account.logged-in .woocommerce-MyAccount-content {
    grid-area: content !important;
    margin: 0;
  }
}

/* Navigation */
body.woocommerce-account.logged-in .woocommerce-MyAccount-navigation {
  background: #fff;
  border: 1px solid rgba(104, 97, 80, 0.10);
  border-radius: 8px;
  padding: 6px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(46, 47, 36, 0.04);
}

body.woocommerce-account.logged-in .woocommerce-MyAccount-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

body.woocommerce-account.logged-in .woocommerce-MyAccount-navigation li {
  margin: 0;
  list-style: none;
  display: block !important;
}

body.woocommerce-account.logged-in .woocommerce-MyAccount-navigation li a {
  display: block !important;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.6px;
  color: #3A3128;
  text-decoration: none;
  border-radius: 4px;
  transition: background 200ms, color 200ms;
  text-transform: uppercase;
}

body.woocommerce-account.logged-in .woocommerce-MyAccount-navigation li.is-active a,
body.woocommerce-account.logged-in .woocommerce-MyAccount-navigation li a:hover {
  background: #2A2620;
  color: #F0EADB;
}

/* Content */
body.woocommerce-account.logged-in .woocommerce-MyAccount-content {
  background: #fff;
  border: 1px solid rgba(104, 97, 80, 0.10);
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(46, 47, 36, 0.04);
}

body.woocommerce-account.logged-in .woocommerce-MyAccount-content > p:first-child {
  margin-top: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  color: #2A2620;
}

body.woocommerce-account.logged-in .woocommerce-MyAccount-content h2,
body.woocommerce-account.logged-in .woocommerce-MyAccount-content h3 {
  font-family: 'Marcellus SC', 'Cormorant Garamond', serif;
  font-weight: 400;
  color: #2A2620;
  margin: 24px 0 14px;
}

body.woocommerce-account.logged-in .woocommerce-MyAccount-content h2 { font-size: 1.4rem; }
body.woocommerce-account.logged-in .woocommerce-MyAccount-content h3 { font-size: 1.15rem; }

@media (max-width: 600px) {
  body.woocommerce-account.logged-in .woocommerce-MyAccount-content { padding: 22px 18px; }
}

/* ============================================================
   FORMS dentro de Mi Cuenta (login, register, edit address, edit account)
   ============================================================ */
body.woocommerce-account .form-row {
  display: block !important;
  margin: 0 0 14px;
  padding: 0;
  width: 100% !important;
}

body.woocommerce-account .form-row label {
  display: block !important;
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem;
  font-weight: 500;
  color: #686150;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0 0 6px;
}

body.woocommerce-account .form-row label .required,
body.woocommerce-account .form-row label .optional {
  color: #8B8E78;
  font-weight: 400;
  text-decoration: none;
  border: 0;
}

body.woocommerce-account input[type="text"],
body.woocommerce-account input[type="email"],
body.woocommerce-account input[type="tel"],
body.woocommerce-account input[type="password"],
body.woocommerce-account input[type="number"],
body.woocommerce-account textarea,
body.woocommerce-account select {
  display: block !important;
  width: 100% !important;
  padding: 12px 14px;
  border: 1px solid #D3C8B1;
  border-radius: 4px;
  background: #FAFAF7;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: #2A2620;
  height: auto;
  line-height: 1.4;
  box-sizing: border-box;
  transition: border 200ms, background 200ms, box-shadow 200ms;
}

body.woocommerce-account input:focus,
body.woocommerce-account textarea:focus,
body.woocommerce-account select:focus {
  outline: none;
  border-color: #2A2620;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(193, 198, 169, 0.3);
}

body.woocommerce-account .form-row.form-row-first,
body.woocommerce-account .form-row.form-row-last {
  width: 100% !important;
}

@media (min-width: 768px) {
  body.woocommerce-account .form-row.form-row-first {
    width: calc(50% - 6px) !important;
    float: left !important;
    clear: left !important;
    margin-right: 6px;
  }
  body.woocommerce-account .form-row.form-row-last {
    width: calc(50% - 6px) !important;
    float: left !important;
    clear: right !important;
    margin-left: 6px;
  }
  body.woocommerce-account .form-row.form-row-wide {
    clear: both !important;
    width: 100% !important;
  }
}

/* Botones */
body.woocommerce-account .button,
body.woocommerce-account button[type="submit"] {
  display: inline-block !important;
  padding: 12px 28px;
  background: #2A2620;
  color: #F0EADB;
  border: 0;
  border-radius: 4px;
  font-family: 'Marcellus SC', 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  margin-top: 6px;
  transition: background 200ms, transform 100ms, box-shadow 200ms;
  box-shadow: 0 2px 6px rgba(46, 47, 36, 0.15);
}

body.woocommerce-account .button:hover,
body.woocommerce-account button[type="submit"]:hover {
  background: #1f1c17;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46, 47, 36, 0.22);
  color: #F0EADB;
}

/* Lost password / remember */
body.woocommerce-account .lost_password {
  margin-top: 8px;
  font-size: 0.85rem;
}

body.woocommerce-account .lost_password a {
  color: #686150;
  text-decoration: underline;
}

body.woocommerce-account .woocommerce-form__label-for-checkbox {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 0.9rem;
  color: #686150;
  cursor: pointer;
}

/* ============================================================
   MIS PEDIDOS (tabla)
   ============================================================ */
body.woocommerce-account.logged-in .woocommerce-orders-table,
body.woocommerce-account.logged-in table.shop_table {
  width: 100% !important;
  border-collapse: collapse;
  margin: 14px 0;
  background: transparent;
  border: 1px solid #D3C8B1;
  border-radius: 6px;
  overflow: hidden;
}

body.woocommerce-account.logged-in table.shop_table th {
  background: #F5EFE0;
  padding: 12px 14px;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #686150;
  border: 0;
}

body.woocommerce-account.logged-in table.shop_table td {
  padding: 14px;
  border-top: 1px solid #D3C8B1;
  background: #fff;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  color: #2A2620;
}

body.woocommerce-account.logged-in .order-actions a.button {
  padding: 8px 16px;
  font-size: 0.78rem;
}

/* ============================================================
   DIRECCIONES (col2-set en /direcciones)
   ============================================================ */
body.woocommerce-account.logged-in .addresses {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 18px !important;
  width: 100% !important;
}

@media (min-width: 768px) {
  body.woocommerce-account.logged-in .addresses {
    grid-template-columns: 1fr 1fr !important;
    gap: 22px !important;
  }
}

body.woocommerce-account.logged-in .addresses .col-1,
body.woocommerce-account.logged-in .addresses .col-2,
body.woocommerce-account.logged-in .addresses .u-column1,
body.woocommerce-account.logged-in .addresses .u-column2 {
  width: 100% !important;
  margin: 0;
  padding: 22px;
  background: #FAFAF7;
  border: 1px solid #D3C8B1;
  border-radius: 6px;
}

body.woocommerce-account.logged-in .addresses header.title {
  display: flex !important;
  justify-content: space-between;
  align-items: baseline !important;
  margin-bottom: 12px;
}

body.woocommerce-account.logged-in .addresses header.title h3 {
  margin: 0;
  font-family: 'Marcellus SC', 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  color: #2A2620;
}

body.woocommerce-account.logged-in .addresses header.title .edit {
  font-size: 0.78rem;
  color: #686150;
  text-decoration: underline;
  letter-spacing: 0.5px;
}

body.woocommerce-account.logged-in .addresses address {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  color: #2A2620;
  font-style: normal;
  line-height: 1.5;
}

/* ============================================================
   NOTICES dentro de mi cuenta
   ============================================================ */
body.woocommerce-account .woocommerce-info,
body.woocommerce-account .woocommerce-message {
  background: rgba(193, 198, 169, 0.18) !important;
  border-left: 3px solid #C1C6A9 !important;
  border-radius: 4px !important;
  padding: 14px 16px !important;
  font-size: 0.9rem !important;
  color: #2A2620 !important;
  margin: 0 0 18px !important;
  list-style: none !important;
}

body.woocommerce-account .woocommerce-info::before,
body.woocommerce-account .woocommerce-message::before { display: none !important; }

body.woocommerce-account .woocommerce-error {
  background: #FBF3F3 !important;
  border-left: 3px solid #B8454F !important;
  border-radius: 4px !important;
  padding: 14px 16px !important;
  margin: 0 0 18px !important;
  list-style: none !important;
  color: #7A2C36 !important;
  font-size: 0.9rem !important;
}

body.woocommerce-account .woocommerce-error::before { display: none !important; }
