/* Aquí se reúnen los retoques visuales para que las páginas se vean parte del mismo sitio. */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap");

html:has(body[data-page="cuenta"]),
html:has(body[data-page="productos"]),
html:has(body[data-page="detalle-producto"]),
html:has(body[data-page="carrito"]),
html:has(body[data-page="checkout"]),
html:has(body[data-page="inicio"]),
html:has(body[data-page="soluciones"]),
html:has(body[data-page="nosotros"]),
html:has(body[data-page="contacto"]),
html:has(body[data-page="libro-reclamaciones"]),
html:has(body[data-page="politica-privacidad"]),
html:has(body[data-page="terminos-condiciones"]),
html:has(body[data-page="eliminar-datos"]) {
  overflow-x: clip;
}

body[data-page="cuenta"],
body[data-page="productos"],
body[data-page="detalle-producto"],
body[data-page="carrito"],
body[data-page="checkout"],
body[data-page="inicio"],
body[data-page="soluciones"],
body[data-page="nosotros"],
body[data-page="contacto"],
body[data-page="libro-reclamaciones"],
body[data-page="politica-privacidad"],
body[data-page="terminos-condiciones"],
body[data-page="eliminar-datos"] {
  color: #344054;
  background-color: #f9fafb;
  font-family: "Outfit", sans-serif;
}

body[data-page="cuenta"] .auth-shell,
body[data-page="cuenta"] .auth-shell :is(input, button, select, textarea, span) {
  font-family: "Outfit", sans-serif;
}

/* Las páginas informativas usan bordes y sombras suaves en sus tarjetas. */
body[data-page="inicio"] main,
body[data-page="soluciones"] main,
body[data-page="nosotros"] main,
body[data-page="contacto"] main,
body[data-page="libro-reclamaciones"] main,
body[data-page="politica-privacidad"] main,
body[data-page="terminos-condiciones"] main,
body[data-page="eliminar-datos"] main {
  border-color: #e4e7ec;
}

