:root {
  --lj-checkout-cream: #f3eee3;
  --lj-checkout-paper: #faf7ef;
  --lj-checkout-blue: #173f59;
  --lj-checkout-ink: #273033;
  --lj-checkout-muted: #69706c;
  --lj-checkout-line: rgba(23, 63, 89, .18);
}

/* Única corrección visual del carrito: miniaturas cuadradas sin deformación. */
body.woocommerce-cart .woocommerce-cart-form td.product-thumbnail img,
body.woocommerce-cart .wc-block-cart-items__row .wc-block-cart-item__image img {
  display: block;
  width: 130px !important;
  height: 130px !important;
  max-width: 130px !important;
  aspect-ratio: 1 / 1;
  object-fit: cover !important;
  object-position: center !important;
}

@media (max-width: 544px) {
  body.woocommerce-cart .woocommerce-cart-form td.product-thumbnail img,
  body.woocommerce-cart .wc-block-cart-items__row .wc-block-cart-item__image img {
    width: 96px !important;
    height: 96px !important;
    max-width: 96px !important;
  }
}

body.lj-checkout-page {
  background: var(--lj-checkout-cream);
  color: var(--lj-checkout-ink);
  font-family: "DM Sans", sans-serif;
}

.lj-checkout-page #page,
.lj-checkout-page .site,
.lj-checkout-page .site-content {
  background: var(--lj-checkout-cream);
}

.lj-checkout-page .site-content > .ast-container,
.lj-checkout-page .site-content .ast-container {
  display: block;
  width: 100%;
  max-width: 1460px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4.5vw, 72px);
  box-sizing: border-box;
}

.lj-checkout-page #primary {
  float: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

.lj-checkout-page #secondary,
.lj-checkout-page #primary > .entry-header,
.lj-checkout-page article > .entry-header,
.lj-checkout-page .entry-title,
.lj-checkout-page .woocommerce-billing-fields > h3 {
  display: none;
}

.lj-checkout-page .entry-content {
  margin: 0;
}

.lj-checkout-page .woocommerce {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(42px, 6vw, 84px) 0 90px;
}

.lj-checkout-header {
  max-width: 760px;
  margin: 0 0 clamp(34px, 4.5vw, 58px);
  padding-bottom: 27px;
  border-bottom: 1px solid var(--lj-checkout-line);
}

.lj-back-to-cart {
  display: inline-block;
  margin-bottom: 27px;
  color: var(--lj-checkout-blue);
  font-size: .82rem;
  text-decoration: none;
}

.lj-back-to-cart:hover,
.lj-back-to-cart:focus {
  color: var(--lj-checkout-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.lj-checkout-eyebrow {
  margin: 0 0 11px;
  color: var(--lj-checkout-blue);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.lj-checkout-header h1 {
  margin: 0;
  color: var(--lj-checkout-ink);
  font-family: Italiana, Georgia, serif;
  font-size: clamp(3.4rem, 6.4vw, 6rem);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.025em;
}

.lj-checkout-page form.checkout {
  display: grid;
  grid-template-columns: minmax(0, 65fr) minmax(360px, 35fr);
  grid-template-areas:
    "customer-title order-title"
    "customer order";
  column-gap: clamp(42px, 6vw, 84px);
  align-items: start;
}

.lj-checkout-page form.checkout > .woocommerce-NoticeGroup,
.lj-checkout-page form.checkout > .woocommerce-error,
.lj-checkout-page form.checkout > .woocommerce-message,
.lj-checkout-page form.checkout > .woocommerce-info {
  grid-column: 1 / -1;
}

.lj-customer-heading,
.lj-checkout-page #order_review_heading {
  margin: 0;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--lj-checkout-line);
  color: var(--lj-checkout-ink);
  font-family: Italiana, Georgia, serif;
  font-size: clamp(1.65rem, 2.5vw, 2.25rem);
  font-weight: 400;
  line-height: 1.15;
}

.lj-customer-heading {
  grid-area: customer-title;
}

.lj-checkout-page #customer_details {
  grid-area: customer;
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  margin-top: 26px;
}

.lj-checkout-page #order_review_heading {
  grid-area: order-title;
  float: none !important;
  width: 100% !important;
  max-width: none !important;
}

.lj-checkout-page #order_review {
  grid-area: order;
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  margin-top: 26px;
  padding: clamp(22px, 2.5vw, 32px);
  border: 1px solid var(--lj-checkout-line);
  background: rgba(250, 247, 239, .62);
  box-sizing: border-box;
}

.lj-checkout-page #customer_details .col-1,
.lj-checkout-page #customer_details .col-2 {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
}

.lj-checkout-page #customer_details .col-2 {
  margin-top: 24px;
}

.lj-checkout-page .woocommerce-billing-fields__field-wrapper,
.lj-checkout-page .woocommerce-shipping-fields__field-wrapper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
}