body[data-page="inicio"] main :is(.bg-white.border, [class*="bg-white"][class*="border"]),
body[data-page="soluciones"] main :is(.bg-white.border, [class*="bg-white"][class*="border"]),
body[data-page="nosotros"] main :is(.bg-white.border, [class*="bg-white"][class*="border"]),
body[data-page="contacto"] main :is(.bg-white.border, [class*="bg-white"][class*="border"]),
body[data-page="libro-reclamaciones"] main :is(.bg-white.border, [class*="bg-white"][class*="border"]),
body[data-page="politica-privacidad"] main :is(.bg-white.border, [class*="bg-white"][class*="border"]),
body[data-page="terminos-condiciones"] main :is(.bg-white.border, [class*="bg-white"][class*="border"]),
body[data-page="eliminar-datos"] main :is(.bg-white.border, [class*="bg-white"][class*="border"]) {
  border-color: #e4e7ec;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

body[data-page="inicio"] main :is(.bg-white.border, [class*="bg-white"][class*="border"]):hover,
body[data-page="soluciones"] main :is(.bg-white.border, [class*="bg-white"][class*="border"]):hover,
body[data-page="nosotros"] main :is(.bg-white.border, [class*="bg-white"][class*="border"]):hover,
body[data-page="contacto"] main :is(.bg-white.border, [class*="bg-white"][class*="border"]):hover,
body[data-page="libro-reclamaciones"] main :is(.bg-white.border, [class*="bg-white"][class*="border"]):hover,
body[data-page="politica-privacidad"] main :is(.bg-white.border, [class*="bg-white"][class*="border"]):hover,
body[data-page="terminos-condiciones"] main :is(.bg-white.border, [class*="bg-white"][class*="border"]):hover,
body[data-page="eliminar-datos"] main :is(.bg-white.border, [class*="bg-white"][class*="border"]):hover {
  border-color: #d0d5dd;
  box-shadow: 0 4px 8px -2px rgba(16, 24, 40, 0.1);
}

body[data-page="contacto"] main > .wrapper > header h1,
body[data-page="libro-reclamaciones"] main > .wrapper > header h1,
body[data-page="politica-privacidad"] main > .wrapper > header h1,
body[data-page="terminos-condiciones"] main > .wrapper > header h1,
body[data-page="eliminar-datos"] main > .wrapper > header h1 {
  color: #101828;
}

/* Los campos de contacto y reclamos tienen bordes suaves y resaltan al seleccionarlos. */
body[data-page="contacto"] main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body[data-page="contacto"] main select,
body[data-page="contacto"] main textarea,
body[data-page="libro-reclamaciones"] main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body[data-page="libro-reclamaciones"] main select,
body[data-page="libro-reclamaciones"] main textarea {
  border-color: #d0d5dd;
  border-radius: 0.5rem;
  color: #344054;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

body[data-page="contacto"] main input:focus,
body[data-page="contacto"] main select:focus,
body[data-page="contacto"] main textarea:focus,
body[data-page="libro-reclamaciones"] main input:focus,
body[data-page="libro-reclamaciones"] main select:focus,
body[data-page="libro-reclamaciones"] main textarea:focus {
  border-color: #84caff;
  box-shadow: 0 0 0 3px rgba(4, 129, 242, 0.12);
  outline: none;
}

body[data-page="inicio"] main :is(button, a),
body[data-page="soluciones"] main :is(button, a),
body[data-page="nosotros"] main :is(button, a),
body[data-page="contacto"] main :is(button, a),
body[data-page="libro-reclamaciones"] main :is(button, a),
body[data-page="politica-privacidad"] main :is(button, a),
body[data-page="terminos-condiciones"] main :is(button, a),
body[data-page="eliminar-datos"] main :is(button, a) {
  transition-duration: 160ms;
}

/* Desde aquí se ajustan las pantallas de cuenta, productos, carrito y compra. */
body[data-page="cuenta"] main,
body[data-page="productos"] main,
body[data-page="detalle-producto"] main,
body[data-page="carrito"] main,
body[data-page="checkout"] main {
  border-color: #e4e7ec;
}

body[data-page="cuenta"] main h1,
body[data-page="cuenta"] main h2,
body[data-page="cuenta"] main h3,
body[data-page="productos"] main h1,
body[data-page="productos"] main h2,
body[data-page="detalle-producto"] main h1,
body[data-page="detalle-producto"] main h2,
body[data-page="carrito"] main h1,
body[data-page="carrito"] main h2,
body[data-page="checkout"] main h1,
body[data-page="checkout"] main h2 {
  color: #101828;
}

/* El menú de la cuenta queda más ordenado y fácil de recorrer. */
body[data-page="cuenta"] #site-sidebar > div {
  border-color: #e4e7ec;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

body[data-page="cuenta"] #site-sidebar nav ul {
  gap: 0.25rem;
}

body[data-page="cuenta"] #site-sidebar #dashNameCustomer {
  font-size: 16px;
}

body[data-page="cuenta"] #site-sidebar #dashEmailCustomer {
  font-size: 13px;
}

body[data-page="cuenta"] #site-sidebar nav a {
  min-height: 2.5rem;
  border-radius: 0.5rem;
  font-size: 14px;
  transition: background-color 160ms ease, color 160ms ease;
}

body[data-page="cuenta"] #site-sidebar nav a:not(.font-semibold):not([href="#logout"]):hover {
  background-color: #eff8ff;
  color: #0472e0;
}

body[data-page="cuenta"] #site-sidebar nav a[href="#logout"]:hover {
  background-color: #ffe2e2;
  color: #f87171;
}

body[data-page="cuenta"] main .wrapper > .grid > div:last-child > div > h3,
body[data-page="cuenta"] main .wrapper > .grid > div:last-child > div > .flex > h3 {
  margin-bottom: 1rem;
  color: #101828;
}

/* Escala de texto más equilibrada para las vistas de cuenta, sin afectar iconos. */
body[data-page="cuenta"] main {
  font-size: 15px;
}

body[data-page="cuenta"] main :is(.text-xs, .text-\[11px\], .text-\[12px\]):not(i):not(svg) {
  font-size: 12px;
}

body[data-page="cuenta"] main :is(.text-sm, .text-\[13px\]):not(i):not(svg) {
  font-size: 14px;
}

body[data-page="cuenta"] main .text-base:not(i):not(svg) {
  font-size: 15px;
}

body[data-page="cuenta"] main .text-lg:not(i):not(svg) {
  font-size: 17px;
}

body[data-page="cuenta"] main .text-xl:not(i):not(svg) {
  font-size: 19px;
}

body[data-page="cuenta"] main .text-2xl:not(i):not(svg) {
  font-size: 23px;
}

/* El menú del encabezado es compartido con el resto del sitio. */
#dropdownInfoUser {
  font-size: 15px;
}

#dropdownInfoUser #headerNameCustomer {
  font-size: 15px;
}

#dropdownInfoUser #headerEmailCustomer {
  font-size: 13px;
}

#dropdownInfoUser #dropdownInfoUserLoggedIn a {
  font-size: 14px;
}

#dropdownInfoUser #dropdownInfoUserLoggedOut > p {
  font-size: 14px;
}

/* Las tarjetas de la cuenta tienen bordes redondeados y una sombra discreta. */
body[data-page="cuenta"] main .wrapper > .grid > div:last-child
  :is(.bg-white.border, .bg-white[class*="border"]) {
  border-color: #e4e7ec;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

body[data-page="cuenta"] main .wrapper > .grid > div:last-child
  :is(.bg-white.border, .bg-white[class*="border"]):hover {
  border-color: #d0d5dd;
}

/* Los campos de cuenta y compra muestran claramente cuándo están seleccionados. */
body[data-page="cuenta"] main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
body[data-page="cuenta"] main select,
body[data-page="cuenta"] main textarea,
body[data-page="checkout"] main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
body[data-page="checkout"] main select,
body[data-page="checkout"] main textarea {
  border-color: #d0d5dd;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  color: #344054;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

body[data-page="cuenta"] main input:focus,
body[data-page="cuenta"] main select:focus,
body[data-page="cuenta"] main textarea:focus,
body[data-page="checkout"] main input:focus,
body[data-page="checkout"] main select:focus,
body[data-page="checkout"] main textarea:focus {
  border-color: #84caff;
  box-shadow: 0 0 0 3px rgba(4, 129, 242, 0.12);
  outline: none;
}

/* El carrito y el checkout mantienen una superficie clara y consistente. */
body[data-page="carrito"] main,
body[data-page="checkout"] main {
  color: #344054;
}

.cart-page-heading,
.checkout-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
}

.cart-page-heading h1,
.checkout-page-heading h1 {
  margin: 0;
  color: #101828;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.cart-page-eyebrow {
  margin-bottom: 0.35rem;
  color: #0472e0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.checkout-page-heading > div > p:last-child {
  margin-top: 0.35rem;
  color: #667085;
  font-size: 0.9rem;
}

.cart-continue-link,
.checkout-back-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid #d0d5dd;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.65rem 0.9rem;
  color: #344054;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.cart-continue-link:hover,
.checkout-back-link:hover {
  border-color: #84caff;
  background: #eff8ff;
  color: #175cd3;
}

.cart-layout {
  align-items: start;
}

.cart-layout > .cart-items-list {
  display: grid;
  min-width: 0;
  gap: 0.85rem;
}

.cart-line-item,
.checkout-line-item {
  display: grid;
  min-width: 0;
  grid-template-columns: 6rem minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  border: 1px solid #eaecf0;
  border-radius: 1rem;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.cart-line-item:hover,
.checkout-line-item:hover {
  border-color: #d0d5dd;
  box-shadow: 0 5px 14px rgba(16, 24, 40, 0.07);
}

.cart-line-image,
.checkout-line-image {
  display: block;
  width: 6rem;
  height: 6rem;
  border: 1px solid #eaecf0;
  border-radius: 0.8rem;
  background: #f9fafb;
  object-fit: contain;
  padding: 0.35rem;
}

.cart-line-details,
.checkout-line-details {
  min-width: 0;
}

.cart-line-name,
.checkout-line-name {
  overflow-wrap: anywhere;
  color: #101828;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.4;
}

.cart-line-sku,
.checkout-line-sku {
  margin-top: 0.25rem;
  color: #667085;
  font-size: 0.78rem;
}

.cart-line-price,
.checkout-line-price {
  margin-top: 0.5rem;
  color: #175cd3;
  font-size: 0.9rem;
  font-weight: 600;
}

.cart-line-price span,
.checkout-line-price span {
  color: #667085;
  font-size: 0.75rem;
  font-weight: 400;
}

.cart-line-tier-badge {
  display: inline-flex;
  margin-left: 0.4rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 600;
  vertical-align: middle;
}

.cart-line-min-note {
  margin-top: 0.25rem;
  color: #98a2b3;
  font-size: 0.72rem;
}

.cart-line-actions,
.checkout-line-actions {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid #f2f4f7;
  padding-top: 0.8rem;
}

.cart-quantity-control,
.checkout-quantity-control {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  overflow: hidden;
  border: 1px solid #d0d5dd;
  border-radius: 0.65rem;
  background: #fff;
}

.cart-quantity-button,
.checkout-quantity-button {
  display: inline-flex;
  width: 2.35rem;
  height: 2.4rem;
  align-items: center;
  justify-content: center;
  border: 0;
  background: #fff;
  color: #344054;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.cart-quantity-button:hover,
.checkout-quantity-button:hover {
  background: #eff8ff;
  color: #175cd3;
}

.cart-quantity-input,
.checkout-quantity-input {
  width: 2.75rem;
  height: 2.4rem;
  border: 0 !important;
  border-right: 1px solid #eaecf0 !important;
  border-left: 1px solid #eaecf0 !important;
  border-radius: 0 !important;
  padding: 0 0.2rem;
  box-shadow: none !important;
  color: #101828;
  font-size: 0.875rem;
  text-align: center;
}

.cart-quantity-input:focus,
.checkout-quantity-input:focus {
  outline: 2px solid #84caff !important;
  outline-offset: -2px;
}

.cart-remove-button,
.checkout-remove-button {
  display: inline-flex;
  min-height: 2.4rem;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  padding: 0.35rem 0.5rem;
  color: #b42318;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.cart-remove-button:hover,
.checkout-remove-button:hover {
  background: #fef3f2;
  color: #912018;
}

.cart-line-subtotal,
.checkout-line-subtotal {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  color: #667085;
  font-size: 0.78rem;
}

.cart-line-subtotal strong,
.checkout-line-subtotal strong {
  color: #101828;
  font-size: 0.95rem;
  font-weight: 600;
}

.cart-summary-card,
.checkout-cart-card,
.checkout-payment-card {
  min-width: 0;
  border: 1px solid #e4e7ec;
  border-radius: 1rem;
  background: #fff;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
}

.cart-summary-card {
  position: sticky;
  top: calc(var(--header-fixed-h, 128px) + 1rem);
}

.cart-summary-heading,
.checkout-card-heading {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.cart-summary-icon,
.checkout-heading-icon {
  display: inline-flex;
  width: 2.7rem;
  height: 2.7rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem;
  background: #eff8ff;
  color: #175cd3;
}

.cart-summary-heading h2,
.checkout-card-heading h2 {
  color: #101828;
  font-size: 1.05rem;
  font-weight: 600;
}

.cart-summary-heading p,
.checkout-card-heading p {
  margin-top: 0.15rem;
  color: #667085;
  font-size: 0.8rem;
}

.cart-summary-lines {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.35rem;
  color: #475467;
  font-size: 0.9rem;
}

.cart-summary-lines > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cart-summary-lines strong {
  color: #344054;
  font-weight: 500;
}

.cart-summary-lines .cart-summary-total {
  margin-top: 0.2rem;
  border-top: 1px solid #eaecf0;
  padding-top: 1rem;
  color: #101828;
  font-size: 1rem;
  font-weight: 600;
}

.cart-summary-total strong {
  color: #175cd3;
  font-size: 1.25rem;
  font-weight: 700;
}

.cart-primary-action {
  display: inline-flex;
  width: 100%;
  min-height: 2.9rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.25rem;
  border: 1px solid #175cd3;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #0b6fcc, #175cd3);
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: box-shadow 160ms ease, transform 160ms ease, filter 160ms ease;
}

.cart-primary-action:hover {
  filter: brightness(1.05);
  box-shadow: 0 7px 16px rgba(23, 92, 211, 0.2);
  transform: translateY(-1px);
}

.cart-clear-button,
.checkout-secondary-button {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid #d0d5dd;
  border-radius: 0.7rem;
  background: #fff;
  padding: 0.6rem 0.9rem;
  color: #475467;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.cart-clear-button {
  width: 100%;
  margin-top: 0.55rem;
  border-color: transparent;
  color: #b42318;
}

.cart-clear-button:hover,
.checkout-secondary-button:hover {
  border-color: #fecdca;
  background: #fef3f2;
  color: #912018;
}

.cart-summary-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 1rem;
  border-top: 1px solid #f2f4f7;
  padding-top: 0.85rem;
  color: #667085;
  font-size: 0.75rem;
  line-height: 1.5;
}

.cart-summary-note i {
  margin-top: 0.15rem;
  color: #039855;
}

.cart-empty-state {
  grid-column: 1 / -1;
  display: flex;
  min-height: 19rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #d0d5dd;
  border-radius: 1rem;
  background: #fff;
  padding: 2rem 1.25rem;
  text-align: center;
}

.cart-empty-icon {
  display: inline-flex;
  width: 3.5rem;
  height: 3.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: #eff8ff;
  color: #175cd3;
  font-size: 1.4rem;
}

.cart-empty-state h2 {
  margin-top: 1rem;
  color: #101828;
  font-size: 1.2rem;
  font-weight: 600;
}

.cart-empty-state p {
  margin-top: 0.3rem;
  color: #667085;
  font-size: 0.9rem;
}

.cart-empty-state .cart-primary-action {
  width: auto;
  min-width: 11rem;
}

.checkout-layout {
  align-items: start;
}

.checkout-page-heading {
  align-items: center;
}

.checkout-cart-card,
.checkout-payment-card {
  padding: 1.5rem;
}

.checkout-payment-card {
  position: sticky;
  top: calc(var(--header-fixed-h, 128px) + 1rem);
}

.checkout-items-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.checkout-line-item {
  grid-template-columns: 5rem minmax(0, 1fr) auto;
  gap: 0.85rem;
  padding: 0.85rem;
}

.checkout-line-image {
  width: 5rem;
  height: 5rem;
}

.checkout-line-name {
  font-size: 0.9rem;
}

.checkout-line-price {
  margin-top: 0.3rem;
  font-size: 0.83rem;
}

.checkout-line-actions {
  grid-column: 2;
  justify-content: flex-start;
  gap: 0.5rem;
  border-top: 0;
  padding-top: 0.2rem;
}

.checkout-quantity-control {
  min-height: 2.15rem;
}

.checkout-quantity-button,
.checkout-quantity-input {
  height: 2.05rem;
}

.checkout-quantity-button {
  width: 2rem;
}

.checkout-quantity-input {
  width: 2.4rem;
}

.checkout-remove-button {
  min-height: 2.1rem;
}

.checkout-line-subtotal {
  grid-column: 3;
  grid-row: 1 / span 2;
  min-width: 5.5rem;
  align-self: center;
}

.checkout-subtotal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  border-top: 1px solid #eaecf0;
  padding-top: 1rem;
  color: #475467;
  font-size: 0.9rem;
}

.checkout-subtotal-value {
  color: #101828;
  font-size: 1.1rem;
  font-weight: 600;
}

.checkout-cart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.checkout-outline-link {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid #b2ddff;
  border-radius: 0.7rem;
  background: #fff;
  padding: 0.6rem 0.9rem;
  color: #175cd3;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
}

.checkout-outline-link:hover {
  background: #eff8ff;
}

.checkout-cart-empty {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1rem;
  border: 1px solid #fedf89;
  border-radius: 0.75rem;
  background: #fffaeb;
  padding: 0.8rem;
  color: #93370d;
  font-size: 0.84rem;
  line-height: 1.5;
}

.checkout-cart-empty.hidden {
  display: none;
}

.checkout-cart-empty i {
  margin-top: 0.15rem;
}

.checkout-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.checkout-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.checkout-field {
  display: grid;
  min-width: 0;
  gap: 0.4rem;
}

.checkout-field > label,
.checkout-field-label {
  color: #344054;
  font-size: 0.82rem;
  font-weight: 500;
}

.checkout-field input:not([type="file"]) {
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  border: 1px solid #d0d5dd;
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.65rem 0.75rem;
  color: #101828;
  font-size: 0.9rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.checkout-field input:not([type="file"]):focus {
  border-color: #84caff;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(4, 129, 242, 0.12);
}

.checkout-form-section {
  display: grid;
  gap: 0.65rem;
  border-top: 1px solid #eaecf0;
  padding-top: 1rem;
}

.checkout-payment-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.checkout-payment-option {
  min-height: 2.8rem;
  border: 1px solid #d0d5dd;
  border-radius: 0.7rem;
  background: #fff;
  padding: 0.6rem;
  color: #344054;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.checkout-payment-option:hover {
  border-color: #84caff;
  background: #f5faff;
}

.checkout-payment-option[aria-pressed="true"] {
  border-color: #175cd3;
  background: #eff8ff;
  color: #175cd3;
  box-shadow: inset 0 0 0 1px #175cd3;
}

.checkout-payment-detail:not(.hidden) {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.35rem;
  border: 1px solid #e4e7ec;
  border-radius: 0.75rem;
  background: #f9fafb;
  padding: 0.9rem;
  color: #344054;
  font-size: 0.85rem;
}

.checkout-qr-image {
  display: block;
  width: 10rem;
  max-width: 100%;
  margin: 0 auto;
  border: 1px solid #e4e7ec;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.4rem;
}

.checkout-file-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 2.8rem;
  border: 1px solid #d0d5dd;
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.3rem 0.4rem;
  color: #475467;
  font: inherit;
  font-size: 0.85rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.checkout-file-input::file-selector-button {
  min-height: 2.1rem;
  margin-right: 0.65rem;
  border: 0;
  border-radius: 0.4rem;
  background: #f2f4f7;
  padding: 0.45rem 0.75rem;
  color: #344054;
  font: inherit;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.checkout-file-input::file-selector-button:hover {
  background: #e4e7ec;
  color: #175cd3;
}

.checkout-file-input:focus-visible {
  border-color: #84caff;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(4, 129, 242, 0.12);
}

.checkout-submit-button {
  display: inline-flex;
  width: 100%;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #0b6fcc, #175cd3);
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 150ms ease, box-shadow 150ms ease;
}

.checkout-submit-button:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 14px rgba(23, 92, 211, 0.2);
}

.checkout-status {
  min-height: 1.1rem;
  color: #475467;
  font-size: 0.82rem;
}

.checkout-result {
  border: 1px solid #abefc6;
  border-radius: 0.85rem;
  background: #ecfdf3;
  padding: 1rem;
}

.checkout-result.hidden {
  display: none;
}

@media (max-width: 767px) {
  .cart-page-heading,
  .checkout-page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .cart-line-item {
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.85rem;
  }

  .cart-line-image {
    width: 5rem;
    height: 5rem;
  }

  .cart-line-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .cart-line-subtotal {
    margin-left: auto;
  }

  .cart-summary-card,
  .checkout-payment-card {
    position: static;
  }

  .checkout-cart-card,
  .checkout-payment-card {
    padding: 1rem;
  }

  .checkout-line-item {
    grid-template-columns: 4.25rem minmax(0, 1fr);
    gap: 0.65rem;
    padding: 0.7rem;
  }

  .checkout-line-image {
    grid-row: 1 / span 2;
    width: 4.25rem;
    height: 4.25rem;
  }

  .checkout-line-actions {
    grid-column: 1 / -1;
    grid-row: auto;
    flex-wrap: wrap;
    border-top: 1px solid #f2f4f7;
    padding-top: 0.55rem;
  }

  .checkout-line-subtotal {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    align-self: start;
  }
}

@media (max-width: 420px) {
  .checkout-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .checkout-cart-actions > * {
    flex: 1 1 100%;
  }
}

body[data-page="cuenta"] main :is(button, a),
body[data-page="productos"] main :is(button, a),
body[data-page="detalle-producto"] main :is(button, a),
body[data-page="carrito"] main :is(button, a),
body[data-page="checkout"] main :is(button, a) {
  transition-duration: 160ms;
}

body[data-page="cuenta"] main button:disabled,
body[data-page="checkout"] main button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* La tabla y las tarjetas de órdenes quedan más claras y responden al pasar el cursor. */
body[data-page="cuenta"] #recentOrdersCustomerTable {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  color: #475467;
}

body[data-page="cuenta"] #recentOrdersCustomerTableContainer[hidden] {
  display: none !important;
}

body[data-page="cuenta"] #recentOrdersCustomerTable thead th {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #eaecf0;
  background-color: #fff;
  color: #667085;
  text-transform: uppercase;
  white-space: nowrap;
}

body[data-page="cuenta"] #recentOrdersCustomerTable tbody tr {
  background-color: #fff;
  transition: background-color 150ms ease;
}