.lj-checkout-page .form-row {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0;
  padding: 0;
}

.lj-checkout-page .form-row-wide,
.lj-checkout-page #billing_country_field,
.lj-checkout-page #billing_address_1_field,
.lj-checkout-page #billing_phone_field,
.lj-checkout-page #billing_email_field,
.lj-checkout-page #shipping_country_field,
.lj-checkout-page #shipping_address_1_field,
.lj-checkout-page #order_comments_field {
  grid-column: 1 / -1;
}

.lj-checkout-page .form-row label {
  display: block;
  margin: 0 0 8px;
  color: var(--lj-checkout-muted);
  font-size: .69rem;
  font-weight: 500;
  letter-spacing: .12em;
  line-height: 1.35;
  text-transform: uppercase;
}

.lj-checkout-page .form-row .required {
  color: #8a4c34;
}

.lj-checkout-page .input-text,
.lj-checkout-page select,
.lj-checkout-page .select2-container .select2-selection--single {
  min-height: 52px;
  border: 1px solid rgba(23, 63, 89, .23);
  border-radius: 0;
  background: rgba(255, 255, 255, .72);
  color: var(--lj-checkout-ink);
  box-shadow: none;
  font-family: "DM Sans", sans-serif;
  font-size: .94rem;
}

.lj-checkout-page .input-text,
.lj-checkout-page select {
  width: 100%;
  padding: 13px 14px;
}

.lj-checkout-page textarea.input-text {
  min-height: 110px;
  resize: vertical;
}

.lj-checkout-page .select2-container {
  width: 100% !important;
}

.lj-checkout-page .select2-container .select2-selection--single .select2-selection__rendered {
  padding: 11px 40px 11px 14px;
  line-height: 28px;
}

.lj-checkout-page .select2-container .select2-selection--single .select2-selection__arrow {
  top: 12px;
  right: 10px;
}

.lj-checkout-page .input-text:focus,
.lj-checkout-page select:focus,
.lj-checkout-page .select2-container--focus .select2-selection--single {
  border-color: var(--lj-checkout-blue);
  outline: 2px solid rgba(23, 63, 89, .1);
  outline-offset: 0;
}

.lj-checkout-page #ship-to-different-address {
  margin: 5px 0 18px;
  font-family: "DM Sans", sans-serif;
  font-size: .95rem;
  font-weight: 500;
}

.lj-checkout-page .woocommerce-checkout-review-order-table {
  width: 100%;
  margin: 0 0 22px;
  border: 0;
  border-collapse: collapse;
}

.lj-checkout-page .woocommerce-checkout-review-order-table th,
.lj-checkout-page .woocommerce-checkout-review-order-table td {
  padding: 16px 0;
  border-width: 0 0 1px;
  border-color: var(--lj-checkout-line);
  background: transparent;
  color: var(--lj-checkout-ink);
  vertical-align: middle;
  overflow-wrap: normal;
  word-break: normal;
}

.lj-checkout-page .woocommerce-checkout-review-order-table thead {
  display: none;
}

.lj-checkout-page .woocommerce-checkout-review-order-table td.product-name {
  min-height: 82px;
  padding-right: 12px;
}

.lj-order-product-thumb {
  float: left;
  display: block;
  width: 70px;
  height: 86px;
  margin: 0 14px 4px 0;
  overflow: hidden;
  background: #171717;
}

.lj-order-product-image {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
}

.lj-order-product-name {
  color: var(--lj-checkout-ink);
  font-weight: 600;
}

.lj-checkout-page .woocommerce-checkout-review-order-table .variation {
  margin: 7px 0 0;
  color: var(--lj-checkout-muted);
  font-size: .78rem;
  line-height: 1.45;
}

.lj-checkout-page .woocommerce-checkout-review-order-table .variation dt,
.lj-checkout-page .woocommerce-checkout-review-order-table .variation dd {
  float: none;
  display: inline;
  margin: 0;
}

.lj-checkout-page .woocommerce-checkout-review-order-table .variation dd::after {
  content: " · ";
}

.lj-checkout-page .woocommerce-checkout-review-order-table .variation dd:last-child::after {
  content: "";
}

.lj-checkout-page .woocommerce-checkout-review-order-table .product-total,
.lj-checkout-page .woocommerce-checkout-review-order-table tfoot td {
  text-align: right;
  font-weight: 600;
}

.lj-checkout-page .woocommerce-checkout-review-order-table tfoot tr:last-child th,
.lj-checkout-page .woocommerce-checkout-review-order-table tfoot tr:last-child td {
  padding-top: 20px;
  border-bottom: 0;
  color: var(--lj-checkout-blue);
  font-size: 1.08rem;
}

.lj-checkout-page #payment {
  border-radius: 0;
  background: transparent;
}

.lj-checkout-page #payment ul.payment_methods {
  margin: 0;
  padding: 0;
  border: 0;
}