body[data-page="cuenta"] #recentOrdersCustomerTable tbody td {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #eaecf0;
  color: #475467;
  vertical-align: middle;
}

body[data-page="cuenta"] #recentOrdersCustomerTable tbody td:first-child,
body[data-page="cuenta"] #recentOrdersCustomerTable tbody td:last-child {
  color: #344054;
}

body[data-page="cuenta"] #recentOrdersCustomerTable tbody tr:last-child td {
  border-bottom: 0;
}

body[data-page="cuenta"] #recentOrdersCustomerTable tbody tr:hover {
  background-color: #f9fafb;
}

body[data-page="cuenta"] #ordersContainer > div {
  border-color: #e4e7ec;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

body[data-page="cuenta"] #ordersContainer > div:hover,
body[data-page="cuenta"] #recentOrdersCustomerCards article:hover {
  border-color: #d0d5dd;
  box-shadow: 0 4px 8px -2px rgba(16, 24, 40, 0.1);
}

/* El título y el ícono del total conservan el azul de su tarjeta. */
body[data-page="cuenta"] #ordersContainer h2 {
  color: #0472e0;
}

body[data-page="cuenta"] #recentOrdersCustomerCards article {
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

/* El inicio de sesión y el registro conservan sus colores, con bordes más suaves. */
body[data-page="cuenta"] .auth-shell {
  border-radius: 1rem;
  background: linear-gradient(135deg, #0c2544 0%, #0472e0 100%);
  box-shadow: 0 12px 24px -4px rgba(16, 24, 40, 0.12);
  font-family: "Outfit", sans-serif;
}

body[data-page="cuenta"] .auth-field input,
body[data-page="cuenta"] .auth-submit,
body[data-page="cuenta"] .auth-brand span {
  font-family: "Outfit", sans-serif;
}

body[data-page="cuenta"] .auth-form-panel {
  border-radius: 0.75rem;
}

body[data-page="cuenta"] .auth-heading h1 {
  color: #101828;
}

body[data-page="cuenta"] main .auth-aside-copy h2 {
  color: #fff;
}

body[data-page="cuenta"] .auth-field input {
  border-radius: 0.5rem;
}

body[data-page="cuenta"] .auth-field input:focus {
  border-color: #84caff;
  box-shadow: 0 0 0 3px rgba(4, 129, 242, 0.12);
}

body[data-page="cuenta"] .auth-submit {
  border-radius: 0.5rem;
  background: #0481f2;
  box-shadow: none;
  text-transform: none;
}

body[data-page="cuenta"] .auth-submit:hover {
  background: #036fd4;
  box-shadow: 0 4px 8px -2px rgba(4, 129, 242, 0.3);
}

/* En el catálogo, las tarjetas de productos se elevan suavemente al pasar el cursor. */
body[data-page="productos"] #todosSection,
body[data-page="productos"] #sectionNavCard,
body[data-page="productos"] #productsContainer,
body[data-page="productos"] #filtersCard,
body[data-page="productos"] #otherSection > div > div > div {
  border-color: #e4e7ec;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

body[data-page="productos"] .product-card {
  border-color: #e4e7ec;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

body[data-page="productos"] .product-card:hover {
  border-color: #b2ddff;
  box-shadow: 0 8px 16px -4px rgba(16, 24, 40, 0.12);
  transform: translateY(-2px);
}

body[data-page="productos"] .active-tab,
body[data-page="productos"] .subitem.active {
  color: #036fd4;
}

/* Las tarjetas del detalle de producto mantienen el mismo estilo que el resto. */
body[data-page="detalle-producto"] #productDetail .bg-white,
body[data-page="detalle-producto"] #checkoutModal .bg-white {
  border-color: #e4e7ec;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

body[data-page="detalle-producto"] #productDetail .pd-gallery-card {
  align-self: start;
  position: static;
}

/* El carrito y el resumen de compra usan tarjetas con el mismo acabado. */
body[data-page="carrito"] #cartWrap > section > div,
body[data-page="carrito"] #cartWrap > aside,
body[data-page="carrito"] #cartWrap > div {
  border-color: #e4e7ec;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

body[data-page="checkout"] main > section,
body[data-page="checkout"] main > aside {
  border-color: #e4e7ec;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

body[data-page="checkout"] .payBtn.bg-blue-600 {
  border-color: #0481f2;
  background-color: #eff8ff;
  color: #036fd4;
}

/* En tablet, el menú de la cuenta puede desplazarse de lado si no cabe. */
@media (max-width: 1023px) {
  body[data-page="cuenta"] #site-sidebar nav ul {
    justify-content: flex-start;
    justify-content: safe center;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  body[data-page="cuenta"] #site-sidebar nav li {
    flex: 0 0 auto;
  }
}

/* En móvil, el contenido ocupa el ancho disponible y conserva espacio entre secciones. */
@media (max-width: 767px) {
  body[data-page="cuenta"] #recentOrdersCustomerTableContainer {
    display: none !important;
  }

  body[data-page="cuenta"] main .wrapper > .grid > div {
    width: 100%;
    min-width: 0;
  }

  body[data-page="cuenta"] #site-sidebar > div {
    padding: 1rem;
  }

  body[data-page="cuenta"] main .wrapper {
    padding-top: 1.25rem;
    padding-bottom: 1.5rem;
  }

  body[data-page="cuenta"] #profileForm button[type="submit"] {
    margin-top: 1rem;
  }

  body[data-page="cuenta"] #ordersContainer > div {
    padding: 1rem;
  }

  body[data-page="cuenta"] .auth-layout {
    padding: 1.5rem 1rem 2rem;
  }

  body[data-page="cuenta"] .auth-shell {
    border-radius: 0.875rem;
    padding: 0.4rem;
  }

  body[data-page="cuenta"] .auth-form-panel {
    padding: 2rem 1.25rem;
  }

  body[data-page="productos"] #todosSection {
    padding: 1rem;
  }

  body[data-page="carrito"] main,
  body[data-page="checkout"] main {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  body[data-page="checkout"] main > section,
  body[data-page="checkout"] main > aside {
    padding: 1rem;
  }
}

/* Si el dispositivo pide menos movimiento, reducimos las animaciones. */
@media (prefers-reduced-motion: reduce) {
  body[data-page="cuenta"] *,
  body[data-page="productos"] *,
  body[data-page="detalle-producto"] *,
  body[data-page="carrito"] *,
  body[data-page="checkout"] * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