.lj-checkout-page #payment ul.payment_methods li {
  margin: 0 0 10px;
  padding: 14px 15px;
  border: 1px solid var(--lj-checkout-line);
  background: rgba(255, 255, 255, .48);
  overflow-wrap: normal;
  word-break: normal;
}

.lj-checkout-page #payment ul.payment_methods li > label {
  color: var(--lj-checkout-ink);
  font-size: .94rem;
  font-weight: 500;
}

.lj-checkout-page #payment div.payment_box {
  margin: 12px 0 0;
  padding: 12px 0 0;
  background: transparent;
  color: var(--lj-checkout-muted);
  font-size: .82rem;
  line-height: 1.55;
}

.lj-checkout-page #payment div.payment_box::before {
  display: none;
}

.lj-checkout-page #payment .place-order {
  margin: 24px 0 0;
  padding: 0;
}

.lj-checkout-page #payment .woocommerce-privacy-policy-text,
.lj-checkout-page #payment .woocommerce-terms-and-conditions-wrapper {
  color: var(--lj-checkout-muted);
  font-size: .78rem;
  line-height: 1.55;
}

.lj-checkout-page #place_order {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 58px;
  margin: 20px 0 0;
  padding: 16px 20px;
  border: 1px solid var(--lj-checkout-blue);
  border-radius: 0;
  background: var(--lj-checkout-blue);
  color: #fff;
  box-shadow: none;
  font-family: "DM Sans", sans-serif;
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1.25;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

.lj-checkout-page #place_order:hover,
.lj-checkout-page #place_order:focus {
  background: #0f3147;
  border-color: #0f3147;
}

.lj-checkout-page .woocommerce-info,
.lj-checkout-page .woocommerce-error,
.lj-checkout-page .woocommerce-message {
  border-top-color: var(--lj-checkout-blue);
  background: rgba(250, 247, 239, .82);
}

@media (max-width: 1020px) {
  html,
  body.lj-checkout-page {
    overflow-x: hidden;
  }

  .lj-checkout-page .site-content > .ast-container,
  .lj-checkout-page .site-content .ast-container {
    padding-right: 16px;
    padding-left: 16px;
  }

  .lj-checkout-page .woocommerce {
    padding: 34px 0 58px;
  }

  .lj-checkout-header {
    margin-bottom: 34px;
    padding-bottom: 23px;
  }

  .lj-back-to-cart {
    margin-bottom: 22px;
  }

  .lj-checkout-header h1 {
    font-size: clamp(2.8rem, 14vw, 4.2rem);
  }

  .lj-checkout-page form.checkout {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    min-width: 0;
  }

  .lj-customer-heading,
  .lj-checkout-page #order_review_heading,
  .lj-checkout-page #customer_details,
  .lj-checkout-page #order_review {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .lj-checkout-page #customer_details {
    order: 2;
    float: none !important;
  }

  .lj-customer-heading {
    order: 1;
  }

  .lj-checkout-page #order_review_heading {
    order: 3;
    float: none !important;
    margin-top: 46px;
  }

  .lj-checkout-page #order_review {
    order: 4;
    float: none !important;
    padding: 20px 16px;
  }

  .lj-checkout-page form.checkout > .woocommerce-NoticeGroup,
  .lj-checkout-page form.checkout > .woocommerce-error,
  .lj-checkout-page form.checkout > .woocommerce-message,
  .lj-checkout-page form.checkout > .woocommerce-info {
    order: 0;
    width: 100%;
  }

  .lj-checkout-page .woocommerce-billing-fields__field-wrapper,
  .lj-checkout-page .woocommerce-shipping-fields__field-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }

  .lj-checkout-page .form-row,
  .lj-checkout-page .select2-container,
  .lj-checkout-page .input-text,
  .lj-checkout-page select {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .lj-checkout-page #payment ul.payment_methods li {
    padding: 13px 12px;
  }
}

@media (max-width: 760px) {
  .lj-checkout-page .site-content > .ast-container,
  .lj-checkout-page .site-content .ast-container {
    padding-right: 16px;
    padding-left: 16px;
  }

  .lj-checkout-page .woocommerce {
    padding: 34px 0 58px;
  }

  .lj-checkout-header {
    margin-bottom: 34px;
    padding-bottom: 23px;
  }

  .lj-back-to-cart {
    margin-bottom: 22px;
  }

  .lj-checkout-header h1 {
    font-size: clamp(2.8rem, 14vw, 4.2rem);
  }
}

@media (max-width: 380px) {
  .lj-checkout-page .site-content > .ast-container,
  .lj-checkout-page .site-content .ast-container {
    padding-right: 12px;
    padding-left: 12px;
  }

  .lj-order-product-thumb {
    width: 60px;
    height: 76px;
    margin-right: 11px;
  }

  .lj-checkout-page #order_review {
    padding-right: 12px;
    padding-left: 12px;
  }
}
